aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/getmail
diff options
context:
space:
mode:
authorRob Funk <rfunk@funknet.net>2004-06-08 03:59:01 +0000
committerRob Funk <rfunk@funknet.net>2004-06-08 03:59:01 +0000
commitd78b61e3efaea197a6e5b2b72bf2981a9ed69461 (patch)
tree1704e13ce5d767d59868a2d5e834cb2e988ed90f /contrib/getmail
parentd9e84e176fe538e110d9612f9832d69846e8d3e7 (diff)
downloadfetchmail-d78b61e3efaea197a6e5b2b72bf2981a9ed69461.tar.gz
fetchmail-d78b61e3efaea197a6e5b2b72bf2981a9ed69461.tar.bz2
fetchmail-d78b61e3efaea197a6e5b2b72bf2981a9ed69461.zip
Add files from ESR's dev directory that weren't under version control
svn path=/trunk/; revision=3881
Diffstat (limited to 'contrib/getmail')
-rwxr-xr-xcontrib/getmail73
1 files changed, 73 insertions, 0 deletions
diff --git a/contrib/getmail b/contrib/getmail
new file mode 100755
index 00000000..eec5c6fb
--- /dev/null
+++ b/contrib/getmail
@@ -0,0 +1,73 @@
+#------------------------------------------------------------------------------
+#
+# GetMail - Fetchmail Daemon Controlling Script
+#
+# 1999 by Thomas Nesges <ThomaNesges@TNT-Computer.de>
+#
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+# GetMail starts/stops fetchmail in daemon mode and logs all actions to
+# /var/log/fetchmail.log. Output is done by tailing the logfile.
+#
+# Sendmail/Fetchmail has to be installed, and your fetchmailrc has to be
+# correctly configured. The option 'got' and 'goth' require a correctly
+# installed GotMail. If you didn't install it in /usr/local/gotmail you
+# must change the path given.
+#
+# If you have any changes/corrections in the script, please send me email.
+#------------------------------------------------------------------------------
+
+#!/bin/sh
+
+case "$1" in
+ start)
+ sendmail -q
+ date +%d.%m.%Y\ %H:%M:%S\ fetchmail\ started >> /var/log/fetchmail.log
+ fetchmail -d 1 -L /var/log/fetchmail.log &
+ tail -f /var/log/fetchmail.log
+ ;;
+ stop)
+ fetchmail -q
+ date +%d.%m.%Y\ %H:%M:%S\ fetchmail\ stoped >> /var/log/fetchmail.log
+ ;;
+ fetch)
+ date +%d.%m.%Y\ %H:%M:%S\ fetchmail\ started >> /var/log/fetchmail.log
+ fetchmail -d 1 -L /var/log/fetchmail.log &
+ tail -f /var/log/fetchmail.log
+ ;;
+ status)
+ tail -f /var/log/fetchmail.log
+ ;;
+ got)
+ /usr/local/gotmail/gotmail
+ ;;
+ goth)
+ /usr/local/gotmail/gotmail html
+ ;;
+ send)
+ /sendmail -q
+ ;;
+ clear)
+ fetchmail -q
+ rm /var/log/fetchmail.log
+ ;;
+ -v)
+ echo 'getmail version: 0.0.1'
+ ;;
+ *)
+ echo
+ echo 'Usage: getmail option'
+ echo
+ echo 'options:'
+ echo ' clear - stops fetchmail and kills the logfile'
+ echo ' fetch - starts fetchmail'
+ echo ' got - starts gotmail'
+ echo ' goth - starts gotmail html'
+ echo ' send - sends all mail from the mailqueue'
+ echo ' status - tails the logfile'
+ echo ' start - starts fetchmail and tails the logfile'
+ echo ' stop - stops fetchmail'
+ echo ' -v - print the version number'
+ echo
+esac