|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [Plug] Problems with fetchmail and smail
|
You could automate the task with a shell script. I have one I
call getmail. It starts by cleaning up any old log files (I like
to keep mail logs) then calls fetchmail -c to see if there is any
mail waiting on the server. If there is it start fetchmail in
daemon mode. You could modify this script to start qmail after
fetchmail.
#!/bin/sh
#-------------------------------------------------------------------
#
# $HOME/bin/getmail.sh - automate common tasks involved in
# retrieving e-mail from a POP server
#
# related files: .fetchmailrc
#
#-------------------------------------------------------------------
#
# Delete old log and backup files lest they become extremely huge.
#
if [ -e $HOME/fetchmail.log ]; then
rm -f $HOME/fetchmail.log
fi
if [ -f $HOME/mail/procmail-log ]; then
rm -f $HOME/mail/procmail-log
fi
#
# If there is mail waiting start fetchmail in daemon mode.
#
if [ -e $HOME/.fetchmailrc ]; then
printf "%s\n" "Attempting connection with bellatlantic POP3 server"
fetchmail -c
rc=$?
if [ $rc -eq 0 ]; then
printf "%s\n" "Starting the fetchmail daemon"
fetchmail -d300 -v -a
else
printf "%s\n" "Ending fetchmail session"
fi
fi
I hope this works for you.
Roger Scudder
_______________________________________________
Plug maillist - Plug@lists.nothinbut.net
http://lists.nothinbut.net/mail/listinfo/plug
|