#!/bin/sh #----------------------------------------------------------------------------- # /var/install/bin/vmail-modules-fetchmail start Fetchmail by hand # # Copyright (c) 2007 Jens Vehlhaber # # Creation: 2007-02-21 jv # Last Update: $Id: vmail-modules-fetchmail 6653 2007-02-21 18:54:11Z jv $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #----------------------------------------------------------------------------- #include eislib . /var/install/include/eislib #include configuration . /etc/config.d/vmail # read password vmail_sql_fetchmail_pass=`grep FTM= /etc/.vmailpass | sed "s/FTM=//g"` # define fetchmailconfig file fetchfile=".fetchmailrc.\$$" clrhome # use user vmail su vmail -c "/usr/local/postfix/fetchmysql -t /var/spool/postfix/virtual/${fetchfile} -d vmaildata -p ${vmail_sql_fetchmail_pass} ; \\ /usr/local/bin/fetchmail -t ${FETCHMAIL_TIMEOUT} -f /var/spool/postfix/virtual/${fetchfile} -s --nobounce --postmaster ${FETCHMAIL_POSTMASTER} -v ; \\ rm -f /var/spool/postfix/virtual/${fetchfile}" ### ------------------------------------------------------------------------- exit 0