aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
...
* Added G12 on Y2K compliance.Eric S. Raymond1999-06-071-2/+14
* Fix fetchmailconf to handle window-manager destroy notifications.Eric S. Raymond1999-05-172-2/+2
* Attempt destroy interception.Eric S. Raymond1999-05-171-0/+3
* Add qpopper 2.53 warning.Eric S. Raymond1999-05-162-1/+7
* Added cautionary note about qpopper.Eric S. Raymond1999-05-161-26/+58
* Take official noitice of RFC2449.Eric S. Raymond1999-05-162-3/+5
* Emphasize the need for the server greeting line.Eric S. Raymond1999-05-161-2/+3
* There is now a documented return code 13 for termination on fetchlimit.Eric S. Raymond1999-05-163-2/+5
* Fix a qmail \n bug.Eric S. Raymond1999-05-162-1/+2
* GIF -> XPM.Eric S. Raymond1999-05-123-2/+8
* No more changelog updates.Eric S. Raymond1999-05-111-29/+0
* Working version of Debian changelog code.Eric S. Raymond1999-05-111-3/+3
* More non-vnsprint fixes.Eric S. Raymond1999-05-101-3/+3
* Fix patch.Eric S. Raymond1999-05-101-1/+1
* Cosmetic fix.Eric S. Raymond1999-05-091-1/+1
* GIF -> PNG.Eric S. Raymond1999-05-092-4/+4
* We shipped this.Eric S. Raymond1999-05-032-2/+21
* Cast sprintf args in sink.c to expected types (to avoid problems onEric S. Raymond1999-05-031-1/+1
* Version bump.Eric S. Raymond1999-05-031-1/+1
* Correct an embarassing buffer smash.Eric S. Raymond1999-05-031-3/+5
* Correct logfile updating.Eric S. Raymond1999-04-301-3/+9
* Bug fix release.Eric S. Raymond1999-04-302-3/+4
* We now have SSL patches.Eric S. Raymond1999-04-292-2/+27
* Cleaner retry logic.Eric S. Raymond1999-04-291-8/+13
* Quieter UID code.Eric S. Raymond1999-04-261-18/+24
* Instrument the UID code.Eric S. Raymond1999-04-261-0/+38
* Another try at getting Debian changelogs right.Eric S. Raymond1999-04-261-0/+13
* retry several times to avoid getting jammed by lockbusy.Eric S. Raymond1999-04-262-2/+9
* Document new environment logic.Eric S. Raymond1999-04-252-9/+12
* Improved environment-query logic.Eric S. Raymond1999-04-251-17/+40
* Add useful comment.Eric S. Raymond1999-04-251-0/+6
* Fix typo.Eric S. Raymond1999-04-251-1/+1
* Improve fetchmail -V by moving password-gathering further forward.Eric S. Raymond1999-04-251-68/+74
* Typo fix.Eric S. Raymond1999-04-251-1/+1
* Typo fix.Eric S. Raymond1999-04-251-1/+1
* Comment aboout OpenMail.Eric S. Raymond1999-04-251-4/+5
* Add missing \n.Eric S. Raymond1999-04-251-1/+1
* Deleted -> Seen, Deleted.Eric S. Raymond1999-04-212-2/+13
* Get these bug fixes in before the Red Hat 6 freeze.Eric S. Raymond1999-04-181-2/+2
* Version bump.Eric S. Raymond1999-04-182-1/+2
* Fix site deletion.Eric S. Raymond1999-04-181-1/+3
* Enable expunge to controil POP2 and POP3 checkpointing.Eric S. Raymond1999-04-1811-79/+141
* Another update from Kent Robotti.Eric S. Raymond1999-04-171-62/+29
* Fix a transposition.Eric S. Raymond1999-04-171-2/+2
* Betrter error messages.Eric S. Raymond1999-04-171-2/+2
* Killed the segfault-13 bug.Eric S. Raymond1999-04-172-2/+3
* First round of post-5.0.0 buglets.Eric S. Raymond1999-04-074-25/+27
* Ready to ship the big one.Eric S. Raymond1999-04-051-3/+3
* Ready to ship.Eric S. Raymond1999-04-052-3/+4
* Fix address.Eric S. Raymond1999-04-051-1/+1
tention to other tasks at hand (busy, busy, busy.... ;^>). Now we only need the dropmail script, /usr/local/bin/dropmail, mode 700. It looks big, but effectively one pipeline does the real work. The rest is configuration, error checking and locking the mailbox. #!/bin/bash # # Script to force a mail message in a format that fetchmail will recognise. # use as a MDA from sendmail. Must be executed with F=S. # # # Configuration: # maildir=/var/spool/mail envelope=Delivered-To: # # set PATH to a known value to avoid some security issues # export PATH=/bin:/usr/bin # # # to=$2 user=$1 mbox=$maildir/$user # # If the mailbox does not exist, create it. Note that we act pretty paranoid, this is hopefully # resistant to symlink attacks # if [ ! -f $mbox ] then oldumask=`umask` umask 077 touch $mbox chmod 660 $mbox || exit 1 chown $user $mbox || exit 1 chgrp mail $mbox || exit 1 umask $oldumask fi # First lock the mailbox, if this doesn't succeed in 64 seconds, give up and send # mail to postmaster. # If this period is to short, increase the retries (-r flag to lockfile) # # Then run the message through formail to get it into the right mailbox format with the # right headers added. # # Delivered-To will make fetchmail propagate this mail to the correct user when # run with '-E "Delivered-To"'. Set this in the advanced settings of the TeamInternet f.i. # (if you changed the envelope at the start of this script, adapt this accordingly) # # We also muck up the messageid, so fetchmail will never skip a message on the basis of # duplicate messageIDs. The -i "Message-ID" will rename the old message ID, the -a will # add a new one. # # Lastly, we add a header indicating which host did the rewriting. # if lockfile -r 8 $mbox.lock >/dev/null 2>&1 then cat - | formail -i "$envelope <$to>" -i "Message-ID:" -a "Message-ID:" -i "X-Multidrop-Processing: <`hostname`>" >>$mbox rm -f $mbox.lock else (echo "Subject: Cannot lock mailbox for $user" & cat -) | /usr/lib/sendmail postmaster fi # # EOF # This obviously is very Linux (even RedHat?) dependant, locking mailboxes, creating mailboxes with the right permissions, probably even bash dependent. I would say that it should be fairly easy to port to other systems, but alas, my unix knowledge is lacking for that. I'll also rewrite it someday, a.o. that umask handling can be done much better and the location of the sendmail binairy should not be fixed. Now the only thing left to do is to retrieve the mail with fetchmail, using 'envelope "Delivered-To:"' in the poll line. The above script has added this line, so this is all that fetchmail needs. All parts of this solution need carefull examination. In particular I think the new rule lines may not catch all cases, although they worked for everything I threw at them and work satisfactorily in production. I'm also wondering if there is a more standard way to drop something in a mailbox. I yet have to investigate procmail, but all other MDA's mucked with the message and effectively undid my carefully added header. I'll experiment some more and rethink it all as I learn more. I'm still wondering, if I can get formail to include another received line.... "Received from localhost by dropmail for <user>...." to make it work without the envelope flag. Well I'll have to experiment. Do you know if there is a header I can add so fetchmail works out-of-the-box? Regards, Martijn Lievaart