1 #------------------------------------------------------------------------------
3 # GetMail - Fetchmail Daemon Controlling Script
5 # 1999 by Thomas Nesges <ThomaNesges@TNT-Computer.de>
7 #------------------------------------------------------------------------------
9 #------------------------------------------------------------------------------
10 # GetMail starts/stops fetchmail in daemon mode and logs all actions to
11 # /var/log/fetchmail.log. Output is done by tailing the logfile.
13 # Sendmail/Fetchmail has to be installed, and your fetchmailrc has to be
14 # correctly configured. The option 'got' and 'goth' require a correctly
15 # installed GotMail. If you didn't install it in /usr/local/gotmail you
16 # must change the path given.
18 # If you have any changes/corrections in the script, please send me email.
19 #------------------------------------------------------------------------------
26 date +%d.%m.%Y\ %H:%M:%S\ fetchmail\ started >> /var/log/fetchmail.log
27 fetchmail -d 1 -L /var/log/fetchmail.log &
28 tail -f /var/log/fetchmail.log
32 date +%d.%m.%Y\ %H:%M:%S\ fetchmail\ stoped >> /var/log/fetchmail.log
35 date +%d.%m.%Y\ %H:%M:%S\ fetchmail\ started >> /var/log/fetchmail.log
36 fetchmail -d 1 -L /var/log/fetchmail.log &
37 tail -f /var/log/fetchmail.log
40 tail -f /var/log/fetchmail.log
43 /usr/local/gotmail/gotmail
46 /usr/local/gotmail/gotmail html
53 rm /var/log/fetchmail.log
56 echo 'getmail version: 0.0.1'
60 echo 'Usage: getmail option'
63 echo ' clear - stops fetchmail and kills the logfile'
64 echo ' fetch - starts fetchmail'
65 echo ' got - starts gotmail'
66 echo ' goth - starts gotmail html'
67 echo ' send - sends all mail from the mailqueue'
68 echo ' status - tails the logfile'
69 echo ' start - starts fetchmail and tails the logfile'
70 echo ' stop - stops fetchmail'
71 echo ' -v - print the version number'