debian/0000775000000000000000000000000013203554770007176 5ustar debian/control0000664000000000000000000000146612402066075010604 0ustar Source: procmail Section: mail Priority: standard Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Santiago Vila Standards-Version: 3.9.4 Homepage: http://www.procmail.org/ Package: procmail Architecture: any Depends: ${shlibs:Depends} Recommends: default-mta | mail-transport-agent | fetchmail Description: Versatile e-mail processor Can be used to create mail-servers, mailing lists, sort your incoming mail into separate folders/files (very convenient when subscribing to one or more mailing lists or for prioritising your mail), preprocess your mail, start any programs upon mail arrival (e.g. to generate different chimes on your workstation for different types of mail) or selectively forward certain incoming mail automatically to someone. debian/changelog0000664000000000000000000003710513203554770011056 0ustar procmail (3.22-21ubuntu0.2) trusty-security; urgency=medium * SECURITY UPDATE: buffer overflow in the loadbuf function - debian/patches/30: make sure buffer is big enough in src/formisc.c. - CVE-2017-16844 -- Marc Deslauriers Fri, 17 Nov 2017 07:45:44 -0500 procmail (3.22-21ubuntu0.1) trusty-security; urgency=medium * SECURITY UPDATE: heap overflow in formail via malformed from header - debian/patches/CVE-2014-3618.patch: handle unbalanced quotes in src/formisc.c. - CVE-2014-3618 -- Marc Deslauriers Thu, 04 Sep 2014 09:40:05 -0400 procmail (3.22-21) unstable; urgency=low * debian/patches: Try to correlate patches with bugs and Debian releases. * Really adopt remaining changes from procmail 3.23pre. No code changes here, just some documentation and RCS Id strings. As a result, this release now identifies itself as 3.23pre which is a lot closer to reality. * Removed obsolete Conflicts: suidmanager. -- Santiago Vila Tue, 15 Oct 2013 19:30:30 +0200 procmail (3.22-20) unstable; urgency=low * Added recommended targets build-arch and build-indep. * Build with hardening flags. Closes: #674658. * Added homepage control field. * Added lintian overrides. -- Santiago Vila Wed, 06 Jun 2012 23:05:24 +0200 procmail (3.22-19) unstable; urgency=low * Adopted remaining code changes from procmail 3.23pre. * Changed MTA recommends to "default-mta | mail-transport-agent". * Changed mailstat to use [:alnum:] instead of 0-9A-Za-z. Thanks to Juhan Kundla. Closes: #337048. * Document that the repetition operator is not supported. Thanks to Justin Pryzby. Closes: #452723. * Switch to 3.0 (quilt) source format, 27 patches. -- Santiago Vila Mon, 26 Apr 2010 00:23:26 +0200 procmail (3.22-18) unstable; urgency=low * Renamed function 'getline' to 'procmail_getline' to avoid namespace clash with modern POSIX. Fixes FTBFS with gcc 4.4. Closes: #549426. Patch from Ubuntu. Thanks a lot. -- Santiago Vila Wed, 21 Oct 2009 23:00:22 +0200 procmail (3.22-17) unstable; urgency=medium * Changed mailfold.c to fix off-by-one malloc error in writefolder() which made procmail to crash. Closes: #474298, #484352. * Do not ignore errors from make realclean. * Cleanup of debian/rules. -- Santiago Vila Thu, 3 Sep 2009 14:42:44 +0200 procmail (3.22-16) unstable; urgency=low * Changed formisc.c so that formail -n actually works (Closes: #151627). * Changed procmailex(5) so that it points to the examples directory in the Debian binary package, not the source (Closes: #355472). * Modified description to not use "real" as an adverb (Closes: #356828). -- Santiago Vila Sun, 30 Apr 2006 19:20:02 +0200 procmail (3.22-15) unstable; urgency=low * Use config.h to override things in autoconf.h that might not be detected by autoconf correctly. This undefines NO_COMSAT and gives proper values for UDP_protocolno and BIFF_serviceport (will hopefully fix Bug#348667). -- Santiago Vila Fri, 3 Feb 2006 00:09:08 +0100 procmail (3.22-14) unstable; urgency=low * Hardcode 127.0.0.1 as the address for localhost in config.h. The COMSAT variable should work again (Closes: #348667). -- Santiago Vila Wed, 18 Jan 2006 19:11:16 +0100 procmail (3.22-13) unstable; urgency=low * Make autoconf.h without cflags, then make everything else as usual. This should fix a build problem on s390, where strcspn is a macro. Thanks to Bastian Blank. Closes: #347563. -- Santiago Vila Thu, 12 Jan 2006 19:09:44 +0100 procmail (3.22-12) unstable; urgency=low * Removed references to binmail(1) from all manpages (Closes: #300894). * Removed PATH line from example .procmailrc (Closes: #334293). -- Santiago Vila Sat, 7 Jan 2006 17:47:30 +0100 procmail (3.22-11) unstable; urgency=low * Added Large File Support, using the output of "getconf LFS_CFLAGS". This will add -D_FILE_OFFSET_BITS=64 when the architecture needs it, and only when the architecture needs it (Closes: #236685). * Headers User-Agent: and NNTP-Posting-Date: are now recognized by formail when splitting messages (Closes: #295604). -- Santiago Vila Tue, 1 Mar 2005 16:35:56 +0100 procmail (3.22-10) unstable; urgency=low * Modified autoconf to hardcode 127.0.0.1 as the address for localhost, instead of taking the value from the machine on which the package is being built. Reported by Stephen Frost. Closes: #283529. -- Santiago Vila Thu, 2 Dec 2004 19:46:16 +0100 procmail (3.22-9) unstable; urgency=low * Changed Recommends: exim to exim4, since that's the default MTA package in sarge (Closes: #228572). -- Santiago Vila Tue, 20 Jan 2004 18:07:10 +0100 procmail (3.22-8) unstable; urgency=low * Fixed strange formail -l behaviour when there is a Content-Length: header. Thanks a lot to Henning Makholm for the patch (Closes: #217853). -- Santiago Vila Mon, 3 Nov 2003 20:01:24 +0100 procmail (3.22-7) unstable; urgency=low * Fixed bad nroff syntax in procmailrc(5), closes: #147173. * Added missing newline in procmail(1), closes: #180477. -- Santiago Vila Mon, 10 Mar 2003 00:09:20 +0100 procmail (3.22-6) unstable; urgency=low * Standards-Version: 3.5.8. -- Santiago Vila Thu, 26 Dec 2002 18:27:08 +0100 procmail (3.22-5) stable; urgency=medium * Patched pipes.c to fix a memory allocation bug (Closes: #171514). -- Santiago Vila Thu, 26 Dec 2002 18:09:38 +0100 procmail (3.22-4) unstable; urgency=low * Fixed a typo in procmail(1). Patch by the author (Closes: #142983). -- Santiago Vila Tue, 16 Apr 2002 19:16:20 +0200 procmail (3.22-3) unstable; urgency=medium * Fixed off-by-one bug in procmail.c which made the raw flag not to be cleared properly. Thanks to Gregory Stark (Closes: #134341). -- Santiago Vila Sun, 17 Feb 2002 16:43:02 +0100 procmail (3.22-2) unstable; urgency=medium * Modified mailfold.c to fix a segfault problem. Patch by the author. * The system-wide mail directory is /var/mail as per policy. -- Santiago Vila Thu, 29 Nov 2001 09:39:04 +0100 procmail (3.22-1) unstable; urgency=low * New upstream release, which uses the `standard' format for Maildir filenames and retries on name collision. It also contains some bug fixes from the 3.23pre snapshot dated 2001-09-13. * Removed `sendmail' from the Recommends field, since we already have `exim' (the default Debian MTA) and `mail-transport-agent'. * Removed suidmanager support. Conflicts: suidmanager (<< 0.50). * Added support for DEB_BUILD_OPTIONS in the source package. * README.Maildir: Do not use locking on the example recipe, since it's wrong to do so in this case. -- Santiago Vila Wed, 21 Nov 2001 09:40:20 +0100 procmail (3.15.2-1) stable; urgency=high * New upstream release, with improved security and robustness involving signal handlers. Author recommends upgrading to this version on any system where it is installed setuid or setgid. * This release fixes also Bug #108417: procmail -p -m resets PATH. -- Santiago Vila Thu, 30 Aug 2001 20:05:06 +0200 procmail (3.15.1-4) unstable; urgency=low * Don't add an extra newline when delivering to a Maildir folder. Please note that the MTA may still add a newline on their own. Exim users should check the `suffix' variable, for example. Patch by the author. Closes: #78623. -- Santiago Vila Sat, 14 Apr 2001 17:18:29 +0200 procmail (3.15.1-3) unstable; urgency=low * Clarified formail -X behaviour, patch by the author (Closes: #77388). * Updated QuickStart. -- Santiago Vila Sun, 25 Mar 2001 10:45:56 +0200 procmail (3.15.1-2) unstable; urgency=low * Fixed lockfile -l endless loop (Closes: #82006). Patch by the author. -- Santiago Vila Sun, 28 Jan 2001 19:44:49 +0100 procmail (3.15.1-1) unstable; urgency=low * New upstream release. A race to create the mailspool would bounce one of the messages due to an internal error. -- Santiago Vila Mon, 8 Jan 2001 20:09:34 +0100 procmail (3.15-3) unstable; urgency=low * Fixed formatting error in procmailrc(5). Patch by the author. (Closes: #80437). -- Santiago Vila Sun, 31 Dec 2000 17:20:47 +0100 procmail (3.15-2) unstable; urgency=low * formail -l is now documented. Patch by the author (Closes: #72275). -- Santiago Vila Fri, 1 Dec 2000 19:54:22 +0100 procmail (3.15-1) unstable; urgency=low * New upstream release. Maildir support is now built-in. * Really change default PATH to "$HOME/bin:/usr/local/bin:/usr/bin:/bin". * Modified the note in QuickStart about refiltering an old mail folder. * Use SEARCHLIBS="" in debian/rules clean target to speed it up. * Modified ft_dotlock in src/foldinfo.h to be in compliance with locking policy, following a hint by the author. * Removed (versioned) dependency on debianutils, since mailstat does not use temporary files anymore. * Made the .forward example in procmail(1) not to depend on the build environment by modifying src/autoconf so that buggy_SENDMAIL is never defined. -- Santiago Vila Mon, 28 Aug 2000 12:51:05 +0200 procmail (3.13.1-4) stable; urgency=high * Fixed weird formail -rk behavior (patch from the author, backported from procmail-3.15). Thanks to Ben Collins for the report. * s/smail/exim/ in `Recommends:' field. -- Santiago Vila Tue, 22 Aug 2000 13:04:50 +0200 procmail (3.13.1-3) unstable; urgency=medium * Standards-Version: 3.1.1 * Updated location of licenses in copyright file. * LOCKINGTEST=100 again, to use fcntl() and dot-locking, as required by latest policy. -- Santiago Vila Wed, 1 Dec 1999 12:37:35 +0100 procmail (3.13.1-2) unstable; urgency=low * Modified procmail(1) and QuickStart to reflect the fact that exim does not accept the exec keyword in .forward files (Bugs #33460 and #37771). * Modified formail to recognize exim's Envelope-To: header (Bug#40718). Patch by Philip Guenther. * Standards-Version: 3.0.0. -- Santiago Vila Mon, 19 Jul 1999 20:09:25 +0200 procmail (3.13.1-1) stable unstable; urgency=high * New upstream release, 3.13 missed a couple possible overflows. * Applied `procmail-locking.patch' from Bruce Guenter, since no directory delivery mechanism requires locking (Bug #35210). -- Santiago Vila Thu, 8 Apr 1999 13:56:33 +0200 procmail (3.13-1) stable unstable; urgency=high * New upstream release. procmail 3.12 breaks smartlist (Bug #35115). -- Santiago Vila Fri, 2 Apr 1999 14:24:24 +0200 procmail (3.12-1) frozen unstable; urgency=high * New upstream release. Fixes some security bugs. * #define GROUP_PER_USER in config.h to allow writeable rcfiles when the group is the user's default group. * Added KNOWN_BUGS to the doc directory. * suid procmail to avoid non-suidness window when upgrading. -- Santiago Vila Thu, 4 Mar 1999 10:28:28 +0100 procmail (3.10.7-7) frozen unstable; urgency=medium * New Maildir patches from Bruce Guenter. Should fix Bug #30320: procmail: maildir does not use From_ lines. -- Santiago Vila Thu, 31 Dec 1998 13:27:20 +0100 procmail (3.10.7-6) frozen unstable; urgency=medium * Patched mailfold.c to avoid the unnecessary one second wait when delivering to MH folders (patch by the author). * src/locking.c: Applied a bugfix patch from the author. -- Santiago Vila Wed, 13 May 1998 21:50:19 +0200 procmail (3.10.7-5) frozen unstable; urgency=medium * Added a patch for Maildir support. The "new" procmail should be completely backwards compatible with the "previous" one, in the sense that its behaviour should be just the same for already existing .procmailrc files which do not use the new syntax for Maildir folders. * Added a small README.Maildir explaining how to use this feature. -- Santiago Vila Mon, 4 May 1998 19:39:55 +0200 procmail (3.10.7-4) frozen unstable; urgency=low * Added a small note in QuickStart about refiltering an old mail folder. * mailstat(1): The log file is truncated to zero length (Bug #21022). * PATH=/usr/local/bin:/usr/bin:/bin for the example in procmail(1). * Standards-Version: 2.4.1. -- Santiago Vila Fri, 17 Apr 1998 18:00:14 +0200 procmail (3.10.7-3) frozen unstable; urgency=medium * Patched src/recommend.c so that the mail spool directory is not touched. This will allow the package to be built using fakeroot. * Patched mailstat so that it uses tempfile. -- Santiago Vila Tue, 24 Mar 1998 21:43:08 +0100 procmail (3.10.7-2) unstable; urgency=low * Default PATH is now "$HOME/bin:/usr/local/bin:/usr/bin:/bin". * Added "fetchmail" to the Recommends: line as one more option. * Added /usr/doc/procmail/QuickStart (experimental). * Compressed changelog.Debian. * Removed debstd dependency. * Pristine source. -- Santiago Vila Sat, 31 Jan 1998 20:30:06 +0100 procmail (3.10.7-1) unstable; urgency=low * Upgraded to 3.11pre7. Sources are now GPLed, hurrah! * Added explicit SEARCHLIBS, to avoid unneeded dependency on libdl. * First libc6 release. -- Santiago Vila Wed, 18 Jun 1997 20:43:28 +0200 procmail (3.10.4-2) frozen unstable; urgency=low * Rebuilt using latest debmake to avoid a problem with suidmanager. -- Santiago Vila Sat, 17 May 1997 20:52:59 +0200 procmail (3.10.4-1) frozen unstable; urgency=low * Upgraded to 3.11pre4. Side effect: It can be built using libc6. * Removed NFS_ATIME_HACK patch, since it is no longer needed. -- Santiago Vila Sat, 12 Apr 1997 19:06:46 +0200 procmail (3.10-8) unstable; urgency=low * Rewritten copyright file. * initmake unmodified (source). * Patched to recognize NFS_ATIME_HACK variable in .procmailrc or /etc/procmailrc. Default value is "yes" (i.e. wait a second). * Added a small note about this in /usr/doc/procmail/README.Debian. -- Santiago Vila Sun, 23 Mar 1997 12:04:34 +0100 procmail (3.10-7) unstable; urgency=low * Put CFLAGS settings &c in ./Makefile, not in debian/rules. * Removed fix-substvars script, since it's no longer needed with new libc5-5.4.20. * Man page for mailstat changed slightly. * Some minor debian/rules changes. * Added MD5 sums. -- Santiago Vila Fri, 21 Feb 1997 20:53:30 +0100 procmail (3.10-6) unstable; urgency=low * Use debmake. * suidmanager support. * Removed `mailstat' from examples, it's already in /usr/bin. * Removed also `dirname' (which was "for the deprived"). * Added `fix-substvars' script to depend on libc5 >= 5.4.0. -- Santiago Vila Mon, 23 Dec 1996 16:34:02 +0100 procmail (3.10-5) unstable; urgency=low * Updated to Standards-Version 2.1.2.2. * Changed "Depends: MTA" to "Recommends: MTA". * Added extended package description in control file. * Added the symlink changelog.gz -> HISTORY.gz. * Added an "experimental" man page for mailstat. * New maintainer. -- Santiago Vila Sat, 21 Dec 1996 23:32:11 +0100 debian/source/0000775000000000000000000000000011337257317010501 5ustar debian/source/format0000664000000000000000000000001411365134042011675 0ustar 3.0 (quilt) debian/lintian0000664000000000000000000000016411763741257010567 0ustar procmail: setgid-binary usr/bin/lockfile 2755 root/mail procmail: setuid-gid-binary usr/bin/procmail 6755 root/mail debian/QuickStart0000664000000000000000000000640110357770753011224 0ustar procmail QuickStart =================== * procmail is not an `interactive' program. It has to run automatically when the mail arrives. Therefore the first thing to do is to tell our MTA that we want procmail to "eat" all our mail messages. The way of doing this depends on the MTA we are using. For example, if we are using sendmail, it will suffice to have a .forward file like this in our home directory: "|exec /usr/bin/procmail" (don't forget the quotes, they are needed in this case). If you are using exim, use this instead as your .forward file: |/usr/bin/procmail The step of creating a .forward file is not needed if the MTA already performs the delivery using procmail. For example, Debian sendmail will automatically use procmail for mail delivering if the sendmail.cf is generated from a sendmail.mc file containing this line: FEATURE(local_procmail)dnl * If we have a stand-alone system with no permanent net connection (like PPP), and we are using fetchmail to get mail from a server, we don't really need a MTA. Just adding --mda "formail -s procmail" to the fetchmail command line (or using the `mda' keyword) will tell it to deliver through procmail. * Next, we have to write a ~/.procmailrc file in our home directory. This file is a set of filtering rules, based on regular expressions. The complete syntax is explained in procmailrc(5). Let's see a real example just to get started. Let's suppose you are subscribed to the following two mailing lists: linux-kernel@vger.kernel.org debian-user@lists.debian.org The first list is managed by Majordomo. Messages coming from a Majordomo list often include a header field "Sender: " which allow easy filtering. The second list is managed my SmartList. Messages coming from a SmartList list may include several headers that can be used to filter it. One of them (in fact, the only that it is not X-whatever) is "Resent-Sender: ". So the following .procmailrc will first filter the mailing lists, and any remaining message will go to the default folder: *--------------------------------->8------------------------------------ MAILDIR=$HOME/mail # you'd better make sure it exists DEFAULT=$MAILDIR/mbox # completely optional LOGFILE=$MAILDIR/procmail.log # recommended :0: * ^Sender:.*linux-kernel-owner@vger.kernel.org linux-kernel :0: * ^Resent-Sender:.*debian-user-request@lists.debian.org debian-user *--------------------------------->8------------------------------------ From this example additional rules for mailing lists may be created easily. * Once you have received lots of messages you will want to know where did they go. That's what the LOGFILE is for. There is a tool named mailstat which parses this file and shows a summary: mailstat procmail.log The mailstat command that this package provides does really come from the examples directory and it is installed by default. You may have your own modified copy in $HOME/bin, if you like. If you have to refilter an old mail folder according to your current ~/.procmailrc file, you may do the following: cat mbox | formail -s procmail But of course if your mbox file is the target of a procmail recipe you should do this instead: mv mbox whatever cat whatever | formail -s procmail See formail(1) for details. Santiago Vila debian/patches/0000775000000000000000000000000013203554764010630 5ustar debian/patches/020000664000000000000000000000110407376657570011005 0ustar From: Santiago Vila Subject: LOCKINGTEST=100 to use fcntl() and dot-locking X-Debian-version: 3.13.1-3 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ # Only edit below this line if you *think* you know what you are doing # ######################################################################## -#LOCKINGTEST=100 # Uncomment (and change) if you think you know +LOCKINGTEST=100 # Uncomment (and change) if you think you know # it better than the autoconf lockingtests. # This will cause the lockingtests to be hotwired. # 100 to enable fcntl() debian/patches/170000664000000000000000000000143007751007627011002 0ustar From: Santiago Vila Subject: Fix formail -l behaviour when there is a Content-Length: header Bug-Debian: http://bugs.debian.org/217853 X-Debian-version: 3.22-8 --- a/src/formail.c +++ b/src/formail.c @@ -758,9 +758,9 @@ lputssn(buf,buffilled),ctlength-=buffilled,buffilled=lnl=0; ;{ int tbl=buflast,lwr='\n'; while(--ctlength>=0&&tbl!=EOF) /* skip Content-Length: bytes */ - lnl=lwr==tbl&&lwr=='\n',putcs(lwr=tbl),tbl=getchar(); + lnl=lwr==tbl&&lwr=='\n',lputcs(lwr=tbl),tbl=getchar(); if((buflast=tbl)=='\n'&&lwr!=tbl) /* just before a line break? */ - putcs('\n'),buflast=getchar(); /* wrap up loose end */ + lputcs('\n'),buflast=getchar(); /* wrap up loose end */ } if(!quiet&&ctlength>0) { charNUM(num,ctlength); debian/patches/240000664000000000000000000000370211267673013010777 0ustar From: Santiago Vila Subject: Rename getline() to procmail_getline() to fix FTBFS Bug-Debian: http://bugs.debian.org/549426 X-Debian-version: 3.22-18 --- a/src/fields.c +++ b/src/fields.c @@ -110,16 +110,16 @@ /* try and append one valid field to rdheader from stdin */ int readhead P((void)) { int idlen; - getline(); + procmail_getline(); if((idlen=breakfield(buf,buffilled))<=0) /* not the start of a valid field */ return 0; if(idlen==STRLEN(FROM)&&eqFrom_(buf)) /* it's a From_ line */ { if(rdheader) return 0; /* the From_ line was a fake! */ - for(;buflast=='>';getline()); /* gather continued >From_ lines */ + for(;buflast=='>';procmail_getline()); /* gather continued >From_ lines */ } else - for(;;getline()) /* get the rest of the continued field */ + for(;;procmail_getline()) /* get the rest of the continued field */ { switch(buflast) /* will this line be continued? */ { case ' ':case '\t': /* yep, it sure is */ continue; --- a/src/formail.c +++ b/src/formail.c @@ -819,7 +819,7 @@ { if(split) /* gobble up the next start separator */ { buffilled=0; #ifdef sMAILBOX_SEPARATOR - getline();buffilled=0; /* but only if it's defined */ + procmail_getline();buffilled=0; /* but only if it's defined */ #endif if(buflast!=EOF) /* if any */ goto splitit; --- a/src/formisc.c +++ b/src/formisc.c @@ -115,7 +115,7 @@ buf[buffilled++]=c; } -int getline P((void)) /* read a newline-terminated line */ +int procmail_getline P((void)) /* read a newline-terminated line */ { if(buflast==EOF) /* at the end of our Latin already? */ { loadchar('\n'); /* fake empty line */ return EOF; /* spread the word */ --- a/src/formisc.h +++ b/src/formisc.h @@ -17,4 +17,4 @@ char* skipwords P((char*start)); int - getline P((void)); + procmail_getline P((void)); debian/patches/260000664000000000000000000000116311365140237010774 0ustar From: Santiago Vila Subject: Document that the repetition operator is not supported Bug-Debian: http://bugs.debian.org/452723 X-Debian-version: 3.22-19 --- a/man/procmailrc.man +++ b/man/procmailrc.man @@ -588,7 +588,10 @@ The following tokens are known to both the procmail internal egrep and the standard .BR egrep (1) -(beware that some egrep implementations include other non-standard extensions): +(beware that some egrep implementations include other non-standard +extensions; in particular, the repetition operator +.B { +is not supported by procmail's egrep): .TP 1.0i .B ^ Start of a line. debian/patches/140000664000000000000000000000103307576417464011007 0ustar From: Santiago Vila Subject: Fix memory allocation bug in pipes.c Bug-Debian: http://bugs.debian.org/171514 X-Debian-version: 3.22-5 --- a/src/pipes.c +++ b/src/pipes.c @@ -194,7 +194,7 @@ makeblock(&temp,Stdfilled); tmemmove(temp.p,Stdout,Stdfilled); readdyn(&temp,&Stdfilled,Stdfilled+backlen+1); - Stdout=realloc(Stdout,&Stdfilled+1); + Stdout=realloc(Stdout,Stdfilled+1); tmemmove(Stdout,temp.p,Stdfilled+1); freeblock(&temp); retStdout(Stdout,pwait&&pipw,!backblock); debian/patches/180000664000000000000000000000071610204754567011010 0ustar From: Santiago Vila Subject: Recognize User-Agent: and NNTP-Posting-Date: headers Bug-Debian: http://bugs.debian.org/295604 X-Debian-version: 3.22-11 --- a/src/header.h +++ b/src/header.h @@ -167,3 +167,5 @@ X(readreceiptto, "Read-Receipt-To:") /* miscellaneous extension */ X(fakesender, "Fake-Sender:") X(envelopeto, "Envelope-To:") /* exim extension */ +X(useragent, "User-Agent:") +X(nntppostingdate, "NNTP-Posting-Date:") debian/patches/220000664000000000000000000000120510425171511010760 0ustar From: Santiago Vila Subject: Changed formisc.c so that formail -n actually works Bug-Debian: http://bugs.debian.org/151627 X-Debian-version: 3.22-16 --- a/src/formisc.c +++ b/src/formisc.c @@ -183,10 +183,10 @@ retval=excode; } /* reap some children */ while(childlimit&&children>=childlimit||(child=fork())==-1&&children) - for(--children;(excode=waitfor((pid_t)0))!=NO_PROCESS;) + for(--children;(excode=waitfor((pid_t)0))!=NO_PROCESS;--children) { if(excode!=EXIT_SUCCESS) retval=excode; - if(--children<=maxchild) + if(children<=maxchild) break; } } debian/patches/230000664000000000000000000000111711247254613010773 0ustar From: Santiago Vila Subject: Fixed off-by-1 memory allocation error Bug-Debian: http://bugs.debian.org/474298 Bug-Debian: http://bugs.debian.org/484352 X-Debian-version: 3.22-17 --- a/src/mailfold.c +++ b/src/mailfold.c @@ -205,7 +205,7 @@ if(linkfolder) /* any additional directories specified? */ { size_t blen; if(blen=Tmnate-linkfolder) /* copy the names into safety */ - Tmnate=(linkfolder=tmemmove(malloc(blen),linkfolder,blen))+blen; + Tmnate=(linkfolder=tmemmove(malloc(blen+1),linkfolder,blen))+blen; else linkfolder=0; } debian/patches/series0000664000000000000000000000015013203554764012041 0ustar 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 CVE-2014-3618.patch 30 debian/patches/CVE-2014-3618.patch0000664000000000000000000000107412402065661013244 0ustar From: Tavis Ormandy Subject: formail heap overflow. CVE-2014-3618 Bug-Debian: http://bugs.debian.org/704675 Bug-Debian: http://bugs.debian.org/760443 X-Debian-version: 3.22-22 --- a/src/formisc.c +++ b/src/formisc.c @@ -84,12 +84,11 @@ case '"':*target++=delim='"';start++; } ;{ int i; - do + while(*start) if((i= *target++= *start++)==delim) /* corresponding delimiter? */ break; else if(i=='\\'&&*start) /* skip quoted character */ *target++= *start++; - while(*start); /* anything? */ } hitspc=2; } debian/patches/040000664000000000000000000000071607376657760011020 0ustar From: Santiago Vila Subject: PATH=/usr/local/bin:/usr/bin:/bin for the example in procmail(1) X-Debian-version: 3.10.7-4 --- a/man/procmail.man +++ b/man/procmail.man @@ -754,7 +754,7 @@ .SS "A sample small @PROCMAILRC@:" .na .nf -PATH=/bin:/usr/bin:@BINDIR@ +PATH=/usr/local/bin:/usr/bin:/bin MAILDIR=$HOME/Mail #you'd better make sure it exists DEFAULT=$MAILDIR/mbox #completely optional LOGFILE=$MAILDIR/from #recommended debian/patches/060000664000000000000000000000123207376660150010777 0ustar From: Santiago Vila Subject: The example .forward for exim in procmail(1) is |/usr/bin/procmail Bug-Debian: http://bugs.debian.org/33460 Bug-Debian: http://bugs.debian.org/37771 X-Debian-version: 3.13.1-2 --- a/man/procmail.man +++ b/man/procmail.man @@ -723,6 +723,15 @@ .fi .ad .PP +Some mailers (notably exim) do not currently accept the above syntax. +In such case use this instead: +.PP +.na +.nf +|/usr/bin/procmail +.fi +.ad +.PP Procmail can also be invoked to postprocess an already filled system mailbox. This can be useful if you don't want to or can't use a $HOME/@DOT_FORWARD@ file (in which case the following script could debian/patches/000000664000000000000000000002143607376657400011005 0ustar From: Santiago Vila Subject: diff from procmail-3.22 to procmail-3.23pre X-Debian-version: 3.22-1 --- a/HISTORY +++ b/HISTORY @@ -491,8 +491,8 @@ - Root owned lockfiles aren't bogus - A lone trailing '$' wasn't terminated properly when expanded Changes to formail: - - Replies without the -t flag go to the envelope sender - - Replies without "-a Resent-" and -t flag ignore the + - Replies without the -t option go to the envelope sender + - Replies without "-a Resent-" and -t option ignore the Resent-* headers - Prevent corrupt idcaches by suppressing the -n option when splitting with the -D option @@ -509,7 +509,7 @@ Changed the form of tempfile names to make them `more' unique and deal with filename length limits more gracefully Updated the FAQ and the list of mirrors in the README - Documented the exact behavior of lockfile's -! flag + Documented the exact behavior of lockfile's -! option Documented the suggested usage of -r vs -rt 2000/08/25: v3.15 Changes to procmail: @@ -588,7 +588,7 @@ Changes to lockfile: - Include the system mailbox lockfile path in the -v output - Resist attempts to use a setuid lockfile command - - Fix infinite loop on -l, -r, or -s flag with no value + - Fix infinite loop on -l, -r, or -s option with no value Documented formail's treatment of >From_ lines as continuations of the From_ line and warned of problems caused by non-RFC822 field names like 'Old-From ' @@ -623,3 +623,8 @@ More paranoia: start to use strlcpy() Generate safe temp and maildir filenames when the hostname contains / or : by mapping them to \ooo +2001/09/13: v3.23pre + Changes to procmail: + - Don't coredump in comsat code if interrupted early + - Correctly handle COMSAT=on + - Once used the 'H' flag would never be cleared --- a/patchlevel.h +++ b/patchlevel.h @@ -1,5 +1,5 @@ #define VERSION "\ - v3.22 2001/09/10\n\ + v3.23pre 2001/09/13\n\ Copyright (c) 1990-2001, Stephen R. van den Berg\t\n\ Copyright (c) 1997-2001, Philip A. Guenther\t\t\n\ \n\ --- a/src/comsat.c +++ b/src/comsat.c @@ -9,7 +9,7 @@ #ifdef RCS static /*const*/char rcsid[]= - "$Id: comsat.c,v 1.5 2001/07/03 15:05:47 guenther Exp $"; + "$Id: comsat.c,v 1.7 2001/09/13 19:08:49 guenther Exp $"; #endif #include "procmail.h" @@ -92,7 +92,7 @@ } if(newvalid) /* so far, so good */ { int s; - if(!*chp) /* no service */ + if(!chad||!*chp) /* no service */ chp=BIFF_serviceport; /* new balls please! */ s=strtol(chp,&chad,10); if(chp!=chad) /* the service is not numeric */ @@ -120,7 +120,7 @@ { int s;const char*p; if(!csvalid||!buf) /* is comat on and set to a valid address? */ return; - if(!*cslgname||strlen(cslgname)+2>linebuf) /* is $LOGNAME bogus? */ + if(!cslgname||!*cslgname||strlen(cslgname)+2>linebuf)/* is $LOGNAME bogus? */ return; if(!(p=folder?folder:cslastf)) /* do we have a folder? */ return; --- a/src/header.h +++ b/src/header.h @@ -4,12 +4,11 @@ * "-m nnn" fields encountered should be among them or one of * * the special From_, Article_ or X- fields). * * * - * If you need to add one (be sure to update "cdigest" below as * - * well!), drop me a mail, I might be interested in including * - * it in the next release. * + * If you need to add one, drop me an email at bug@procmail.org. * + * I might be interested in including it in the next release. * * * ************************************************************************/ -/*$Id: header.h,v 1.44 1999/07/06 06:12:22 guenther Exp $*/ +/*$Id: header.h,v 1.45 2001/09/24 03:38:08 guenther Exp $*/ X(returnpath, "Return-Path:") /* RFC 822 */ X(received, "Received:") /* ditto ... */ --- a/src/lmtp.c +++ b/src/lmtp.c @@ -7,7 +7,7 @@ ************************************************************************/ #ifdef RCS static /*const*/char rcsid[]= - "$Id: lmtp.c,v 1.13 2001/06/28 21:44:28 guenther Exp $" + "$Id: lmtp.c,v 1.14 2001/09/23 20:17:57 guenther Exp $" #endif #include "procmail.h" #ifdef LMTP @@ -708,7 +708,7 @@ got-=in-p; /* correct for what disappeared */ } while(left-=got); /* change listed buffer size */ - *(long*)statep=state; /* save state */ + *(int*)statep=state; /* save state */ return 0; } @@ -765,7 +765,7 @@ got-=in-p; /* correct for what disappeared */ } while(left-=got); /* change listed buffer size */ - *(long*)statep=state; /* save state */ + *(int*)statep=state; /* save state */ return 0; } --- a/src/memblk.c +++ b/src/memblk.c @@ -8,7 +8,7 @@ ************************************************************************/ #ifdef RCS static /*const*/char rcsid[]= - "$Id: memblk.c,v 1.6 2001/06/28 22:55:09 guenther Exp $" + "$Id: memblk.c,v 1.7 2001/09/18 21:59:08 guenther Exp $" #endif #include "procmail.h" #include "robust.h" @@ -51,11 +51,11 @@ { #ifdef USE_MMAP if(mb->fd>=0) - { long len=mb->len+1; - if(munmap(mb->p,len)) - mmapfailed(len); /* don't want to continue here */ - if((mb->p=mmap(0,len,PROT_READ,MAP_PRIVATE,mb->fd,(off_t)0))==MAP_FAILED) - mmapfailed(len); + { long mlen=mb->len+1; + if(munmap(mb->p,mlen)) + mmapfailed(mlen); /* don't want to continue here */ + if((mb->p=mmap(0,mlen,PROT_READ,MAP_PRIVATE,mb->fd,(off_t)0))==MAP_FAILED) + mmapfailed(mlen); close(mb->fd); mb->fd=ropen(devnull,O_RDWR,0); /* XXX Perhaps -1 is better? */ } @@ -77,8 +77,8 @@ strcpy(filename,MMAP_DIR); if(unique(filename,strchr(filename,'\0'),MMAP_FILE_LEN,MMAP_PERM,0,0)&& (mb->fd=ropen(filename,O_RDWR,MMAP_PERM),unlink(filename),mb->fd>=0)) - { mb->filelen=len; - if(lseek(mb->fd,mb->filelen-1,SEEK_SET)<0||1!=rwrite(mb->fd,empty,1)) + { mb->filelen=len+1; + if(lseek(mb->fd,len,SEEK_SET)<0||1!=rwrite(mb->fd,empty,1)) dropf: { close(mb->fd);mb->fd= -1; if(verbose)nlog("Unable to extend or use tempfile"); } @@ -98,9 +98,9 @@ } } if(mb->fd>=0) - { if(len>mb->filelen) /* need to extend? */ - { mb->filelen=len; - if(lseek(mb->fd,mb->filelen-1,SEEK_SET)<0||1!=rwrite(mb->fd,empty,1)) + { if(len>=mb->filelen) /* need to extend? */ + { mb->filelen=len+1; + if(lseek(mb->fd,len,SEEK_SET)<0||1!=rwrite(mb->fd,empty,1)) { char*p=malloc(len+1); /* can't extend, switch to malloc */ tmemmove(p,mb->p,mb->len); munmap(mb->p,mb->len+1); @@ -124,9 +124,9 @@ } else mb->p=realloc(mb->p,len+1); - mb->len=len+1; - mb->p[len]='\0'; + mb->len=len; ret1: + mb->p[len]='\0'; return 1; } --- a/src/memblk.h +++ b/src/memblk.h @@ -1,6 +1,6 @@ typedef struct memblk { char*p; /* where it starts */ - long len; /* currently allocated size */ + long len; /* current size, not including trailing NUL */ #ifdef USE_MMAP off_t filelen; /* how long is the file */ int fd; /* file which is mmap()ed */ --- a/src/pipes.c +++ b/src/pipes.c @@ -8,7 +8,7 @@ ************************************************************************/ #ifdef RCS static /*const*/char rcsid[]= - "$Id: pipes.c,v 1.73 2001/08/27 08:43:59 guenther Exp $"; + "$Id: pipes.c,v 1.74 2001/09/18 22:01:27 guenther Exp $"; #endif #include "procmail.h" #include "robust.h" @@ -145,7 +145,9 @@ if(Stdout) { *(eq=strchr(Stdout,'\0')-1)='\0'; /* chop the '=' */ if(!(backblock=getenv(Stdout))) /* no current value? */ - PRDB=PWRB= -1; + { PRDB=PWRB= -1; + backlen=0; + } else { backlen=strlen(backblock); goto pip; @@ -155,9 +157,7 @@ pip: rpipe(pbackfd); rpipe(pinfd); /* main pipes setup */ if(!(pidchild=sfork())) /* create a sending procmail */ - { if(Stdout&&backblock) - backlen=strlen(backblock); - else + { if(!Stdout) backblock=source,backlen=len; childsetup();rclose(PRDI);rclose(PRDB); rpipe(poutfd);rclose(STDOUT); --- a/src/procmail.c +++ b/src/procmail.c @@ -14,7 +14,7 @@ ************************************************************************/ #ifdef RCS static /*const*/char rcsid[]= - "$Id: procmail.c,v 1.183 2001/08/31 04:57:36 guenther Exp $"; + "$Id: procmail.c,v 1.184 2001/09/14 05:54:19 guenther Exp $"; #endif #include "../patchlevel.h" #include "procmail.h" @@ -652,8 +652,7 @@ nrcond= -1; if(tolock) /* clear temporary buffer for lockfile name */ free(tolock); - for(i=maxindex(flags);i;i--) /* clear the flags */ - flags[i]=0; + bbzero(flags,maxindex(flags)); /* clear the flags */ for(tolock=0,locknext=0;;) { chp=skpspace(chp); switch(i= *chp++) debian/patches/030000664000000000000000000000063407376657664011021 0ustar From: Santiago Vila Subject: Do not touch /var/mail during build X-Debian-version: 3.10.7-3 --- a/src/recommend.c +++ b/src/recommend.c @@ -47,7 +47,7 @@ printf("chmod %lo %s\n",(unsigned long)(sgid|PERMIS),argv[2]); else if(chmdir==1) goto nogchmod; - if(chmdir) + if(0) printf("chmod %c+w %s/.\n",chmdir==1?'g':'a',mailspooldir); nogchmod: return EXIT_SUCCESS; debian/patches/110000664000000000000000000001342007401372715010771 0ustar From: Santiago Vila Subject: The system-wide mail directory is /var/mail as per policy X-Debian-version: 3.22-2 --- a/FAQ +++ b/FAQ @@ -57,8 +57,8 @@ Forward to |/usr/bin/procmail or if that doesn't work, try: Pipe to /usr/bin/procmail - as the only line in your mail spool file (e.g. /usr/mail/$LOGNAME), as - well as doing a "chmod 06660 /usr/mail/$LOGNAME". For more information + as the only line in your mail spool file (e.g. /var/mail/$LOGNAME), as + well as doing a "chmod 06660 /var/mail/$LOGNAME". For more information on such systems, do a "man mail". If all of this doesn't work, procmail can be called on a periodical @@ -210,14 +210,14 @@ procmail with both the fcntl() and lockf() locking method disabled (see config.h). -17. I sometimes get these `Lock failure on "/usr/mail/$LOGNAME.lock"' errors +17. I sometimes get these `Lock failure on "/var/mail/$LOGNAME.lock"' errors from procmail. What do I do about it? The problem here is that as long as procmail has not read a $HOME/.procmailrc file, it can hang on to the sgid mail permission - (which it needs in order to create a lockfile in /usr/mail). + (which it needs in order to create a lockfile in /var/mail). I.e. if procmail delivers mail to a user without a $HOME/.procmailrc - file, procmail *can* (and does) use the /usr/mail/$LOGNAME.lock file. + file, procmail *can* (and does) use the /var/mail/$LOGNAME.lock file. If, however, it finds a $HOME/.procmailrc file, procmail has to let go of the sgid mail permission because otherwise any ordinary user could @@ -226,7 +226,7 @@ There are several solutions to this problem: - Some systems support the sticky bit on directories (when set only allows the owner of a file in that directory to rename or remove - it). This enables you to make /usr/spool/mail drwxrwxrwt. It is + it). This enables you to make /var/mail drwxrwxrwt. It is thus effectively world writable, but all the mailboxes in it are protected because only the mailbox owner can remove or rename it. - If your system did not exhibit the !@#$%^&* POSIX semantics for @@ -245,9 +245,9 @@ :0 $DEFAULT - - You could, instead of using /usr/mail/$LOGNAME, use a file below + - You could, instead of using /var/mail/$LOGNAME, use a file below your home directory as your default mailbox. - - Or, you could still use /usr/mail/$LOGNAME as the mailbox, but + - Or, you could still use /var/mail/$LOGNAME as the mailbox, but simply instruct procmail to use a different lockfile. This can be achieved by putting following recipe at the bottom of your .procmailrc file: --- a/FEATURES +++ b/FEATURES @@ -30,7 +30,7 @@ per message, the similar MH directory folders (numbered files), and Maildir directory folders (a multi-directory format that requires no locking) - + Native support for /var/spool/mail/b/a/bar type mailspools + + Native support for /var/mail/b/a/bar type mailspools + Variable assignment and substitution is an extremely complete subset of the standard /bin/sh syntax + Provides a mail log file, which logs all mail arrival, shows --- a/examples/advanced +++ b/examples/advanced @@ -251,14 +251,14 @@ -------------------------------------------------------- There are many different reasons why more and more sites decide not to -store mail in /usr/spool/mail or /usr/mail anymore. +store mail in /var/spool/mail or /var/mail anymore. Some of the obvious advantages when storing mail in the recipient's home directory are: - Mail is automatically subject to the user's quota limitations. - Often there is more room on the home partition(s) than on that - one /usr/mail partition. + one /var/mail partition. -The quota limitations also apply to /usr/spool/mail or /usr/mail if procmail +The quota limitations also apply to /var/spool/mail or /var/mail if procmail does the delivery. These quota limitations often do not work with the regular /bin/mail since that usually writes the mailbox with root permissions (eluding the quota restrictions). @@ -276,7 +276,7 @@ defined SYSTEM_MBOX to be. Some braindamaged mail programs do not pick up the MAIL environment variable, these either have to be patched/recompiled or you have to create symbolic - links in /usr/mail to every person's new mailbox. + links in /var/mail to every person's new mailbox. --- --- a/src/authenticate.c +++ b/src/authenticate.c @@ -39,13 +39,13 @@ #include "authenticate.h" #ifndef MAILSPOOLDIR -#define MAILSPOOLDIR "/var/spool/mail/" /* watch the trailing / */ +#define MAILSPOOLDIR "/var/mail/" /* watch the trailing / */ #endif #ifndef MAILSPOOLSUFFIX #define MAILSPOOLSUFFIX "" /* suffix to force maildir or MH style */ #endif #ifndef MAILSPOOLHASH -#define MAILSPOOLHASH 0 /* 2 would deliver to /var/spool/mail/b/a/bar */ +#define MAILSPOOLHASH 0 /* 2 would deliver to /var/mail/b/a/bar */ #endif /*#define MAILSPOOLHOME "/.mail" /* watch the leading / */ /* delivers to $HOME/.mail */ --- a/src/autoconf +++ b/src/autoconf @@ -89,7 +89,7 @@ # #define NOfcntl_lock #Ok #define USElockf #Ok #define USEflock -#Ok #define MAILSPOOLDIR "/var/spool/mail/" +#Ok #define MAILSPOOLDIR "/var/mail/" #Ok #define SENDMAIL "/usr/sbin/sendmail" # #define buggy_SENDMAIL # #define DEFflagsendmail "" @@ -1416,14 +1416,14 @@ found=no -for a in /var/spool/mail /usr/spool/mail /var/mail /usr/mail /spool/mail +for a in /var/mail /var/spool/mail /usr/spool/mail /usr/mail /spool/mail do test -d $a -a $found != yes && echo '#define MAILSPOOLDIR "'$a'/"' >>$ACONF && found=yes done if test $found != yes then - echo '#define MAILSPOOLDIR "/var/spool/mail/"' >>$ACONF + echo '#define MAILSPOOLDIR "/var/mail/"' >>$ACONF echo Could not find the system-mailbox directory, supplied default. fi debian/patches/200000664000000000000000000000133510366462426010776 0ustar From: Santiago Vila Subject: Hardcode things for biff Bug-Debian: http://bugs.debian.org/348667 X-Debian-version: 3.22-14 --- a/config.h +++ b/config.h @@ -133,6 +133,15 @@ trouble creating a "logfile" or suspect that the trouble starts before procmail can interpret any rcfile or arguments. */ +#undef NO_COMSAT +#undef UDP_protocolno +#undef BIFF_serviceport +#undef IP_localhost + +#define UDP_protocolno 17 +#define BIFF_serviceport "512" +#define IP_localhost {127,0,0,1} + /************************************************************************ * Only edit below this line if you *think* you know what you are doing * ************************************************************************/ debian/patches/210000664000000000000000000000126510425171507010772 0ustar From: Santiago Vila Subject: Examples are at /usr/share/doc/procmail/examples Bug-Debian: http://bugs.debian.org/355472 X-Debian-version: 3.22-16 --- a/man/procmailex.man +++ b/man/procmailex.man @@ -19,8 +19,7 @@ This man page shows several example recipes. For examples of complete rcfiles you can check the NOTES section in .BR procmail (1), -or look at the example rcfiles part of the procmail source distribution -(procmail*/examples/?procmailrc). +or look at the example rcfiles in /usr/share/doc/procmail/examples. .SH EXAMPLES Sort out all mail coming from the scuba-dive mailing list into the mailfolder scubafile (uses the locallockfile scubafile.lock). debian/patches/090000664000000000000000000000130007376660434011003 0ustar From: Santiago Vila Subject: Modified ft_dotlock in src/foldinfo.h to be in compliance with locking policy X-Debian-version: 3.15-1 --- a/src/foldinfo.h +++ b/src/foldinfo.h @@ -10,7 +10,7 @@ #define ft_lock(type) ((type)>ft_MAILDIR) /* kernel lock fd */ #define ft_atime(type) ((type)==ft_FILE) /* force atime < mtime */ -#define ft_dotlock(type) ((type)==ft_FILE) /* dotlock $DEFAULT */ +#define ft_dotlock(type) ((type)>ft_MAILDIR) /* dotlock $DEFAULT */ #define ft_delim(type) ((type)==ft_FILE) /* add MMDF delim */ #define ft_checkcloser(type) ((type)>ft_MH) #define ft_forceblank(type) ((type)!=ft_MAILDIR) /* force blank line at end */ debian/patches/300000664000000000000000000000103513203554764010774 0ustar From: Santiago Vila Subject: Fix heap-based buffer overflow in loadbuf() Bug-Debian: http://bugs.debian.org/876511 X-Debian-version: 3.22-26 --- a/src/formisc.c +++ b/src/formisc.c @@ -103,7 +103,7 @@ } /* append to buf */ void loadbuf(text,len)const char*const text;const size_t len; -{ if(buffilled+len>buflen) /* buf can't hold the text */ +{ while(buffilled+len>buflen) /* buf can't hold the text */ buf=realloc(buf,buflen+=Bsize); tmemmove(buf+buffilled,text,len);buffilled+=len; } debian/patches/120000664000000000000000000000110207433744441010770 0ustar From: Santiago Vila Subject: Fixed off-by-one bug in procmail.c which made the raw flag not to be cleared properly Bug-Debian: http://bugs.debian.org/134341 X-Debian-version: 3.22-3 --- a/src/procmail.c +++ b/src/procmail.c @@ -652,7 +652,7 @@ nrcond= -1; if(tolock) /* clear temporary buffer for lockfile name */ free(tolock); - bbzero(flags,maxindex(flags)); /* clear the flags */ + bbzero(flags,sizeof(flags)); /* clear the flags */ for(tolock=0,locknext=0;;) { chp=skpspace(chp); switch(i= *chp++) debian/patches/130000664000000000000000000000076007457055723011006 0ustar From: Santiago Vila Subject: Fixed typo in procmail(1) Bug-Debian: http://bugs.debian.org/142983 X-Debian-version: 3.22-4 --- a/src/manconf.c +++ b/src/manconf.c @@ -233,7 +233,7 @@ \2-@PRESERVOPT@\1and\1.BR \2-@FROMWHOPT@ .\1"); pc("LMTPOPT",LMTPOPT); #else - ps("LMTPOPTdesc","");ps("LMTPusage",""); + ps("LMTPOPTdesc","");ps("LMTPusage","\1"); #endif pname("INIT_UMASK",0);printf("0%lo/g\n",(unsigned long)INIT_UMASK);lines--; pn("DEFlinebuf",DEFlinebuf); debian/patches/190000664000000000000000000000177210357770434011014 0ustar From: Santiago Vila Subject: Removed binmail from manpages Bug-Debian: http://bugs.debian.org/300894 X-Debian-version: 3.22-12 --- a/man/formail.man +++ b/man/formail.man @@ -359,7 +359,6 @@ .na .nh .BR mail (1), -.BR binmail (1), .BR sendmail (8), .BR procmail (1), .BR sed (1), --- a/man/lockfile.man +++ b/man/lockfile.man @@ -122,7 +122,6 @@ .nh .BR rm (1), .BR mail (1), -.BR binmail (1), .BR sendmail (8), .BR procmail (1) .hy --- a/man/procmailex.man +++ b/man/procmailex.man @@ -497,7 +497,6 @@ .BR csh (1), .BR mail (1), .BR mailx (1), -.BR binmail (1), .BR uucp (1), .BR aliases (5), .BR sendmail (8), --- a/man/procmail.man +++ b/man/procmail.man @@ -268,7 +268,6 @@ .BR csh (1), .BR mail (1), .BR mailx (1), -.BR binmail (1), .BR uucp (1), .BR aliases (5), .BR sendmail (8), --- a/man/procmailrc.man +++ b/man/procmailrc.man @@ -706,7 +706,6 @@ .BR csh (1), .BR mail (1), .BR mailx (1), -.BR binmail (1), .BR uucp (1), .BR aliases (5), .BR sendmail (8), debian/patches/050000664000000000000000000000100007376660054010772 0ustar From: Santiago Vila Subject: Allow writeable rcfiles when the group is the user's default group X-Debian-version: 3.12-1 --- a/config.h +++ b/config.h @@ -46,7 +46,7 @@ */ #define PRESTENV {"IFS","ENV","PWD",0} -/*#define GROUP_PER_USER /* uncomment this if each +#define GROUP_PER_USER /* uncomment this if each user has his or her own group and procmail can therefore trust a $HOME/.procmailrc that is group writable or contained in a group writable home directory debian/patches/160000664000000000000000000000103507632746226011005 0ustar From: Santiago Vila Subject: Added missing newline to manpage Bug-Debian: http://bugs.debian.org/180477 X-Debian-version: 3.22-7 --- a/man/procmail.man +++ b/man/procmail.man @@ -166,7 +166,8 @@ accept an unlimited number of arguments.@ETCRCS_desc@ For some advanced usage of this option you should look in the .B EXAMPLES -section below.@LMTPOPTdesc@.SH ARGUMENTS +section below.@LMTPOPTdesc@ +.SH ARGUMENTS Any arguments containing an '=' are considered to be environment variable assignments, they will .I all debian/patches/100000664000000000000000000000112607376660530010776 0ustar From: Santiago Vila Subject: Modified mailfold.c to fix a segfault problem X-Debian-version: 3.22-2 --- a/src/mailfold.c +++ b/src/mailfold.c @@ -378,7 +378,8 @@ dfilled=mailread=0; else if(rhead) /* only read in a new header */ { memblk new; - dfilled=mailread=0;makeblock(&new,0);readdyn(&new,&dfilled,0); + dfilled=mailread=0;makeblock(&new,0); + readdyn(&new,&dfilled,thebody-themail.p); if(tobesent>dfilled&&isprivate) /* put it in place here */ { tmemmove(themail.p+dfilled,thebody,filled-=tobesent); tmemmove(themail.p,new.p,dfilled); debian/patches/080000664000000000000000000000127407376660340011010 0ustar From: Santiago Vila Subject: Really change default PATH to "$HOME/bin:/usr/local/bin:/usr/bin:/bin" X-Debian-version: 3.15-1 --- a/config.h +++ b/config.h @@ -33,8 +33,8 @@ * override those settings you should uncomment and possibly change the * DEFSPATH and DEFPATH defines below */ -/*#define DEFSPATH "PATH=/bin:/usr/bin" /* */ -/*#define DEFPATH "PATH=$HOME/bin:/bin:/usr/bin" /* */ +#define DEFSPATH "PATH=/usr/local/bin:/usr/bin:/bin" /* */ +#define DEFPATH "PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin" /* */ /* every environment variable appearing in PRESTENV will be set or wiped * out of the environment (variables without an '=' sign will be thrown debian/patches/150000664000000000000000000000111607632746225011003 0ustar From: Santiago Vila Subject: Fix manpage typo Bug-Debian: http://bugs.debian.org/147173 X-Debian-version: 3.22-7 --- a/man/procmailrc.man +++ b/man/procmailrc.man @@ -779,7 +779,7 @@ .PP Some non-optimal and non-obvious regexps set MATCH to an incorrect value. The regexp can be made to work by removing one or more unneeded -'*', '+', or '?' operator on the left-hand side of the \e/ token. +\&'*', '+', or '?' operator on the left-hand side of the \e/ token. .SH MISCELLANEOUS If the regular expression contains `\fB@TO_key@\fP' it will be substituted by .na debian/patches/070000664000000000000000000000110707376660244011005 0ustar From: Santiago Vila Subject: Make buggy_SENDMAIL not to be defined X-Debian-version: 3.15-1 --- a/src/autoconf +++ b/src/autoconf @@ -1470,9 +1470,9 @@ grep 'Mlocal.*procmail' >$DEVNULL || echo '#define CF_no_procmail_yet' >>$ACONF -cat /usr/lib/sendmail.cf /etc/sendmail.cf /etc/mail/sendmail.cf 2>$DEVNULL | - grep '^V' >$DEVNULL || - echo '#define buggy_SENDMAIL' >>$ACONF +# cat /usr/lib/sendmail.cf /etc/sendmail.cf /etc/mail/sendmail.cf 2>$DEVNULL | +# grep '^V' >$DEVNULL || +# echo '#define buggy_SENDMAIL' >>$ACONF lpath='/bin' bins="/bin" debian/patches/250000664000000000000000000000243011365140235010767 0ustar From: Santiago Vila Subject: Changed mailstat to use [:alnum:] instead of 0-9A-Za-z Bug-Debian: http://bugs.debian.org/337048 X-Debian-version: 3.22-19 --- a/examples/mailstat +++ b/examples/mailstat @@ -190,16 +190,16 @@ then $sed -e '/^From /d' -e '/^ [Ss][uU][bB][jJ][eE][cC][tT]:/d' \ -e '/^ Folder/s/ */ /' \ - -e '/^ Folder/s/\/msg\.[-0-9A-Za-z_][-0-9A-Za-z_]* /\/ /' \ - -e '/^ Folder/s/\/new\/[-0-9A-Za-z_][-0-9A-Za-z_.,+:%@]* /\/ /' \ + -e '/^ Folder/s/\/msg\.[-[:alnum:]_][-[:alnum:]_]* /\/ /' \ + -e '/^ Folder/s/\/new\/[-[:alnum:]_][-[:alnum:]_.,+:%@]* /\/ /' \ -e '/^ Folder/s/\/[0-9][0-9]* /\/. /' \ -e 's/^ Folder: \(.*\)/\1/' -e t -e 's/ /\\t/g' \ -e 's/^/ ## /' $OLDLOGFILE | $sort | $awk "$awkscript" - else $sed -e '/^From /d' -e '/^ [Ss][uU][bB][jJ][eE][cC][tT]:/d' \ -e '/^ Folder/s/ */ /' \ - -e '/^ Folder/s/\/msg\.[-0-9A-Za-z_][-0-9A-Za-z_]* /\/ /' \ - -e '/^ Folder/s/\/new\/[-0-9A-Za-z_][-0-9A-Za-z_.,+:%@]* /\/ /' \ + -e '/^ Folder/s/\/msg\.[-[:alnum:]_][-[:alnum:]_]* /\/ /' \ + -e '/^ Folder/s/\/new\/[-[:alnum:]_][-[:alnum:]_.,+:%@]* /\/ /' \ -e '/^ Folder/s/\/[0-9][0-9]* /\/. /' \ -e 's/^ Folder: \(.*\)/\1/' -e t \ -e 's/.*/ ## diagnostic messages ##/' $OLDLOGFILE | $sort | \ debian/patches/010000664000000000000000000000234407376657474011016 0ustar From: Santiago Vila Subject: Inherited from every previous Debian release X-Debian-version: 3.10-5 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ # -lresolv # not really needed, is it? # Informal list of directories where we look for the libraries in SEARCHLIBS -LIBPATHS=/lib /usr/lib /usr/local/lib +LIBPATHS=/lib /usr/lib GCC_WARNINGS = -O2 -pedantic -Wreturn-type -Wunused -Wformat -Wtraditional \ -Wpointer-arith -Wconversion -Waggregate-return \ --- a/config.h +++ b/config.h @@ -98,7 +98,7 @@ mail present. procmail automatically suppresses this when it isn't needed or under heavy load. */ -/*#define DEFsendmail "/usr/sbin/sendmail" /* uncomment and/or change if +#define DEFsendmail "/usr/sbin/sendmail" /* uncomment and/or change if the autoconfigured default SENDMAIL is not suitable. This program should quack like a sendmail: it should accept the -oi flag (to tell it to _not_ treat a line --- a/src/autoconf +++ b/src/autoconf @@ -1477,8 +1477,7 @@ lpath='/bin' bins="/bin" -for newd in /usr/bin /usr/ucb /usr/5bin $BINDIR /local/bin /usr/local/bin \ - /global/bin /usr/bin/X11 /usr/X*/bin +for newd in /usr/bin $BINDIR /usr/bin/X11 /usr/X*/bin do if test -d $newd then debian/README.Maildir0000664000000000000000000000060407457056013011437 0ustar This version of procmail supports Maildir folders. To make procmail to deliver into a Maildir folder, just append a slash (/) to the name of the maildir folder in your ~/.procmailrc file. For example, the following rule: :0 * ^Resent-Sender.*debian-user-request@lists.debian.org debian-user/ will deliver all mail from the debian-user mailing list to the Maildir folder "debian-user". debian/copyright0000664000000000000000000000340307457056013011132 0ustar This is the Debian prepackaged version of the "procmail" mail-processing program written by Stephen van den Berg. This package is currently maintained by Santiago Vila . The source for this release was downloaded from: ftp://ftp.procmail.org/pub/procmail/procmail-3.22.tar.gz This package was first put together by Bruce Perens , who added Debian package maintenance system files, and edited config.h to configure for Debian. Copyright: Procmail & formail mail processing package. Copyright (c) 1990-1999, S.R. van den Berg, The Netherlands. Copyright (c) 1999-2001, Philip Guenther, The United States of America This package is open source software; you can redistribute it and/or modify it under the terms of either: - the GNU General Public License as published by the Free Software Foundation and can be found in the included file called "COPYING"; either version 2, or (at your option) any later version, or - the "Artistic License" which can be found in the included file called "Artistic". This package is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See either the GNU General Public License or the Artistic License for more details. For those of you that choose to use the GNU General Public License, my interpretation of the GNU General Public License is that no procmailrc script falls under the terms of the GPL unless you explicitly put said script under the terms of the GPL yourself. On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL', and the complete text of the "Artistic License" can be found in `/usr/share/common-licenses/Artistic'. debian/mailstat.10000664000000000000000000000154207457056013011101 0ustar .TH MAILSTAT 1 .SH NAME mailstat \- shows mail-arrival statistics .SH SYNOPSIS .B mailstat [\-klmots] [logfile] .SH DESCRIPTION .B mailstat parses a procmail-generated $LOGFILE and displays a summary about the messages delivered to all folders (total size, average size, nr of messages). The $LOGFILE is truncated to zero length, unless the .B -k option is used. Exit code 0 if mail arrived, 1 if no mail arrived. .SH OPTIONS .TP .I \-k keep logfile intact .TP .I \-l long display format .TP .I \-m merge any errors into one line .TP .I \-o use the old logfile .TP .I \-t terse display format .TP .I \-s silent in case of no mail .SH NOTES Customise to your heart's content, this program is only provided as a guideline. .SH AUTHOR This manual page was written by Santiago Vila for the Debian GNU/Linux distribution (but may be used by others). debian/rules0000775000000000000000000000421511763742565010272 0ustar #!/usr/bin/make -f package = procmail docdir = debian/tmp/usr/share/doc/$(package) CC = gcc CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $$(getconf LFS_CFLAGS) LDFLAGS := `dpkg-buildflags --get LDFLAGS` CPPFLAGS := `dpkg-buildflags --get CPPFLAGS` SEARCHLIBS = -lm STRIP = true ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) STRIP = strip --remove-section=.comment --remove-section=.note endif build: $(MAKE) CC="$(CC)" CFLAGS0="" \ LDFLAGS0="$(LDFLAGS)" SEARCHLIBS="$(SEARCHLIBS)" autoconf.h $(MAKE) CC="$(CC)" CFLAGS0="$(CFLAGS) $(CPPFLAGS)" \ LDFLAGS0="$(LDFLAGS)" SEARCHLIBS="$(SEARCHLIBS)" touch build clean: rm -f build $(MAKE) realclean SEARCHLIBS="" rm -f `find . -name "*~"` rm -rf debian/tmp debian/files* core debian/substvars binary-indep: build binary-arch: build rm -rf debian/tmp install -d debian/tmp/DEBIAN $(docdir)/examples cd debian/tmp && install -d usr/bin usr/share/lintian/overrides $(MAKE) BASENAME=`pwd`/debian/tmp/usr install.man install-suid $(STRIP) debian/tmp/usr/bin/procmail $(STRIP) debian/tmp/usr/bin/lockfile $(STRIP) debian/tmp/usr/bin/formail cp -p debian/copyright $(docdir) cp -p debian/changelog $(docdir)/changelog.Debian cp -p debian/lintian debian/tmp/usr/share/lintian/overrides/$(package) install -m 644 debian/mailstat.1 debian/tmp/usr/man/man1 cp -p FEATURES HISTORY README FAQ KNOWN_BUGS \ debian/QuickStart debian/README.Maildir $(docdir) cp -p examples/* $(docdir)/examples cd $(docdir)/examples && rm -f dirname mailstat procmail-rpm.spec cd $(docdir) && gzip -9 HISTORY changelog.Debian ln -s HISTORY.gz $(docdir)/changelog.gz mv debian/tmp/usr/man debian/tmp/usr/share gzip -r9 debian/tmp/usr/share/man dpkg-shlibdeps debian/tmp/usr/bin/* dpkg-gencontrol cd debian/tmp && \ md5sum `find * -type f ! -regex "DEBIAN/.*"` > DEBIAN/md5sums chown -R 0:0 debian/tmp chmod -R go=rX debian/tmp chgrp mail debian/tmp/usr/bin/procmail debian/tmp/usr/bin/lockfile chmod 6755 debian/tmp/usr/bin/procmail chmod 2755 debian/tmp/usr/bin/lockfile dpkg --build debian/tmp .. binary: binary-indep binary-arch build-arch: build build-indep: build .PHONY: binary binary-arch binary-indep clean