1923N/A --------------------------------------------------------
1923N/A There are many different reasons why more and more sites decide not to
1923N/A Some of the obvious advantages when storing mail in the recipient's home
1923N/A - Mail is automatically subject to the user's quota limitations.
1923N/A - Often there is more room on the home partition(s) than on that
1923N/A does the delivery. These quota limitations often do not work with the
1923N/A regular
/bin/mail since that usually writes the mailbox with root permissions
1923N/A (eluding the quota restrictions).
1923N/A defined SYSTEM_MBOX to be. Some braindamaged mail programs
1923N/A do not pick up the MAIL environment variable, these either
1923N/A accept an unlimited number of arguments.@ETCRCS_desc@
1923N/A For some advanced usage of this option you should look in the
1923N/A-section below.@LMTPOPTdesc@.SH ARGUMENTS
1923N/A+section below.@LMTPOPTdesc@
1923N/A Any arguments containing an '=' are considered to be environment variable
1923N/A+Some mailers (notably exim) do not currently accept the above syntax.
1923N/A+In such case use this instead:
1923N/A Procmail can also be invoked to postprocess an already filled system
1923N/A mailbox. This can be useful if you don't want to or can't use a
1923N/A $HOME/@DOT_FORWARD@ file (in which case the following script could
1923N/A .SS "A sample small @PROCMAILRC@:"
1923N/A Some non-optimal and non-obvious regexps set MATCH to an incorrect
1923N/A value. The regexp can be made to work by removing one or more unneeded
1923N/A-'*', '+', or '?' operator on the left-hand side of the \e/ token.
1923N/A+\&'*', '+', or '?' operator on the left-hand side of the \e/ token.
1923N/A If the regular expression contains `\fB@TO_key@\fP' it will be substituted by
1923N/A if(newvalid) /* so far, so good */
1923N/A- if(!*chp) /* no service */
1923N/A+ if(!chad||!*chp) /* no service */
1923N/A chp=BIFF_serviceport; /* new balls please! */
1923N/A if(chp!=chad) /* the service is not numeric */
1923N/A if(!csvalid||!buf) /* is comat on and set to a valid address? */
1923N/A- if(!*cslgname||strlen(cslgname)+2>linebuf) /* is $LOGNAME bogus? */
1923N/A+ if(!cslgname||!*cslgname||strlen(cslgname)+2>linebuf)/* is $LOGNAME bogus? */
1923N/A if(!(p=folder?folder:cslastf)) /* do we have a folder? */
1923N/A lputssn(buf,buffilled),ctlength-=buffilled,buffilled=lnl=0;
1923N/A ;{ int tbl=buflast,lwr='\n';
1923N/A while(--ctlength>=0&&tbl!=EOF) /* skip Content-Length: bytes */
1923N/A- lnl=lwr==tbl&&lwr=='\n',putcs(lwr=tbl),tbl=getchar();
1923N/A+ lnl=lwr==tbl&&lwr=='\n',lputcs(lwr=tbl),tbl=getchar();
1923N/A if((buflast=tbl)=='\n'&&lwr!=tbl) /* just before a line break? */
1923N/A- putcs('\n'),buflast=getchar(); /* wrap up loose end */
1923N/A+ lputcs('\n'),buflast=getchar(); /* wrap up loose end */
1923N/A- mmapfailed(len); /* don't want to continue here */
1923N/A- if((mb->p=mmap(0,len,PROT_READ,MAP_PRIVATE,mb->fd,(off_t)0))==MAP_FAILED)
1923N/A+ mmapfailed(mlen); /* don't want to continue here */
1923N/A+ if((mb->p=mmap(0,mlen,PROT_READ,MAP_PRIVATE,mb->fd,(off_t)0))==MAP_FAILED)
1923N/A mb->fd=ropen(devnull,O_RDWR,0); /* XXX Perhaps -1 is better? */
1923N/A if(unique(filename,strchr(filename,'\0'),MMAP_FILE_LEN,MMAP_PERM,0,0)&&
1923N/A (mb->fd=ropen(filename,O_RDWR,MMAP_PERM),unlink(filename),mb->fd>=0))
1923N/A- if(lseek(mb->fd,mb->filelen-1,SEEK_SET)<0||1!=rwrite(mb->fd,empty,1))
1923N/A+ if(lseek(mb->fd,len,SEEK_SET)<0||1!=rwrite(mb->fd,empty,1))
1923N/A dropf: { close(mb->fd);mb->fd= -1;
1923N/A if(verbose)nlog("Unable to extend or use tempfile");
1923N/A- { if(len>mb->filelen) /* need to extend? */
1923N/A- if(lseek(mb->fd,mb->filelen-1,SEEK_SET)<0||1!=rwrite(mb->fd,empty,1))
1923N/A+ { if(len>=mb->filelen) /* need to extend? */
1923N/A+ if(lseek(mb->fd,len,SEEK_SET)<0||1!=rwrite(mb->fd,empty,1))
1923N/A { char*p=malloc(len+1); /* can't extend, switch to malloc */
1923N/A mb->p=realloc(mb->p,len+1);
1923N/A grep 'Mlocal.*procmail' >$DEVNULL ||
1923N/A echo '#define CF_no_procmail_yet' >>$ACONF
1923N/A- echo '#define buggy_SENDMAIL' >>$ACONF
1923N/A+# echo '#define buggy_SENDMAIL' >>$ACONF
1923N/A if(tolock) /* clear temporary buffer for lockfile name */
1923N/A- for(i=maxindex(flags);i;i--) /* clear the flags */
1923N/A+ bbzero(flags,sizeof(flags)); /* clear the flags */
1923N/A { *(eq=strchr(Stdout,'\0')-1)='\0'; /* chop the '=' */
1923N/A if(!(backblock=getenv(Stdout))) /* no current value? */
1923N/A { backlen=strlen(backblock);
1923N/A rpipe(pinfd); /* main pipes setup */
1923N/A if(!(pidchild=sfork())) /* create a sending procmail */
1923N/A- backlen=strlen(backblock);
1923N/A backblock=source,backlen=len;
1923N/A childsetup();rclose(PRDI);rclose(PRDB);
1923N/A rpipe(poutfd);rclose(STDOUT);
1923N/A makeblock(&temp,Stdfilled);
1923N/A readdyn(&temp,&Stdfilled,Stdfilled+backlen+1);
1923N/A- Stdout=realloc(Stdout,&Stdfilled+1);
1923N/A+ Stdout=realloc(Stdout,Stdfilled+1);
1923N/A retStdout(Stdout,pwait&&pipw,!backblock);
1923N/A char*p; /* where it starts */
1923N/A- long len; /* currently allocated size */
1923N/A+ long len; /* current size, not including trailing NUL */
1923N/A off_t filelen; /* how long is the file */
1923N/A int fd; /* file which is mmap()ed */
1923N/A \2-@PRESERVOPT@\1and\
1.BR \2-@FROMWHOPT@ .\1");
1923N/A- ps("LMTPOPTdesc","");ps("LMTPusage","");
1923N/A+ ps("LMTPOPTdesc","");ps("LMTPusage","\1");
1923N/A pname("INIT_UMASK",0);printf("0%lo/g\n",(unsigned long)INIT_UMASK);lines--;
1923N/A pn("DEFlinebuf",DEFlinebuf);
1923N/A printf("chmod %lo %s\n",(unsigned long)(sgid|PERMIS),argv[2]);
1923N/A printf("chmod %c+w %s/.\n",chmdir==1?'g':'a',mailspooldir);
1923N/A #define ft_lock(type) ((type)>ft_MAILDIR) /* kernel lock fd */
1923N/A #define ft_atime(type) ((type)==ft_FILE) /* force atime < mtime */
1923N/A-#define ft_dotlock(type) ((type)==ft_FILE) /* dotlock $DEFAULT */
1923N/A+#define ft_dotlock(type) ((type)>ft_MAILDIR) /* dotlock $DEFAULT */
1923N/A #define ft_delim(type) ((type)==ft_FILE) /* add MMDF delim */
1923N/A #define ft_checkcloser(type) ((type)>ft_MH)
1923N/A #define ft_forceblank(type) ((type)!=ft_MAILDIR) /* force blank line at end */
1923N/A else if(rhead) /* only read in a new header */
1923N/A- dfilled=mailread=0;makeblock(&new,0);readdyn(&new,&dfilled,0);
1923N/A+ dfilled=mailread=0;makeblock(&new,0);
1923N/A if(tobesent>dfilled&&isprivate) /* put it in place here */
1923N/A or if that doesn't work, try:
1923N/A on such systems, do a "man mail".
1923N/A If all of this doesn't work, procmail can be called on a periodical
1923N/A procmail with both the fcntl() and lockf() locking method
1923N/A from procmail. What do I do about it?
1923N/A The problem here is that as long as procmail has not read a
1923N/A $HOME/.procmailrc file, it can hang on to the sgid mail permission
1923N/A I.e. if procmail delivers mail to a user without a $HOME/.procmailrc
1923N/A If, however, it finds a $HOME/.procmailrc file, procmail has to let go
1923N/A of the sgid mail permission because otherwise any ordinary user could
1923N/A There are several solutions to this problem:
1923N/A - Some systems support the sticky bit on directories (when set only
1923N/A allows the owner of a file in that directory to rename or remove
1923N/A thus effectively world writable, but all the mailboxes in it are
1923N/A protected because only the mailbox owner can remove or rename it.
1923N/A - If your system did not exhibit the !@#$%^&* POSIX semantics for
1923N/A your home directory as your default mailbox.
1923N/A simply instruct procmail to use a different lockfile. This can
1923N/A be achieved by putting following recipe at the bottom of
1923N/A # -lresolv # not really needed, is it?
1923N/A # Informal list of directories where we look for the libraries in SEARCHLIBS
1923N/A GCC_WARNINGS = -O2 -pedantic -Wreturn-type -Wunused -Wformat -Wtraditional \
1923N/A -Wpointer-arith -Wconversion -Waggregate-return \
1923N/A+procmail (3.22-8) unstable; urgency=low
1923N/A+ * Fixed strange formail -l behaviour when there is a Content-Length: header.
1923N/A+ Thanks a lot to Henning Makholm for the patch (Closes: #217853).
1923N/A+ -- Santiago Vila <sanvila@debian.org> Mon, 3 Nov 2003 20:01:24 +0100
1923N/A+procmail (3.22-7) unstable; urgency=low
1923N/A+ * Fixed bad nroff syntax in procmailrc(5), closes: #147173.
1923N/A+ * Added missing newline in procmail(1), closes: #180477.
1923N/A+ -- Santiago Vila <sanvila@debian.org> Mon, 10 Mar 2003 00:09:20 +0100
1923N/A+procmail (3.22-6) unstable; urgency=low
1923N/A+ * Standards-Version: 3.5.8.
1923N/A+ -- Santiago Vila <sanvila@debian.org> Thu, 26 Dec 2002 18:27:08 +0100
1923N/A+procmail (3.22-5) stable; urgency=medium
1923N/A+ * Patched
pipes.c to fix a memory allocation bug (Closes: #171514).
1923N/A+ -- Santiago Vila <sanvila@debian.org> Thu, 26 Dec 2002 18:09:38 +0100
1923N/A+procmail (3.22-4) unstable; urgency=low
1923N/A+ * Fixed a typo in procmail(1). Patch by the author (Closes: #142983).
1923N/A+ -- Santiago Vila <sanvila@debian.org> Tue, 16 Apr 2002 19:16:20 +0200
1923N/A+procmail (3.22-3) unstable; urgency=medium
1923N/A+ cleared properly. Thanks to Gregory Stark (Closes: #134341).
1923N/A+ -- Santiago Vila <sanvila@debian.org> Sun, 17 Feb 2002 16:43:02 +0100
1923N/A+procmail (3.22-2) unstable; urgency=medium
1923N/A+ -- Santiago Vila <sanvila@debian.org> Thu, 29 Nov 2001 09:39:04 +0100
1923N/A+procmail (3.22-1) unstable; urgency=low
1923N/A+ * New upstream release, which uses the `standard' format for Maildir
1923N/A+ filenames and retries on name collision. It also contains some
1923N/A+ bug fixes from the 3.23pre snapshot dated 2001-09-13.
1923N/A+ * Removed `sendmail' from the Recommends field, since we already
1923N/A+ have `exim' (the default Debian MTA) and `mail-transport-agent'.
1923N/A+ * Removed suidmanager support. Conflicts: suidmanager (<< 0.50).
1923N/A+ * Added support for DEB_BUILD_OPTIONS in the source package.
1923N/A+ since it's wrong to do so in this case.
1923N/A+ -- Santiago Vila <sanvila@debian.org> Wed, 21 Nov 2001 09:40:20 +0100
1923N/A+procmail (3.15.2-1) stable; urgency=high
1923N/A+ * New upstream release, with improved security and robustness involving
1923N/A+ signal handlers. Author recommends upgrading to this version on
1923N/A+ any system where it is installed setuid or setgid.
1923N/A+ * This release fixes also Bug #108417: procmail -p -m resets PATH.
1923N/A+ -- Santiago Vila <sanvila@debian.org> Thu, 30 Aug 2001 20:05:06 +0200
1923N/A+procmail (3.15.1-4) unstable; urgency=low
1923N/A+ * Don't add an extra newline when delivering to a Maildir folder.
1923N/A+ Please note that the MTA may still add a newline on their own.
1923N/A+ Exim users should check the `suffix' variable, for example.
1923N/A+ Patch by the author. Closes: #78623.
1923N/A+ -- Santiago Vila <sanvila@debian.org> Sat, 14 Apr 2001 17:18:29 +0200
1923N/A+procmail (3.15.1-3) unstable; urgency=low
1923N/A+ * Clarified formail -X behaviour, patch by the author (Closes: #77388).
1923N/A+ -- Santiago Vila <sanvila@debian.org> Sun, 25 Mar 2001 10:45:56 +0200
1923N/A+procmail (3.15.1-2) unstable; urgency=low
1923N/A+ * Fixed lockfile -l endless loop (Closes: #82006). Patch by the author.
1923N/A+ -- Santiago Vila <sanvila@debian.org> Sun, 28 Jan 2001 19:44:49 +0100
1923N/A+procmail (3.15.1-1) unstable; urgency=low
1923N/A+ * New upstream release. A race to create the mailspool would bounce one of
1923N/A+ the messages due to an internal error.
1923N/A+ -- Santiago Vila <sanvila@debian.org> Mon, 8 Jan 2001 20:09:34 +0100
1923N/A+procmail (3.15-3) unstable; urgency=low
1923N/A+ * Fixed formatting error in procmailrc(5). Patch by the author.
1923N/A+ -- Santiago Vila <sanvila@debian.org> Sun, 31 Dec 2000 17:20:47 +0100
1923N/A+procmail (3.15-2) unstable; urgency=low
1923N/A+ * formail -l is now documented. Patch by the author (Closes: #72275).
1923N/A+ -- Santiago Vila <sanvila@debian.org> Fri, 1 Dec 2000 19:54:22 +0100
1923N/A+procmail (3.15-1) unstable; urgency=low
1923N/A+ * New upstream release. Maildir support is now built-in.
1923N/A+ * Modified the note in QuickStart about refiltering an old mail folder.
1923N/A+ locking policy, following a hint by the author.
1923N/A+ * Removed (versioned) dependency on debianutils, since mailstat
1923N/A+ does not use temporary files anymore.
1923N/A+ * Made the .forward example in procmail(1) not to depend on the build
1923N/A+ -- Santiago Vila <sanvila@debian.org> Mon, 28 Aug 2000 12:51:05 +0200
1923N/A+procmail (3.13.1-4) stable; urgency=high
1923N/A+ * Fixed weird formail -rk behavior (patch from the author, backported
1923N/A+ from procmail-3.15). Thanks to Ben Collins for the report.
1923N/A+ -- Santiago Vila <sanvila@debian.org> Tue, 22 Aug 2000 13:04:50 +0200
1923N/A+procmail (3.13.1-3) unstable; urgency=medium
1923N/A+ * Standards-Version: 3.1.1
1923N/A+ * Updated location of licenses in copyright file.
1923N/A+ * LOCKINGTEST=100 again, to use fcntl() and dot-locking, as required by
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Wed, 1 Dec 1999 12:37:35 +0100
1923N/A+procmail (3.13.1-2) unstable; urgency=low
1923N/A+ * Modified procmail(1) and QuickStart to reflect the fact that exim does
1923N/A+ not accept the exec keyword in .forward files (Bugs #33460 and #37771).
1923N/A+ * Modified formail to recognize exim's Envelope-To: header (Bug#40718).
1923N/A+ * Standards-Version: 3.0.0.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Mon, 19 Jul 1999 20:09:25 +0200
1923N/A+procmail (3.13.1-1) stable unstable; urgency=high
1923N/A+ * New upstream release, 3.13 missed a couple possible overflows.
1923N/A+ no directory delivery mechanism requires locking (Bug #35210).
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Thu, 8 Apr 1999 13:56:33 +0200
1923N/A+procmail (3.13-1) stable unstable; urgency=high
1923N/A+ * New upstream release. procmail 3.12 breaks smartlist (Bug #35115).
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Fri, 2 Apr 1999 14:24:24 +0200
1923N/A+procmail (3.12-1) frozen unstable; urgency=high
1923N/A+ * New upstream release. Fixes some security bugs.
1923N/A+ * #define GROUP_PER_USER in
config.h to allow writeable rcfiles when
1923N/A+ the group is the user's default group.
1923N/A+ * Added KNOWN_BUGS to the doc directory.
1923N/A+ * suid procmail to avoid non-suidness window when upgrading.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Thu, 4 Mar 1999 10:28:28 +0100
1923N/A+procmail (3.10.7-7) frozen unstable; urgency=medium
1923N/A+ * New Maildir patches from Bruce Guenter.
1923N/A+ Should fix Bug #30320: procmail: maildir does not use From_ lines.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Thu, 31 Dec 1998 13:27:20 +0100
1923N/A+procmail (3.10.7-6) frozen unstable; urgency=medium
1923N/A+ delivering to MH folders (patch by the author).
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Wed, 13 May 1998 21:50:19 +0200
1923N/A+procmail (3.10.7-5) frozen unstable; urgency=medium
1923N/A+ * Added a patch for Maildir support. The "new" procmail should be
1923N/A+ completely backwards compatible with the "previous" one, in the
1923N/A+ sense that its behaviour should be just the same for already
1923N/A+ existing .procmailrc files which do not use the new syntax for
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Mon, 4 May 1998 19:39:55 +0200
1923N/A+procmail (3.10.7-4) frozen unstable; urgency=low
1923N/A+ * Added a small note in QuickStart about refiltering an old mail folder.
1923N/A+ * mailstat(1): The log file is truncated to zero length (Bug #21022).
1923N/A+ * Standards-Version: 2.4.1.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Fri, 17 Apr 1998 18:00:14 +0200
1923N/A+procmail (3.10.7-3) frozen unstable; urgency=medium
1923N/A+ touched. This will allow the package to be built using fakeroot.
1923N/A+ * Patched mailstat so that it uses tempfile.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Tue, 24 Mar 1998 21:43:08 +0100
1923N/A+procmail (3.10.7-2) unstable; urgency=low
1923N/A+ * Added "fetchmail" to the Recommends: line as one more option.
1923N/A+ * Removed debstd dependency.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Sat, 31 Jan 1998 20:30:06 +0100
1923N/A+procmail (3.10.7-1) unstable; urgency=low
1923N/A+ * Upgraded to 3.11pre7. Sources are now GPLed, hurrah!
1923N/A+ * Added explicit SEARCHLIBS, to avoid unneeded dependency on libdl.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Wed, 18 Jun 1997 20:43:28 +0200
1923N/A+procmail (3.10.4-2) frozen unstable; urgency=low
1923N/A+ * Rebuilt using latest debmake to avoid a problem with suidmanager.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Sat, 17 May 1997 20:52:59 +0200
1923N/A+procmail (3.10.4-1) frozen unstable; urgency=low
1923N/A+ * Upgraded to 3.11pre4. Side effect: It can be built using libc6.
1923N/A+ * Removed NFS_ATIME_HACK patch, since it is no longer needed.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Sat, 12 Apr 1997 19:06:46 +0200
1923N/A+procmail (3.10-8) unstable; urgency=low
1923N/A+ * Rewritten copyright file.
1923N/A+ * initmake unmodified (source).
1923N/A+ * Patched to recognize NFS_ATIME_HACK variable in .procmailrc or
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Sun, 23 Mar 1997 12:04:34 +0100
1923N/A+procmail (3.10-7) unstable; urgency=low
1923N/A+ * Removed fix-substvars script, since it's no longer needed with
1923N/A+ * Man page for mailstat changed slightly.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Fri, 21 Feb 1997 20:53:30 +0100
1923N/A+procmail (3.10-6) unstable; urgency=low
1923N/A+ * Removed also `dirname' (which was "for the deprived").
1923N/A+ * Added `fix-substvars' script to depend on libc5 >= 5.4.0.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Mon, 23 Dec 1996 16:34:02 +0100
1923N/A+procmail (3.10-5) unstable; urgency=low
1923N/A+ * Updated to Standards-Version 2.1.2.2.
1923N/A+ * Changed "Depends: MTA" to "Recommends: MTA".
1923N/A+ * Added extended package description in control file.
1923N/A+ * Added an "experimental" man page for mailstat.
1923N/A+ -- Santiago Vila <sanvila@ctv.es> Sat, 21 Dec 1996 23:32:11 +0100
1923N/A+Maintainer: Santiago Vila <sanvila@debian.org>
1923N/A+Conflicts: suidmanager (<< 0.50)
1923N/A+Recommends: exim | mail-transport-agent | fetchmail
1923N/A+Description: Versatile e-mail processor
1923N/A+ Can be used to create mail-servers, mailing lists, sort your incoming
1923N/A+ or more mailing lists or for prioritising your mail), preprocess your
1923N/A+ mail, start any programs upon mail arrival (
e.g. to generate different
1923N/A+ chimes on your workstation for different types of mail) or selectively
1923N/A+ forward certain incoming mail automatically to someone.
1923N/A+This is the Debian prepackaged version of the "procmail" mail-processing
1923N/A+program written by Stephen van den Berg.
1923N/A+This package is currently maintained by Santiago Vila <sanvila@debian.org>.
1923N/A+The source for this release was downloaded from:
1923N/A+This package was first put together by Bruce Perens <bruce@hams.com>,
1923N/A+who added Debian package maintenance system files, and edited
config.h 1923N/A+Procmail & formail mail processing package.
1923N/A+Copyright (c) 1990-1999,
S.R. van den Berg, The Netherlands.
1923N/A+Copyright (c) 1999-2001, Philip Guenther, The United States of America
1923N/A+This package is open source software; you can redistribute it
and/or 1923N/A+modify it under the terms of either:
1923N/A+- the GNU General Public License as published by the Free Software Foundation
1923N/A+ and can be found in the included file called "COPYING"; either version 2,
1923N/A+ or (at your option) any later version, or
1923N/A+- the "Artistic License" which can be found in the included file called
1923N/A+This package is distributed in the hope that it will be useful, but without
1923N/A+any warranty; without even the implied warranty of merchantability or fitness
1923N/A+for a particular purpose. See either the GNU General Public License or the
1923N/A+Artistic License for more details.
1923N/A+For those of you that choose to use the GNU General Public License,
1923N/A+my interpretation of the GNU General Public License is that no procmailrc
1923N/A+script falls under the terms of the GPL unless you explicitly put
1923N/A+said script under the terms of the GPL yourself.
1923N/A+On Debian systems, the complete text of the GNU General Public License
1923N/A+text of the "Artistic License" can be found in
1923N/A+mailstat \- shows mail-arrival statistics
1923N/A+parses a procmail-generated $LOGFILE and displays
1923N/A+a summary about the messages delivered to all folders
1923N/A+(total size, average size, nr of messages).
1923N/A+The $LOGFILE is truncated to zero length, unless the
1923N/A+Exit code 0 if mail arrived, 1 if no mail arrived.
1923N/A+merge any errors into one line
1923N/A+Customise to your heart's content, this program is only provided as a
1923N/A+This manual page was written by Santiago Vila <sanvila@debian.org>
1923N/A+* procmail is not an `interactive' program. It has to run automatically
1923N/A+when the mail arrives. Therefore the first thing to do is to tell our MTA
1923N/A+that we want procmail to "eat" all our mail messages. The way of doing
1923N/A+this depends on the MTA we are using. For example, if we are using
1923N/A+sendmail, it will suffice to have a .forward file like this in our home
1923N/A+(don't forget the quotes, they are needed in this case).
1923N/A+If you are using exim, use this instead as your .forward file:
1923N/A+The step of creating a .forward file is not needed if the MTA already
1923N/A+performs the delivery using procmail. For example, Debian sendmail will
1923N/A+* If we have a stand-alone system with no permanent net connection (like
1923N/A+PPP), and we are using fetchmail to get mail from a server, we don't
1923N/A+really need a MTA. Just adding --mda "formail -s procmail" to the
1923N/A+fetchmail command line (or using the `mda' keyword) will tell it to
1923N/A+* Next, we have to write a ~/.procmailrc file in our home directory. This
1923N/A+file is a set of filtering rules, based on regular expressions. The
1923N/A+complete syntax is explained in procmailrc(5). Let's see a real example
1923N/A+just to get started. Let's suppose you are subscribed to the following two
1923N/A+linux-kernel@vger.kernel.org
1923N/A+debian-user@lists.debian.org
1923N/A+The first list is managed by Majordomo. Messages coming from a Majordomo
1923N/A+list often include a header field "Sender: " which allow easy filtering.
1923N/A+The second list is managed my SmartList. Messages coming from a SmartList
1923N/A+list may include several headers that can be used to filter it. One of
1923N/A+them (in fact, the only that it is not X-whatever) is "Resent-Sender: ".
1923N/A+So the following .procmailrc will first filter the mailing lists, and
1923N/A+any remaining message will go to the default folder:
1923N/A+*--------------------------------->8------------------------------------
1923N/A+* ^Sender:.*linux-kernel-owner@vger.kernel.org
1923N/A+* ^Resent-Sender:.*debian-user-request@lists.debian.org
1923N/A+*--------------------------------->8------------------------------------
1923N/A+From this example additional rules for mailing lists may be created
1923N/A+* Once you have received lots of messages you will want to know where
1923N/A+did they go. That's what the LOGFILE is for. There is a tool named
1923N/A+mailstat which parses this file and shows a summary:
1923N/A+The mailstat command that this package provides does really come from the
1923N/A+examples directory and it is installed by default. You may have your own
1923N/A+If you have to refilter an old mail folder according to your current
1923N/A+~/.procmailrc file, you may do the following:
1923N/A+cat mbox | formail -s procmail
1923N/A+But of course if your mbox file is the target of a procmail recipe you should
1923N/A+cat whatever | formail -s procmail
1923N/A+See formail(1) for details.
1923N/A+Santiago Vila <sanvila@debian.org>
1923N/A+This version of procmail supports Maildir folders.
1923N/A+To make procmail to deliver into a Maildir folder, just append
1923N/A+a slash (/) to the name of the maildir folder in your ~/.procmailrc file.
1923N/A+For example, the following rule:
1923N/A+* ^Resent-Sender.*debian-user-request@lists.debian.org
1923N/A+will deliver all mail from the debian-user mailing list to the Maildir
1923N/A+ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
1923N/A+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
1923N/A+ STRIP = strip --remove-section=.comment --remove-section=.note
1923N/A+ $(MAKE) CC="$(CC)" CFLAGS0="$(CFLAGS0)" LDFLAGS0="$(LDFLAGS0)" \
1923N/A+ SEARCHLIBS="$(SEARCHLIBS)"
1923N/A+ -$(MAKE) realclean SEARCHLIBS=""
1923N/A+binary-indep: checkroot build
1923N/A+binary-arch: checkroot build
1923N/A+ cp -p FEATURES HISTORY README FAQ KNOWN_BUGS \
1923N/A+ cp -p examples/* $(docdir)/examples
1923N/A+binary: binary-indep binary-arch
1923N/A+.PHONY: binary binary-arch binary-indep clean checkroot