README
1These are scripts or configuration snippets to help you running
2fetchmail in special situations.
3
4Note: you're on your own using these -- the fetchmail team undertakes no
5efforts in understanding them, they are just passing them along.
6 --esr, ma
7
8This file is currently unsorted. Use your pager's search function when
9looking for the description of a particular file in this directory. --ma
10
11### 0*.html:
12Messages from the archives of the old fetchmail-friends mailing list,
13for off-line reading.
14
15### maildaemon:
16Larry Fahnoe wrote this for driving fetchmail from cron. It may be useful if
17you want to force a PPP link up and then poll for mail at specified times.
18I have rearranged it slightly to make it easier to configure.
19
20### novell:
21
22Some mail from Dan Newcombe describing how to write a procmail rule that
23will domainify Novell server names.
24
25### login & logout:
26
27These are intended to help if you typically have multiple logins active.
28Here's the script composer's original README:
29
30 Please find attached 2 files, ~/.bash_login & ~/.bash_logout
31 What these do is try to keep track of WHO is the process/tty
32 that ran fetchmail in daemon mode. I tried to use the bash
33 Variable PPID, but when using xterm the PPID is set to the
34 xterm's pid not the bash shell's pid so....
35
36 They have been lightly tested.
37
38 Any comments...
39
40 Hth, JimL <babydr@nwrain.net>
41
42Doug Carter <dougc@canus.com> suggests this instead:
43
44Add the following to your login script. (.ie .bash_profile, .profile, etc)
45
46LOGINS=`who | grep $USER | wc -l`
47if [ $LOGINS = 1 ]; then
48 /usr/bin/fetchmail > /dev/null 2>&1
49fi
50
51Then add the following to your logout script. (.ie .bash_logout, etc)
52
53LOGINS=`who | grep $USER | wc -l`
54if [ $LOGINS = 1 ]; then
55 /usr/bin/fetchmail -q > /dev/null 2>&1
56fi
57
58### ip-up:
59
60A note from James Stevens about using fetchmail in an ip-up script without
61disabling timeouts.
62
63### runfetchmail:
64
65A shellscript front end for fetchmail that mails you various statistics on
66the downloaded mail and the state of your folders. A good example of what
67you can do with your own front end.
68
69### fetchspool:
70
71If you find that the speed of forwarding to port 25 is limited by the
72SMTP listener's speed, it may make sense to locally spool all the mail
73first and feed it to sendmail after you hang up the network link.
74This shellscript aims to do exactly that. It would be smarter to
75figure out why sendmail is slow, however.
76
77### fetchsetup:
78
79This is a shell script for creating a $HOME/.fetchmailrc file, it will ask
80you some questions and based on your answers it will create a .fetchmailrc
81file. fetchsetup is linux specific so it may not work on another operating
82system.
83
84### mailqueue.pl:
85
86This script will connect to your ISP (if not already connected),
87send any outgoing mail and retrieve any incoming mail. If this
88program made the connection, it will also break the connection
89when it is done. By Bill Adams, <bill@evil.inetarena.com>. The
90latest version is carried at <http://evil.inetarena.com/>.
91
92### redhat_rc:
93
94A fetchmail boot-time init file compatible with RedHat 5.1. It leaves
95fetchmail in background to get messages when you connect to your ISP.
96The invoked fetchmail expects to find its configuration in
97/etc/fetchmailrc, and must include the proper "interface" directive.
98
99### debian_rc:
100
101A fetchmail boot-time init file compatible with Debian. It leaves
102fetchmail in background to get messages when you connect to your ISP.
103The invoked fetchmail expects to find its configuration in
104/root/.fetchmailrc, and must include the proper "interface" directive.
105
106Matthias Andree adds: note that current Debian packages (as of January
1072007) ship with their own init files.
108
109### start_dynamic_ppp:
110
111An admittedly scratchy ip-up script that Ryan Murray wrote to cope with
112dynamic PPP addressing. Will need some customizing.
113
114 http://www.inetarena.com/~badams/linux/programs/mailqueue.pl
115
116### getfetchmail:
117
118Here's a script that gets Eric's most recent fetchmail source rpm,
119downloads it and (if the rpm's not broken) rebuilds it.
120
121With fairly simple changes it can be used to download the latest i386 rpm
122or tar.gz.
123
124Those who are addicted to having the latest of everything could filter mail
125from fetchmail announce through it and get new versions as they're
126announced. However, if we all did that, Eric's ftp server might feel a
127little stressed.
128
129The script as written works on bash 2. By John Summerfield
130<summer@os2.ami.com.au>.
131
132### zsh-completion:
133
134These commands set up command completion for fetchmail under zsh.
135Jay Kominek <jay.kominek@colorado.edu>.
136
137### getmail/gotmail:
138
139These scripts are front ends for fetchmail in daemon mode that can gather
140log statistics and generate text or HTML reports. See README.getmail for
141details. Scripts by Thomas Nesges <ThomaNesges@TNT-Computer.de>.
142
143### fetchmaildistrib:
144
145This script resolves the issue where the sysadmin polls for mail with fetchmail
146only at set intervals, but where a user wishes to see his email right
147away. The duplication in /etc/fetchmailrc and ~/.fetchmailrc files is
148automated with this script; whenever /etc/fetchmailrc is changed, this
149script is run to distribute the stuff into all user's ~/.fetchmailrc
150files.
151
152### multidrop:
153
154Martijn Lievaart's sendmail hacks to make multidrop reliable.
155
156### domino:
157
158Gustavo Chaves <gustavo@cpqd.com.br> wrote this script to deal with
159the boundary-mismatch bug in Domino (see FAQ item X5). If you use
160this with --mda, the broken boundaries will be fixed and the result
161passed to procmail.
162
163### toprocmail:
164
165John Lim Eng Hooi <jleh@mail.com> wrote this script, yet another
166mda plugin, to be used with fetchmail in foreground mode. It displays
167some header lines to stdout in color, passing them (and the rest of the
168message content) to procmail.
169
170### preauth-harness:
171
172Emmanuel Dreyfus's Perl test script for exercising IMAP PREAUTH
173connections. You'll have to patch in your username and password.
174
175### sm-hybrid:
176
177Peter 'Rattacresh' Backes sent this patch to improve the behavior of
178sendmail 8.11.0 with multidrop.
179
180### fetchmailnochda.pl
181
182Watchdog script to check whether fetchmail is working in daemon mode.
183
184### mold-remover.py
185
186A short python script to remove old read mail from a pop3 mailserver.
187Dovetails with fetchmail with keep option. Run it as a cron job.
188
189### PopDel.py
190
191PopDel stands for Pop Delete; this program deletes selected email from a
192pop mail server. (By Richard Harris, improved by Joshua Crawford.)
193
194### fetchmail.logrotate (added 2007-01-14, --ma)
195
196A logrotate configuration file developped by Daniel Leidert for Debian,
197when he wanted to use /var/log/fetchmail instead of the usual syslog.
198It probably needs to be adjusted for use on other systems.
199
200### delete-later (added 2007-03-17, --ma)
201
202A MySQL/Tcl/Expect-based client-side script to remove messages at a
203certain age. See delete-later.README for details.
204(By Carsten Ralle, Yoo GmbH, Germany.)
205
206### gai (added 2013-02-03, --ma)
207
208A trivial getaddrinfo() program to check the getaddrinfo() call from the
209system, as a research tool for the fetchmail developers.
210
README.getmail
1-------------------------------------------------------------------------------
2
3 - GetMail - GotMail -
4
5 1999 by Thomas Nesges <ThomaNesges@TNT-Computer.de>
6
7-------------------------------------------------------------------------------
8
9-------------------------------------------------------------------------------
10Installation:
11-------------------------------------------------------------------------------
12The Installation is as simple as it could be. Just create the directory
13/usr/local/gotmail and copy all files to it. Ready.
14
15If you decide to choose an other directory to copy the files to, don't forget
16to change the path in the scripts.
17
18-------------------------------------------------------------------------------
19Usage:
20-------------------------------------------------------------------------------
21GetMail starts with: getmail <option>
22
23options:
24 clear - stops fetchmail and kills the logfile
25 fetch - starts fetchmail
26 got - starts gotmail
27 goth - starts gotmail html
28 send - sends all mail from the mailqueue
29 status - tails the logfile
30 start - starts fetchmail and tails the logfile
31 stop - stops fetchmail
32 -v - prints GetMails version number
33
34GotMail can be startet without any parameters. It then prints a statistic
35on the console. The only parameters so far are:
36
37 html - prints the output to an html file specified in gotmail.conf
38 -v - prints GotMails version number
39
40-------------------------------------------------------------------------------
41Configuration
42-------------------------------------------------------------------------------
43GotMail is configured by a file named gotmail.conf either in the user's home
44dir, in /etc or in /usr/local/gotmail. gotmail.conf itself is a shell script.
45It just exports some variables to the environment. So it's syntax is like this:
46
47 export <OPTION>=<VALUE>
48
49Remember not to put spaces between <OPTION>=<VALUE> !!
50You have the folllowing options:
51
52 GOTM_ERR yes|no print error messages?
53 GOTM_MSG yes|no print mail stats?
54 GOTM_TIM yes|no print start/stop stats?
55 GOTM_HED yes|no print a header?
56
57 Special HTML options:
58 GOTM_BGCOL hex color backgroundcolor
59 GOTM_TXCOL hex color textcolor
60 GOTM_ERRCOL hex color color of error messages
61 GOTM_TIMCOL hex color color of start/stop stats
62 GOTM_MSGCOL hex color color of mail stats
63 GOTM_HTMLFILE filename filename for html output
64-------------------------------------------------------------------------------
65
README.mold_remover
delete-later.README
1******************* DELETE - LATER ********************
2
3 version 0.11 2007-02-06
4
5
6 A tool for deleting email messages on POP3 accounts
7 after a given period of time (in days)
8
9 E.g. if you want to keep the messages 30 days to
10 have webmail access while on the road
11
12********************************************************
13
14 The script queries the current contents of a POP3 mailbox,
15 stores the message IDs of that run and saves them to a
16 MySQL database.
17
18 On each run, it compares the date on which the message was
19 first seen with the current date and deletes the message,
20 if that difference is greater than the value of the column
21 "retaindays".
22
23 The script stores account settings in a separate MySQL
24 table for easy maintenance each email account needs an
25 unique ID.
26
27 The script scales well on large installations with several
28 thousands of messages a day if you run it at a time of low
29 email volume (e.g. at 4 am).
30
31
32
33REQUIREMENTS
34------------
35
36- MySQL database server and client software (v4.x or later,
37 www.mysql.com)
38
39 MySQL sources (for compiling mysqltcl only)
40
41- mysqltcl script (www.xdobry.de/mysqltcl/)
42
43- libexpect (v5 or later)
44
45
46
47INSTALLATION
48------------
49
501. create the tables "fetchmail" and "fetchmail_users" on a
51 MySQL server by running
52
53 CREATE TABLE `fetchmail` ( `UserID` BIGINT UNSIGNED NOT NULL DEFAULT 0, `UID` VARCHAR(255) NOT NULL DEFAULT '', `Fetchdate` DATE NOT NULL DEFAULT 0, PRIMARY KEY(`UserID`, `UID`));
54
55 CREATE TABLE `fetchmail_user` ( `UserID` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, `server` VARCHAR(255) NOT NULL DEFAULT '', `username` VARCHAR(63) NOT NULL DEFAULT '', `password` VARCHAR(63) NOT NULL DEFAULT '', `retaindays` INTEGER UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY(`UserID`));
56
572. Fill the table "fetchmail_users" with the settings of the
58 email accounts you wish to handle
59
603. copy the script "delete-later" to a safe place, (on
61 Linux/Unix: make it executable) and edit the first lines to
62 match your MySQL setup
63
644. run "delete-later" via cron AFTER you fetched your emails
65 with settings that keep the messages on the server (e.g. via
66 fetchmail --keep)
67
68
69
70KNOWN ISSUES
71------------
72
73The mysqltcl libraries sometimes don't compile against
74earlier versions of MySQL 4.x.
75
76If you are experiencing any problems with compiling
77mysqltcl, please look for pre-compiled binaries for your
78distribution (or contact mail@xdobry.de), the win32 binaries
79work out of the box on most M$ systems.
80
81As most linux distributions don't include mysqltcl, get the
82latest precompiled 5.x series MySQL binariesand the matching
83source code from www.mysql.com, install them onto a separate
84location and run "configure && make && make install" to
85compile mysqltcl yourself.
86
87
88
89NOTES
90-----
91
92The age of an email message is calculated by the difference
93in days between the run of "delete-later" it was first seen
94on and the current date, not the actual date the message was
95sent. So if you run the script every week, the period after
96which a message is delete may vary up to 14 days.
97
98This was implemented that way, because of the common
99practice of spammers to change the message date to some date
100in the far future to place the message first in your inbox.
101
102
103
104COPYRIGHT
105---------
106
107Copyright (c) 2007 Yoo GmbH
108 Zellwaldring 51
109 09603 GROSSVOIGTSBERG
110 GERMANY
111
112Permission to use, copy, modify, distribute, and sell this software
113and its documentation for any purpose is hereby granted without fee,
114provided that the content of this README file appears in all copies
115of the software and related documentation.
116
117
118
119DISCLAIMER
120----------
121
122THE SCRIPT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
123
124WE (YOO) HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD
125TO THIS README AND SCRIPT, INCLUDING ALL WARRANTIES AND CONDITIONS
126OF MERCHANTABILITY, WHETHER EXPRESS, IMPLIED OR STATUTORY, FITNESS
127FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT.
128
129IN NO EVENT SHALL YOO AND/OR ITS REPRESENTATIVES AND/OR RESPECTIVE
130SUPPLIERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
131DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
132OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
133TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
134PERFORMANCE OF THIS README OR SCRIPT.
135
136
137
138CONTACT
139-------
140
141For help, bug reports or other request regarding "delete-later" please
142contact Carsten Ralle (English/German) by writing an e-mail to
143
144 cr <at> i4yoo <dot> de
145
146with a subject starting with "DELETE-LATER: "
147
148Please note that messages containing HTML or images will be
149automatically deleted.
150
151
152
153********************************************************************************
154Yoo GmbH, Zellwaldring 51, D-09603 Grossvoigtsberg, Germany
155
156 www.yoogmbh.de
157********************************************************************************
158