diff options
| author | atatat <atatat@NetBSD.org> | 2004-03-25 19:14:30 +0000 |
|---|---|---|
| committer | atatat <atatat@NetBSD.org> | 2004-03-25 19:14:30 +0000 |
| commit | 7a69658f3772546594e650eba3de71b6caa8bf73 (patch) | |
| tree | 4761e4f199a903df417989eccd4636f76f5e04df /gnu | |
| parent | 8d2f43c39d67e8a64dfe068bb102054665f41cbb (diff) | |
resolve conflicts, pull 8.12.11 to head
Diffstat (limited to 'gnu')
72 files changed, 2168 insertions, 1570 deletions
diff --git a/gnu/dist/sendmail/LICENSE b/gnu/dist/sendmail/LICENSE index 1dc3ee5875d..503563b515b 100644 --- a/gnu/dist/sendmail/LICENSE +++ b/gnu/dist/sendmail/LICENSE @@ -2,7 +2,7 @@ The following license terms and conditions apply, unless a different license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor, -Emeryville, CA 94608, or by electronic mail at license@sendmail.com. +Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: @@ -33,7 +33,7 @@ each of the following conditions is met: forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: - "Copyright (c) 1998-2002 Sendmail, Inc. All rights reserved." + "Copyright (c) 1998-2003 Sendmail, Inc. All rights reserved." 4. Neither the name of Sendmail, Inc. nor the University of California nor the names of their contributors may be used to endorse or promote @@ -76,4 +76,4 @@ each of the following conditions is met: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -Revision: 8.11, Last updated Date: 2002/04/24 22:26:56 +Revision: 8.11.2.1, Last updated Date: 2003/04/19 14:30:36 diff --git a/gnu/dist/sendmail/PGPKEYS b/gnu/dist/sendmail/PGPKEYS index f1c274aa3fd..e06f1bcf9cb 100644 --- a/gnu/dist/sendmail/PGPKEYS +++ b/gnu/dist/sendmail/PGPKEYS @@ -89,6 +89,76 @@ y+PVZ1MwnEXfTQReVSla0AAOIRirHEh4YnUVZzFSNEJqoDRZQwVd7Q== -----END PGP PUBLIC KEY BLOCK----- Type Bits KeyID Created Expires Algorithm Use +pub 1024 0x95F61771 2003-12-10 ---------- RSA Sign & Encrypt + Key fingerprint = 46 FE 81 99 48 75 30 B1 3E A9 79 43 BB 78 C1 D4 +uid Sendmail Signing Key/2004 <sendmail@Sendmail.ORG> + +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.3 (OpenBSD) + +mQCNAz/XbhgAAAEEANMR0MZRcYSFEWLDwtwdVaRl5K2te70fuZ1EsZxOn1C7XO6G +udhw0hwJeq7AD0S3Tv8AofH8X8GrNVosfKJwJ+ttq0W9ivjBSm4nzOD+5mYmzsap +0Uh1Io+Wg8kDf04O+f7PZ1tct44UZlr0F6hL+YE3/+4wpFA4S8jV7SmV9hdxAAUR +tDFTZW5kbWFpbCBTaWduaW5nIEtleS8yMDA0IDxzZW5kbWFpbEBTZW5kbWFpbC5P +Ukc+iQCVAwUQP9duGMjV7SmV9hdxAQGFYAQApMXWH0Okwfeb6OPLv45ngSqzq1Ka +C3dpuVmd1S5mD85Npgj5B5O/uoHhu57VXRcM7GCeRqbaezzCL3G0jKzI5y52qb4Z +LJkK4/Pbq1DzbRL6GGV954NR9xR9d0A7MOo05K7NYa6RM+WyIk7KNeHZCKX2V/BZ ++FVDcCDwmMd0YQmJAJUDBRM/32RP71iWZNQy4Z0BAdYhA/9IcKx9yZ6vOdf+2q8J +XP+CKYkgTpq3O8s/jNXoqTEJikpj5vrHcaxbP5UAHJlaLbn9Z9zj4V2LrgDJOiT2 +UaCGy+4IfD7t9MgVpMjyKBXMbdV0LII/SESYV1QpzVAaqKR97ScMxCMV5/wS0GxZ ++UplQOBUlvVfYVci5V6UkWFINokAlQMFEz/fZHJvUpPYo5umVQEBtm8D/iuOVnqW +mQS7bN2aQp2K/jCLWx3YXG86U7r/urPeeKFRKBI9nF47pyjd84t+utkAM17yCIrS +8pOdal3nzhRWkqLj3s+hBTeUJ1HR+rNuYHbgusIPkUF+sShEivOEfS8iQo7ZbcrT +zU/neobWzf9X+ihcT5i5a5F12V6o1PiIq01HiQCVAwUTP99umZwcveLjXFY1AQFU +hwP9Gf9Pr47nYyXaxb0naxuYEz9EDgzOwHgZ99yRgnkLiMHgLdfpZQWywIEHrG8M +2py2Bc7+gQgsOT8SuBgHa1II8Y6bH9Xzu89EUoJFF5TlO3vBJlELg+aJehKqk7pW +TOWkNppP9bcb/JgLci+/wSqiI0acBBe9LL8p0DGb5lyP1yqJAJUDBRM/326oOCLb +R8w3Ty0BAU5mA/9z8BoeFzoNVEU10+FqLSBEYObq5AQPI8TZgHSE+H6EeGIO/clQ +d+RMcWMedOWXtajglfx1UhF/fSn1Y/woWlJhNy7ebqBqscKVhTlCNeJHT6yLme1a +/w3KOxnPleoT66EnyREyxR3O9s09VnKpGGf/g3223+k3VcFpn7qw3a2pQIkAlQMF +Ez/fbr6JaWK4Z4wKAwEB/84D/3ssrF6teu739smXiRqLZxB+WppHO1yzr+Ylsir3 +RICwU3y9ayUtAIQzkwJ5qC+V8iMTVMSdJiwV2Yg8xBp0CzRXcdqntgRzJQWzWq2r +HEHhcM8NOVtR0TCbPF8iw4htBAc+rEMOhT001xQ2zPL8k8HXqVrLHh84y5XxZx7J +xOK6iQCVAwUTP99u0iGD4bE5bweJAQH7OgQAhzzTt7CqBezWb+pCY648W1NSzAgG +ANUcybCJBaM+olkkO2SA9pSPXEIGfEg8qXh4jJhFmk6OLdeaaPJd084PiG3M3IAt +B7QHE8DBBcnTPNWsZseTxn1dMZDWDddBGEqplUQivwNF0iAoLHUhySmqwi1PBPQe +4NZeeLWjAJ6yV4KJAJUDBRM/327uwCnKQBb0zOkBATEzBACxvB0EivpyF6DiY9zs +LhGkPwoRabteqvvZ3sSCtIxQWpxq3lyX8MgkeSEAUlJL38YGXHhBWbTfEUz8VQHe +P8obxXBiEj0JxfqnzEmUvnTWF39dYXCQsAXp8+vjS1xYCrtYFMBmUjTg20pNRgzX +y48UyDM33Zvr/7hsZ0iXGZ6ysYkAlQMFEz/fbxXBnB0lEtNGHQEBasAD/17V89bg +Cj7Wh35BBB6Hq/eVHDLL1klGJRDX5BGP6v3rKpvercCSZEFlb9JSNVDmSefcTYpC +NH6oNZux23EmOjTC6ZzDgrcCiADtTkfPotBL23dthLyiwL0yz24SKVqlBadzyNrK +SDlXiz5pLHmvS0wuexJlHtaB4bRuBo0j5YaziQCVAwUTP99vSXxLZ22gDhVjAQE+ +uwQAqOey4/yVuMHfTVMDpAwWDMJJ1rWoRuiXPdn0lRAQSefu7A/TAe32Gcpm7xXH +HlvGXEcqxMxXtSIK/TkFlVde9gPaQmRVvt/p77lT8eWkd7Le4vfftl1HGe6TSRVp +CjP/QOkIYVuL1OcH1ZHZaOEKtGKbiG1TabJNsNJF3/4Go+KJAJUDBRM/329X1uCh +/k++Kt0BAfwxA/9LDEkvCb9YP++5MQalpKe+CDvPJPf916HNjBF1XqIyh/0Ygy6d +oYB6AiT9ch/dRc85s67rXeSHclabdcb4CudDAB+7wK7o7EGs/FQbsWlixftdoJ0I +A+uCCMYc4ZVPBRiY3nEoEQYs05brfTih0iF3Pe0GQtv1PbCX6sy8xCGfiIkAlQMF +Ez/f8ArPHrUDIjJ6AQEBsc8D+wcjK1zS+AT1QJ23atbNpX++1fhjVK0qF8d3SfH6 +Y5p+2uzWT5PpEfVfMtn5O7U9SUptGt3QUStM8bc1YYqL8XQvN8tO+TimK8PZ8J4n +z6bp6R6qsbidvo12O4WkhCBQS/b1E0ech+0Yrkp/bpT5L5Mbzv/L4qc1+Qp9Brfw +1XuaiQCVAwUQQAH3FuHU/BTm0HRxAQEJ/QP8ClUYRx3OIlrdutTiPczIzNg6TYCK +oZR2bMUPLkWUzH5BdkYvY92gW3JcU/ZLah0vXOrcYPgQ+hE3HpNrxQ1phrJv2ZyU +oh6JIJ6P8mGzErysOfbZeOlakgxLemjuGXZcA7gJYzFBPzOcCt3dCc0dHzHbSN4C +eUki/A9y6W/bmCGIRgQSEQIABgUCQAIiGQAKCRAJp6JK0eWCByRYAJ42JQ7xf7zV +EV7Bav/YeI5XT75YPACfYjdnZdatI98TPa1bww6lk5TYMmiIRgQQEQIABgUCQAIu +MwAKCRCIy6enC3wfO+HOAJ4hOmpSrlOzsdDF6gtPJPmTlJyVGwCfbTRBW9KgQAeR +8zYCyqcrjOfk8P+IRgQSEQIABgUCQAI4jQAKCRCgT/sbfcrp08DvAKCTnKjbBRq2 +hm4+u7OGXKnCa8XQdgCeN0wziQ3SPJSBRC33mU5fsT8r0beIRgQTEQIABgUCQAI9 +NwAKCRBwLeVZtNPXsKHzAJ9oaQL9JqxTb3Pdqjh1YGbUeBeXIACggTyw9xhtIJTB +LIkSIcotiYmp1TGIRgQSEQIABgUCQAJgigAKCRDEsQeYhXlqI+ZUAJ45IOw6O3rT +Vyw1eWS+gGr1sq7vOACePqM5sCQ1tcH+s6W5PxiP/ghEaeOIRgQTEQIABgUCQAKP +bAAKCRAkuTzlgnDpGsjuAJ9/UzGrisfPeVGGYUSKctA/74t1AwCgxUi2mTmFfylI +pxn8TvoaLfCVSl+JAJUDBRJAApvoXx7Ib4gMnlUBAQ/qA/0cgA4kaUn8ubg+GayA +gmOdS0S2YdyfhAPcREHdHCAkOHkrder7COddi9m0qiqhIHB2+nWYQA6DWAlL7jOK +ztDRY6egE2MIPdemro7GJjUusWykvl8f11j6hfWQyJkaGM+99q4CBLkp+YoZ14b8 +DCVlH2nU0ROlR/ErLxKM780DsohGBBIRAgAGBQJAAuGKAAoJEKK7+yQM+Vb3EzAA +oI8m75Y5TKhra08usDDQyWHgQeKHAKDgmh9dm8e2CTZk9xPEUAsucWea6Q== +=CNJY +-----END PGP PUBLIC KEY BLOCK----- + +Type Bits KeyID Created Expires Algorithm Use pub 1024 0x396F0789 2003-01-15 ---------- RSA Sign & Encrypt Key fingerprint = C4 73 DF 4A 97 9C 27 A9 EE 4F B2 BD 55 B5 E0 0F uid Sendmail Signing Key/2003 <sendmail@Sendmail.ORG> @@ -952,4 +1022,4 @@ SIXqPke2iCW6+zdG1T/gS5T9T9/Lf2c9FQf0FjURAi3ynDA2RBLA5FDsI8v3 =dbDm -----END PGP PUBLIC KEY BLOCK----- -Revision: 8.13.2.2, Last updated Date: 2003/01/15 01:55:04 +Revision: 8.13.2.4, Last updated Date: 2004/01/13 21:18:06 diff --git a/gnu/dist/sendmail/RELEASE_NOTES b/gnu/dist/sendmail/RELEASE_NOTES index a7f2fc815d2..56d5a68cf24 100644 --- a/gnu/dist/sendmail/RELEASE_NOTES +++ b/gnu/dist/sendmail/RELEASE_NOTES @@ -1,17 +1,146 @@ SENDMAIL RELEASE NOTES - Id: RELEASE_NOTES,v 8.1340.2.132 2003/03/29 14:02:26 ca Exp - $NetBSD: RELEASE_NOTES,v 1.12 2003/06/01 14:06:40 atatat Exp $ + Id: RELEASE_NOTES,v 8.1340.2.189 2004/01/18 17:50:57 ca Exp + $NetBSD: RELEASE_NOTES,v 1.13 2004/03/25 19:14:30 atatat Exp $ This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. +8.12.11/8.12.11 2004/01/18 + Use QueueFileMode when opening qf files. This error was a + regression in 8.12.10. Problem detected and diagnosed + Lech Szychowski of the Polish Power Grid Company. + Properly count the number of queue runners in a work group and + make sure the total limit of MaxQueueChildren is not + exceeded. Based on patch from Takayuki Yoshizawa of + Techfirm, Inc. + Take care of systems that can generate time values where the + seconds can exceed the usual range of 0 to 59. + Problem noted by Randy Diffenderfer of EDS. + Avoid regeneration of identical queue identifiers by processes + whose process id is the same as that of the initial + sendmail process that was used to start the daemon. + Problem noted by Randy Diffenderfer of EDS. + When a milter invokes smfi_delrcpt() compare the supplied + recipient address also against the printable addresses + of the current list to deal with rewritten addresses. + Based on patch from Sean Hanson of The Asylum. + BadRcptThrottle now also works for addresses which return the + error mailer, e.g., virtusertable entries with the + right hand side error:. Patch from Per Hedeland. + Fix printing of 8 bit characters as octals in log messages. + Based on patch by Andrey J. Melnikoff. + Undo change of algorithm for MIME 7-bit base64 encoding to 8-bit + text that has been introduced in 8.12.3. There are some + examples where the new code fails, but the old code works. + To get the 8.12.3-8.12.10 version, compile sendmail with + -DMIME7TO8_OLD=0. If you have an example of improper + 7 to 8 bit conversion please send it to us. + Return normal error code for unknown SMTP commands instead of + the one specified by check_relay or a milter for a + connection. Problem noted by Andrzej Filip. + Some ident responses contain data after the terminating CRLF which + causes sendmail to log "POSSIBLE ATTACK...newline in string". + To avoid this everything after LF is ignored. + If the operating system supports O_EXLOCK and HASFLOCK is set + then a possible race condition for creating qf files + can be avoided. Note: the race condition does not + exist within sendmail, but between sendmail and an + external application that accesses qf files. + Log the proper options name for TLS related mising files for + the CACertPath, CACertFile, and DHParameters options. + Do not split an envelope if it will be discarded, otherwise df + files could be left behind. Problem found by Wolfgang + Breyha. + The use of the environment variables HOME and HOSTALIASES has been + deprecated and will be removed in version 8.13. This only + effects configuration which preserve those variable via the + 'E' command in the cf file as sendmail clears out its entire + environment. + Portability: + Add support for Darwin 7.0/Mac OS X 10.3 (a.k.a. Panther). + Solaris 10 has unsetenv(), patch from Craig Mohrman of + Sun Microsystems. + LIBMILTER: Add extra checks in case a broken MTA sends bogus data + to libmilter. Based on code review by Rob Grzywinski. + SMRSH: Properly assemble commands that contain '&&' or '||'. + Problem noted by Eric Lee of Talking Heads. + New Files: + devtools/OS/Darwin.7.0 + +8.12.10/8.12.10 2003/09/24 (Released: 2003/09/17) + SECURITY: Fix a buffer overflow in address parsing. Problem + detected by Michal Zalewski, patch from Todd C. Miller + of Courtesan Consulting. + Fix a potential buffer overflow in ruleset parsing. This problem + is not exploitable in the default sendmail configuration; + only if non-standard rulesets recipient (2), final (4), or + mailer-specific envelope recipients rulesets are used then + a problem may occur. Problem noted by Timo Sirainen. + Accept 0 (and 0/0) as valid input for set MaxMimeHeaderLength. + Problem noted by Thomas Schulz. + Add several checks to avoid (theoretical) buffer over/underflows. + Properly count message size when performing 7->8 or 8->7 bit MIME + conversions. Problem noted by Werner Wiethege. + Properly compute message priority based on size of entire message, + not just header. Problem noted by Axel Holscher. + Reset SevenBitInput to its configured value between SMTP + transactions for broken clients which do not properly + announce 8 bit data. Problem noted by Stefan Roehrich. + Set {addr_type} during queue runs when processing recipients. + Based on patch from Arne Jansen. + Better error handling in case of (very unlikely) queue-id conflicts. + Perform better error recovery for address parsing, e.g., when + encountering a comment that is too long. Problem noted by + Tanel Kokk, Union Bank of Estonia. + Add ':' to the allowed character list for bogus HELO/EHLO + checking. It is used for IPv6 domain literals. Patch from + Iwaizako Takahiro of FreeBit Co., Ltd. + Reset SASL connection context after a failed authentication attempt. + Based on patch from Rob Siemborski of CMU. + Check Berkeley DB compile time version against run time version + to make sure they match. + Do not attempt AAAA (IPv6) DNS lookups if IPv6 is not enabled + in the kernel. + When a milter adds recipients and one of them causes an error, + do not ignore the other recipients. Problem noted by + Bart Duchesne. + CONFIG: Use specified SMTP error code in mailertable entries which + lack a DSN, i.e., "error:### Text". Problem noted by + Craig Hunt. + CONFIG: Call Local_trust_auth with the correct argument. Patch + from Jerome Borsboom. + CONTRIB: Better handling of temporary filenames for doublebounce.pl + and expn.pl to avoid file overwrites, etc. Patches from + Richard A. Nelson of Debian and Paul Szabo. + MAIL.LOCAL: Fix obscure race condition that could lead to an + improper mailbox truncation if close() fails after the + mailbox is fsync()'ed and a new message is delivered + after the close() and before the truncate(). + MAIL.LOCAL: If mail delivery fails, do not leave behind a + stale lockfile (which is ignored after the lock timeout). + Patch from Oleg Bulyzhin of Cronyx Plus LLC. + Portability: + Port for AIX 5.2. Thanks to Steve Hubert of University + of Washington for providing access to a computer + with AIX 5.2. + setreuid(2) works on OpenBSD 3.3. Patch from + Todd C. Miller of Courtesan Consulting. + Allow for custom definition of SMRSH_CMDDIR and SMRSH_PATH + on all operating systems. Patch from Robert Harker + of Harker Systems. + Use strerror(3) on Linux. If this causes a problem on + your Linux distribution, compile with + -DHASSTRERROR=0 and tell sendmail.org about it. + Added Files: + devtools/OS/AIX.5.2 + 8.12.9/8.12.9 2003/03/29 SECURITY: Fix a buffer overflow in address parsing due to a char to int conversion problem which is potentially remotely exploitable. Problem found by Michal Zalewski. - Note: an MTA that is not patched might be vulnerable to + Note: an MTA that is not patched might be vulnerable to data that it receives from untrusted sources, which includes DNS. To provide partial protection to internal, unpatched sendmail MTAs, @@ -32,7 +161,7 @@ summary of the changes in that release. College London. Properly initialize data structure for dns maps to avoid various errors, e.g., looping processes. Problem noted by - Maurice Makaay. + Maurice Makaay of InterNLnet B.V. CONFIG: Prevent multiple application of rule to add smart host. Patch from Andrzej Filip. CONFIG: Fix queue group declaration in MAILER(`usenet'). @@ -1458,6 +1587,67 @@ summary of the changes in that release. cf/cf/generic-solaris2.cf => cf/cf/generic-solaris.cf cf/ostype/aux.m4 => cf/ostype/a-ux.m4 +8.11.7/8.11.7 2003/03/29 + SECURITY: Fix a remote buffer overflow in header parsing by + dropping sender and recipient header comments if the + comments are too long. Problem noted by Mark Dowd + of ISS X-Force. + SECURITY: Fix a buffer overflow in address parsing due to + a char to int conversion problem which is potentially + remotely exploitable. Problem found by Michal Zalewski. + Note: an MTA that is not patched might be vulnerable to + data that it receives from untrusted sources, which + includes DNS. + To provide partial protection to internal, unpatched sendmail MTAs, + 8.11.7 changes by default (char)0xff to (char)0x7f in + headers etc. To turn off this conversion compile with + -DALLOW_255 or use the command line option -d82.101. + To provide partial protection for internal, unpatched MTAs that may be + performing 7->8 or 8->7 bit MIME conversions, the default + for MaxMimeHeaderLength has been changed to 2048/1024. + Note: this does have a performance impact, and it only + protects against frontal attacks from the outside. + To disable the checks and return to pre-8.11.7 defaults, + set MaxMimeHeaderLength to 0/0. + Properly clean up macros to avoid persistence of session data + across various connections. This could cause session + oriented restrictions, e.g., STARTTLS requirements, + to erroneously allow a connection. Problem noted + by Tim Maletic of Priority Health. + Ignore comments in NIS host records when trying to find the + canonical name for a host. + Fix a memory leak when closing Hesiod maps. + Set ${msg_size} macro when reading a message from the command line + or the queue. + Prevent a segmentation fault when clearing the event list by + turning off alarms before checking if event list is + empty. Problem noted by Allan E Johannesen of Worcester + Polytechnic Institute. + Fix a potential core dump problem if the environment variable + NAME is set. Problem noted by Beth A. Chaney of + Purdue University. + Prevent a race condition on child cleanup for delivery to files. + Problem noted by Fletcher Mattox of the University of + Texas. + CONFIG: Do not bounce mail if FEATURE(`ldap_routing')'s bounce + parameter is set and the LDAP lookup returns a temporary + error. + CONFIG: Fix a syntax error in the try_tls ruleset if + FEATURE(`access_db') is not enabled. + LIBSMDB: Fix a lock race condition that affects makemap, praliases, + and vacation. + LIBSMDB: Avoid a file creation race condition for Berkeley DB 1.X + and NDBM on systems with the O_EXLOCK open(2) flag. + MAKEMAP: Avoid going beyond the end of an input line if it does + not contain a value for a key. Based on patch from + Mark Bixby from Hewlett-Packard. + MAIL.LOCAL: Fix a truncation race condition if the close() on + the mailbox fails. Problem noted by Tomoko Fukuzawa of + Sun Microsystems. + SMRSH: SECURITY: Only allow regular files or symbolic links to be + used for a command. Problem noted by David Endler of + iDEFENSE, Inc. + 8.11.6/8.11.6 2001/08/20 SECURITY: Fix a possible memory access violation when specifying out-of-bounds debug parameters. Problem detected by @@ -2687,10 +2877,9 @@ summary of the changes in that release. Log the DSN code for each recipient if one is available as a new equate (dsn=). Macro expand PostmasterCopy and DoubleBounceAddress options. - New "ph" map for performing ph queries in rulesets. More - information is available at - http://www-dev.cso.uiuc.edu/sendmail/. Contributed by Mark - Roth of the University of Illinois at Urbana-Champaign. + New "ph" map for performing ph queries in rulesets, see + sendmail/README for details. Contributed by Mark Roth + of the University of Illinois at Urbana-Champaign. Detect temporary lookup failures in the host map if looking up a bracketed IP address. Problem noted by Kari Hurtta of the Finnish Meteorological Institute. diff --git a/gnu/dist/sendmail/cf/README b/gnu/dist/sendmail/cf/README index 896af4fdea6..dfa0bdbe046 100644 --- a/gnu/dist/sendmail/cf/README +++ b/gnu/dist/sendmail/cf/README @@ -2591,9 +2591,9 @@ my.domain and you have my.domain RELAY -in the access map, then all e-mail with a sender address of -<user@my.domain> gets through, even if check_relay would reject it -(e.g., based on the hostname or IP address). This allows spammers +in the access map, then any e-mail with a sender address of +<user@my.domain> will not be rejected by check_relay even though +it would match the hostname or IP address. This allows spammers to get around DNS based blacklist by faking the sender address. To avoid this problem you have to use tagged entries: @@ -2765,15 +2765,14 @@ ${server_addr} the address of the server of the current outgoing SMTP Relaying -------- - SMTP STARTTLS can allow relaying for remote SMTP clients which have -successfully authenticated themselves. This is done in the ruleset -RelayAuth. If the verification of the cert failed (${verify} != OK), -relaying is subject to the usual rules. Otherwise the DN of the issuer is -looked up in the access map using the tag CERTISSUER. If the resulting -value is RELAY, relaying is allowed. If it is SUBJECT, the DN of the cert -subject is looked up next in the access map using the tag CERTSUBJECT. If -the value is RELAY, relaying is allowed. +successfully authenticated themselves. If the verification of the cert +failed (${verify} != OK), relaying is subject to the usual rules. +Otherwise the DN of the issuer is looked up in the access map using the +tag CERTISSUER. If the resulting value is RELAY, relaying is allowed. +If it is SUBJECT, the DN of the cert subject is looked up next in the +access map using the tag CERTSUBJECT. If the value is RELAY, relaying +is allowed. ${cert_issuer} and ${cert_subject} can be optionally modified by regular expressions defined in the m4 variables _CERT_REGEX_ISSUER_ and @@ -3245,7 +3244,9 @@ and on relay.machine use the mailertable: The [square brackets] turn off MX records for this host only. If you didn't do this, the mailertable would use the MX record -again, which would give you an MX loop. +again, which would give you an MX loop. Note that the use of +wildcard MX records is almost always a bad idea. Please avoid +using them if possible. +--------------------------------+ @@ -3857,11 +3858,11 @@ confMAX_RCPTS_PER_MESSAGE MaxRecipientsPerMessage receive a 452 error code (i.e., they are deferred for the next delivery attempt). -confBAD_RCPT_THROTTLE BadRcptThrottle [infinite] If set and more than the - specified number of recipients in an - envelope are rejected, sleep for one - second after each rejected RCPT - command. +confBAD_RCPT_THROTTLE BadRcptThrottle [infinite] If set and the specified + number of recipients in a single SMTP + transaction have been rejected, sleep + for one second after each subsequent + RCPT command in that transaction. confDONT_PROBE_INTERFACES DontProbeInterfaces [False] If set, sendmail will _not_ insert the names and addresses of any @@ -4374,4 +4375,4 @@ M4 DIVERSIONS 8 DNS based blacklists 9 special local rulesets (1 and 2) -Revision: 8.623.2.23, Last updated Date: 2003/03/28 17:28:26 +Revision: 8.623.2.27, Last updated Date: 2004/01/11 17:58:25 diff --git a/gnu/dist/sendmail/cf/cf/generic-bsd4.4.cf b/gnu/dist/sendmail/cf/cf/generic-bsd4.4.cf index 3c86c66fcec..fcbe2cf500b 100644 --- a/gnu/dist/sendmail/cf/cf/generic-bsd4.4.cf +++ b/gnu/dist/sendmail/cf/cf/generic-bsd4.4.cf @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Sat Mar 29 06:04:50 PST 2003 -##### in /extra/home/ca/sm-8.12.9/OpenSource/sendmail-8.12.9/cf/cf +##### built by ca@wiz.smi.sendmail.com on Sun Jan 18 09:54:45 PST 2004 +##### in /extra/home/ca/sm-8.12.11/OpenSource/sendmail-8.12.11/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp ##### +##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp ##### ##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp ##### ##### Id: generic-bsd4.4.mc,v 8.10 1999/02/07 07:26:02 gshapiro Exp ##### @@ -41,7 +41,7 @@ -##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp ##### +##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp ##### # level 10 config file format V10/Berkeley @@ -71,6 +71,7 @@ Fw/etc/mail/local-host-names # ... define this only if sendmail cannot automatically determine your domain #Dj$w.Foo.COM +# host/domain names ending with a token in class P are canonical CP. # "Smart" relay host (may be null) @@ -121,7 +122,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.12.9 +DZ8.12.11 ############### @@ -839,7 +840,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 > SMailerToTriple=95 R< > $* $@ $1 strip off null relay R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 -R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $+ > $* $#error $: $1 R< local : $* > $* $>CanonLocal < $1 > $2 R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer @@ -1148,7 +1150,7 @@ R$* $: $&{auth_type} $| $1 R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated" R$* $| $&{auth_authen} $@ identical R$* $| <$&{auth_authen}> $@ identical -R$* $| $* $: $1 $| $>"Local_trust_auth" $1 +R$* $| $* $: $1 $| $>"Local_trust_auth" $2 R$* $| $#$* $#$2 R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author} diff --git a/gnu/dist/sendmail/cf/cf/generic-hpux10.cf b/gnu/dist/sendmail/cf/cf/generic-hpux10.cf index 4503bcc8564..f8e3e8345b0 100644 --- a/gnu/dist/sendmail/cf/cf/generic-hpux10.cf +++ b/gnu/dist/sendmail/cf/cf/generic-hpux10.cf @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Sat Mar 29 06:04:50 PST 2003 -##### in /extra/home/ca/sm-8.12.9/OpenSource/sendmail-8.12.9/cf/cf +##### built by ca@wiz.smi.sendmail.com on Sun Jan 18 09:54:45 PST 2004 +##### in /extra/home/ca/sm-8.12.11/OpenSource/sendmail-8.12.11/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp ##### +##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp ##### ##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp ##### ##### Id: generic-hpux10.mc,v 8.13 2001/05/29 17:29:52 ca Exp ##### @@ -42,7 +42,7 @@ -##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp ##### +##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp ##### # level 10 config file format V10/Berkeley @@ -72,6 +72,7 @@ Fw/etc/mail/local-host-names # ... define this only if sendmail cannot automatically determine your domain #Dj$w.Foo.COM +# host/domain names ending with a token in class P are canonical CP. # "Smart" relay host (may be null) @@ -122,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.12.9 +DZ8.12.11 ############### @@ -840,7 +841,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 > SMailerToTriple=95 R< > $* $@ $1 strip off null relay R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 -R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $+ > $* $#error $: $1 R< local : $* > $* $>CanonLocal < $1 > $2 R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer @@ -1149,7 +1151,7 @@ R$* $: $&{auth_type} $| $1 R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated" R$* $| $&{auth_authen} $@ identical R$* $| <$&{auth_authen}> $@ identical -R$* $| $* $: $1 $| $>"Local_trust_auth" $1 +R$* $| $* $: $1 $| $>"Local_trust_auth" $2 R$* $| $#$* $#$2 R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author} diff --git a/gnu/dist/sendmail/cf/cf/generic-hpux9.cf b/gnu/dist/sendmail/cf/cf/generic-hpux9.cf index a5ee3bcaaf0..aed9941be9d 100644 --- a/gnu/dist/sendmail/cf/cf/generic-hpux9.cf +++ b/gnu/dist/sendmail/cf/cf/generic-hpux9.cf @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Sat Mar 29 06:04:50 PST 2003 -##### in /extra/home/ca/sm-8.12.9/OpenSource/sendmail-8.12.9/cf/cf +##### built by ca@wiz.smi.sendmail.com on Sun Jan 18 09:54:45 PST 2004 +##### in /extra/home/ca/sm-8.12.11/OpenSource/sendmail-8.12.11/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp ##### +##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp ##### ##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp ##### ##### Id: generic-hpux9.mc,v 8.11 1999/02/07 07:26:02 gshapiro Exp ##### @@ -42,7 +42,7 @@ -##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp ##### +##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp ##### # level 10 config file format V10/Berkeley @@ -72,6 +72,7 @@ Fw/etc/mail/local-host-names # ... define this only if sendmail cannot automatically determine your domain #Dj$w.Foo.COM +# host/domain names ending with a token in class P are canonical CP. # "Smart" relay host (may be null) @@ -122,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.12.9 +DZ8.12.11 ############### @@ -840,7 +841,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 > SMailerToTriple=95 R< > $* $@ $1 strip off null relay R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 -R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $+ > $* $#error $: $1 R< local : $* > $* $>CanonLocal < $1 > $2 R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer @@ -1149,7 +1151,7 @@ R$* $: $&{auth_type} $| $1 R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated" R$* $| $&{auth_authen} $@ identical R$* $| <$&{auth_authen}> $@ identical -R$* $| $* $: $1 $| $>"Local_trust_auth" $1 +R$* $| $* $: $1 $| $>"Local_trust_auth" $2 R$* $| $#$* $#$2 R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author} diff --git a/gnu/dist/sendmail/cf/cf/generic-linux.cf b/gnu/dist/sendmail/cf/cf/generic-linux.cf index 2f34feab8e0..319d6deb7fd 100644 --- a/gnu/dist/sendmail/cf/cf/generic-linux.cf +++ b/gnu/dist/sendmail/cf/cf/generic-linux.cf @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Sat Mar 29 06:04:50 PST 2003 -##### in /extra/home/ca/sm-8.12.9/OpenSource/sendmail-8.12.9/cf/cf +##### built by ca@wiz.smi.sendmail.com on Sun Jan 18 09:54:45 PST 2004 +##### in /extra/home/ca/sm-8.12.11/OpenSource/sendmail-8.12.11/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp ##### +##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp ##### ##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp ##### ##### Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp ##### @@ -46,7 +46,7 @@ -##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp ##### +##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp ##### # level 10 config file format V10/Berkeley @@ -76,6 +76,7 @@ Fw/etc/mail/local-host-names # ... define this only if sendmail cannot automatically determine your domain #Dj$w.Foo.COM +# host/domain names ending with a token in class P are canonical CP. # "Smart" relay host (may be null) @@ -126,7 +127,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.12.9 +DZ8.12.11 ############### @@ -844,7 +845,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 > SMailerToTriple=95 R< > $* $@ $1 strip off null relay R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 -R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $+ > $* $#error $: $1 R< local : $* > $* $>CanonLocal < $1 > $2 R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer @@ -1153,7 +1155,7 @@ R$* $: $&{auth_type} $| $1 R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated" R$* $| $&{auth_authen} $@ identical R$* $| <$&{auth_authen}> $@ identical -R$* $| $* $: $1 $| $>"Local_trust_auth" $1 +R$* $| $* $: $1 $| $>"Local_trust_auth" $2 R$* $| $#$* $#$2 R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author} diff --git a/gnu/dist/sendmail/cf/cf/generic-nextstep3.3.cf b/gnu/dist/sendmail/cf/cf/generic-nextstep3.3.cf index 84b7d0a9514..922da8d2740 100644 --- a/gnu/dist/sendmail/cf/cf/generic-nextstep3.3.cf +++ b/gnu/dist/sendmail/cf/cf/generic-nextstep3.3.cf @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Sat Mar 29 06:04:51 PST 2003 -##### in /extra/home/ca/sm-8.12.9/OpenSource/sendmail-8.12.9/cf/cf +##### built by ca@wiz.smi.sendmail.com on Sun Jan 18 09:54:45 PST 2004 +##### in /extra/home/ca/sm-8.12.11/OpenSource/sendmail-8.12.11/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp ##### +##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp ##### ##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp ##### ##### Id: generic-nextstep3.3.mc,v 8.10 1999/02/07 07:26:02 gshapiro Exp ##### @@ -41,7 +41,7 @@ -##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp ##### +##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp ##### # level 10 config file format V10/Berkeley @@ -71,6 +71,7 @@ Fw/etc/mail/local-host-names # ... define this only if sendmail cannot automatically determine your domain #Dj$w.Foo.COM +# host/domain names ending with a token in class P are canonical CP. # "Smart" relay host (may be null) @@ -121,7 +122,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.12.9 +DZ8.12.11 ############### @@ -839,7 +840,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 > SMailerToTriple=95 R< > $* $@ $1 strip off null relay R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 -R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $+ > $* $#error $: $1 R< local : $* > $* $>CanonLocal < $1 > $2 R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer @@ -1148,7 +1150,7 @@ R$* $: $&{auth_type} $| $1 R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated" R$* $| $&{auth_authen} $@ identical R$* $| <$&{auth_authen}> $@ identical -R$* $| $* $: $1 $| $>"Local_trust_auth" $1 +R$* $| $* $: $1 $| $>"Local_trust_auth" $2 R$* $| $#$* $#$2 R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author} diff --git a/gnu/dist/sendmail/cf/cf/generic-osf1.cf b/gnu/dist/sendmail/cf/cf/generic-osf1.cf index 30158eed855..c84cde3f403 100644 --- a/gnu/dist/sendmail/cf/cf/generic-osf1.cf +++ b/gnu/dist/sendmail/cf/cf/generic-osf1.cf @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Sat Mar 29 06:04:51 PST 2003 -##### in /extra/home/ca/sm-8.12.9/OpenSource/sendmail-8.12.9/cf/cf +##### built by ca@wiz.smi.sendmail.com on Sun Jan 18 09:54:46 PST 2004 +##### in /extra/home/ca/sm-8.12.11/OpenSource/sendmail-8.12.11/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp ##### +##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp ##### ##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp ##### ##### Id: generic-osf1.mc,v 8.11 1999/02/07 07:26:02 gshapiro Exp ##### @@ -42,7 +42,7 @@ -##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp ##### +##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp ##### # level 10 config file format V10/Berkeley @@ -72,6 +72,7 @@ Fw/etc/mail/local-host-names # ... define this only if sendmail cannot automatically determine your domain #Dj$w.Foo.COM +# host/domain names ending with a token in class P are canonical CP. # "Smart" relay host (may be null) @@ -122,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.12.9 +DZ8.12.11 ############### @@ -840,7 +841,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 > SMailerToTriple=95 R< > $* $@ $1 strip off null relay R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 -R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $+ > $* $#error $: $1 R< local : $* > $* $>CanonLocal < $1 > $2 R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer @@ -1149,7 +1151,7 @@ R$* $: $&{auth_type} $| $1 R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated" R$* $| $&{auth_authen} $@ identical R$* $| <$&{auth_authen}> $@ identical -R$* $| $* $: $1 $| $>"Local_trust_auth" $1 +R$* $| $* $: $1 $| $>"Local_trust_auth" $2 R$* $| $#$* $#$2 R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author} diff --git a/gnu/dist/sendmail/cf/cf/generic-sunos4.1.cf b/gnu/dist/sendmail/cf/cf/generic-sunos4.1.cf index db7bce4c891..10c407ba6a4 100644 --- a/gnu/dist/sendmail/cf/cf/generic-sunos4.1.cf +++ b/gnu/dist/sendmail/cf/cf/generic-sunos4.1.cf @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Sat Mar 29 06:04:51 PST 2003 -##### in /extra/home/ca/sm-8.12.9/OpenSource/sendmail-8.12.9/cf/cf +##### built by ca@wiz.smi.sendmail.com on Sun Jan 18 09:54:46 PST 2004 +##### in /extra/home/ca/sm-8.12.11/OpenSource/sendmail-8.12.11/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp ##### +##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp ##### ##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp ##### ##### Id: generic-sunos4.1.mc,v 8.11 1999/02/07 07:26:03 gshapiro Exp ##### @@ -42,7 +42,7 @@ -##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp ##### +##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp ##### # level 10 config file format V10/Berkeley @@ -72,6 +72,7 @@ Fw/etc/mail/local-host-names # ... define this only if sendmail cannot automatically determine your domain #Dj$w.Foo.COM +# host/domain names ending with a token in class P are canonical CP. # "Smart" relay host (may be null) @@ -122,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.12.9 +DZ8.12.11 ############### @@ -840,7 +841,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 > SMailerToTriple=95 R< > $* $@ $1 strip off null relay R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 -R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $+ > $* $#error $: $1 R< local : $* > $* $>CanonLocal < $1 > $2 R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer @@ -1149,7 +1151,7 @@ R$* $: $&{auth_type} $| $1 R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated" R$* $| $&{auth_authen} $@ identical R$* $| <$&{auth_authen}> $@ identical -R$* $| $* $: $1 $| $>"Local_trust_auth" $1 +R$* $| $* $: $1 $| $>"Local_trust_auth" $2 R$* $| $#$* $#$2 R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author} diff --git a/gnu/dist/sendmail/cf/cf/generic-ultrix4.cf b/gnu/dist/sendmail/cf/cf/generic-ultrix4.cf index b17e3e442a4..aaace8cdb01 100644 --- a/gnu/dist/sendmail/cf/cf/generic-ultrix4.cf +++ b/gnu/dist/sendmail/cf/cf/generic-ultrix4.cf @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -16,8 +16,8 @@ ##### ##### SENDMAIL CONFIGURATION FILE ##### -##### built by ca@wiz.smi.sendmail.com on Sat Mar 29 06:04:52 PST 2003 -##### in /extra/home/ca/sm-8.12.9/OpenSource/sendmail-8.12.9/cf/cf +##### built by ca@wiz.smi.sendmail.com on Sun Jan 18 09:54:46 PST 2004 +##### in /extra/home/ca/sm-8.12.11/OpenSource/sendmail-8.12.11/cf/cf ##### using ../ as configuration include directory ##### ###################################################################### @@ -27,7 +27,7 @@ ###################################################################### ###################################################################### -##### Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp ##### +##### Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp ##### ##### Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp ##### ##### Id: generic-ultrix4.mc,v 8.11 1999/02/07 07:26:03 gshapiro Exp ##### @@ -42,7 +42,7 @@ -##### Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp ##### +##### Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp ##### # level 10 config file format V10/Berkeley @@ -72,6 +72,7 @@ Fw/etc/mail/local-host-names # ... define this only if sendmail cannot automatically determine your domain #Dj$w.Foo.COM +# host/domain names ending with a token in class P are canonical CP. # "Smart" relay host (may be null) @@ -122,7 +123,7 @@ DnMAILER-DAEMON CPREDIRECT # Configuration version number -DZ8.12.9 +DZ8.12.11 ############### @@ -840,7 +841,8 @@ R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 > SMailerToTriple=95 R< > $* $@ $1 strip off null relay R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 -R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $+ > $* $#error $: $1 R< local : $* > $* $>CanonLocal < $1 > $2 R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer @@ -1149,7 +1151,7 @@ R$* $: $&{auth_type} $| $1 R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated" R$* $| $&{auth_authen} $@ identical R$* $| <$&{auth_authen}> $@ identical -R$* $| $* $: $1 $| $>"Local_trust_auth" $1 +R$* $| $* $: $1 $| $>"Local_trust_auth" $2 R$* $| $#$* $#$2 R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author} diff --git a/gnu/dist/sendmail/cf/m4/cfhead.m4 b/gnu/dist/sendmail/cf/m4/cfhead.m4 index 38898fd7b8d..78a5a029cac 100644 --- a/gnu/dist/sendmail/cf/m4/cfhead.m4 +++ b/gnu/dist/sendmail/cf/m4/cfhead.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -305,5 +305,5 @@ define(`confMILTER_MACROS_ENVRCPT', ``{rcpt_mailer}, {rcpt_host}, {rcpt_addr}'') divert(0)dnl -VERSIONID(`Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp') -VERSIONID(`$NetBSD: cfhead.m4,v 1.8 2003/06/01 14:06:48 atatat Exp $') +VERSIONID(`Id: cfhead.m4,v 8.108.2.6 2003/12/05 02:26:47 ca Exp') +VERSIONID(`$NetBSD: cfhead.m4,v 1.9 2004/03/25 19:14:30 atatat Exp $') diff --git a/gnu/dist/sendmail/cf/m4/proto.m4 b/gnu/dist/sendmail/cf/m4/proto.m4 index baf98f94d37..edddc2feb9d 100644 --- a/gnu/dist/sendmail/cf/m4/proto.m4 +++ b/gnu/dist/sendmail/cf/m4/proto.m4 @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -13,8 +13,8 @@ divert(-1) # divert(0) -VERSIONID(`Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp') -VERSIONID(`$NetBSD: proto.m4,v 1.9 2003/06/01 14:06:48 atatat Exp $') +VERSIONID(`Id: proto.m4,v 8.649.2.30 2004/01/11 17:54:06 ca Exp') +VERSIONID(`$NetBSD: proto.m4,v 1.10 2004/03/25 19:14:30 atatat Exp $') # level CF_LEVEL config file format V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley') @@ -112,6 +112,7 @@ Fw`'confCW_FILE', # ... `define' this only if sendmail cannot automatically determine your domain ifdef(`confDOMAIN_NAME', `Dj`'confDOMAIN_NAME', `#Dj$w.Foo.COM') +# host/domain names ending with a token in class P are canonical CP. ifdef(`UUCP_RELAY', @@ -634,7 +635,8 @@ _OPTION(Milter.LogLevel, `confMILTER_LOG_LEVEL', `') _OPTION(Milter.macros.connect, `confMILTER_MACROS_CONNECT', `') _OPTION(Milter.macros.helo, `confMILTER_MACROS_HELO', `') _OPTION(Milter.macros.envfrom, `confMILTER_MACROS_ENVFROM', `') -_OPTION(Milter.macros.envrcpt, `confMILTER_MACROS_ENVRCPT', `')') +_OPTION(Milter.macros.envrcpt, `confMILTER_MACROS_ENVRCPT', `') +') # CA directory _OPTION(CACertPath, `confCACERT_PATH', `') @@ -1284,6 +1286,7 @@ R< $* > $* $@ $2 no mailertable match', dnl input: in general: <[mailer:]host> lp<@domain>rest dnl <> address -> address dnl <error:d.s.n:text> -> error +dnl <error:keyword:text> -> error dnl <error:text> -> error dnl <mailer:user@host> lp<@domain>rest -> mailer host user dnl <mailer:host> address -> mailer host address @@ -1294,7 +1297,8 @@ dnl <host> address -> relay host address SMailerToTriple=95 R< > $* $@ $1 strip off null relay R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4 -R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2 +R< error : $+ > $* $#error $: $1 R< local : $* > $* $>CanonLocal < $1 > $2 dnl it is $~[ instead of $- to avoid matches on IPv6 addresses R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user @@ -1910,8 +1914,10 @@ R<@> < $* @ $+ . $+ > $: < $1 @ $2 . $3 > dnl prepend daemon_flags R<@> $* $: $&{daemon_flags} $| <@> $1 dnl workspace: ${daemon_flags} $| <@> <address> +dnl 'r'equire qual.rcpt: ok +R$* r $* $| <@> < $+ @ $+ > $: < $3 @ $4 > dnl do not allow these at all or only from local systems? -R$* r $* $| <@> < $* @ $* > $: < ? $&{client_name} > < $3 @ $4 > +R$* r $* $| <@> < $* > $: < ? $&{client_name} > < $3 > R<?> < $* > $: <$1> R<? $=w> < $* > $: <$1> R<? $+> <$+> $#error $@ 5.5.4 $: "553 Fully qualified domain name required" @@ -2196,22 +2202,24 @@ R$* <@ $+ . > $1 <@ $2 > R$* <@ $* > $@ $1 <@ $2 > R$+ $@ $1 <@ $j > -SDelay_TLS_Client +SDelay_TLS_Clt # authenticated? dnl code repeated here from Basic_check_mail dnl only called from check_rcpt in delay mode if checkrcpt returns $# R$* $: $1 $| $>"tls_client" $&{verify} $| MAIL R$* $| $#$+ $#$2 dnl return result from checkrcpt +R$* $| $* $# $1 R$* $# $1 -SDelay_TLS_Client2 +SDelay_TLS_Clt2 # authenticated? dnl code repeated here from Basic_check_mail dnl only called from check_rcpt in delay mode if stopping due to Friend/Hater R$* $: $1 $| $>"tls_client" $&{verify} $| MAIL R$* $| $#$+ $#$2 dnl return result from friend/hater check +R$* $| $* $@ $1 R$* $@ $1 # call all necessary rulesets @@ -2226,7 +2234,7 @@ dnl on error (or discard) stop now R$+ $| $#error $* $#error $2 R$+ $| $#discard $* $#discard $2 dnl otherwise call tls_client; see above -R$+ $| $#$* $@ $>"Delay_TLS_Client" $2 +R$+ $| $#$* $@ $>"Delay_TLS_Clt" $2 R$+ $| $* $: <?> $>FullAddr $>CanonAddr $1 ifdef(`_SPAM_FH_', `dnl lookup user@ and user@address @@ -2248,13 +2256,13 @@ ifdef(`_SPAM_FRIEND_', ifdef(`_SPAM_HATER_', `errprint(`*** ERROR: define either Hater or Friend -- not both. ')', `dnl') -R<FRIEND> $+ $@ $>"Delay_TLS_Client2" SPAMFRIEND +R<FRIEND> $+ $@ $>"Delay_TLS_Clt2" SPAMFRIEND R<$*> $+ $: $2', `dnl') ifdef(`_SPAM_HATER_', `# is the recipient no spam hater? R<HATER> $+ $: $1 spam hater: continue checks -R<$*> $+ $@ $>"Delay_TLS_Client2" NOSPAMHATER everyone else: stop +R<$*> $+ $@ $>"Delay_TLS_Clt2" NOSPAMHATER everyone else: stop dnl',`dnl') dnl run further checks: check_mail dnl should we "clean up" $&f? @@ -2468,7 +2476,7 @@ dnl seems to be useful... R$* $| $&{auth_authen} $@ identical R$* $| <$&{auth_authen}> $@ identical dnl call user supplied code -R$* $| $* $: $1 $| $>"Local_trust_auth" $1 +R$* $| $* $: $1 $| $>"Local_trust_auth" $2 R$* $| $#$* $#$2 dnl default: error R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author} diff --git a/gnu/dist/sendmail/cf/m4/version.m4 b/gnu/dist/sendmail/cf/m4/version.m4 index 82b58a33a82..266086a6fb0 100644 --- a/gnu/dist/sendmail/cf/m4/version.m4 +++ b/gnu/dist/sendmail/cf/m4/version.m4 @@ -1,6 +1,6 @@ divert(-1) # -# Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. +# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. # All rights reserved. # Copyright (c) 1983 Eric P. Allman. All rights reserved. # Copyright (c) 1988, 1993 @@ -11,9 +11,9 @@ divert(-1) # the sendmail distribution. # # -VERSIONID(`Id: version.m4,v 8.92.2.15 2003/03/19 21:19:52 ca Exp') -VERSIONID(`$NetBSD: version.m4,v 1.12 2003/06/01 14:06:48 atatat Exp $') +VERSIONID(`Id: version.m4,v 8.92.2.26 2004/01/13 00:29:26 ca Exp') +VERSIONID(`$NetBSD: version.m4,v 1.13 2004/03/25 19:14:30 atatat Exp $') # divert(0) # Configuration version number -DZ8.12.9`'ifdef(`confCF_VERSION', `/confCF_VERSION') +DZ8.12.11`'ifdef(`confCF_VERSION', `/confCF_VERSION') diff --git a/gnu/dist/sendmail/contrib/expn.pl b/gnu/dist/sendmail/contrib/expn.pl index d67fb0f4e1d..85de08a7f41 100755 --- a/gnu/dist/sendmail/contrib/expn.pl +++ b/gnu/dist/sendmail/contrib/expn.pl @@ -8,6 +8,7 @@ use 5.001; use IO::Socket; +use Fcntl; # system requirements: # must have 'nslookup' and 'hostname' programs. @@ -999,7 +1000,7 @@ sub mxlookup } $0 = "$av0 - nslookup of $server"; - open(T,">/tmp/expn$$") || die "open > /tmp/expn$$: $!\n"; + sysopen(T,"/tmp/expn$$",O_RDWR|O_CREAT|O_EXCL,0600) || die "open > /tmp/expn$$: $!\n"; print T "set querytype=MX\n"; print T "$server\n"; close(T); diff --git a/gnu/dist/sendmail/devtools/OS/AIX.4.3 b/gnu/dist/sendmail/devtools/OS/AIX.4.3 index 8f98053cdbc..616c083d6a9 100644 --- a/gnu/dist/sendmail/devtools/OS/AIX.4.3 +++ b/gnu/dist/sendmail/devtools/OS/AIX.4.3 @@ -1,5 +1,5 @@ -# Id: AIX.4.3,v 8.19 2002/03/21 23:59:25 gshapiro Exp -# $NetBSD: AIX.4.3,v 1.4 2003/06/01 14:06:54 atatat Exp $ +# Id: AIX.4.3,v 8.19.2.1 2003/07/07 21:14:24 msk Exp +# $NetBSD: AIX.4.3,v 1.5 2004/03/25 19:14:30 atatat Exp $ dnl DO NOT EDIT THIS FILE. dnl Place personal settings in devtools/Site/site.config.m4 @@ -19,3 +19,7 @@ define(`confSM_OS_HEADER', `sm_os_aix') define(`confMTCCOPTS', `-D_THREAD_SAFE') define(`confMTLDOPTS', `-lpthread') define(`confLDOPTS_SO', `-Wl,-G -Wl,-bexpall') + +define(`USE_ICONV',` + APPENDDEF(`confLIBS',`-liconv ')dnl +')dnl diff --git a/gnu/dist/sendmail/devtools/OS/FreeBSD b/gnu/dist/sendmail/devtools/OS/FreeBSD index 27076a83eac..7f23dfe2c19 100644 --- a/gnu/dist/sendmail/devtools/OS/FreeBSD +++ b/gnu/dist/sendmail/devtools/OS/FreeBSD @@ -1,5 +1,5 @@ -# Id: FreeBSD,v 8.35 2002/03/21 23:59:25 gshapiro Exp -# $NetBSD: FreeBSD,v 1.5 2003/06/01 14:06:54 atatat Exp $ +# Id: FreeBSD,v 8.35.2.1 2003/07/07 21:14:24 msk Exp +# $NetBSD: FreeBSD,v 1.6 2004/03/25 19:14:30 atatat Exp $ dnl DO NOT EDIT THIS FILE. dnl Place personal settings in devtools/Site/site.config.m4 @@ -36,4 +36,8 @@ dnl default ` define(`confOPTIMIZE',`-O') ') - +define(`USE_ICONV',` + APPENDDEF(`confLIBS',`-liconv ')dnl + APPENDDEF(`confLIBDIRS',`-L/usr/local/lib ')dnl + APPENDDEF(`confINCDIRS',`-I/usr/local/include ')dnl +')dnl diff --git a/gnu/dist/sendmail/devtools/bin/Build b/gnu/dist/sendmail/devtools/bin/Build index 22cec23d530..efe1d6d5a07 100755 --- a/gnu/dist/sendmail/devtools/bin/Build +++ b/gnu/dist/sendmail/devtools/bin/Build @@ -11,8 +11,8 @@ # the sendmail distribution. # # -# Id: Build,v 8.179.2.3 2002/12/23 23:02:37 ca Exp -# $NetBSD: Build,v 1.9 2003/06/01 14:06:56 atatat Exp $ +# Id: Build,v 8.179.2.4 2003/08/20 18:08:07 gshapiro Exp +# $NetBSD: Build,v 1.10 2004/03/25 19:14:30 atatat Exp $ # # @@ -46,6 +46,7 @@ EX_OK=0 EX_USAGE=64 EX_NOINPUT=66 EX_UNAVAILABLE=69 +SHELL=/bin/sh # default to a optimized build to behave like the old system. build_variant="optimized" @@ -649,7 +650,7 @@ then echo "Cannot determine how to support $os.$rel.$arch" >&2 exit $EX_UNAVAILABLE fi - M4=`sh $BUILDTOOLS/bin/find_m4.sh` + M4=`$SHELL $BUILDTOOLS/bin/find_m4.sh` ret=$? if [ $ret -ne 0 ] then @@ -775,7 +776,7 @@ then grep "^_HCRSBIL_=" | \ sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' -e "s/^_HCRSBIL_=//"` echo 'divert(-1)' >> $obj/.settings$$ - LIBDIRS="$libdirs" LIBSRCH="$libsrch" LIBPATH="$libpath" SITECONFIG="$siteconfig" sh $BUILDTOOLS/bin/configure.sh $sflag $oscf >> $obj/.settings$$ + LIBDIRS="$libdirs" LIBSRCH="$libsrch" LIBPATH="$libpath" SITECONFIG="$siteconfig" $SHELL $BUILDTOOLS/bin/configure.sh $sflag $oscf >> $obj/.settings$$ echo 'divert(0)dnl' >> $obj/.settings$$ sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' -e 's/
//g' $obj/.settings$$ | \ ${M4} ${M4_BLDVARIANT_FLAGS} -DconfBUILDTOOLSDIR=$BUILDTOOLS - Makefile.m4 | \ diff --git a/gnu/dist/sendmail/devtools/bin/configure.sh b/gnu/dist/sendmail/devtools/bin/configure.sh index 61498a86919..e75808cbd2e 100644 --- a/gnu/dist/sendmail/devtools/bin/configure.sh +++ b/gnu/dist/sendmail/devtools/bin/configure.sh @@ -8,13 +8,14 @@ # the sendmail distribution. # # -# Id: configure.sh,v 8.45 2001/12/13 23:56:43 gshapiro Exp -# $NetBSD: configure.sh,v 1.5 2003/06/01 14:06:56 atatat Exp $ +# Id: configure.sh,v 8.45.2.1 2003/08/20 18:08:07 gshapiro Exp +# $NetBSD: configure.sh,v 1.6 2004/03/25 19:14:30 atatat Exp $ # # Special script to autoconfigure for M4 generation of Makefile # +SHELL=/bin/sh os="" resolver="" sflag="" @@ -154,7 +155,7 @@ then echo "define(\`confLIBS', \`$libs' confLIBS)dnl" fi -if [ ! -z "`sh $find_prog ranlib`" ] +if [ ! -z "`$SHELL $find_prog ranlib`" ] then echo "define(\`confRANLIB', \`ranlib')dnl" fi @@ -162,7 +163,7 @@ fi roff_progs="groff nroff" for roff_prog in $roff_progs do - if [ ! -z "`sh $find_prog $roff_prog`" ] + if [ ! -z "`$SHELL $find_prog $roff_prog`" ] then found_roff=$roff_prog break; diff --git a/gnu/dist/sendmail/doc/op/op.me b/gnu/dist/sendmail/doc/op/op.me index c41d39dbc12..4ed8cbd002a 100644 --- a/gnu/dist/sendmail/doc/op/op.me +++ b/gnu/dist/sendmail/doc/op/op.me @@ -9,8 +9,8 @@ .\" the sendmail distribution. .\" .\" -.\" Id: op.me,v 8.609.2.23 2003/03/28 05:51:16 ca Exp -.\" $NetBSD: op.me,v 1.11 2003/06/01 14:06:57 atatat Exp $ +.\" Id: op.me,v 8.609.2.29 2004/01/11 17:58:24 ca Exp +.\" $NetBSD: op.me,v 1.12 2004/03/25 19:14:30 atatat Exp $ .\" .\" eqn op.me | pic | troff -me .\" @@ -91,7 +91,7 @@ Sendmail, Inc. .de Ve Version \\$2 .. -.Ve Revision: 8.609.2.23 +.Ve Revision: 8.609.2.29 .rm Ve .sp For Sendmail Version 8.12 @@ -1126,7 +1126,7 @@ that some sites might want. A complete description of the log levels is given in section .\" XREF -4.6. +4.7. .sh 2 "Dumping State" .pp You can ask @@ -3026,7 +3026,7 @@ alias files, :include: files, and external databases) must be readable by that user. -Also, since sendmail will not be able to change it's uid, +Also, since sendmail will not be able to change its uid, delivery to programs or files will be marked as unsafe, e.g., undeliverable, in @@ -4308,8 +4308,11 @@ is ignored (even if the ruleset does not return a ``useful'' result). .pp The .i queuegroup -ruleset is used to map an address to a queue group name. -It should return +ruleset is used to map a recipient address to a queue group name. +The input for the ruleset is a recipient address as specified by the +.sm "SMTP RCPT" +command. +The ruleset should return .b $# followed by the name of a queue group. If the return value starts with anything else it is silently ignored. @@ -6225,8 +6228,9 @@ selected SASL mechanisms. Explanations of these properties can be found in the Cyrus SASL documentation. .ip BadRcptThrottle=\fIN\fP [no short name] -If set and more than the specified number of recipients in a single SMTP -envelope are rejected, sleep for one second after each rejected RCPT command. +If set and the specified number of recipients in a single SMTP +transaction have been rejected, sleep for one second after each subsequent +RCPT command in that transaction. .ip BlankSub=\fIc\fP [B] Set the blank substitution character to @@ -8271,7 +8275,7 @@ Contributed and supported by Mark Roth, roth@uiuc.edu. For more information, consult the web site -.q http://www-dev.cso.uiuc.edu/sendmail/ . +.q http://www-dev.cites.uiuc.edu/sendmail/ . .ip nsd nsd map for IRIX 6.5 and later. Contributed and supported by Bob Mende of SGI, @@ -9155,7 +9159,7 @@ Then create a config file that uses this. For example, using the V8 M4 configuration, include the following line in your .mc file: .(b -define(\`confUSERDB_SPEC\', /etc/mail/userdb.db) +define(\`confUSERDB_SPEC\', /etc/mail/userdb) .)b .sh 1 "OTHER CONFIGURATION" .pp @@ -10765,7 +10769,7 @@ replace it with a blank sheet for double-sided output. .\".sz 10 .\"Eric Allman .\".sp -.\"Version Revision: 8.609.2.23 +.\"Version Revision: 8.609.2.29 .\".ce 0 .bp 3 .ce diff --git a/gnu/dist/sendmail/include/libmilter/mfapi.h b/gnu/dist/sendmail/include/libmilter/mfapi.h index 8a65b8f7804..ad45ec93d04 100644 --- a/gnu/dist/sendmail/include/libmilter/mfapi.h +++ b/gnu/dist/sendmail/include/libmilter/mfapi.h @@ -1,4 +1,4 @@ -/* $NetBSD: mfapi.h,v 1.6 2003/06/01 14:06:57 atatat Exp $ */ +/* $NetBSD: mfapi.h,v 1.7 2004/03/25 19:14:30 atatat Exp $ */ /* * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers. * All rights reserved. @@ -8,7 +8,7 @@ * the sendmail distribution. * * - * Id: mfapi.h,v 8.44.2.3 2002/12/19 02:10:09 ca Exp + * Id: mfapi.h,v 8.44.2.4 2003/10/20 21:51:49 msk Exp */ /* @@ -109,7 +109,7 @@ struct smfiDesc }; #if _FFR_SMFI_OPENSOCKET -LIBMILTER_API int smfi_opensocket __P((void)); +LIBMILTER_API int smfi_opensocket __P((bool)); #endif /* _FFR_SMFI_OPENSOCKET */ LIBMILTER_API int smfi_register __P((struct smfiDesc)); LIBMILTER_API int smfi_main __P((void)); diff --git a/gnu/dist/sendmail/include/libmilter/milter.h b/gnu/dist/sendmail/include/libmilter/milter.h index 9f83c37989a..05a975356f8 100644 --- a/gnu/dist/sendmail/include/libmilter/milter.h +++ b/gnu/dist/sendmail/include/libmilter/milter.h @@ -1,6 +1,6 @@ -/* $NetBSD: milter.h,v 1.8 2003/06/01 14:06:58 atatat Exp $ */ +/* $NetBSD: milter.h,v 1.9 2004/03/25 19:14:30 atatat Exp $ */ /* - * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -8,7 +8,7 @@ * the sendmail distribution. * * - * Id: milter.h,v 8.37.2.1 2002/12/19 02:10:09 ca Exp + * Id: milter.h,v 8.37.2.3 2003/12/02 00:19:51 msk Exp */ /* @@ -26,7 +26,11 @@ typedef pthread_t sthread_t; typedef int socket_t; +#if _FFR_MILTER_MACROS_EOM +# define MAX_MACROS_ENTRIES 5 /* max size of macro pointer array */ +#else /* _FFR_MILTER_MACROS_EOM */ # define MAX_MACROS_ENTRIES 4 /* max size of macro pointer array */ +#endif /* _FFR_MILTER_MACROS_EOM */ /* ** context for milter diff --git a/gnu/dist/sendmail/include/sm/cdefs.h b/gnu/dist/sendmail/include/sm/cdefs.h index 13936de003c..c87d049fa9e 100644 --- a/gnu/dist/sendmail/include/sm/cdefs.h +++ b/gnu/dist/sendmail/include/sm/cdefs.h @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.3 2003/06/01 14:06:58 atatat Exp $ */ +/* $NetBSD: cdefs.h,v 1.4 2004/03/25 19:14:30 atatat Exp $ */ /* * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers. * All rights reserved. @@ -7,7 +7,7 @@ * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * - * Id: cdefs.h,v 1.15 2002/01/16 18:30:11 ca Exp + * Id: cdefs.h,v 1.15.2.1 2003/12/05 22:44:17 ca Exp */ /* @@ -68,11 +68,14 @@ # if __GNUC__ >= 2 # if __GNUC__ == 2 && __GNUC_MINOR__ < 5 # define SM_DEAD(proto) volatile proto +# define SM_DEAD_D volatile # else /* __GNUC__ == 2 && __GNUC_MINOR__ < 5 */ # define SM_DEAD(proto) proto __attribute__((__noreturn__)) +# define SM_DEAD_D # endif /* __GNUC__ == 2 && __GNUC_MINOR__ < 5 */ # else /* __GNUC__ >= 2 */ # define SM_DEAD(proto) proto +# define SM_DEAD_D # endif /* __GNUC__ >= 2 */ # endif /* SM_DEAD */ diff --git a/gnu/dist/sendmail/include/sm/conf.h b/gnu/dist/sendmail/include/sm/conf.h index a31fa5f5efa..56154f50327 100644 --- a/gnu/dist/sendmail/include/sm/conf.h +++ b/gnu/dist/sendmail/include/sm/conf.h @@ -1,6 +1,6 @@ -/* $NetBSD: conf.h,v 1.3 2003/06/01 14:06:58 atatat Exp $ */ +/* $NetBSD: conf.h,v 1.4 2004/03/25 19:14:30 atatat Exp $ */ /* - * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -11,7 +11,7 @@ * the sendmail distribution. * * - * Id: conf.h,v 1.90.2.14 2003/03/06 18:38:06 ca Exp + * Id: conf.h,v 1.90.2.20 2004/01/07 00:52:16 ca Exp */ /* @@ -103,7 +103,9 @@ # endif /* ! HASGETUSERSHELL */ # ifdef HPUX10 # define _PATH_SENDMAIL "/usr/sbin/sendmail" -# define SMRSH_CMDDIR "/var/adm/sm.bin" +# ifndef SMRSH_CMDDIR +# define SMRSH_CMDDIR "/var/adm/sm.bin" +# endif /* ! SMRSH_CMDDIR */ # endif /* HPUX10 */ # ifdef HPUX11 # define HASSETREUID 1 /* setreuid(2) works on HP-UX 11.x */ @@ -111,7 +113,9 @@ # ifndef BROKEN_RES_SEARCH # define BROKEN_RES_SEARCH 1 /* res_search(unknown) returns h_errno=0 */ # endif /* ! BROKEN_RES_SEARCH */ -# define SMRSH_CMDDIR "/var/adm/sm.bin" +# ifndef SMRSH_CMDDIR +# define SMRSH_CMDDIR "/var/adm/sm.bin" +# endif /* ! SMRSH_CMDDIR */ # define _PATH_SENDMAIL "/usr/sbin/sendmail" # else /* HPUX11 */ # ifndef NOT_SENDMAIL @@ -158,6 +162,9 @@ extern void hard_syslog(); # ifdef _AIX5 # define _AIX4 40300 +# if _AIX5 >= 50200 +# define HASUNSETENV 1 /* has unsetenv(3) call */ +# endif /* _AIX5 >= 50200 */ # endif /* _AIX5 */ /* @@ -423,12 +430,17 @@ typedef int pid_t; # if SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) # undef _PATH_SENDMAILPID /* tmpfs /var/run added in 2.8 */ # define _PATH_SENDMAILPID "/var/run/sendmail.pid" -# define SMRSH_CMDDIR "/var/adm/sm.bin" +# ifndef SMRSH_CMDDIR +# define SMRSH_CMDDIR "/var/adm/sm.bin" +# endif /* ! SMRSH_CMDDIR */ # define SL_FUDGE 34 /* fudge offset for SyslogPrefixLen */ # endif /* SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) */ # if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) # define HASURANDOMDEV 1 /* /dev/[u]random added in S9 */ # endif /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */ +# if SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) +# define HASUNSETENV 1 /* unsetenv() added in S10 */ +# endif /* SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) */ # ifndef HASGETUSERSHELL # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */ # endif /* ! HASGETUSERSHELL */ @@ -908,8 +920,12 @@ extern unsigned int sleepX __P((unsigned int seconds)); # define HASSETUSERCONTEXT 1 /* BSDI-style login classes */ # endif /* __FreeBSD_version >= 222000 */ # if __FreeBSD_version >= 330000 /* 3.3.0-release and later */ -# define SMRSH_CMDDIR "/usr/libexec/sm.bin" -# define SMRSH_PATH "/bin:/usr/bin" +# ifndef SMRSH_CMDDIR +# define SMRSH_CMDDIR "/usr/libexec/sm.bin" +# endif /* ! SMRSH_CMDDIR */ +# ifndef SMRSH_PATH +# define SMRSH_PATH "/bin:/usr/bin" +# endif /* ! SMRSH_PATH */ # endif /* __FreeBSD_version >= 330000 */ # define USESYSCTL 1 /* use sysctl(3) for getting ncpus */ # include <sys/sysctl.h> @@ -923,7 +939,9 @@ extern unsigned int sleepX __P((unsigned int seconds)); # undef SPT_TYPE # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ # define HASSETLOGIN 1 /* has setlogin(2) */ -# define HASSETREUID 0 /* OpenBSD has broken setreuid(2) emulation */ +# if OpenBSD < 200305 +# define HASSETREUID 0 /* setreuid(2) broken in OpenBSD < 3.3 */ +# endif /* OpenBSD < 200305 */ # define HASSETEGID 1 /* use setegid(2) to set saved gid */ # define HASURANDOMDEV 1 /* has /dev/urandom(4) */ # if OpenBSD >= 200006 @@ -1361,6 +1379,11 @@ extern void *malloc(); # define HASURANDOMDEV 1 /* 2.0 (at least) has linux/drivers/char/random.c */ # endif /* ! HASURANDOMDEV */ # endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0)) */ +# if defined(__GLIBC__) && defined(__GLIBC_MINOR__) +# ifndef HASSTRERROR +# define HASSTRERROR 1 /* has strerror(3) */ +# endif /* HASSTRERROR */ +# endif /* defined(__GLIBC__) && defined(__GLIBC_MINOR__) */ # ifndef TZ_TYPE # define TZ_TYPE TZ_NONE /* no standard for Linux */ # endif /* ! TZ_TYPE */ @@ -1386,7 +1409,6 @@ extern void *malloc(); ** in 2.1 and later, but the APIs appear before the functions. */ # if defined(__GLIBC__) && defined(__GLIBC_MINOR__) -# define HASSTRERROR 1 /* has strerror(3) */ # define GLIBC_VERSION ((__GLIBC__ << 8) + __GLIBC_MINOR__) # if (GLIBC_VERSION >= 0x201) # undef IPPROTO_ICMPV6 /* linux #defines, glibc enums */ @@ -2236,8 +2258,8 @@ typedef struct msgb mblk_t; # undef HAVE_SYS_ERRLIST # define sys_errlist __sys_errlist # define sys_nerr __sys_nerr -# define major(dev) ((int)(((dev) >> 8) & 0xff) -# define minor(dev) ((int)((dev) & 0xff) +# define major(dev) ((int)(((dev) >> 8) & 0xff)) +# define minor(dev) ((int)((dev) & 0xff)) # endif /* defined(__INTERIX) */ @@ -2548,7 +2570,7 @@ typedef struct msgb mblk_t; # endif /* ! EX_CONFIG */ /* pseudo-codes */ -# define EX_QUIT 22 /* drop out of server immediately */ +# define EX_QUIT 22 /* drop out of server immediately */ # define EX_RESTART 23 /* restart sendmail daemon */ # define EX_SHUTDOWN 24 /* shutdown sendmail daemon */ diff --git a/gnu/dist/sendmail/libmilter/README b/gnu/dist/sendmail/libmilter/README index d8cbda1ed2e..88aa63c26a3 100644 --- a/gnu/dist/sendmail/libmilter/README +++ b/gnu/dist/sendmail/libmilter/README @@ -427,6 +427,7 @@ main(argc, argv) int argc; char *argv[]; { + bool setconn = false; int c; const char *args = "p:"; @@ -443,10 +444,16 @@ main(argc, argv) exit(EX_USAGE); } (void) smfi_setconn(optarg); + setconn = true; break; } } + if (!setconn) + { + fprintf(stderr, "%s: Missing required -p argument\n", argv[0]); + exit(EX_USAGE); + } if (smfi_register(smfilter) == MI_FAILURE) { fprintf(stderr, "smfi_register failed\n"); @@ -457,4 +464,4 @@ main(argc, argv) /* eof */ -Revision: 8.35.2.1, Last updated Date: 2002/10/21 14:31:57 +Revision: 8.35.2.2, Last updated Date: 2003/05/26 04:10:06 diff --git a/gnu/dist/sendmail/libmilter/engine.c b/gnu/dist/sendmail/libmilter/engine.c index 2181d071113..c61c6f204bf 100644 --- a/gnu/dist/sendmail/libmilter/engine.c +++ b/gnu/dist/sendmail/libmilter/engine.c @@ -1,11 +1,11 @@ -/* $NetBSD: engine.c,v 1.9 2003/07/05 15:08:59 martin Exp $ */ +/* $NetBSD: engine.c,v 1.10 2004/03/25 19:14:30 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: engine.c,v 1.9 2003/07/05 15:08:59 martin Exp $"); +__RCSID("$NetBSD: engine.c,v 1.10 2004/03/25 19:14:30 atatat Exp $"); #endif /* - * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -15,7 +15,7 @@ __RCSID("$NetBSD: engine.c,v 1.9 2003/07/05 15:08:59 martin Exp $"); */ #include <sm/gen.h> -SM_RCSID("@(#)Id: engine.c,v 8.109.2.4 2002/12/03 17:27:32 ca Exp") +SM_RCSID("@(#)Id: engine.c,v 8.109.2.8 2003/12/01 23:57:45 msk Exp") #include "libmilter.h" @@ -65,14 +65,21 @@ typedef struct cmdfct_t cmdfct; #define CT_END 0x0008 /* start replying */ /* index in macro array: macros only for these commands */ -#define CI_NONE (-1) -#define CI_CONN 0 -#define CI_HELO 1 -#define CI_MAIL 2 -#define CI_RCPT 3 -#if CI_RCPT >= MAX_MACROS_ENTRIES +#define CI_NONE (-1) +#define CI_CONN 0 +#define CI_HELO 1 +#define CI_MAIL 2 +#define CI_RCPT 3 +#if _FFR_MILTER_MACROS_EOM +# define CI_EOM 4 +# if CI_EOM >= MAX_MACROS_ENTRIES +ERROR: do not compile with CI_EOM >= MAX_MACROS_ENTRIES +# endif +#else /* _FFR_MILTER_MACROS_EOM */ +# if CI_RCPT >= MAX_MACROS_ENTRIES ERROR: do not compile with CI_RCPT >= MAX_MACROS_ENTRIES -#endif +# endif +#endif /* _FFR_MILTER_MACROS_EOM */ /* function prototypes */ static int st_abortfct __P((genarg *)); @@ -162,7 +169,11 @@ static cmdfct cmds[] = {SMFIC_MACRO, CM_ARGV, ST_NONE, CT_KEEP, CI_NONE, st_macros }, {SMFIC_BODY, CM_ARG1, ST_BODY, CT_CONT, CI_NONE, st_bodychunk }, {SMFIC_CONNECT, CM_ARG2, ST_CONN, CT_CONT, CI_CONN, st_connectinfo }, +#if _FFR_MILTER_MACROS_EOM +{SMFIC_BODYEOB, CM_ARG1, ST_ENDM, CT_CONT, CI_EOM, st_bodyend }, +#else /* _FFR_MILTER_MACROS_EOM */ {SMFIC_BODYEOB, CM_ARG1, ST_ENDM, CT_CONT, CI_NONE, st_bodyend }, +#endif /* _FFR_MILTER_MACROS_EOM */ {SMFIC_HELO, CM_ARG1, ST_HELO, CT_CONT, CI_HELO, st_helo }, {SMFIC_HEADER, CM_ARG2, ST_HDRS, CT_CONT, CI_NONE, st_header }, {SMFIC_MAIL, CM_ARGV, ST_MAIL, CT_CONT, CI_MAIL, st_sender }, @@ -605,18 +616,16 @@ st_connectinfo(g) l = g->a_len; while (s[i] != '\0' && i <= l) ++i; - if (i >= l) + if (i + 1 >= l) return _SMFIS_ABORT; /* Move past trailing \0 in host string */ i++; family = s[i++]; - memset(&sockaddr, '\0', sizeof sockaddr); + (void) memset(&sockaddr, '\0', sizeof sockaddr); if (family != SMFIA_UNKNOWN) { - (void) memcpy((void *) &port, (void *) (s + i), - sizeof port); - if ((i += sizeof port) >= l) + if (i + sizeof port >= l) { smi_log(SMI_LOG_ERR, "%s: connect[%p]: wrong len %d >= %d", @@ -624,6 +633,9 @@ st_connectinfo(g) g->a_ctx->ctx_id, (int) i, (int) l); return _SMFIS_ABORT; } + (void) memcpy((void *) &port, (void *) (s + i), + sizeof port); + i += sizeof port; /* make sure string is terminated */ if (s[l - 1] != '\0') @@ -735,7 +747,12 @@ st_helo(g) mi_clr_macros(g->a_ctx, g->a_idx + 1); if (g->a_ctx->ctx_smfi != NULL && (fi_helo = g->a_ctx->ctx_smfi->xxfi_helo) != NULL) + { + /* paranoia: check for terminating '\0' */ + if (g->a_len == 0 || g->a_buf[g->a_len - 1] != '\0') + return MI_FAILURE; return (*fi_helo)(g->a_ctx, g->a_buf); + } return SMFIS_CONTINUE; } /* @@ -853,6 +870,11 @@ st_macros(g) case SMFIC_RCPT: i = CI_RCPT; break; +#if _FFR_MILTER_MACROS_EOM + case SMFIC_BODYEOB: + i = CI_EOM; + break; +#endif /* _FFR_MILTER_MACROS_EOM */ default: free(argv); return _SMFIS_FAIL; @@ -875,6 +897,7 @@ st_macros(g) ** noreply */ +/* ARGSUSED */ static int st_quit(g) genarg *g; @@ -1094,10 +1117,16 @@ dec_argv(buf, len) for (i = 0, elem = 0; i < len && elem < nelem; i++) { if (buf[i] == '\0') - s[++elem] = &(buf[i + 1]); + { + ++elem; + if (i + 1 >= len) + s[elem] = NULL; + else + s[elem] = &(buf[i + 1]); + } } - /* overwrite last entry */ + /* overwrite last entry (already done above, just paranoia) */ s[elem] = NULL; return s; } @@ -1122,6 +1151,9 @@ dec_arg2(buf, len, s1, s2) { size_t i; + /* paranoia: check for terminating '\0' */ + if (len == 0 || buf[len - 1] != '\0') + return MI_FAILURE; *s1 = buf; for (i = 1; i < len && buf[i] != '\0'; i++) continue; diff --git a/gnu/dist/sendmail/libmilter/libmilter.h b/gnu/dist/sendmail/libmilter/libmilter.h index f3dddb76faa..1886c9c44a3 100644 --- a/gnu/dist/sendmail/libmilter/libmilter.h +++ b/gnu/dist/sendmail/libmilter/libmilter.h @@ -1,4 +1,4 @@ -/* $NetBSD: libmilter.h,v 1.9 2003/06/01 14:07:00 atatat Exp $ */ +/* $NetBSD: libmilter.h,v 1.10 2004/03/25 19:14:30 atatat Exp $ */ /* * Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers. * All rights reserved. @@ -20,7 +20,7 @@ #ifdef _DEFINE # define EXTERN # define INIT(x) = x -SM_IDSTR(MilterlId, "@(#)Id: libmilter.h,v 8.33.2.9 2003/01/03 22:14:40 ca Exp") +SM_IDSTR(MilterlId, "@(#)Id: libmilter.h,v 8.33.2.13 2003/10/20 21:51:50 msk Exp") #else /* _DEFINE */ # define EXTERN extern # define INIT(x) @@ -152,7 +152,7 @@ typedef pthread_mutex_t smutex_t; /* hack */ #define smi_log syslog -#define sm_dprintf printf +#define sm_dprintf (void) printf #define milter_ret int #define SMI_LOG_ERR LOG_ERR #define SMI_LOG_FATAL LOG_ERR @@ -177,7 +177,7 @@ extern void mi_clean_signals __P((void)); extern struct hostent *mi_gethostbyname __P((char *, int)); extern int mi_inet_pton __P((int, const char *, void *)); extern void mi_closener __P((void)); -extern int mi_opensocket __P((char *, int, int, smfiDesc_ptr)); +extern int mi_opensocket __P((char *, int, int, bool, smfiDesc_ptr)); /* communication functions */ extern char *mi_rd_cmd __P((socket_t, struct timeval *, char *, size_t *, char *)); diff --git a/gnu/dist/sendmail/libmilter/listener.c b/gnu/dist/sendmail/libmilter/listener.c index 3422588e6bc..a0aa93ce3ca 100644 --- a/gnu/dist/sendmail/libmilter/listener.c +++ b/gnu/dist/sendmail/libmilter/listener.c @@ -1,7 +1,7 @@ -/* $NetBSD: listener.c,v 1.10 2003/07/05 15:09:00 martin Exp $ */ +/* $NetBSD: listener.c,v 1.11 2004/03/25 19:14:30 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: listener.c,v 1.10 2003/07/05 15:09:00 martin Exp $"); +__RCSID("$NetBSD: listener.c,v 1.11 2004/03/25 19:14:30 atatat Exp $"); #endif /* @@ -15,7 +15,7 @@ __RCSID("$NetBSD: listener.c,v 1.10 2003/07/05 15:09:00 martin Exp $"); */ #include <sm/gen.h> -SM_RCSID("@(#)Id: listener.c,v 8.85.2.9 2003/01/03 22:14:40 ca Exp") +SM_RCSID("@(#)Id: listener.c,v 8.85.2.17 2003/10/21 17:22:57 ca Exp") /* ** listener.c -- threaded network listener @@ -24,6 +24,9 @@ SM_RCSID("@(#)Id: listener.c,v 8.85.2.9 2003/01/03 22:14:40 ca Exp") #include "libmilter.h" #include <sm/errstring.h> +#include <sys/types.h> +#include <sys/stat.h> + # if NETINET || NETINET6 # include <arpa/inet.h> @@ -34,26 +37,29 @@ static int L_family; static SOCKADDR_LEN_T L_socksize; static socket_t listenfd = INVALID_SOCKET; -static socket_t mi_milteropen __P((char *, int, char *)); +static socket_t mi_milteropen __P((char *, int, bool, char *)); /* ** MI_OPENSOCKET -- create the socket where this filter and the MTA will meet ** -** Parameters: +** Parameters: ** conn -- connection description ** backlog -- listen backlog -** dbg -- debug level +** dbg -- debug level +** rmsocket -- if true, try to unlink() the socket first +** (UNIX domain sockets only) ** smfi -- filter structure to use ** -** Return value: -** MI_SUCCESS/MI_FAILURE +** Return value: +** MI_SUCCESS/MI_FAILURE */ int -mi_opensocket(conn, backlog, dbg, smfi) +mi_opensocket(conn, backlog, dbg, rmsocket, smfi) char *conn; int backlog; int dbg; + bool rmsocket; smfiDesc_ptr smfi; { if (smfi == NULL || conn == NULL) @@ -70,7 +76,7 @@ mi_opensocket(conn, backlog, dbg, smfi) } (void) smutex_init(&L_Mutex); (void) smutex_lock(&L_Mutex); - listenfd = mi_milteropen(conn, backlog, smfi->xxfi_name); + listenfd = mi_milteropen(conn, backlog, rmsocket, smfi->xxfi_name); if (!ValidSocket(listenfd)) { smi_log(SMI_LOG_FATAL, @@ -97,6 +103,8 @@ mi_opensocket(conn, backlog, dbg, smfi) ** Parameters: ** conn -- connection description ** backlog -- listen backlog +** rmsocket -- if true, try to unlink() the socket first +** (UNIX domain sockets only) ** name -- name for logging ** ** Returns: @@ -111,9 +119,10 @@ static char *sockpath = NULL; #endif /* NETUNIX */ static socket_t -mi_milteropen(conn, backlog, name) +mi_milteropen(conn, backlog, rmsocket, name) char *conn; int backlog; + bool rmsocket; char *name; { socket_t sock; @@ -388,18 +397,18 @@ mi_milteropen(conn, backlog, name) { # if NETINET case AF_INET: - memmove(&addr.sin.sin_addr, - hp->h_addr, - INADDRSZ); + (void) memmove(&addr.sin.sin_addr, + hp->h_addr, + INADDRSZ); addr.sin.sin_port = port; break; # endif /* NETINET */ # if NETINET6 case AF_INET6: - memmove(&addr.sin6.sin6_addr, - hp->h_addr, - IN6ADDRSZ); + (void) memmove(&addr.sin6.sin6_addr, + hp->h_addr, + IN6ADDRSZ); addr.sin6.sin6_port = port; break; # endif /* NETINET6 */ @@ -463,6 +472,41 @@ mi_milteropen(conn, backlog, name) return INVALID_SOCKET; } +#if NETUNIX + if (addr.sa.sa_family == AF_UNIX && rmsocket) + { + struct stat s; + + if (stat(colon, &s) != 0) + { + if (errno != ENOENT) + { + smi_log(SMI_LOG_ERR, + "%s: Unable to stat() %s: %s", + name, colon, sm_errstring(errno)); + (void) closesocket(sock); + return INVALID_SOCKET; + } + } + else if (!S_ISSOCK(s.st_mode)) + { + smi_log(SMI_LOG_ERR, + "%s: %s is not a UNIX domain socket", + name, colon); + (void) closesocket(sock); + return INVALID_SOCKET; + } + else if (unlink(colon) != 0) + { + smi_log(SMI_LOG_ERR, + "%s: Unable to remove %s: %s", + name, colon, sm_errstring(errno)); + (void) closesocket(sock); + return INVALID_SOCKET; + } + } +#endif /* NETUNIX */ + if (bind(sock, &addr.sa, L_socksize) < 0) { smi_log(SMI_LOG_ERR, @@ -597,9 +641,11 @@ mi_closener() ** Parameters: ** conn -- connection description ** dbg -- debug level +** rmsocket -- if true, try to unlink() the socket first +** (UNIX domain sockets only) ** smfi -- filter structure to use ** timeout -- timeout for reads/writes -** backlog -- listen queue backlog size +** backlog -- listen queue backlog size ** ** Returns: ** MI_SUCCESS -- Exited normally @@ -665,7 +711,7 @@ mi_listener(conn, dbg, smfi, timeout, backlog) { socket_t connfd = INVALID_SOCKET; int sockopt = 1; - int r; + int r, mistop; int ret = MI_SUCCESS; int mcnt = 0; /* error count for malloc() failures */ int tcnt = 0; /* error count for thread_create() failures */ @@ -679,16 +725,20 @@ mi_listener(conn, dbg, smfi, timeout, backlog) FD_RD_VAR(rds, excs); struct timeval chktime; - if (mi_opensocket(conn, backlog, dbg, smfi) == MI_FAILURE) + if (mi_opensocket(conn, backlog, dbg, false, smfi) == MI_FAILURE) return MI_FAILURE; clilen = L_socksize; (void) smutex_unlock(&L_Mutex); - while (mi_stop() == MILTER_CONT) + while ((mistop = mi_stop()) == MILTER_CONT) { (void) smutex_lock(&L_Mutex); if (!ValidSocket(listenfd)) { + ret = MI_FAILURE; + smi_log(SMI_LOG_ERR, + "%s: listenfd=%d corrupted, terminating, errno=%d", + smfi->xxfi_name, listenfd, errno); (void) smutex_unlock(&L_Mutex); break; } @@ -734,7 +784,7 @@ mi_listener(conn, dbg, smfi, timeout, backlog) } scnt = 0; /* reset error counter for select() */ - memset(&cliaddr, '\0', sizeof cliaddr); + (void) memset(&cliaddr, '\0', sizeof cliaddr); connfd = accept(listenfd, (struct sockaddr *) &cliaddr, &clilen); save_errno = errno; @@ -810,7 +860,7 @@ mi_listener(conn, dbg, smfi, timeout, backlog) continue; } mcnt = 0; /* reset error counter for malloc() */ - memset(ctx, '\0', sizeof *ctx); + (void) memset(ctx, '\0', sizeof *ctx); ctx->ctx_sd = connfd; ctx->ctx_dbg = dbg; ctx->ctx_timeout = timeout; @@ -860,7 +910,12 @@ mi_listener(conn, dbg, smfi, timeout, backlog) if (ret != MI_SUCCESS) mi_stop_milters(MILTER_ABRT); else + { + if (mistop != MILTER_CONT) + smi_log(SMI_LOG_INFO, "%s: mi_stop=%d", + smfi->xxfi_name, mistop); mi_closener(); + } (void) smutex_destroy(&L_Mutex); return ret; } diff --git a/gnu/dist/sendmail/libmilter/main.c b/gnu/dist/sendmail/libmilter/main.c index 78e9a858566..22c345661ee 100644 --- a/gnu/dist/sendmail/libmilter/main.c +++ b/gnu/dist/sendmail/libmilter/main.c @@ -1,7 +1,7 @@ -/* $NetBSD: main.c,v 1.7 2003/06/01 14:07:00 atatat Exp $ */ +/* $NetBSD: main.c,v 1.8 2004/03/25 19:14:30 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: main.c,v 1.7 2003/06/01 14:07:00 atatat Exp $"); +__RCSID("$NetBSD: main.c,v 1.8 2004/03/25 19:14:30 atatat Exp $"); #endif /* @@ -15,7 +15,7 @@ __RCSID("$NetBSD: main.c,v 1.7 2003/06/01 14:07:00 atatat Exp $"); */ #include <sm/gen.h> -SM_RCSID("@(#)Id: main.c,v 8.64.2.10 2003/01/23 22:34:24 ca Exp") +SM_RCSID("@(#)Id: main.c,v 8.64.2.13 2003/10/20 22:27:13 ca Exp") #define _DEFINE 1 #include "libmilter.h" @@ -92,7 +92,7 @@ smfi_stop() } /* -** default values for some variables. +** Default values for some variables. ** Most of these can be changed with the functions below. */ @@ -107,19 +107,22 @@ static int backlog = MI_SOMAXCONN; ** able to start up ** ** Parameters: -** None. +** rmsocket -- if true, instructs libmilter to attempt +** to remove the socket before creating it; +** only applies for "local:" or "unix:" sockets ** ** Return: ** MI_SUCCESS/MI_FAILURE */ int -smfi_opensocket() +smfi_opensocket(rmsocket) + bool rmsocket; { if (smfi == NULL || conn == NULL) return MI_FAILURE; - return mi_opensocket(conn, backlog, dbg, smfi); + return mi_opensocket(conn, backlog, dbg, rmsocket, smfi); } #endif /* _FFR_SMFI_OPENSOCKET */ diff --git a/gnu/dist/sendmail/libmilter/signal.c b/gnu/dist/sendmail/libmilter/signal.c index ab680213894..17b027cfc14 100644 --- a/gnu/dist/sendmail/libmilter/signal.c +++ b/gnu/dist/sendmail/libmilter/signal.c @@ -1,11 +1,11 @@ -/* $NetBSD: signal.c,v 1.7 2003/06/01 14:07:00 atatat Exp $ */ +/* $NetBSD: signal.c,v 1.8 2004/03/25 19:14:30 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: signal.c,v 1.7 2003/06/01 14:07:00 atatat Exp $"); +__RCSID("$NetBSD: signal.c,v 1.8 2004/03/25 19:14:30 atatat Exp $"); #endif /* - * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -15,7 +15,7 @@ __RCSID("$NetBSD: signal.c,v 1.7 2003/06/01 14:07:00 atatat Exp $"); */ #include <sm/gen.h> -SM_RCSID("@(#)Id: signal.c,v 8.37.2.2 2002/10/23 16:52:00 ca Exp") +SM_RCSID("@(#)Id: signal.c,v 8.37.2.4 2003/11/19 00:22:40 ca Exp") #include "libmilter.h" @@ -96,15 +96,15 @@ mi_signal_thread(name) int sig, errs; sigset_t set; - sigemptyset(&set); - sigaddset(&set, SIGHUP); - sigaddset(&set, SIGTERM); + (void) sigemptyset(&set); + (void) sigaddset(&set, SIGHUP); + (void) sigaddset(&set, SIGTERM); /* Handle Ctrl-C gracefully for debugging */ - sigaddset(&set, SIGINT); + (void) sigaddset(&set, SIGINT); errs = 0; - while (true) + for (;;) { sig = 0; #if defined(SOLARIS) || defined(__svr5__) @@ -144,6 +144,7 @@ mi_signal_thread(name) break; } } + /* NOTREACHED */ } /* ** MI_SPAWN_SIGNAL_THREAD -- spawn thread to handle signals @@ -164,10 +165,10 @@ mi_spawn_signal_thread(name) sigset_t set; /* Mask HUP and KILL signals */ - sigemptyset(&set); - sigaddset(&set, SIGHUP); - sigaddset(&set, SIGTERM); - sigaddset(&set, SIGINT); + (void) sigemptyset(&set); + (void) sigaddset(&set, SIGHUP); + (void) sigaddset(&set, SIGTERM); + (void) sigaddset(&set, SIGINT); if (pthread_sigmask(SIG_BLOCK, &set, NULL) != 0) { diff --git a/gnu/dist/sendmail/libsmdb/smdb2.c b/gnu/dist/sendmail/libsmdb/smdb2.c index e6f1a55deda..792d3808bd6 100644 --- a/gnu/dist/sendmail/libsmdb/smdb2.c +++ b/gnu/dist/sendmail/libsmdb/smdb2.c @@ -1,7 +1,7 @@ -/* $NetBSD: smdb2.c,v 1.8 2003/06/01 14:07:01 atatat Exp $ */ +/* $NetBSD: smdb2.c,v 1.9 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: smdb2.c,v 1.8 2003/06/01 14:07:01 atatat Exp $"); +__RCSID("$NetBSD: smdb2.c,v 1.9 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -14,7 +14,7 @@ __RCSID("$NetBSD: smdb2.c,v 1.8 2003/06/01 14:07:01 atatat Exp $"); */ #include <sm/gen.h> -SM_RCSID("@(#)Id: smdb2.c,v 8.72.2.6 2003/01/23 22:21:39 ca Exp") +SM_RCSID("@(#)Id: smdb2.c,v 8.72.2.7 2003/06/24 17:16:10 ca Exp") #include <fcntl.h> #include <stdlib.h> @@ -584,6 +584,7 @@ smdb_db_open(database, db_name, mode, mode_mask, sff, type, user_info, db_params int db_flags; int lock_fd; int db_fd; + int major_v, minor_v, patch_v; SMDB_DATABASE *smdb_db; SMDB_DB2_DATABASE *db2; DB *db; @@ -591,6 +592,10 @@ smdb_db_open(database, db_name, mode, mode_mask, sff, type, user_info, db_params struct stat stat_info; char db_file_name[MAXPATHLEN]; + (void) db_version(&major_v, &minor_v, &patch_v); + if (major_v != DB_VERSION_MAJOR || minor_v != DB_VERSION_MINOR) + return SMDBE_VERSION_MISMATCH; + *database = NULL; result = smdb_add_extension(db_file_name, sizeof db_file_name, diff --git a/gnu/dist/sendmail/mail.local/mail.local.0 b/gnu/dist/sendmail/mail.local/mail.local.0 index ad492c7c7a1..3e8ebe513a3 100644 --- a/gnu/dist/sendmail/mail.local/mail.local.0 +++ b/gnu/dist/sendmail/mail.local/mail.local.0 @@ -1,132 +1,81 @@ +MAIL.LOCAL(8) MAIL.LOCAL(8) -MAIL.LOCAL(8) MAIL.LOCAL(8) - - NNAAMMEE mail.local - store mail in a mailbox SSYYNNOOPPSSIISS - mmaaiill..llooccaall [--77] [--bb] [--dd] [--DD _m_b_d_b] [--ll] [--ff _f_r_o_m|--rr _f_r_o_m] - [--hh _f_i_l_e_n_a_m_e ] _u_s_e_r _._._. + mmaaiill..llooccaall [--77] [--bb] [--dd] [--DD _m_b_d_b] [--ll] [--ff _f_r_o_m|--rr _f_r_o_m] [--hh _f_i_l_e_n_a_m_e + ] _u_s_e_r _._._. DDEESSCCRRIIPPTTIIOONN - MMaaiill..llooccaall reads the standard input up to an end-of-file - and appends it to each _u_s_e_r_'_s mmaaiill file. The _u_s_e_r must be - a valid user name. + MMaaiill..llooccaall reads the standard input up to an end-of-file and appends it + to each _u_s_e_r_'_s mmaaiill file. The _u_s_e_r must be a valid user name. The options are as follows: - --77 Do not advertise 8BITMIME support in LMTP mode. + --77 Do not advertise 8BITMIME support in LMTP mode. - --bb Return a permanent error instead of a temporary - error if a mailbox exceeds quota. + --bb Return a permanent error instead of a temporary error if a + mailbox exceeds quota. - --dd Specify this is a delivery (for backward compat- - ibility). This option has no effect. + --dd Specify this is a delivery (for backward compatibility). + This option has no effect. - --DD _m_b_d_b Specify the name of the mailbox database which - is used to look up local recipient names. This - option defaults to "pw", which means use getpw- - nam(). + --DD _m_b_d_b Specify the name of the mailbox database which is used to + look up local recipient names. This option defaults to "pw", + which means use getpwnam(). --ff _f_r_o_m Specify the sender's name. --ll Turn on LMTP mode. - --rr _f_r_o_m Specify the sender's name (for backward compati- - bility). Same as -f. + --rr _f_r_o_m Specify the sender's name (for backward compatibility). Same + as -f. --hh _f_i_l_e_n_a_m_e - Store incoming mail in _f_i_l_e_n_a_m_e in the user's - home directory instead of a system mail spool - directory. - - Individual mail messages in the mailbox are delimited by - an empty line followed by a line beginning with the string - ``From ''. A line containing the string ``From '', the - sender's name and a time stamp is prepended to each deliv- - ered mail message. A blank line is appended to each mes- - sage. A greater-than character (``>'') is prepended to - any line in the message which could be mistaken for a - ``From '' delimiter line (that is, a line beginning with - the five characters ``From '' following a blank line). - - The mail files are exclusively locked with flock(2) while - mail is appended, and a uusseerr..lloocckk file also is created - while the mailbox is locked for compatibility with older - MUAs. - - - - - Date: 2001/04/05 23:27:35 1 - - + Store incoming mail in _f_i_l_e_n_a_m_e in the user's home directory + instead of a system mail spool directory. + Individual mail messages in the mailbox are delimited by an empty line + followed by a line beginning with the string ``From ''. A line con- + taining the string ``From '', the sender's name and a time stamp is + prepended to each delivered mail message. A blank line is appended to + each message. A greater-than character (``>'') is prepended to any + line in the message which could be mistaken for a ``From '' delimiter + line (that is, a line beginning with the five characters ``From '' fol- + lowing a blank line). + The mail files are exclusively locked with flock(2) while mail is + appended, and a uusseerr..lloocckk file also is created while the mailbox is + locked for compatibility with older MUAs. -MAIL.LOCAL(8) MAIL.LOCAL(8) + If the ``biff'' service is returned by getservbyname(3), the biff + server is notified of delivered mail. - - If the ``biff'' service is returned by getservbyname(3), - the biff server is notified of delivered mail. - - The mmaaiill..llooccaall utility exits 0 on success, and >0 if an - error occurs. + The mmaaiill..llooccaall utility exits 0 on success, and >0 if an error occurs. EENNVVIIRROONNMMEENNTT - TZ Used to set the appropriate time zone on the times- - tamp. + TZ Used to set the appropriate time zone on the timestamp. FFIILLEESS /tmp/local.XXXXXX temporary files /var/mail/user user's default mailbox directory - /var/mail/user.lock lock file for a user's default mail- - box + /var/mail/user.lock lock file for a user's default mailbox SSEEEE AALLSSOO - mail(1), xsend(1), flock(2), getservbyname(3), comsat(8), - sendmail(8) + mail(1), xsend(1), flock(2), getservbyname(3), comsat(8), sendmail(8) WWAARRNNIINNGG - mmaaiill..llooccaall escapes only "^From " lines that follow an - empty line. If all lines starting with "From " should be - escaped, use the 'E' flag for the local mailer in the - sendmail.cf file. + mmaaiill..llooccaall escapes only "^From " lines that follow an empty line. If + all lines starting with "From " should be escaped, use the 'E' flag for + the local mailer in the sendmail.cf file. HHIISSTTOORRYY - A superset of mmaaiill..llooccaall (handling mailbox reading as well - as mail delivery) appeared in Version 7 AT&T UNIX as the - program mmaaiill. - - - - - - - - - - - - - - - - - - - - - - - - - - + A superset of mmaaiill..llooccaall (handling mailbox reading as well as mail + delivery) appeared in Version 7 AT&T UNIX as the program mmaaiill. - Date: 2001/04/05 23:27:35 2 + Date: 2001/04/05 23:27:35 MAIL.LOCAL(8) diff --git a/gnu/dist/sendmail/mail.local/mail.local.c b/gnu/dist/sendmail/mail.local/mail.local.c index 9b106f577da..d07b9991f3e 100644 --- a/gnu/dist/sendmail/mail.local/mail.local.c +++ b/gnu/dist/sendmail/mail.local/mail.local.c @@ -1,7 +1,7 @@ -/* $NetBSD: mail.local.c,v 1.9 2003/06/01 14:07:02 atatat Exp $ */ +/* $NetBSD: mail.local.c,v 1.10 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: mail.local.c,v 1.9 2003/06/01 14:07:02 atatat Exp $"); +__RCSID("$NetBSD: mail.local.c,v 1.10 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -24,7 +24,7 @@ SM_IDSTR(copyright, Copyright (c) 1990, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n") -SM_IDSTR(id, "@(#)Id: mail.local.c,v 8.239.2.5 2003/03/15 23:43:20 gshapiro Exp") +SM_IDSTR(id, "@(#)Id: mail.local.c,v 8.239.2.11 2003/09/01 01:49:46 gshapiro Exp") #include <stdlib.h> #include <sm/errstring.h> @@ -34,6 +34,7 @@ SM_IDSTR(id, "@(#)Id: mail.local.c,v 8.239.2.5 2003/03/15 23:43:20 gshapiro Exp" # ifdef EX_OK # undef EX_OK /* unistd.h may have another use for this */ # endif /* EX_OK */ +# define LOCKFILE_PMODE 0 #include <sm/mbdb.h> #include <sm/sysexits.h> @@ -69,10 +70,6 @@ SM_IDSTR(id, "@(#)Id: mail.local.c,v 8.239.2.5 2003/03/15 23:43:20 gshapiro Exp" #include <sendmail/pathnames.h> -/* additional mode for open() */ -# define EXTRA_MODE 0 - - #ifndef LOCKTO_RM # define LOCKTO_RM 300 /* timeout for stale lockfile removal */ #endif /* ! LOCKTO_RM */ @@ -860,7 +857,7 @@ deliver(fd, name) int exitval; char *p; char *errcode; - off_t curoff; + off_t curoff, cursize; #ifdef CONTENTLENGTH off_t headerbytes; int readamount; @@ -1003,7 +1000,7 @@ tryagain: mode |= S_IRGRP|S_IWGRP; #endif /* MAILGID */ - mbfd = open(path, O_APPEND|O_CREAT|O_EXCL|O_WRONLY|EXTRA_MODE, + mbfd = open(path, O_APPEND|O_CREAT|O_EXCL|O_WRONLY, mode); save_errno = errno; @@ -1073,7 +1070,7 @@ tryagain: #ifdef DEBUG fprintf(stderr, "new euid = %d\n", (int) geteuid()); #endif /* DEBUG */ - mbfd = open(path, O_APPEND|O_WRONLY|EXTRA_MODE, 0); + mbfd = open(path, O_APPEND|O_WRONLY, 0); if (mbfd < 0) { mailerr("450 4.2.0", "%s: %s", path, sm_errstring(errno)); @@ -1209,7 +1206,6 @@ tryagain: { mailerr("450 4.2.0", "%s: %s", path, sm_errstring(errno)); err3: - (void) setreuid(0, 0); #ifdef DEBUG fprintf(stderr, "reset euid = %d\n", (int) geteuid()); #endif /* DEBUG */ @@ -1217,10 +1213,26 @@ err3: (void) ftruncate(mbfd, curoff); err1: if (mbfd >= 0) (void) close(mbfd); -err0: unlockmbox(); +err0: (void) setreuid(0, 0); + unlockmbox(); return; } + /* + ** Save the current size so if the close() fails below + ** we can make sure no other process has changed the mailbox + ** between the failed close and the re-open()/re-lock(). + ** If something else has changed the size, we shouldn't + ** try to truncate it as we may do more harm then good + ** (e.g., truncate a later message delivery). + */ + + if (fstat(mbfd, &sb) < 0) + cursize = 0; + else + cursize = sb.st_size; + + /* Close and check -- NFS doesn't write until the close. */ if (close(mbfd)) { @@ -1230,9 +1242,12 @@ err0: unlockmbox(); errcode = "552 5.2.2"; #endif /* EDQUOT */ mailerr(errcode, "%s: %s", path, sm_errstring(errno)); - mbfd = open(path, O_WRONLY|EXTRA_MODE, 0); - if (mbfd < 0 - || fstat(mbfd, &sb) < 0 || + mbfd = open(path, O_WRONLY, 0); + if (mbfd < 0 || + cursize == 0 + || flock(mbfd, LOCK_EX) < 0 || + fstat(mbfd, &sb) < 0 || + sb.st_size != cursize || sb.st_nlink != 1 || !S_ISREG(sb.st_mode) || sb.st_dev != fsb.st_dev || @@ -1350,7 +1365,7 @@ lockmbox(path) errno = 0; return EX_TEMPFAIL; } - fd = open(LockName, O_WRONLY|O_EXCL|O_CREAT, 0); + fd = open(LockName, O_WRONLY|O_EXCL|O_CREAT, LOCKFILE_PMODE); if (fd >= 0) { /* defeat lock checking programs which test pid */ diff --git a/gnu/dist/sendmail/rmail/rmail.0 b/gnu/dist/sendmail/rmail/rmail.0 index 0dbcacf20e7..8bda8d17221 100644 --- a/gnu/dist/sendmail/rmail/rmail.0 +++ b/gnu/dist/sendmail/rmail/rmail.0 @@ -1,9 +1,7 @@ +RMAIL(8) RMAIL(8) -RMAIL(8) RMAIL(8) - - NNAAMMEE rmail - handle remote mail received via uucp @@ -11,18 +9,16 @@ SSYYNNOOPPSSIISS rrmmaaiill [--DD _d_o_m_a_i_n] [--TT] _u_s_e_r _._._. DDEESSCCRRIIPPTTIIOONN - RRmmaaiill interprets incoming mail received via uucp(1), col- - lapsing ``From'' lines in the form generated by - mail.local(8) into a single line of the form ``return- - path!sender'', and passing the processed mail on to send- - mail(8). + RRmmaaiill interprets incoming mail received via uucp(1), collapsing + ``From'' lines in the form generated by mail.local(8) into a single + line of the form ``return-path!sender'', and passing the processed mail + on to sendmail(8). - RRmmaaiill is explicitly designed for use with uucp and send- - mail. + RRmmaaiill is explicitly designed for use with uucp and sendmail. FFllaaggss - --DD Use the specified _d_o_m_a_i_n instead of the default - domain of ``UUCP''. + --DD Use the specified _d_o_m_a_i_n instead of the default domain of + ``UUCP''. --TT Turn on debugging. @@ -37,30 +33,4 @@ BBUUGGSS - - - - - - - - - - - - - - - - - - - - - - - - - Date: 2001/04/03 01:53:16 1 - - + Date: 2001/04/03 01:53:16 RMAIL(8) diff --git a/gnu/dist/sendmail/sendmail/README b/gnu/dist/sendmail/sendmail/README index c2c38ab5ab9..6e210cf6d1a 100644 --- a/gnu/dist/sendmail/sendmail/README +++ b/gnu/dist/sendmail/sendmail/README @@ -9,8 +9,8 @@ # the sendmail distribution. # # -# Id: README,v 8.355.2.14 2003/03/27 21:39:29 ca Exp -# $NetBSD: README,v 1.11 2003/06/01 14:07:04 atatat Exp $ +# Id: README,v 8.355.2.16 2004/01/08 21:54:55 ca Exp +# $NetBSD: README,v 1.12 2004/03/25 19:14:31 atatat Exp $ # This directory contains the source files for sendmail(TM). @@ -126,7 +126,7 @@ MAP_REGEX Regular Expression support. You will need to use an the Free Software Foundation. DNSMAP DNS map support. Requires NAMED_BIND. PH_MAP PH map support. You will need the libphclient library from - the nph package (http://www-dev.cso.uiuc.edu/ph/nph/). + the nph package (http://www-dev.cites.uiuc.edu/ph/nph/). MAP_NSD nsd map support (IRIX 6.5 and later). >>> NOTE WELL for NEWDB support: If you want to get ndbm support, for @@ -562,6 +562,11 @@ MATCHGECOS Permit fuzzy matching of user names against the full MIME8TO7 If non-zero, include 8 to 7 bit MIME conversions. This also controls advertisement of 8BITMIME in the ESMTP startup dialogue. +MIME7TO8_OLD If 0 then use an algorithm for MIME 7-bit quoted-printable + or base64 encoding to 8-bit text that has been introduced + in 8.12.3. There are some examples where that code fails, + but the old code works. If you have an example of improper + 7 to 8 bit conversion please send it to sendmail-bugs. MIME7TO8 If non-zero, include 7 to 8 bit MIME conversions. HES_GETMAILHOST Define this to 1 if you are using Hesiod with the hes_getmailhost() routine. This is included with the MIT @@ -1641,7 +1646,7 @@ OpenSSL PH PH support is provided by Mark Roth <roth@uiuc.edu>. The map is - described at http://www-dev.cso.uiuc.edu/sendmail/ . + described at http://www-dev.cites.uiuc.edu/sendmail/ . NOTE: The "spacedname" pseudo-field which was used by earlier versions of the PH map code is no longer supported! See the URL @@ -1798,4 +1803,4 @@ util.c Some general purpose routines used by sendmail. version.c The version number and information about this version of sendmail. -(Version Revision: 8.355.2.14, last update Date: 2003/03/27 21:39:29 ) +(Version Revision: 8.355.2.16, last update Date: 2004/01/08 21:54:55 ) diff --git a/gnu/dist/sendmail/sendmail/TRACEFLAGS b/gnu/dist/sendmail/sendmail/TRACEFLAGS index daae43457c3..0ccc9ef6b77 100644 --- a/gnu/dist/sendmail/sendmail/TRACEFLAGS +++ b/gnu/dist/sendmail/sendmail/TRACEFLAGS @@ -1,5 +1,5 @@ -# Id: TRACEFLAGS,v 8.37.2.3 2002/09/12 02:57:36 gshapiro Exp -# $NetBSD: TRACEFLAGS,v 1.5 2003/06/01 14:07:04 atatat Exp $ +# Id: TRACEFLAGS,v 8.37.2.4 2003/06/13 21:59:45 lijian Exp +# $NetBSD: TRACEFLAGS,v 1.6 2004/03/25 19:14:31 atatat Exp $ 0, 4 main.c main canonical name, UUCP node name, a.k.a.s 0, 15 main.c main print configuration 0, 44 util.c printav print address of each string diff --git a/gnu/dist/sendmail/sendmail/alias.c b/gnu/dist/sendmail/sendmail/alias.c index c5021a4e8c6..31b2e651a24 100644 --- a/gnu/dist/sendmail/sendmail/alias.c +++ b/gnu/dist/sendmail/sendmail/alias.c @@ -1,11 +1,11 @@ -/* $NetBSD: alias.c,v 1.8 2003/06/01 14:07:04 atatat Exp $ */ +/* $NetBSD: alias.c,v 1.9 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: alias.c,v 1.8 2003/06/01 14:07:04 atatat Exp $"); +__RCSID("$NetBSD: alias.c,v 1.9 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -19,7 +19,7 @@ __RCSID("$NetBSD: alias.c,v 1.8 2003/06/01 14:07:04 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: alias.c,v 8.214 2002/05/24 20:50:16 gshapiro Exp") +SM_RCSID("@(#)Id: alias.c,v 8.214.2.2 2003/10/06 20:43:29 ca Exp") #define SEPARATOR ':' # define ALIAS_SPEC_SEPARATORS " ,/:" @@ -100,7 +100,7 @@ alias(a, sendq, aliaslevel, e) if (aliaslookup(obuf, &status, a->q_host) != NULL) { if (LogLevel > 8) - syslog(LOG_WARNING, + sm_syslog(LOG_WARNING, e->e_id, "possible spam from <> to list: %s, redirected to %s\n", a->q_user, obuf); a->q_user = sm_rpool_strdup_x(e->e_rpool, obuf); diff --git a/gnu/dist/sendmail/sendmail/aliases.0 b/gnu/dist/sendmail/sendmail/aliases.0 index a8469a8e841..694e4bf8bad 100644 --- a/gnu/dist/sendmail/sendmail/aliases.0 +++ b/gnu/dist/sendmail/sendmail/aliases.0 @@ -1,9 +1,7 @@ +ALIASES(5) ALIASES(5) -ALIASES(5) ALIASES(5) - - NNAAMMEE aliases - aliases file for sendmail @@ -11,16 +9,14 @@ SSYYNNOOPPSSIISS aalliiaasseess DDEESSCCRRIIPPTTIIOONN - This file describes user ID aliases used by sendmail. The - file resides in /etc/mail and is formatted as a series of - lines of the form + This file describes user ID aliases used by sendmail. The file resides + in /etc/mail and is formatted as a series of lines of the form name: addr_1, addr_2, addr_3, . . . - The _n_a_m_e is the name to alias, and the _a_d_d_r___n are the - aliases for that name. _a_d_d_r___n can be another alias, a - local username, a local filename, a command, an include - file, or an external address. + The _n_a_m_e is the name to alias, and the _a_d_d_r___n are the aliases for that + name. _a_d_d_r___n can be another alias, a local username, a local filename, + a command, an include file, or an external address. LLooccaall UUsseerrnnaammee username @@ -30,56 +26,40 @@ DDEESSCCRRIIPPTTIIOONN LLooccaall FFiilleennaammee /path/name - Messages are appended to the file specified by the - full pathname (starting with a slash (/)) + Messages are appended to the file specified by the full pathname + (starting with a slash (/)) CCoommmmaanndd |command - A command starts with a pipe symbol (|), it - receives messages via standard input. + A command starts with a pipe symbol (|), it receives messages + via standard input. IInncclluuddee FFiillee :include: /path/name - The aliases in pathname are added to the aliases - for _n_a_m_e_. + The aliases in pathname are added to the aliases for _n_a_m_e_. EE--MMaaiill AAddddrreessss user@domain An e-mail address in RFC 822 format. - Lines beginning with white space are continuation lines. - Another way to continue lines is by placing a backslash - directly before a newline. Lines beginning with # are - comments. - - Aliasing occurs only on local names. Loops can not occur, - since no message will be sent to any person more than - once. - - - - Date: 2000/12/14 23:09:46 1 - - - - + Lines beginning with white space are continuation lines. Another way + to continue lines is by placing a backslash directly before a newline. + Lines beginning with # are comments. -ALIASES(5) ALIASES(5) + Aliasing occurs only on local names. Loops can not occur, since no + message will be sent to any person more than once. + After aliasing has been done, local and valid recipients who have a + ``.forward'' file in their home directory have messages forwarded to + the list of users defined in that file. - After aliasing has been done, local and valid recipients - who have a ``.forward'' file in their home directory have - messages forwarded to the list of users defined in that - file. - - This is only the raw data file; the actual aliasing infor- - mation is placed into a binary format in the file - /etc/mail/aliases.db using the program newaliases(1). A - newaliases command should be executed each time the - aliases file is changed for the change to take effect. + This is only the raw data file; the actual aliasing information is + placed into a binary format in the file /etc/mail/aliases.db using the + program newaliases(1). A newaliases command should be executed each + time the aliases file is changed for the change to take effect. SSEEEE AALLSSOO newaliases(1), dbm(3), dbopen(3), db_open(3), sendmail(8) @@ -89,44 +69,15 @@ SSEEEE AALLSSOO _S_E_N_D_M_A_I_L _A_n _I_n_t_e_r_n_e_t_w_o_r_k _M_a_i_l _R_o_u_t_e_r_. BBUUGGSS - If you have compiled sendmail with DBM support instead of - NEWDB, you may have encountered problems in dbm(3) - restricting a single alias to about 1000 bytes of informa- - tion. You can get longer aliases by ``chaining''; that - is, make the last name in the alias be a dummy name which - is a continuation alias. + If you have compiled sendmail with DBM support instead of NEWDB, you + may have encountered problems in dbm(3) restricting a single alias to + about 1000 bytes of information. You can get longer aliases by + ``chaining''; that is, make the last name in the alias be a dummy name + which is a continuation alias. HHIISSTTOORRYY The aalliiaasseess file format appeared in 4.0BSD. - - - - - - - - - - - - - - - - - - - - - - - - - - - Date: 2000/12/14 23:09:46 2 - - + Date: 2000/12/14 23:09:46 ALIASES(5) diff --git a/gnu/dist/sendmail/sendmail/collect.c b/gnu/dist/sendmail/sendmail/collect.c index 5046c374314..5e6350d4631 100644 --- a/gnu/dist/sendmail/sendmail/collect.c +++ b/gnu/dist/sendmail/sendmail/collect.c @@ -1,11 +1,11 @@ -/* $NetBSD: collect.c,v 1.10 2003/06/01 14:07:04 atatat Exp $ */ +/* $NetBSD: collect.c,v 1.11 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: collect.c,v 1.10 2003/06/01 14:07:04 atatat Exp $"); +__RCSID("$NetBSD: collect.c,v 1.11 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -19,7 +19,7 @@ __RCSID("$NetBSD: collect.c,v 1.10 2003/06/01 14:07:04 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: collect.c,v 8.242.2.4 2003/03/28 17:34:39 ca Exp") +SM_RCSID("@(#)Id: collect.c,v 8.242.2.8 2003/07/08 01:16:35 ca Exp") static void collecttimeout __P((time_t)); static void dferror __P((SM_FILE_T *volatile, char *, ENVELOPE *)); @@ -223,7 +223,7 @@ collect_dfopen(e) syserr("@Cannot create %s", dfname); e->e_flags |= EF_NO_BODY_RETN; flush_errors(true); - finis(true, true, ExitStat); + finis(false, true, ExitStat); /* NOTREACHED */ } dfd = sm_io_getinfo(df, SM_IO_WHAT_FD, NULL); @@ -253,6 +253,7 @@ collect_dfopen(e) ** end of message. ** hdrp -- the location to stash the header. ** e -- the current envelope. +** rsetsize -- reset e_msgsize? ** ** Returns: ** none. @@ -287,11 +288,12 @@ static SM_EVENT *volatile CollectTimeout = NULL; #define MS_DISCARD 3 /* discarding rest of message */ void -collect(fp, smtpmode, hdrp, e) +collect(fp, smtpmode, hdrp, e, rsetsize) SM_FILE_T *fp; bool smtpmode; HDR **hdrp; register ENVELOPE *e; + bool rsetsize; { register SM_FILE_T *volatile df; volatile bool ignrdot; @@ -372,7 +374,8 @@ collect(fp, smtpmode, hdrp, e) CollectTimeout = sm_setevent(dbto, collecttimeout, dbto); } - e->e_msgsize = 0; + if (rsetsize) + e->e_msgsize = 0; for (;;) { if (tTd(30, 35)) @@ -889,7 +892,22 @@ readerr: /* collect statistics */ if (OpMode != MD_VERIFY) + { + /* + ** Recalculate e_msgpriority, it is done at in eatheader() + ** which is called (in 8.12) after the header is collected, + ** hence e_msgsize is (most likely) incorrect. + */ + + e->e_msgpriority = e->e_msgsize + - e->e_class * WkClassFact + + e->e_nrcpts * WkRecipFact; + if (tTd(90, 1)) + sm_syslog(LOG_INFO, e->e_id, + "collect: at end: msgsize=%ld, msgpriority=%ld", + e->e_msgsize, e->e_msgpriority); markstats(e, (ADDRESS *) NULL, STATS_NORMAL); + } } static void @@ -1025,6 +1043,7 @@ dferror(df, msg, e) ** ** Parameters: ** fm -- the from line. +** e -- envelope ** ** Returns: ** none. diff --git a/gnu/dist/sendmail/sendmail/conf.c b/gnu/dist/sendmail/sendmail/conf.c index 13a16ad7196..e290ce8e5ea 100644 --- a/gnu/dist/sendmail/sendmail/conf.c +++ b/gnu/dist/sendmail/sendmail/conf.c @@ -1,7 +1,7 @@ -/* $NetBSD: conf.c,v 1.17 2003/06/01 14:07:05 atatat Exp $ */ +/* $NetBSD: conf.c,v 1.18 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: conf.c,v 1.17 2003/06/01 14:07:05 atatat Exp $"); +__RCSID("$NetBSD: conf.c,v 1.18 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -19,9 +19,12 @@ __RCSID("$NetBSD: conf.c,v 1.17 2003/06/01 14:07:05 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: conf.c,v 8.972.2.35 2003/03/28 05:46:09 ca Exp") +SM_RCSID("@(#)Id: conf.c,v 8.972.2.54 2004/01/08 21:54:55 ca Exp") #include <sendmail/pathnames.h> +#if NEWDB +# include "sm/bdb.h" +#endif /* NEWDB */ # include <sys/ioctl.h> # include <sys/param.h> @@ -471,6 +474,19 @@ setupmaps() register STAB *s; #if NEWDB +# if DB_VERSION_MAJOR > 1 + int major_v, minor_v, patch_v; + + (void) db_version(&major_v, &minor_v, &patch_v); + if (major_v != DB_VERSION_MAJOR || minor_v != DB_VERSION_MINOR) + { + errno = 0; + syserr("Berkeley DB version mismatch: compiled against %d.%d.%d, run-time linked against %d.%d.%d", + DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH, + major_v, minor_v, patch_v); + } +# endif /* DB_VERSION_MAJOR > 1 */ + MAPDEF("hash", ".db", MCF_ALIASOK|MCF_REBUILDABLE, map_parseargs, hash_map_open, db_map_close, db_map_lookup, db_map_store); @@ -2233,7 +2249,7 @@ refuseconnections(name, e, d, active) sm_setproctitle(true, e, R_MSG_LA, name, CurrentLA); if (LogLevel > 8) sm_syslog(LOG_NOTICE, NOQID, R_MSG_LA, name, CurrentLA); -#if _FFR_REJECT_LOG +# if _FFR_REJECT_LOG now = curtime(); if (firstrejtime[d] == 0) { @@ -2246,13 +2262,13 @@ refuseconnections(name, e, d, active) pintvl(now - firstrejtime[d], true)); nextlogtime[d] = now + RejectLogInterval; } -#endif /* _FFR_REJECT_LOG */ +# endif /* _FFR_REJECT_LOG */ return true; } -#if _FFR_REJECT_LOG +# if _FFR_REJECT_LOG else firstrejtime[d] = 0; -#endif /* _FFR_REJECT_LOG */ +# endif /* _FFR_REJECT_LOG */ if (DelayLA > 0 && CurrentLA >= DelayLA) { @@ -2434,12 +2450,12 @@ initsetproctitle(argc, argv, envp) */ align = -1; -#if _FFR_SPT_ALIGN -# ifdef SPT_ALIGN_SIZE +# if _FFR_SPT_ALIGN +# ifdef SPT_ALIGN_SIZE for (i = SPT_ALIGN_SIZE; i > 0; i >>= 1) align++; -# endif /* SPT_ALIGN_SIZE */ -#endif /* _FFR_SPT_ALIGN */ +# endif /* SPT_ALIGN_SIZE */ +# endif /* _FFR_SPT_ALIGN */ for (i = 0; i < argc; i++) { @@ -2824,25 +2840,6 @@ uname(name) return 0; } -# if 0 - /* - ** Popen is known to have security holes. - */ - - /* try uuname -l to return local name */ - if ((file = popen("uuname -l", "r")) != NULL) - { - (void) sm_io_fgets(file, SM_TIME_DEFAULT, name, - NODE_LENGTH + 1); - (void) pclose(file); - n = strchr(name, '\n'); - if (n != NULL) - *n = '\0'; - if (name->nodename[0] != '\0') - return 0; - } -# endif /* 0 */ - return -1; } #endif /* !HASUNAME */ @@ -4740,7 +4737,7 @@ load_if_names() # ifndef __hpux lifc.lifc_family = AF_UNSPEC; lifc.lifc_flags = 0; -# endif /* __hpux */ +# endif /* ! __hpux */ if (ioctl(s, SIOCGLIFCONF, (char *)&lifc) < 0) { if (tTd(0, 4)) @@ -5581,6 +5578,9 @@ char *CompileOptions[] = #if MIME7TO8 "MIME7TO8", #endif /* MIME7TO8 */ +#if MIME7TO8_OLD + "MIME7TO8_OLD", +#endif /* MIME7TO8_OLD */ #if MIME8TO7 "MIME8TO7", #endif /* MIME8TO7 */ @@ -5685,6 +5685,9 @@ char *OsCompileOptions[] = #if ADDRCONFIG_IS_BROKEN "ADDRCONFIG_IS_BROKEN", #endif /* ADDRCONFIG_IS_BROKEN */ +#if ALLOW_255 + "ALLOW_255", +#endif /* ALLOW_255 */ #ifdef AUTO_NETINFO_HOSTS "AUTO_NETINFO_HOSTS", #endif /* AUTO_NETINFO_HOSTS */ @@ -5936,6 +5939,10 @@ char *FFRCompileOptions[] = /* Stricter checks about queue directory permissions. */ "_FFR_CHK_QUEUE", #endif /* _FFR_CHK_QUEUE */ +#if _FFR_CLIENT_SIZE + /* Don't try to send mail if its size exceeds SIZE= of server. */ + "_FFR_CLIENT_SIZE", +#endif /* _FFR_CLIENT_SIZE */ #if _FFR_CONTROL_MSTAT /* Extended daemon status. */ "_FFR_CONTROL_MSTAT", @@ -5996,6 +6003,10 @@ char *FFRCompileOptions[] = "_FFR_DROP_TRUSTUSER_WARNING", #endif /* _FFR_DROP_TRUSTUSER_WARNING */ +#if _FFR_EXTRA_MAP_CHECK + /* perform extra checks on $( $) in R lines */ + "_FFR_EXTRA_MAP_CHECK", +#endif /* _FFR_EXTRA_MAP_CHECK */ #if _FFR_FIX_DASHT /* ** If using -t, force not sending to argv recipients, even @@ -6033,6 +6044,10 @@ char *FFRCompileOptions[] = /* Use nsswitch on HP-UX */ "_FFR_HPUX_NSSWITCH", #endif /* _FFR_HPUX_NSSWITCH */ +#if _FFR_IGNORE_BOGUS_ADDR + /* Ignore addresses for which prescan() failed */ + "_FFR_IGNORE_BOGUS_ADDR", +#endif /* _FFR_IGNORE_BOGUS_ADDR */ #if _FFR_IGNORE_EXT_ON_HELO /* Ignore extensions offered in response to HELO */ "_FFR_IGNORE_EXT_ON_HELO", @@ -6056,12 +6071,24 @@ char *FFRCompileOptions[] = /* Randall S. Winchester of the University of Maryland */ "_FFR_MAX_FORWARD_ENTRIES", #endif /* _FFR_MAX_FORWARD_ENTRIES */ +#if _FFR_MAX_SLEEP_TIME + /* Limit sleep(2) time in libsm/clock.c */ + "_FFR_MAX_SLEEP_TIME", +#endif /* _FFR_MAX_SLEEP_TIME */ +#if _FFR_MESSAGEID_MACRO + /* stick the message ID header's value in a macro */ + "_FFR_MESSAGEID_MACRO", +#endif /* _FFR_MESSAGEID_MACRO */ #if MILTER # if _FFR_MILTER_421 /* If a filter returns 421, close the SMTP connection */ "_FFR_MILTER_421", # endif /* _FFR_MILTER_421 */ -# if _FFR_MILTER_PERDAEMON +# if _FFR_MILTER_MACROS_EOM + /* Add an EOM macro set for milter */ + "_FFR_MILTER_MACROS_EOM", +# endif /* _FFR_MILTER_MACROS_EOM */ +# if _FFR_MILTER_PERDAEMON /* Per DaemonPortOptions InputMailFilter lists */ "_FFR_MILTER_PERDAEMON", # endif /* _FFR_MILTER_PERDAEMON */ @@ -6151,6 +6178,10 @@ char *FFRCompileOptions[] = /* Donated code (unused). */ "_FFR_SHM_STATUS", #endif /* _FFR_SHM_STATUS */ +#if _FFR_SLEEP_USE_SELECT + /* Use select(2) in libsm/clock.c to emulate sleep(2) */ + "_FFR_SLEEP_USE_SELECT ", +#endif /* _FFR_SLEEP_USE_SELECT */ #if _FFR_SMFI_OPENSOCKET /* libmilter: smfi_opensocket() to force the socket open early */ "_FFR_SMFI_OPENSOCKET", diff --git a/gnu/dist/sendmail/sendmail/control.c b/gnu/dist/sendmail/sendmail/control.c index eba328faf69..3fedfac2057 100644 --- a/gnu/dist/sendmail/sendmail/control.c +++ b/gnu/dist/sendmail/sendmail/control.c @@ -1,11 +1,11 @@ -/* $NetBSD: control.c,v 1.9 2003/06/01 14:07:05 atatat Exp $ */ +/* $NetBSD: control.c,v 1.10 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: control.c,v 1.9 2003/06/01 14:07:05 atatat Exp $"); +__RCSID("$NetBSD: control.c,v 1.10 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -16,7 +16,7 @@ __RCSID("$NetBSD: control.c,v 1.9 2003/06/01 14:07:05 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: control.c,v 8.118.4.3 2002/11/14 00:15:56 ca Exp") +SM_RCSID("@(#)Id: control.c,v 8.118.4.8 2003/06/24 17:45:27 ca Exp") #include <sm/fdset.h> diff --git a/gnu/dist/sendmail/sendmail/daemon.c b/gnu/dist/sendmail/sendmail/daemon.c index e9257238f71..968a3e474d3 100644 --- a/gnu/dist/sendmail/sendmail/daemon.c +++ b/gnu/dist/sendmail/sendmail/daemon.c @@ -1,7 +1,7 @@ -/* $NetBSD: daemon.c,v 1.12 2003/06/01 14:07:05 atatat Exp $ */ +/* $NetBSD: daemon.c,v 1.13 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: daemon.c,v 1.12 2003/06/01 14:07:05 atatat Exp $"); +__RCSID("$NetBSD: daemon.c,v 1.13 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -19,7 +19,7 @@ __RCSID("$NetBSD: daemon.c,v 1.12 2003/06/01 14:07:05 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: daemon.c,v 8.613.2.14 2003/02/11 17:17:22 ca Exp") +SM_RCSID("@(#)Id: daemon.c,v 8.613.2.20 2003/11/25 19:02:24 ca Exp") #if defined(SOCK_STREAM) || defined(__GNU_LIBRARY__) # define USE_SOCK_STREAM 1 @@ -170,6 +170,8 @@ getrequests(e) extern bool refuseconnections __P((char *, ENVELOPE *, int, bool)); + /* initialize data for function that generates queue ids */ + init_qid_alg(); for (idx = 0; idx < NDaemons; idx++) { Daemons[idx].d_port = setupdaemon(&(Daemons[idx].d_addr)); @@ -241,13 +243,7 @@ getrequests(e) /* see if we are rejecting connections */ (void) sm_blocksignal(SIGALRM); - - if (ShutdownRequest != NULL) - shutdown_daemon(); - else if (RestartRequest != NULL) - restart_daemon(); - else if (RestartWorkGroup) - restart_marked_work_groups(); + CHECK_RESTART; for (idx = 0; idx < NDaemons; idx++) { @@ -289,13 +285,7 @@ getrequests(e) } /* May have been sleeping above, check again */ - if (ShutdownRequest != NULL) - shutdown_daemon(); - else if (RestartRequest != NULL) - restart_daemon(); - else if (RestartWorkGroup) - restart_marked_work_groups(); - + CHECK_RESTART; getrequests_checkdiskspace(e); #if XDEBUG @@ -341,15 +331,8 @@ getrequests(e) fd_set readfds; struct timeval timeout; - if (ShutdownRequest != NULL) - shutdown_daemon(); - else if (RestartRequest != NULL) - restart_daemon(); - else if (RestartWorkGroup) - restart_marked_work_groups(); - + CHECK_RESTART; FD_ZERO(&readfds); - for (idx = 0; idx < NDaemons; idx++) { /* wait for a connection */ @@ -386,14 +369,7 @@ getrequests(e) NULL, NULL, &timeout); /* Did someone signal while waiting? */ - if (ShutdownRequest != NULL) - shutdown_daemon(); - else if (RestartRequest != NULL) - restart_daemon(); - else if (RestartWorkGroup) - restart_marked_work_groups(); - - + CHECK_RESTART; curdaemon = -1; if (doqueuerun()) @@ -3369,7 +3345,9 @@ getauthinfo(fd, may_be_forged) /* try to match the reverse against the forward lookup */ hp = sm_gethostbyname(RealHostName, family); if (hp == NULL) + { *may_be_forged = true; + } else { for (ha = hp->h_addr_list; *ha != NULL; ha++) @@ -3513,10 +3491,21 @@ getauthinfo(fd, may_be_forged) nleft = sizeof ibuf - 1; while ((i = read(s, p, nleft)) > 0) { + char *s; + p += i; nleft -= i; *p = '\0'; - if (strchr(ibuf, '\n') != NULL || nleft <= 0) + if ((s = strchr(ibuf, '\n')) != NULL) + { + if (p > s + 1) + { + p = s + 1; + *p = '\0'; + } + break; + } + if (nleft <= 0) break; } (void) close(s); diff --git a/gnu/dist/sendmail/sendmail/deliver.c b/gnu/dist/sendmail/sendmail/deliver.c index ec800173c17..053ebac6a4e 100644 --- a/gnu/dist/sendmail/sendmail/deliver.c +++ b/gnu/dist/sendmail/sendmail/deliver.c @@ -1,7 +1,7 @@ -/* $NetBSD: deliver.c,v 1.11 2003/06/01 14:07:06 atatat Exp $ */ +/* $NetBSD: deliver.c,v 1.12 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: deliver.c,v 1.11 2003/06/01 14:07:06 atatat Exp $"); +__RCSID("$NetBSD: deliver.c,v 1.12 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -20,7 +20,7 @@ __RCSID("$NetBSD: deliver.c,v 1.11 2003/06/01 14:07:06 atatat Exp $"); #include <sendmail.h> #include <sys/time.h> -SM_RCSID("@(#)Id: deliver.c,v 8.940.2.18 2003/03/28 17:34:39 ca Exp") +SM_RCSID("@(#)Id: deliver.c,v 8.940.2.20 2003/09/26 18:26:19 ca Exp") #if HASSETUSERCONTEXT # include <login_cap.h> @@ -3497,7 +3497,12 @@ do_transfer: (mci->mci_state == MCIS_MAIL || mci->mci_state == MCIS_RCPT || mci->mci_state == MCIS_DATA)) + { mci->mci_state = MCIS_OPEN; + SmtpPhase = mci->mci_phase = "idle"; + sm_setproctitle(true, e, "%s: %s", CurHostName, + mci->mci_phase); + } } if (tobuf[0] != '\0') @@ -4482,7 +4487,7 @@ putbody(mci, e, separator) char *df = queuename(e, DATAFL_LETTER); e->e_dfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, df, - SM_IO_RDONLY, NULL); + SM_IO_RDONLY_B, NULL); if (e->e_dfp == NULL) { char *msg = "!putbody: Cannot open %s for %s from %s"; @@ -5213,7 +5218,7 @@ mailfile(filename, mailer, ctladdr, sfflags, e) char *df = queuename(e, DATAFL_LETTER); e->e_dfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, df, - SM_IO_RDONLY, NULL); + SM_IO_RDONLY_B, NULL); if (e->e_dfp == NULL) { syserr("mailfile: Cannot open %s for %s from %s", diff --git a/gnu/dist/sendmail/sendmail/domain.c b/gnu/dist/sendmail/sendmail/domain.c index 68514d5c990..3b63706d6de 100644 --- a/gnu/dist/sendmail/sendmail/domain.c +++ b/gnu/dist/sendmail/sendmail/domain.c @@ -1,7 +1,7 @@ -/* $NetBSD: domain.c,v 1.9 2003/06/01 14:07:06 atatat Exp $ */ +/* $NetBSD: domain.c,v 1.10 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: domain.c,v 1.9 2003/06/01 14:07:06 atatat Exp $"); +__RCSID("$NetBSD: domain.c,v 1.10 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -20,9 +20,9 @@ __RCSID("$NetBSD: domain.c,v 1.9 2003/06/01 14:07:06 atatat Exp $"); #include <sendmail.h> #if NAMED_BIND -SM_RCSID("@(#)Id: domain.c,v 8.181.2.6 2003/01/15 19:17:15 ca Exp (with name server)") +SM_RCSID("@(#)Id: domain.c,v 8.181.2.9 2003/08/11 23:23:40 gshapiro Exp (with name server)") #else /* NAMED_BIND */ -SM_RCSID("@(#)Id: domain.c,v 8.181.2.6 2003/01/15 19:17:15 ca Exp (without name server)") +SM_RCSID("@(#)Id: domain.c,v 8.181.2.9 2003/08/11 23:23:40 gshapiro Exp (without name server)") #endif /* NAMED_BIND */ #if NAMED_BIND @@ -239,6 +239,8 @@ getmxrr(host, mxhosts, mxprefs, droplocalhost, rcode, tryfallback, pttl) if (tTd(8, 2)) sm_dprintf("getmxrr(%s, droplocalhost=%d)\n", host, droplocalhost); + if (*host == '\0') + return 0; if ((fallbackMX != NULL && droplocalhost && wordinclass(fallbackMX, 'w')) || !tryfallback) @@ -784,12 +786,6 @@ bestmx_map_lookup(map, name, av, statp) ** false -- otherwise. */ -# if NETINET6 -# define SM_T_INITIAL T_AAAA -# else /* NETINET6 */ -# define SM_T_INITIAL T_A -# endif /* NETINET6 */ - bool dns_getcanonname(host, hbsize, trymx, statp, pttl) char *host; @@ -813,6 +809,7 @@ dns_getcanonname(host, hbsize, trymx, statp, pttl) bool amatch; bool gotmx = false; int qtype; + int initial; int loopcnt; char *xp; char nbuf[SM_MAX(MAXPACKET, MAXDNAME*2+2)]; @@ -904,11 +901,16 @@ cnameloop: */ mxmatch = NULL; - qtype = SM_T_INITIAL; + initial = T_A; +# if NETINET6 + if (InetMode == AF_INET6) + initial = T_AAAA; +# endif /* NETINET6 */ + qtype = initial; for (dp = searchlist; *dp != NULL; ) { - if (qtype == SM_T_INITIAL) + if (qtype == initial) gotmx = false; if (tTd(8, 5)) sm_dprintf("dns_getcanonname: trying %s.%s (%s)\n", @@ -990,7 +992,7 @@ nexttype: /* definite no -- try the next domain */ dp++; - qtype = SM_T_INITIAL; + qtype = initial; continue; } else if (tTd(8, 7)) @@ -1075,13 +1077,7 @@ nexttype: # if NETINET6 case T_AAAA: - /* Flag that a good match was found */ - amatch = true; - - /* continue in case a CNAME also exists */ - continue; # endif /* NETINET6 */ - case T_A: /* Flag that a good match was found */ amatch = true; @@ -1167,7 +1163,7 @@ nexttype: qtype = T_MX; else { - qtype = SM_T_INITIAL; + qtype = initial; dp++; } } diff --git a/gnu/dist/sendmail/sendmail/headers.c b/gnu/dist/sendmail/sendmail/headers.c index 69ca279fc81..7b0d084696e 100644 --- a/gnu/dist/sendmail/sendmail/headers.c +++ b/gnu/dist/sendmail/sendmail/headers.c @@ -1,7 +1,7 @@ -/* $NetBSD: headers.c,v 1.11 2003/06/01 14:07:06 atatat Exp $ */ +/* $NetBSD: headers.c,v 1.12 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: headers.c,v 1.11 2003/06/01 14:07:06 atatat Exp $"); +__RCSID("$NetBSD: headers.c,v 1.12 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -19,7 +19,7 @@ __RCSID("$NetBSD: headers.c,v 1.11 2003/06/01 14:07:06 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: headers.c,v 8.266.4.5 2003/03/12 22:42:52 gshapiro Exp") +SM_RCSID("@(#)Id: headers.c,v 8.266.4.9 2003/10/30 00:17:22 gshapiro Exp") static size_t fix_mime_header __P((HDR *, ENVELOPE *)); static int priencode __P((char *)); @@ -146,7 +146,10 @@ chompheader(line, pflag, hdrp, e) mid = (unsigned char) macid(p); if (bitset(0200, mid)) + { p += strlen(macname(mid)) + 2; + SM_ASSERT(p <= q); + } else p++; @@ -321,6 +324,7 @@ hse: qval[l++] = '"'; /* - 3 to avoid problems with " at the end */ + /* should be sizeof(qval), not MAXNAME */ for (k = 0; fvalue[k] != '\0' && l < MAXNAME - 3; k++) { switch (fvalue[k]) @@ -732,6 +736,10 @@ eatheader(e, full, log) e->e_msgid = h->h_value; while (isascii(*e->e_msgid) && isspace(*e->e_msgid)) e->e_msgid++; +#if _FFR_MESSAGEID_MACRO + macdefine(&e->e_macro, A_PERM, macid("{msg_id}"), + e->e_msgid); +#endif /* _FFR_MESSAGEID_MACRO */ } } if (tTd(32, 1)) @@ -775,11 +783,13 @@ eatheader(e, full, log) e->e_timeoutclass = TOC_NORMAL; else if (sm_strcasecmp(p, "non-urgent") == 0) e->e_timeoutclass = TOC_NONURGENT; +#if _FFR_QUEUERETURN_DSN + else if (bitset(EF_RESPONSE, e->e_flags)) + e->e_timeoutclass = TOC_DSN; +#endif /* _FFR_QUEUERETURN_DSN */ } - #if _FFR_QUEUERETURN_DSN - /* If no timeoutclass picked and it's a DSN, use that timeoutclass */ - if (e->e_timeoutclass == TOC_NORMAL && bitset(EF_RESPONSE, e->e_flags)) + else if (bitset(EF_RESPONSE, e->e_flags)) e->e_timeoutclass = TOC_DSN; #endif /* _FFR_QUEUERETURN_DSN */ @@ -1181,7 +1191,7 @@ crackaddr(addr, e) else if (c == ')') { /* syntax error: unmatched ) */ - if (copylev > 0 && SM_HAVE_ROOM) + if (copylev > 0 && SM_HAVE_ROOM && bp > bufhead) bp--; } @@ -1355,7 +1365,7 @@ crackaddr(addr, e) else if (SM_HAVE_ROOM) { /* syntax error: unmatched > */ - if (copylev > 0) + if (copylev > 0 && bp > bufhead) bp--; quoteit = true; continue; @@ -1699,6 +1709,12 @@ put_vanilla_header(h, v, mci) int l; l = nlp - v; + + /* + ** XXX This is broken for SPACELEFT()==0 + ** However, SPACELEFT() is always > 0 unless MAXLINE==1. + */ + if (SPACELEFT(obuf, obp) - 1 < (size_t) l) l = SPACELEFT(obuf, obp) - 1; @@ -1709,6 +1725,8 @@ put_vanilla_header(h, v, mci) if (*v != ' ' && *v != '\t') *obp++ = ' '; } + + /* XXX This is broken for SPACELEFT()==0 */ (void) sm_snprintf(obp, SPACELEFT(obuf, obp), "%.*s", (int) (SPACELEFT(obuf, obp) - 1), v); putxline(obuf, strlen(obuf), mci, putflags); @@ -1743,6 +1761,7 @@ commaize(h, p, oldstyle, mci, e) int omax; bool firstone = true; int putflags = PXLF_HEADER; + char **res; char obuf[MAXLINE + 3]; /* @@ -1759,6 +1778,8 @@ commaize(h, p, oldstyle, mci, e) obp = obuf; (void) sm_snprintf(obp, SPACELEFT(obuf, obp), "%.200s: ", h->h_field); + + /* opos = strlen(obp); */ opos = strlen(h->h_field) + 2; if (opos > 202) opos = 202; @@ -1791,14 +1812,23 @@ commaize(h, p, oldstyle, mci, e) while ((isascii(*p) && isspace(*p)) || *p == ',') p++; name = p; + res = NULL; for (;;) { auto char *oldp; char pvpbuf[PSBUFSIZE]; - (void) prescan(p, oldstyle ? ' ' : ',', pvpbuf, - sizeof pvpbuf, &oldp, NULL); + res = prescan(p, oldstyle ? ' ' : ',', pvpbuf, + sizeof pvpbuf, &oldp, NULL); p = oldp; +#if _FFR_IGNORE_BOGUS_ADDR + /* ignore addresses that can't be parsed */ + if (res == NULL) + { + name = p; + continue; + } +#endif /* _FFR_IGNORE_BOGUS_ADDR */ /* look to see if we have an at sign */ while (*p != '\0' && isascii(*p) && isspace(*p)) @@ -1821,6 +1851,15 @@ commaize(h, p, oldstyle, mci, e) p--; if (++p == name) continue; + + /* + ** if prescan() failed go a bit backwards; this is a hack, + ** there should be some better error recovery. + */ + + if (res == NULL && p > name && + !((isascii(*p) && isspace(*p)) || *p == ',' || *p == '\0')) + --p; savechar = *p; *p = '\0'; @@ -1864,7 +1903,7 @@ commaize(h, p, oldstyle, mci, e) (void) sm_strlcpy(obp, ",\n", SPACELEFT(obuf, obp)); putxline(obuf, strlen(obuf), mci, putflags); obp = obuf; - (void) sm_strlcpy(obp, " ", sizeof obp); + (void) sm_strlcpy(obp, " ", sizeof obuf); opos = strlen(obp); obp += opos; opos += strlen(name); @@ -1880,7 +1919,10 @@ commaize(h, p, oldstyle, mci, e) firstone = false; *p = savechar; } - *obp = '\0'; + if (obp < &obuf[sizeof obuf]) + *obp = '\0'; + else + obuf[sizeof obuf - 1] = '\0'; putxline(obuf, strlen(obuf), mci, putflags); } /* @@ -1952,6 +1994,7 @@ fix_mime_header(h, e) return 0; /* Split on each ';' */ + /* find_character() never returns NULL */ while ((end = find_character(begin, ';')) != NULL) { char save = *end; diff --git a/gnu/dist/sendmail/sendmail/helpfile b/gnu/dist/sendmail/sendmail/helpfile index f15bc28fea9..1ecab42346a 100644 --- a/gnu/dist/sendmail/sendmail/helpfile +++ b/gnu/dist/sendmail/sendmail/helpfile @@ -11,8 +11,8 @@ cpyr By using this file, you agree to the terms and conditions set cpyr forth in the LICENSE file which can be found at the top level of cpyr the sendmail distribution. cpyr -cpyr Id: helpfile,v 8.40 2002/03/19 00:23:28 gshapiro Exp -cpyr $$NetBSD: helpfile,v 1.8 2003/06/01 14:07:06 atatat Exp $$ +cpyr Id: helpfile,v 8.40 2002/03/19 00:23:28 gshapiro Exp +cpyr $$NetBSD: helpfile,v 1.9 2004/03/25 19:14:31 atatat Exp $$ cpyr smtp This is sendmail version $v smtp Topics: diff --git a/gnu/dist/sendmail/sendmail/mailq.0 b/gnu/dist/sendmail/sendmail/mailq.0 index 0b285adaafb..238948c7873 100644 --- a/gnu/dist/sendmail/sendmail/mailq.0 +++ b/gnu/dist/sendmail/sendmail/mailq.0 @@ -1,9 +1,7 @@ +MAILQ(1) MAILQ(1) -MAILQ(1) MAILQ(1) - - NNAAMMEE mailq - print the mail queue @@ -11,72 +9,49 @@ SSYYNNOOPPSSIISS mmaaiillqq [--AAcc] [--qq......] [--vv] DDEESSCCRRIIPPTTIIOONN - MMaaiillqq prints a summary of the mail messages queued for - future delivery. - - The first line printed for each message shows the internal - identifier used on this host for the message with a possi- - ble status character, the size of the message in bytes, - the date and time the message was accepted into the queue, - and the envelope sender of the message. The second line - shows the error message that caused this message to be - retained in the queue; it will not be present if the mes- - sage is being processed for the first time. The status - characters are either ** to indicate the job is being pro- - cessed; XX to indicate that the load is too high to process - the job; and -- to indicate that the job is too young to - process. The following lines show message recipients, one - per line. + MMaaiillqq prints a summary of the mail messages queued for future delivery. + + The first line printed for each message shows the internal identifier + used on this host for the message with a possible status character, the + size of the message in bytes, the date and time the message was + accepted into the queue, and the envelope sender of the message. The + second line shows the error message that caused this message to be + retained in the queue; it will not be present if the message is being + processed for the first time. The status characters are either ** to + indicate the job is being processed; XX to indicate that the load is too + high to process the job; and -- to indicate that the job is too young to + process. The following lines show message recipients, one per line. MMaaiillqq is identical to ``sendmail -bp''. The relevant options are as follows: - --AAcc Show the mail submission queue specified in - _/_e_t_c_/_m_a_i_l_/_s_u_b_m_i_t_._c_f instead of the MTA queue speci- - fied in _/_e_t_c_/_m_a_i_l_/_s_e_n_d_m_a_i_l_._c_f. + --AAcc Show the mail submission queue specified in _/_e_t_c_/_m_a_i_l_/_s_u_b_m_i_t_._c_f + instead of the MTA queue specified in _/_e_t_c_/_m_a_i_l_/_s_e_n_d_m_a_i_l_._c_f. --qq[_!]I substr - Limit processed jobs to those containing _s_u_b_s_t_r as - a substring of the queue id or not when _! is spec- - ified. + Limit processed jobs to those containing _s_u_b_s_t_r as a substring + of the queue id or not when _! is specified. --qq[_!]R substr - Limit processed jobs to those containing _s_u_b_s_t_r as - a substring of one of the recipients or not when _! - is specified. + Limit processed jobs to those containing _s_u_b_s_t_r as a substring + of one of the recipients or not when _! is specified. --qq[_!]S substr - Limit processed jobs to those containing _s_u_b_s_t_r as - a substring of the sender or not when _! is speci- - fied. - - --vv Print verbose information. This adds the priority - of the message and a single character indicator - (``+'' or blank) indicating whether a warning mes- - sage has been sent on the first line of the mes- - sage. Additionally, extra lines may be intermixed - with the recipients indicating the ``controlling - user'' information; this shows who will own any - - - - Date: 2002/09/26 23:03:39 1 - + Limit processed jobs to those containing _s_u_b_s_t_r as a substring + of the sender or not when _! is specified. + --vv Print verbose information. This adds the priority of the mes- + sage and a single character indicator (``+'' or blank) indicat- + ing whether a warning message has been sent on the first line of + the message. Additionally, extra lines may be intermixed with + the recipients indicating the ``controlling user'' information; + this shows who will own any programs that are executed on behalf + of this message and the name of the alias this command expanded + from, if any. Moreover, status messages for each recipient are + printed if available. - - -MAILQ(1) MAILQ(1) - - - programs that are executed on behalf of this mes- - sage and the name of the alias this command - expanded from, if any. Moreover, status messages - for each recipient are printed if available. - - The mmaaiillqq utility exits 0 on success, and >0 if an error - occurs. + The mmaaiillqq utility exits 0 on success, and >0 if an error occurs. SSEEEE AALLSSOO sendmail(8) @@ -86,47 +61,4 @@ HHIISSTTOORRYY - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Date: 2002/09/26 23:03:39 2 - - + Date: 2002/09/26 23:03:39 MAILQ(1) diff --git a/gnu/dist/sendmail/sendmail/main.c b/gnu/dist/sendmail/sendmail/main.c index b6729b23655..6e1488d6c71 100644 --- a/gnu/dist/sendmail/sendmail/main.c +++ b/gnu/dist/sendmail/sendmail/main.c @@ -1,7 +1,7 @@ -/* $NetBSD: main.c,v 1.12 2003/06/01 14:07:07 atatat Exp $ */ +/* $NetBSD: main.c,v 1.13 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: main.c,v 1.12 2003/06/01 14:07:07 atatat Exp $"); +__RCSID("$NetBSD: main.c,v 1.13 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -31,7 +31,7 @@ SM_UNUSED(static char copyright[]) = The Regents of the University of California. All rights reserved.\n"; #endif /* ! lint */ -SM_RCSID("@(#)Id: main.c,v 8.887.2.22 2003/03/06 18:38:08 ca Exp") +SM_RCSID("@(#)Id: main.c,v 8.887.2.29 2003/11/07 00:09:31 ca Exp") #if NETINET || NETINET6 @@ -946,16 +946,18 @@ main(argc, argv, envp) *p++ = '\0'; if (*p != '\0') { - ep = sm_malloc_x(strlen(p) + 1); - cleanstrcpy(ep, p, MAXNAME); + i = strlen(p) + 1; + ep = sm_malloc_x(i); + cleanstrcpy(ep, p, i); macdefine(&BlankEnvelope.e_macro, A_HEAP, 's', ep); } } if (*optarg != '\0') { - ep = sm_malloc_x(strlen(optarg) + 1); - cleanstrcpy(ep, optarg, MAXNAME); + i = strlen(optarg) + 1; + ep = sm_malloc_x(i); + cleanstrcpy(ep, optarg, i); macdefine(&BlankEnvelope.e_macro, A_HEAP, 'r', ep); } @@ -2238,8 +2240,32 @@ main(argc, argv, envp) int status; pid_t ret; + errno = 0; while ((ret = sm_wait(&status)) <= 0) + { + if (errno == ECHILD) + { + /* + ** Oops... something got messed + ** up really bad. Waiting for + ** non-existent children + ** shouldn't happen. Let's get + ** out of here. + */ + + CurChildren = 0; + break; + } continue; + } + + /* something is really really wrong */ + if (errno == ECHILD) + { + sm_syslog(LOG_ERR, NOQID, + "queue control process: lost all children: wait returned ECHILD"); + break; + } /* Only drop when a child gives status */ if (WIFSTOPPED(status)) @@ -2374,15 +2400,32 @@ main(argc, argv, envp) pid_t ret; int group; - if (ShutdownRequest != NULL) - shutdown_daemon(); - else if (RestartRequest != NULL) - restart_daemon(); - else if (RestartWorkGroup) - restart_marked_work_groups(); - + CHECK_RESTART; + errno = 0; while ((ret = sm_wait(&status)) <= 0) + { + /* + ** Waiting for non-existent + ** children shouldn't happen. + ** Let's get out of here if + ** it occurs. + */ + + if (errno == ECHILD) + { + CurChildren = 0; + break; + } continue; + } + + /* something is really really wrong */ + if (errno == ECHILD) + { + sm_syslog(LOG_ERR, NOQID, + "persistent queue runner control process: lost all children: wait returned ECHILD"); + break; + } if (WIFSTOPPED(status)) continue; @@ -2398,8 +2441,9 @@ main(argc, argv, envp) "persistent queue runner=%d core dumped, signal=%d", group, WTERMSIG(status)); - /* don't restart this one */ - mark_work_group_restart(group, -1); + /* don't restart this */ + mark_work_group_restart( + group, -1); continue; } @@ -2420,7 +2464,8 @@ main(argc, argv, envp) sm_syslog(LOG_DEBUG, NOQID, "persistent queue runner=%d, exited", group); - mark_work_group_restart(group, -1); + mark_work_group_restart(group, + -1); } } finis(true, true, ExitStat); @@ -2449,13 +2494,7 @@ main(argc, argv, envp) for (;;) { (void) pause(); - if (ShutdownRequest != NULL) - shutdown_daemon(); - else if (RestartRequest != NULL) - restart_daemon(); - else if (RestartWorkGroup) - restart_marked_work_groups(); - + CHECK_RESTART; if (doqueuerun()) (void) runqueue(true, false, false, false); @@ -2649,7 +2688,7 @@ main(argc, argv, envp) /* collect body for UUCP return */ if (OpMode != MD_VERIFY) - collect(InChannel, false, NULL, &MainEnvelope); + collect(InChannel, false, NULL, &MainEnvelope, true); finis(true, true, EX_USAGE); /* NOTREACHED */ } @@ -2709,7 +2748,7 @@ main(argc, argv, envp) MainEnvelope.e_flags &= ~EF_FATALERRS; Errors = 0; buffer_errors(); - collect(InChannel, false, NULL, &MainEnvelope); + collect(InChannel, false, NULL, &MainEnvelope, true); /* header checks failed */ if (Errors > 0) diff --git a/gnu/dist/sendmail/sendmail/map.c b/gnu/dist/sendmail/sendmail/map.c index 35ce502991f..0e6a869ce0a 100644 --- a/gnu/dist/sendmail/sendmail/map.c +++ b/gnu/dist/sendmail/sendmail/map.c @@ -1,11 +1,11 @@ -/* $NetBSD: map.c,v 1.11 2003/06/01 14:07:07 atatat Exp $ */ +/* $NetBSD: map.c,v 1.12 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: map.c,v 1.11 2003/06/01 14:07:07 atatat Exp $"); +__RCSID("$NetBSD: map.c,v 1.12 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1992, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1992, 1993 @@ -19,7 +19,7 @@ __RCSID("$NetBSD: map.c,v 1.11 2003/06/01 14:07:07 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: map.c,v 8.645.2.7 2002/12/03 17:01:15 ca Exp") +SM_RCSID("@(#)Id: map.c,v 8.645.2.10 2003/07/24 18:24:17 ca Exp") #if LDAPMAP # include <sm/ldap.h> @@ -389,7 +389,7 @@ map_rewrite(map, s, slen, av) if (c != '%') { pushc: - if (--len <= 0) + if (len-- <= 1) break; *bp++ = c; continue; @@ -400,8 +400,9 @@ map_rewrite(map, s, slen, av) goto pushc; if (!(isascii(c) && isdigit(c))) { + if (len-- <= 1) + break; *bp++ = '%'; - --len; goto pushc; } for (avp = av; --c >= '0' && *avp != NULL; avp++) @@ -1179,8 +1180,7 @@ dns_map_lookup(map, name, av, statp) if (r == NULL) { result = NULL; - if (errno == ETIMEDOUT || h_errno == TRY_AGAIN || - errno == ECONNREFUSED) + if (h_errno == TRY_AGAIN || transienterror(errno)) *statp = EX_TEMPFAIL; else *statp = EX_NOTFOUND; @@ -6950,6 +6950,10 @@ regex_map_init(map, ap) map->map_mflags |= MF_MATCHONLY; break; + case 'q': + map->map_mflags |= MF_KEEPQUOTES; + break; + case 'S': map->map_spacesub = *++p; break; diff --git a/gnu/dist/sendmail/sendmail/mci.c b/gnu/dist/sendmail/sendmail/mci.c index 3f28fb8be58..c92ffbf2d69 100644 --- a/gnu/dist/sendmail/sendmail/mci.c +++ b/gnu/dist/sendmail/sendmail/mci.c @@ -1,7 +1,7 @@ -/* $NetBSD: mci.c,v 1.7 2003/06/01 14:07:07 atatat Exp $ */ +/* $NetBSD: mci.c,v 1.8 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: mci.c,v 1.7 2003/06/01 14:07:07 atatat Exp $"); +__RCSID("$NetBSD: mci.c,v 1.8 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -19,7 +19,7 @@ __RCSID("$NetBSD: mci.c,v 1.7 2003/06/01 14:07:07 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: mci.c,v 8.205.2.3 2003/01/07 03:56:19 ca Exp") +SM_RCSID("@(#)Id: mci.c,v 8.205.2.4 2003/03/31 17:35:27 ca Exp") #if NETINET || NETINET6 # include <arpa/inet.h> @@ -554,11 +554,21 @@ mci_dump(mci, logit) } (void) sm_snprintf(p, SPACELEFT(buf, p), "flags=%lx", mci->mci_flags); p += strlen(p); + + /* + ** The following check is just for paranoia. It protects the + ** assignment in the if() clause. If there's not some minimum + ** amount of space we can stop right now. The check will not + ** trigger as long as sizeof(buf)=4000. + */ + + if (p >= buf + sizeof(buf) - 4) + goto printit; if (mci->mci_flags != 0) { struct mcifbits *f; - *p++ = '<'; + *p++ = '<'; /* protected above */ for (f = MciFlags; f->mcif_bit != 0; f++) { if (!bitset(f->mcif_bit, mci->mci_flags)) @@ -1158,7 +1168,7 @@ mci_traverse_persistent(action, pathname) if (hostptr != host) *(hostptr++) = '.'; start = end; - while (*(start - 1) != '/') + while (start > pathname && *(start - 1) != '/') start--; if (*end == '.') @@ -1168,7 +1178,7 @@ mci_traverse_persistent(action, pathname) *(hostptr++) = *scan; end = start - 2; - } while (*end == '.'); + } while (end > pathname && *end == '.'); *hostptr = '\0'; @@ -1358,7 +1368,7 @@ mci_purge_persistent(pathname, hostname) /* ** MCI_GENERATE_PERSISTENT_PATH -- generate path from hostname ** -** Given `host', convert from a.b.c to $QueueDir/.hoststat/c./b./a, +** Given `host', convert from a.b.c to $HostStatDir/c./b./a, ** putting the result into `path'. if `createflag' is set, intervening ** directories will be created as needed. ** diff --git a/gnu/dist/sendmail/sendmail/milter.c b/gnu/dist/sendmail/sendmail/milter.c index a5051d2e070..d0fe652cecb 100644 --- a/gnu/dist/sendmail/sendmail/milter.c +++ b/gnu/dist/sendmail/sendmail/milter.c @@ -1,7 +1,7 @@ -/* $NetBSD: milter.c,v 1.11 2003/06/01 14:07:07 atatat Exp $ */ +/* $NetBSD: milter.c,v 1.12 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: milter.c,v 1.11 2003/06/01 14:07:07 atatat Exp $"); +__RCSID("$NetBSD: milter.c,v 1.12 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -16,7 +16,7 @@ __RCSID("$NetBSD: milter.c,v 1.11 2003/06/01 14:07:07 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: milter.c,v 8.197.2.7 2003/03/22 18:54:25 ca Exp") +SM_RCSID("@(#)Id: milter.c,v 8.197.2.10 2003/12/01 23:57:44 msk Exp") #if MILTER # include <libmilter/mfapi.h> @@ -40,6 +40,9 @@ static char *MilterConnectMacros[MAXFILTERMACROS + 1]; static char *MilterHeloMacros[MAXFILTERMACROS + 1]; static char *MilterEnvFromMacros[MAXFILTERMACROS + 1]; static char *MilterEnvRcptMacros[MAXFILTERMACROS + 1]; +#if _FFR_MILTER_MACROS_EOM +static char *MilterEOMMacros[MAXFILTERMACROS + 1]; +#endif /* _FFR_MILTER_MACROS_EOM */ # define MILTER_CHECK_DONE_MSG() \ if (*state == SMFIR_REPLYCODE || \ @@ -1421,6 +1424,10 @@ static struct milteropt { "macros.envrcpt", MO_MACROS_ENVRCPT }, # define MO_LOGLEVEL 0x05 { "loglevel", MO_LOGLEVEL }, +#if _FFR_MILTER_MACROS_EOM +# define MO_MACROS_EOM 0x06 + { "macros.eom", MO_MACROS_EOM }, +#endif /* _FFR_MILTER_MACROS_EOM */ { NULL, 0 }, }; @@ -1494,6 +1501,13 @@ milter_set_option(name, val, sticky) case MO_MACROS_ENVRCPT: if (macros == NULL) macros = MilterEnvRcptMacros; +#if _FFR_MILTER_MACROS_EOM + /* FALLTHROUGH */ + + case MO_MACROS_EOM: + if (macros == NULL) + macros = MilterEOMMacros; +#endif /* _FFR_MILTER_MACROS_EOM */ p = newstr(val); while (*p != '\0') @@ -1575,7 +1589,7 @@ milter_reopen_df(e) /* open writable */ if ((e->e_dfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, dfname, - SM_IO_RDWR, NULL)) == NULL) + SM_IO_RDWR_B, NULL)) == NULL) { MILTER_DF_ERROR("milter_reopen_df: sm_io_open %s: %s"); return -1; @@ -1632,7 +1646,7 @@ milter_reset_df(e) return -1; } else if ((e->e_dfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, dfname, - SM_IO_RDONLY, NULL)) == NULL) + SM_IO_RDONLY_B, NULL)) == NULL) { MILTER_DF_ERROR("milter_reset_df: error reopening %s: %s"); return -1; @@ -2813,6 +2827,8 @@ milter_addrcpt(response, rlen, e) ssize_t rlen; ENVELOPE *e; { + int olderrors; + if (tTd(64, 10)) sm_dprintf("milter_addrcpt: "); @@ -2837,7 +2853,9 @@ milter_addrcpt(response, rlen, e) sm_dprintf("%s\n", response); if (MilterLogLevel > 8) sm_syslog(LOG_INFO, e->e_id, "Milter add: rcpt: %s", response); - (void) sendtolist(response, NULLADDR, &e->e_sendqueue, 0, e); + olderrors = Errors; + (void) sendtolist(response, NULLADDR, &e->e_sendqueue, 0, e); + Errors = olderrors; return; } /* @@ -3596,6 +3614,11 @@ milter_data(e, state) MILTER_CHECK_RESULTS(); } +#if _FFR_MILTER_MACROS_EOM + if (MilterEOMMacros[0] != NULL) + milter_send_macros(m, MilterEOMMacros, SMFIC_BODYEOB, e); +#endif /* _FFR_MILTER_MACROS_EOM */ + /* send the final body chunk */ (void) milter_write(m, SMFIC_BODYEOB, NULL, 0, m->mf_timeout[SMFTO_WRITE], e); diff --git a/gnu/dist/sendmail/sendmail/mime.c b/gnu/dist/sendmail/sendmail/mime.c index 5018e6f427b..5d0e5a4e6d4 100644 --- a/gnu/dist/sendmail/sendmail/mime.c +++ b/gnu/dist/sendmail/sendmail/mime.c @@ -1,11 +1,11 @@ -/* $NetBSD: mime.c,v 1.5 2003/06/01 14:07:07 atatat Exp $ */ +/* $NetBSD: mime.c,v 1.6 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: mime.c,v 1.5 2003/06/01 14:07:07 atatat Exp $"); +__RCSID("$NetBSD: mime.c,v 1.6 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1994, 1996-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1994 @@ -20,7 +20,7 @@ __RCSID("$NetBSD: mime.c,v 1.5 2003/06/01 14:07:07 atatat Exp $"); #include <sendmail.h> #include <string.h> -SM_RCSID("@(#)Id: mime.c,v 8.130 2002/05/21 03:39:34 ca Exp") +SM_RCSID("@(#)Id: mime.c,v 8.130.2.3 2004/01/08 21:42:56 ca Exp") /* ** MIME support. @@ -39,6 +39,11 @@ SM_RCSID("@(#)Id: mime.c,v 8.130 2002/05/21 03:39:34 ca Exp") ** the problem. */ +/* use "old" mime 7 to 8 algorithm by default */ +#ifndef MIME7TO8_OLD +# define MIME7TO8_OLD 1 +#endif /* ! MIME7TO8_OLD */ + #if MIME8TO7 static int isboundary __P((char *, char **)); static int mimeboundary __P((char *, char **)); @@ -323,7 +328,7 @@ mime8to7(mci, header, e, boundaries, flags) putline(buf, mci); if (tTd(43, 35)) sm_dprintf(" ...%s\n", buf); - collect(e->e_dfp, false, &hdr, e); + collect(e->e_dfp, false, &hdr, e, false); if (tTd(43, 101)) putline("+++after collect", mci); putheader(mci, hdr, e, flags); @@ -377,7 +382,7 @@ mime8to7(mci, header, e, boundaries, flags) putline("", mci); mci->mci_flags |= MCIF_INMIME; - collect(e->e_dfp, false, &hdr, e); + collect(e->e_dfp, false, &hdr, e, false); if (tTd(43, 101)) putline("+++after collect", mci); putheader(mci, hdr, e, flags); @@ -1070,54 +1075,41 @@ mime7to8(mci, header, e) c1 = CHAR64(c1); c2 = CHAR64(c2); +#if MIME7TO8_OLD +#define CHK_EOL if (*--fbufp != '\n' || (fbufp > fbuf && *--fbufp != '\r')) \ + ++fbufp; +#else /* MIME7TO8_OLD */ +#define CHK_EOL if (*--fbufp != '\n' || (fbufp > fbuf && *--fbufp != '\r')) \ + { \ + ++fbufp; \ + pxflags |= PXLF_NOADDEOL; \ + } +#endif /* MIME7TO8_OLD */ + +#define PUTLINE64 \ + do \ + { \ + if (*fbufp++ == '\n' || fbufp >= &fbuf[MAXLINE]) \ + { \ + CHK_EOL; \ + putxline((char *) fbuf, fbufp - fbuf, mci, pxflags); \ + pxflags &= ~PXLF_NOADDEOL; \ + fbufp = fbuf; \ + } \ + } while (0) + *fbufp = (c1 << 2) | ((c2 & 0x30) >> 4); - if (*fbufp++ == '\n' || fbufp >= &fbuf[MAXLINE]) - { - if (*--fbufp != '\n' || - (fbufp > fbuf && *--fbufp != '\r')) - { - pxflags |= PXLF_NOADDEOL; - fbufp++; - } - putxline((char *) fbuf, fbufp - fbuf, - mci, pxflags); - pxflags &= ~PXLF_NOADDEOL; - fbufp = fbuf; - } + PUTLINE64; if (c3 == '=') continue; c3 = CHAR64(c3); *fbufp = ((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2); - if (*fbufp++ == '\n' || fbufp >= &fbuf[MAXLINE]) - { - if (*--fbufp != '\n' || - (fbufp > fbuf && *--fbufp != '\r')) - { - pxflags |= PXLF_NOADDEOL; - fbufp++; - } - putxline((char *) fbuf, fbufp - fbuf, - mci, pxflags); - pxflags &= ~PXLF_NOADDEOL; - fbufp = fbuf; - } + PUTLINE64; if (c4 == '=') continue; c4 = CHAR64(c4); *fbufp = ((c3 & 0x03) << 6) | c4; - if (*fbufp++ == '\n' || fbufp >= &fbuf[MAXLINE]) - { - if (*--fbufp != '\n' || - (fbufp > fbuf && *--fbufp != '\r')) - { - pxflags |= PXLF_NOADDEOL; - fbufp++; - } - putxline((char *) fbuf, fbufp - fbuf, - mci, pxflags); - pxflags &= ~PXLF_NOADDEOL; - fbufp = fbuf; - } + PUTLINE64; } } else diff --git a/gnu/dist/sendmail/sendmail/newaliases.0 b/gnu/dist/sendmail/sendmail/newaliases.0 index 994d3e75a43..d0f354427d1 100644 --- a/gnu/dist/sendmail/sendmail/newaliases.0 +++ b/gnu/dist/sendmail/sendmail/newaliases.0 @@ -1,30 +1,25 @@ +NEWALIASES(1) NEWALIASES(1) -NEWALIASES(1) NEWALIASES(1) - - NNAAMMEE - newaliases - rebuild the data base for the mail aliases - file + newaliases - rebuild the data base for the mail aliases file SSYYNNOOPPSSIISS nneewwaalliiaasseess DDEESSCCRRIIPPTTIIOONN - NNeewwaalliiaasseess rebuilds the random access data base for the - mail aliases file /etc/mail/aliases. It must be run each - time this file is changed in order for the change to take - effect. + NNeewwaalliiaasseess rebuilds the random access data base for the mail aliases + file /etc/mail/aliases. It must be run each time this file is changed + in order for the change to take effect. NNeewwaalliiaasseess is identical to ``sendmail -bi''. - The nneewwaalliiaasseess utility exits 0 on success, and >0 if an - error occurs. + The nneewwaalliiaasseess utility exits 0 on success, and >0 if an error occurs. - Notice: do nnoott use mmaakkeemmaapp to create the aliases data - base, because nneewwaalliiaasseess puts a special token into the - data base that is required by sseennddmmaaiill.. + Notice: do nnoott use mmaakkeemmaapp to create the aliases data base, because + nneewwaalliiaasseess puts a special token into the data base that is required by + sseennddmmaaiill.. FFIILLEESS /etc/mail/aliases The mail aliases file @@ -37,30 +32,4 @@ HHIISSTTOORRYY - - - - - - - - - - - - - - - - - - - - - - - - - Date: 2001/10/10 03:23:17 1 - - + Date: 2001/10/10 03:23:17 NEWALIASES(1) diff --git a/gnu/dist/sendmail/sendmail/parseaddr.c b/gnu/dist/sendmail/sendmail/parseaddr.c index 3903a37489e..85fc976cdea 100644 --- a/gnu/dist/sendmail/sendmail/parseaddr.c +++ b/gnu/dist/sendmail/sendmail/parseaddr.c @@ -1,7 +1,7 @@ -/* $NetBSD: parseaddr.c,v 1.13 2003/09/17 14:16:22 itojun Exp $ */ +/* $NetBSD: parseaddr.c,v 1.14 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: parseaddr.c,v 1.13 2003/09/17 14:16:22 itojun Exp $"); +__RCSID("$NetBSD: parseaddr.c,v 1.14 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -19,7 +19,7 @@ __RCSID("$NetBSD: parseaddr.c,v 1.13 2003/09/17 14:16:22 itojun Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: parseaddr.c,v 8.359.2.6 2003/03/27 02:39:53 ca Exp") +SM_RCSID("@(#)Id: parseaddr.c,v 8.359.2.9 2003/09/16 18:07:50 ca Exp") static void allocaddr __P((ADDRESS *, int, char *, ENVELOPE *)); static int callsubr __P((char**, int, ENVELOPE *)); @@ -708,7 +708,7 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) if (delimptr != NULL) { if (p > addr) - p--; + --p; *delimptr = p; } CurEnv->e_to = saveto; @@ -891,9 +891,12 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) } } while (c != '\0' && (c != delim || anglecnt > 0)); *avp = NULL; - p--; if (delimptr != NULL) + { + if (p > addr) + p--; *delimptr = p; + } if (tTd(22, 12)) { sm_dprintf("prescan==>"); @@ -976,6 +979,11 @@ rewrite(pvp, ruleset, reclevel, e, maxatom) char buf[MAXLINE]; char name[6]; + /* + ** mlp will not exceed mlist[] because readcf enforces + ** the upper limit of entries when reading rulesets. + */ + if (ruleset < 0 || ruleset >= MAXRWSETS) { syserr("554 5.3.5 rewrite: illegal ruleset number %d", ruleset); @@ -1010,6 +1018,8 @@ rewrite(pvp, ruleset, reclevel, e, maxatom) } if (pvp == NULL) return EX_USAGE; + if (maxatom <= 0) + return EX_USAGE; /* ** Run through the list of rewrite rules, applying @@ -1297,16 +1307,7 @@ rewrite(pvp, ruleset, reclevel, e, maxatom) while (pp <= m->match_last) { if (avp >= &npvp[maxatom]) - { - syserr("554 5.3.0 rewrite: expansion too long"); - if (LogLevel > 9) - sm_syslog(LOG_ERR, - e->e_id, - "rewrite: expansion too long, ruleset=%s, ruleno=%d", - rulename, - ruleno); - return EX_DATAERR; - } + goto toolong; *avp++ = *pp++; } } @@ -1413,7 +1414,7 @@ rewrite(pvp, ruleset, reclevel, e, maxatom) char **default_rvp; char cbuf[MAXNAME + 1]; char *pvpb1[MAXATOM + 1]; - char *argvect[10]; + char *argvect[MAX_MAP_ARGS]; char pvpbuf[PSBUFSIZE]; char *nullpvp[1]; @@ -1437,13 +1438,19 @@ rewrite(pvp, ruleset, reclevel, e, maxatom) { endtoken = LOOKUPEND; mapname = *++rvp; + if (mapname == NULL) + syserr("554 5.3.0 rewrite: missing mapname"); } map = stab(mapname, ST_MAP, ST_FIND); if (map == NULL) - syserr("554 5.3.0 rewrite: map %s not found", mapname); + syserr("554 5.3.0 rewrite: map %s not found", + mapname); /* extract the match part */ key_rvp = ++rvp; + if (key_rvp == NULL) + syserr("554 5.3.0 rewrite: missing key for map %s", + mapname); default_rvp = NULL; arg_rvp = argvect; xpvp = NULL; @@ -1452,7 +1459,8 @@ rewrite(pvp, ruleset, reclevel, e, maxatom) { int nodetype = **rvp & 0377; - if (nodetype != CANONHOST && nodetype != CANONUSER) + if (nodetype != CANONHOST && + nodetype != CANONUSER) { rvp++; continue; @@ -1465,7 +1473,9 @@ rewrite(pvp, ruleset, reclevel, e, maxatom) cataddr(xpvp, NULL, replac, &pvpbuf[sizeof pvpbuf] - replac, '\0'); - *++arg_rvp = replac; + if (arg_rvp < + &argvect[MAX_MAP_ARGS - 1]) + *++arg_rvp = replac; replac += strlen(replac) + 1; xpvp = NULL; } @@ -1487,9 +1497,13 @@ rewrite(pvp, ruleset, reclevel, e, maxatom) cataddr(xpvp, NULL, replac, &pvpbuf[sizeof pvpbuf] - replac, '\0'); - *++arg_rvp = replac; + if (arg_rvp < &argvect[MAX_MAP_ARGS - 1]) + *++arg_rvp = replac; } - *++arg_rvp = NULL; + if (arg_rvp >= &argvect[MAX_MAP_ARGS - 1]) + argvect[MAX_MAP_ARGS - 1] = NULL; + else + *++arg_rvp = NULL; /* save the remainder of the input string */ trsize = (int) (avp - rvp + 1) * sizeof *rvp; @@ -1678,7 +1692,7 @@ callsubr(pvp, reclevel, e) /* ** Now we need to call the ruleset specified for - ** the subroutine. we can do this inplace since + ** the subroutine. We can do this in place since ** we call the "last" subroutine first. */ @@ -1876,6 +1890,7 @@ buildaddr(tv, a, flags, e) register ENVELOPE *e; { bool tempfail = false; + int maxatom; struct mailer **mp; register struct mailer *m; register char *p; @@ -1890,6 +1905,7 @@ buildaddr(tv, a, flags, e) printav(tv); } + maxatom = MAXATOM; if (a == NULL) a = (ADDRESS *) sm_rpool_malloc_x(e->e_rpool, sizeof *a); memset((char *) a, '\0', sizeof *a); @@ -1929,14 +1945,22 @@ badaddr: return a; } mname = *++tv; + --maxatom; /* extract host and user portions */ if (*++tv != NULL && (**tv & 0377) == CANONHOST) + { hostp = ++tv; + --maxatom; + } else hostp = NULL; + --maxatom; while (*tv != NULL && (**tv & 0377) != CANONUSER) + { tv++; + --maxatom; + } if (*tv == NULL) { syserr("554 5.3.5 buildaddr: no user"); @@ -1947,6 +1971,7 @@ badaddr: else if (hostp != NULL) cataddr(hostp, tv - 1, hbuf, sizeof hbuf, '\0'); cataddr(++tv, NULL, ubuf, sizeof ubuf, ' '); + --maxatom; /* save away the host name */ if (sm_strcasecmp(mname, "error") == 0) @@ -2051,6 +2076,7 @@ badaddr: { p++; tv++; + --maxatom; a->q_flags |= QNOTREMOTE; } @@ -2081,11 +2107,11 @@ badaddr: !bitset(RF_SENDERADDR|RF_HEADERADDR, flags)) { /* sender addresses done later */ - (void) REWRITE(tv, 2, e); + (void) rewrite(tv, 2, 0, e, maxatom); if (m->m_re_rwset > 0) - (void) REWRITE(tv, m->m_re_rwset, e); + (void) rewrite(tv, m->m_re_rwset, 0, e, maxatom); } - (void) REWRITE(tv, 4, e); + (void) rewrite(tv, 4, 0, e, maxatom); /* save the result for the command line/RCPT argument */ cataddr(tv, NULL, ubuf, sizeof ubuf, '\0'); @@ -2171,7 +2197,7 @@ cataddr(pvp, evp, buf, sz, spacesub) break; } #if _FFR_CATCH_LONG_STRINGS - /* Don't silently truncate long strings */ + /* Don't silently truncate long strings; broken for evp != NULL */ if (*pvp != NULL) syserr("cataddr: string too long"); #endif /* _FFR_CATCH_LONG_STRINGS */ @@ -2464,8 +2490,7 @@ emptyaddr(a) ** ** Parameters: ** name -- the name to translate. -** m -- the mailer that we want to do rewriting relative -** to. +** m -- the mailer that we want to do rewriting relative to. ** flags -- fine tune operations. ** pstat -- pointer to status word. ** e -- the current envelope. @@ -2660,7 +2685,6 @@ maplocaluser(a, sendq, aliaslevel, e) { register char **pvp; register ADDRESS *SM_NONVOLATILE a1 = NULL; - auto char *delimptr; char pvpbuf[PSBUFSIZE]; if (tTd(29, 1)) @@ -2668,7 +2692,7 @@ maplocaluser(a, sendq, aliaslevel, e) sm_dprintf("maplocaluser: "); printaddr(a, false); } - pvp = prescan(a->q_user, '\0', pvpbuf, sizeof pvpbuf, &delimptr, NULL); + pvp = prescan(a->q_user, '\0', pvpbuf, sizeof pvpbuf, NULL, NULL); if (pvp == NULL) { if (tTd(29, 9)) @@ -3114,6 +3138,7 @@ rscheck(rwset, p1, p2, e, flags, logl, host, logid) ** e -- the current envelope. ** pvp -- pointer to token vector. ** pvpbuf -- buffer space. +** size -- size of buffer space. ** ** Returns: ** EX_UNAVAILABLE -- ruleset doesn't exist. @@ -3181,7 +3206,7 @@ rscap(rwset, p1, p2, e, pvp, pvpbuf, size) QuickAbort = false; *pvp = prescan(buf, '\0', pvpbuf, size, NULL, NULL); if (*pvp != NULL) - rstat = REWRITE(*pvp, rsno, e); + rstat = rewrite(*pvp, rsno, 0, e, size); else { if (tTd(48, 2)) diff --git a/gnu/dist/sendmail/sendmail/queue.c b/gnu/dist/sendmail/sendmail/queue.c index 4c6233efd29..2d25e786c7a 100644 --- a/gnu/dist/sendmail/sendmail/queue.c +++ b/gnu/dist/sendmail/sendmail/queue.c @@ -1,7 +1,7 @@ -/* $NetBSD: queue.c,v 1.10 2003/06/01 14:07:07 atatat Exp $ */ +/* $NetBSD: queue.c,v 1.11 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: queue.c,v 1.10 2003/06/01 14:07:07 atatat Exp $"); +__RCSID("$NetBSD: queue.c,v 1.11 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -19,20 +19,32 @@ __RCSID("$NetBSD: queue.c,v 1.10 2003/06/01 14:07:07 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: queue.c,v 8.863.2.30 2003/03/20 00:20:16 ca Exp") +SM_RCSID("@(#)Id: queue.c,v 8.863.2.67 2003/12/02 23:56:01 ca Exp") #include <dirent.h> # define RELEASE_QUEUE (void) 0 # define ST_INODE(st) (st).st_ino +# define sm_file_exists(errno) ((errno) == EEXIST) + +# if HASFLOCK && defined(O_EXLOCK) +# define SM_OPEN_EXLOCK 1 +# define TF_OPEN_FLAGS (O_CREAT|O_WRONLY|O_EXCL|O_EXLOCK) +# else /* HASFLOCK && defined(O_EXLOCK) */ +# define TF_OPEN_FLAGS (O_CREAT|O_WRONLY|O_EXCL) +# endif /* HASFLOCK && defined(O_EXLOCK) */ + +#ifndef SM_OPEN_EXLOCK +# define SM_OPEN_EXLOCK 0 +#endif /* ! SM_OPEN_EXLOCK */ /* ** Historical notes: -** QF_VERSION == 4 was sendmail 8.10/8.11 without _FFR_QUEUEDELAY -** QF_VERSION == 5 was sendmail 8.10/8.11 with _FFR_QUEUEDELAY -** QF_VERSION == 6 is sendmail 8.12 without _FFR_QUEUEDELAY -** QF_VERSION == 7 is sendmail 8.12 with _FFR_QUEUEDELAY +** QF_VERSION == 4 was sendmail 8.10/8.11 without _FFR_QUEUEDELAY +** QF_VERSION == 5 was sendmail 8.10/8.11 with _FFR_QUEUEDELAY +** QF_VERSION == 6 is sendmail 8.12 without _FFR_QUEUEDELAY +** QF_VERSION == 7 is sendmail 8.12 with _FFR_QUEUEDELAY */ #if _FFR_QUEUEDELAY @@ -73,6 +85,21 @@ typedef struct work WORK; static WORK *WorkQ; /* queue of things to be done */ static int NumWorkGroups; /* number of work groups */ +static time_t Current_LA_time = 0; + +/* Get new load average every 30 seconds. */ +#define GET_NEW_LA_TIME 30 + +#define SM_GET_LA(now) \ + do \ + { \ + now = curtime(); \ + if (Current_LA_time < now - GET_NEW_LA_TIME) \ + { \ + sm_getla(); \ + Current_LA_time = now; \ + } \ + } while (0) /* ** DoQueueRun indicates that a queue run is needed. @@ -346,30 +373,59 @@ queueup(e, announce, msync) ** Create control file. */ +#define OPEN_TF do \ + { \ + MODE_T oldumask = 0; \ + \ + if (bitset(S_IWGRP, QueueFileMode)) \ + oldumask = umask(002); \ + tfd = open(tf, TF_OPEN_FLAGS, QueueFileMode); \ + if (bitset(S_IWGRP, QueueFileMode)) \ + (void) umask(oldumask); \ + } while (0) + + newid = (e->e_id == NULL) || !bitset(EF_INQUEUE, e->e_flags); (void) sm_strlcpy(tf, queuename(e, NEWQFL_LETTER), sizeof tf); tfp = e->e_lockfp; - if (tfp == NULL) - newid = false; + if (tfp == NULL && newid) + { + /* + ** open qf file directly: this will give an error if the file + ** already exists and hence prevent problems if a queue-id + ** is reused (e.g., because the clock is set back). + */ + + (void) sm_strlcpy(tf, queuename(e, ANYQFL_LETTER), sizeof tf); + OPEN_TF; + if (tfd < 0 || +#if !SM_OPEN_EXLOCK + !lockfile(tfd, tf, NULL, LOCK_EX|LOCK_NB) || +#endif /* !SM_OPEN_EXLOCK */ + (tfp = sm_io_open(SmFtStdiofd, SM_TIME_DEFAULT, + (void *) &tfd, SM_IO_WRONLY_B, + NULL)) == NULL) + { + int save_errno = errno; + + printopenfds(true); + errno = save_errno; + syserr("!queueup: cannot create queue file %s, euid=%d", + tf, (int) geteuid()); + /* NOTREACHED */ + } + e->e_lockfp = tfp; + } /* if newid, write the queue file directly (instead of temp file) */ if (!newid) { - const int flags = O_CREAT|O_WRONLY|O_EXCL; - /* get a locked tf file */ for (i = 0; i < 128; i++) { if (tfd < 0) { - MODE_T oldumask = 0; - - if (bitset(S_IWGRP, QueueFileMode)) - oldumask = umask(002); - tfd = open(tf, flags, QueueFileMode); - if (bitset(S_IWGRP, QueueFileMode)) - (void) umask(oldumask); - + OPEN_TF; if (tfd < 0) { if (errno != EEXIST) @@ -380,12 +436,22 @@ queueup(e, announce, msync) tf, (int) geteuid(), sm_errstring(errno)); } +#if SM_OPEN_EXLOCK + else + break; +#endif /* SM_OPEN_EXLOCK */ } if (tfd >= 0) { +#if SM_OPEN_EXLOCK + /* file is locked by open() */ + break; +#else /* SM_OPEN_EXLOCK */ if (lockfile(tfd, tf, NULL, LOCK_EX|LOCK_NB)) break; - else if (LogLevel > 0 && (i % 32) == 0) + else +#endif /* SM_OPEN_EXLOCK */ + if (LogLevel > 0 && (i % 32) == 0) sm_syslog(LOG_ALERT, e->e_id, "queueup: cannot lock %s: %s", tf, sm_errstring(errno)); @@ -405,7 +471,7 @@ queueup(e, announce, msync) (void) sleep(i % 32); } if (tfd < 0 || (tfp = sm_io_open(SmFtStdiofd, SM_TIME_DEFAULT, - (void *) &tfd, SM_IO_WRONLY, + (void *) &tfd, SM_IO_WRONLY_B, NULL)) == NULL) { int save_errno = errno; @@ -491,11 +557,12 @@ queueup(e, announce, msync) if (bitset(S_IWGRP, QueueFileMode)) oldumask = umask(002); - dfd = open(df, O_WRONLY|O_CREAT|O_TRUNC, QueueFileMode); + dfd = open(df, O_WRONLY|O_CREAT|O_TRUNC|QF_O_EXTRA, + QueueFileMode); if (bitset(S_IWGRP, QueueFileMode)) (void) umask(oldumask); if (dfd < 0 || (dfp = sm_io_open(SmFtStdiofd, SM_TIME_DEFAULT, - (void *) &dfd, SM_IO_WRONLY, + (void *) &dfd, SM_IO_WRONLY_B, NULL)) == NULL) syserr("!queueup: cannot create data temp file %s, uid=%d", df, (int) geteuid()); @@ -1558,9 +1625,6 @@ runqueue(forkflag, verbose, persistent, runall) ** runs things in the mail queue. */ -/* Get new load average every 30 seconds. */ -#define GET_NEW_LA_TIME 30 - static void runner_work(e, sequenceno, didfork, skip, njobs) register ENVELOPE *e; @@ -1571,9 +1635,9 @@ runner_work(e, sequenceno, didfork, skip, njobs) { int n; WORK *w; - time_t current_la_time, now; + time_t now; - current_la_time = curtime(); + SM_GET_LA(now); /* ** Here we temporarily block the second calling of the handlers. @@ -1629,13 +1693,8 @@ runner_work(e, sequenceno, didfork, skip, njobs) ** Get new load average every GET_NEW_LA_TIME seconds. */ - now = curtime(); - if (current_la_time < now - GET_NEW_LA_TIME) - { - sm_getla(); - current_la_time = now; - } - if (shouldqueue(WkRecipFact, current_la_time)) + SM_GET_LA(now); + if (shouldqueue(WkRecipFact, Current_LA_time)) { char *msg = "Aborting queue run: load average too high"; @@ -1749,7 +1808,7 @@ run_work_group(wgrp, flags) int njobs, qdir; int sequenceno = 1; int qgrp, endgrp, h, i; - time_t current_la_time, now; + time_t now; bool full, more; SM_RPOOL_T *rpool; extern void rmexpstab __P((void)); @@ -1764,11 +1823,10 @@ run_work_group(wgrp, flags) ** the queue. */ - sm_getla(); /* get load average */ - current_la_time = curtime(); + SM_GET_LA(now); if (!bitset(RWG_PERSISTENT, flags) && - shouldqueue(WkRecipFact, current_la_time)) + shouldqueue(WkRecipFact, Current_LA_time)) { char *msg = "Skipping queue run -- load average too high"; @@ -2041,7 +2099,7 @@ run_work_group(wgrp, flags) if (pid < 0) { syserr("run_work_group: cannot fork"); - return 0; + return false; } else if (pid > 0) { @@ -2222,12 +2280,8 @@ run_work_group(wgrp, flags) ** CurrentLA caused all entries in a queue to be ignored. */ - now = curtime(); - if (njobs == 0 && current_la_time < now - GET_NEW_LA_TIME) - { - sm_getla(); - current_la_time = now; - } + if (njobs == 0) + SM_GET_LA(now); rpool = sm_rpool_new_x(NULL); e = newenvelope(&QueueEnvelope, CurEnv, rpool); e->e_flags = BlankEnvelope.e_flags; @@ -2551,7 +2605,7 @@ gatherq(qgrp, qdir, doall, full, more) } /* open control file */ - cf = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, qf, SM_IO_RDONLY, + cf = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, qf, SM_IO_RDONLY_B, NULL); if (cf == NULL && OpMode != MD_PRINT) { @@ -2692,6 +2746,8 @@ gatherq(qgrp, qdir, doall, full, more) p = strchr(&lbuf[1], ':'); if (p == NULL) p = &lbuf[1]; + else + ++p; /* skip over ':' */ } else p = &lbuf[1]; @@ -3798,7 +3854,7 @@ readqf(e, openonly) */ (void) sm_strlcpy(qf, queuename(e, ANYQFL_LETTER), sizeof qf); - qfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, qf, SM_IO_RDWR, NULL); + qfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, qf, SM_IO_RDWR_B, NULL); if (qfp == NULL) { int save_errno = errno; @@ -3830,6 +3886,8 @@ readqf(e, openonly) return false; } + RELEASE_QUEUE; + /* ** Prevent locking race condition. ** @@ -3856,7 +3914,6 @@ readqf(e, openonly) sm_dprintf("readqf(%s): [f]stat failure (%s)\n", qf, sm_errstring(errno)); (void) sm_io_close(qfp, SM_TIME_DEFAULT); - RELEASE_QUEUE; return false; } @@ -3879,7 +3936,6 @@ readqf(e, openonly) if (LogLevel > 19) sm_syslog(LOG_DEBUG, e->e_id, "changed"); (void) sm_io_close(qfp, SM_TIME_DEFAULT); - RELEASE_QUEUE; return false; } @@ -3945,7 +4001,6 @@ readqf(e, openonly) if (!openonly) loseqfile(e, "bogus file uid/gid in mqueue"); (void) sm_io_close(qfp, SM_TIME_DEFAULT); - RELEASE_QUEUE; return false; } @@ -3958,7 +4013,6 @@ readqf(e, openonly) (void) xunlink(queuename(e, ANYQFL_LETTER)); } (void) sm_io_close(qfp, SM_TIME_DEFAULT); - RELEASE_QUEUE; return false; } @@ -3970,7 +4024,6 @@ readqf(e, openonly) */ (void) sm_io_close(qfp, SM_TIME_DEFAULT); - RELEASE_QUEUE; return false; } @@ -4160,10 +4213,10 @@ readqf(e, openonly) /* ** count size before chompheader() destroys the line. ** this isn't accurate due to macro expansion, but - ** better than before. "+3" to skip H?? at least. + ** better than before. "-3" to skip H?? at least. */ - hdrsize += strlen(bp + 3); + hdrsize += strlen(bp) - 3; (void) chompheader(&bp[1], CHHDR_QUEUE, NULL, e); break; @@ -4205,7 +4258,6 @@ readqf(e, openonly) howlong); e->e_id = NULL; unlockqueue(e); - RELEASE_QUEUE; return false; } macdefine(&e->e_macro, A_TEMP, @@ -4280,8 +4332,13 @@ readqf(e, openonly) } else qflags |= QPRIMARY; - q = parseaddr(++p, NULLADDR, RF_COPYALL, '\0', NULL, e, - true); + macdefine(&e->e_macro, A_PERM, macid("{addr_type}"), + "e r"); + if (*p != '\0') + q = parseaddr(++p, NULLADDR, RF_COPYALL, '\0', + NULL, e, true); + else + q = NULL; if (q != NULL) { /* make sure we keep the current qgrp */ @@ -4297,6 +4354,8 @@ readqf(e, openonly) } frcpt = NULL; orcpt = NULL; + macdefine(&e->e_macro, A_PERM, macid("{addr_type}"), + NULL); break; case 'S': /* sender */ @@ -4378,7 +4437,6 @@ readqf(e, openonly) { errno = 0; e->e_flags |= EF_CLRQUEUE|EF_FATALERRS|EF_RESPONSE; - RELEASE_QUEUE; return true; } @@ -4387,7 +4445,6 @@ readqf(e, openonly) { syserr("readqf: %s: incomplete queue file read", qf); (void) sm_io_close(qfp, SM_TIME_DEFAULT); - RELEASE_QUEUE; return false; } @@ -4407,7 +4464,7 @@ readqf(e, openonly) */ p = queuename(e, DATAFL_LETTER); - e->e_dfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, p, SM_IO_RDONLY, + e->e_dfp = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, p, SM_IO_RDONLY_B, NULL); if (e->e_dfp == NULL) { @@ -4429,7 +4486,6 @@ readqf(e, openonly) } } - RELEASE_QUEUE; return true; fail: @@ -4447,7 +4503,6 @@ readqf(e, openonly) e->e_lockfp = NULL; e->e_flags |= EF_INQUEUE; loseqfile(e, err); - RELEASE_QUEUE; return false; } /* @@ -4746,7 +4801,7 @@ print_single_queue(qgrp, qdir) (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, "%13s", w->w_name + 2); (void) sm_strlcpyn(qf, sizeof qf, 3, qd, "/", w->w_name); - f = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, qf, SM_IO_RDONLY, + f = sm_io_open(SmFtStdio, SM_TIME_DEFAULT, qf, SM_IO_RDONLY_B, NULL); if (f == NULL) { @@ -5149,6 +5204,36 @@ queuename(e, type) sm_dprintf("queuename: %s\n", buf); return buf; } + +/* +** INIT_QID_ALG -- Initialize the (static) parameters that are used to +** generate a queue ID. +** +** This function is called by the daemon to reset +** LastQueueTime and LastQueuePid which are used by assign_queueid(). +** Otherwise the algorithm may cause problems because +** LastQueueTime and LastQueuePid are set indirectly by main() +** before the daemon process is started, hence LastQueuePid is not +** the pid of the daemon and therefore a child of the daemon can +** actually have the same pid as LastQueuePid which means the section +** in assign_queueid(): +** * see if we need to get a new base time/pid * +** is NOT triggered which will cause the same queue id to be generated. +** +** Parameters: +** none +** +** Returns: +** none. +*/ + +void +init_qid_alg() +{ + LastQueueTime = 0; + LastQueuePid = -1; +} + /* ** ASSIGN_QUEUEID -- assign a queue ID for this envelope. ** @@ -5165,8 +5250,20 @@ queuename(e, type) ** none. */ -static const char QueueIdChars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx"; +static const char QueueIdChars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; # define QIC_LEN 60 +# define QIC_LEN_R 62 + +/* +** Note: the length is "officially" 60 because minutes and seconds are +** usually only 0-59. However (Linux): +** tm_sec The number of seconds after the minute, normally in +** the range 0 to 59, but can be up to 61 to allow for +** leap seconds. +** Hence the real length of the string is 62 to take this into account. +** Alternatively % QIC_LEN can (should) be used for access everywhere. +*/ + # define queuenextid() CurrentPid @@ -5221,8 +5318,8 @@ assign_queueid(e) idbuf[1] = QueueIdChars[tm->tm_mon]; idbuf[2] = QueueIdChars[tm->tm_mday]; idbuf[3] = QueueIdChars[tm->tm_hour]; - idbuf[4] = QueueIdChars[tm->tm_min]; - idbuf[5] = QueueIdChars[tm->tm_sec]; + idbuf[4] = QueueIdChars[tm->tm_min % QIC_LEN_R]; + idbuf[5] = QueueIdChars[tm->tm_sec % QIC_LEN_R]; idbuf[6] = QueueIdChars[seq / QIC_LEN]; idbuf[7] = QueueIdChars[seq % QIC_LEN]; (void) sm_snprintf(&idbuf[8], sizeof idbuf - 8, "%06d", @@ -6597,7 +6694,7 @@ init_shm(qn, owner, hash) Pshm = sm_shmstart(ShmKey, shms, SHM_R|SHM_W, &ShmId, owner); save_errno = errno; - if (Pshm != NULL || save_errno != EEXIST) + if (Pshm != NULL || !sm_file_exists(save_errno)) break; if (++count >= 3) { @@ -6687,6 +6784,7 @@ init_shm(qn, owner, hash) } #endif /* SM_CONF_SHM */ + /* ** SETUP_QUEUES -- setup all queue groups ** @@ -7333,10 +7431,10 @@ cmpidx(a, b) void makeworkgroups() { - int i, j, total_runners = 0; - int dir; + int i, j, total_runners, dir, h; SORTQGRP_T si[MAXQUEUEGROUPS + 1]; + total_runners = 0; if (NumQueue == 1 && strcmp(Queue[0]->qg_name, "mqueue") == 0) { /* @@ -7432,18 +7530,19 @@ makeworkgroups() (WorkGrp[j].wg_numqgrp + 1))); } - WorkGrp[j].wg_qgs[WorkGrp[j].wg_numqgrp] = Queue[si[i].sg_idx]; + h = si[i].sg_idx; + WorkGrp[j].wg_qgs[WorkGrp[j].wg_numqgrp] = Queue[h]; WorkGrp[j].wg_numqgrp++; - WorkGrp[j].wg_runners += Queue[i]->qg_maxqrun; - Queue[si[i].sg_idx]->qg_wgrp = j; + WorkGrp[j].wg_runners += Queue[h]->qg_maxqrun; + Queue[h]->qg_wgrp = j; if (WorkGrp[j].wg_maxact == 0) { /* can't have more runners than allowed total */ if (MaxQueueChildren > 0 && - Queue[i]->qg_maxqrun > MaxQueueChildren) - Queue[i]->qg_maxqrun = MaxQueueChildren; - WorkGrp[j].wg_maxact = Queue[i]->qg_maxqrun; + Queue[h]->qg_maxqrun > MaxQueueChildren) + Queue[h]->qg_maxqrun = MaxQueueChildren; + WorkGrp[j].wg_maxact = Queue[h]->qg_maxqrun; } /* @@ -7453,9 +7552,9 @@ makeworkgroups() */ /* keep track of the lowest interval for a persistent runner */ - if (Queue[si[i].sg_idx]->qg_queueintvl > 0 && - WorkGrp[j].wg_lowqintvl < Queue[si[i].sg_idx]->qg_queueintvl) - WorkGrp[j].wg_lowqintvl = Queue[si[i].sg_idx]->qg_queueintvl; + if (Queue[h]->qg_queueintvl > 0 && + WorkGrp[j].wg_lowqintvl < Queue[h]->qg_queueintvl) + WorkGrp[j].wg_lowqintvl = Queue[h]->qg_queueintvl; j += dir; } if (tTd(41, 9)) @@ -8256,7 +8355,7 @@ quarantine_queue_item(qgrp, qdir, e, reason) } tempqfp = sm_io_open(SmFtStdiofd, SM_TIME_DEFAULT, (void *) &fd, - SM_IO_WRONLY, NULL); + SM_IO_WRONLY_B, NULL); if (tempqfp == NULL) { (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, diff --git a/gnu/dist/sendmail/sendmail/readcf.c b/gnu/dist/sendmail/sendmail/readcf.c index 6213d4efbee..a9e223b75e9 100644 --- a/gnu/dist/sendmail/sendmail/readcf.c +++ b/gnu/dist/sendmail/sendmail/readcf.c @@ -1,11 +1,11 @@ -/* $NetBSD: readcf.c,v 1.13 2003/06/01 14:07:08 atatat Exp $ */ +/* $NetBSD: readcf.c,v 1.14 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: readcf.c,v 1.13 2003/06/01 14:07:08 atatat Exp $"); +__RCSID("$NetBSD: readcf.c,v 1.14 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -19,7 +19,7 @@ __RCSID("$NetBSD: readcf.c,v 1.13 2003/06/01 14:07:08 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: readcf.c,v 8.607.2.8 2003/03/12 22:42:52 gshapiro Exp") +SM_RCSID("@(#)Id: readcf.c,v 8.607.2.12 2003/10/07 17:45:28 ca Exp") #if NETINET || NETINET6 # include <arpa/inet.h> @@ -297,11 +297,19 @@ readcf(cfname, safe, e) if (rwp->r_rhs != NULL) { register char **ap; + int args, endtoken; +#if _FFR_EXTRA_MAP_CHECK + int nexttoken; +#endif /* _FFR_EXTRA_MAP_CHECK */ + bool inmap; rwp->r_rhs = copyplist(rwp->r_rhs, true, NULL); /* check no out-of-bounds replacements */ nfuzzy += '0'; + inmap = false; + args = 0; + endtoken = 0; for (ap = rwp->r_rhs; *ap != NULL; ap++) { char *botch; @@ -337,6 +345,65 @@ readcf(cfname, safe, e) botch = "$~"; break; + case CANONHOST: + if (!inmap) + break; + if (++args >= MAX_MAP_ARGS) + syserr("too many arguments for map lookup"); + break; + + case HOSTBEGIN: + endtoken = HOSTEND; + /* FALLTHROUGH */ + case LOOKUPBEGIN: + /* see above... */ + if ((**ap & 0377) == LOOKUPBEGIN) + endtoken = LOOKUPEND; + if (inmap) + syserr("cannot nest map lookups"); + inmap = true; + args = 0; +#if _FFR_EXTRA_MAP_CHECK + if (*(ap + 1) == NULL) + { + syserr("syntax error in map lookup"); + break; + } + nexttoken = **(ap + 1) & 0377; + if (nexttoken == CANONHOST || + nexttoken == CANONUSER || + nexttoken == endtoken) + { + syserr("missing map name for lookup"); + break; + } + if (*(ap + 2) == NULL) + { + syserr("syntax error in map lookup"); + break; + } + if ((**ap & 0377) == HOSTBEGIN) + break; + nexttoken = **(ap + 2) & 0377; + if (nexttoken == CANONHOST || + nexttoken == CANONUSER || + nexttoken == endtoken) + { + syserr("missing key name for lookup"); + break; + } +#endif /* _FFR_EXTRA_MAP_CHECK */ + break; + + case HOSTEND: + case LOOKUPEND: + if ((**ap & 0377) != endtoken) + break; + inmap = false; + endtoken = 0; + break; + + #if 0 /* ** This doesn't work yet as there are maps defined *after* the cf @@ -371,6 +438,8 @@ readcf(cfname, safe, e) syserr("Inappropriate use of %s on RHS", botch); } + if (inmap) + syserr("missing map closing token"); } else { @@ -869,6 +938,7 @@ fileclass(class, filename, fmt, ismap, safe, optional) *p++ = '\0'; cl = p; +#if LDAPMAP if (strcmp(cl, "LDAP") == 0) { int n; @@ -908,6 +978,7 @@ fileclass(class, filename, fmt, ismap, safe, optional) spec = buf; } else +#endif /* LDAPMAP */ { if ((spec = strchr(cl, ':')) == NULL) { @@ -2558,7 +2629,7 @@ setoption(opt, val, safe, sticky, e) break; p = newstr(ep); if (!safe) - cleanstrcpy(p, p, MAXNAME); + cleanstrcpy(p, p, strlen(p) + 1); macdefine(&CurEnv->e_macro, A_TEMP, mid, p); break; @@ -3088,7 +3159,7 @@ setoption(opt, val, safe, sticky, e) RunAsGid = pw->pw_gid; else if (UseMSP && *p == '\0') (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, - "WARNING: RunAsGid for MSP ignored, check group ids (egid=%d, want=%d)\n", + "WARNING: RunAsUser for MSP ignored, check group ids (egid=%d, want=%d)\n", (int) EffGid, (int) pw->pw_gid); } @@ -3112,7 +3183,7 @@ setoption(opt, val, safe, sticky, e) else if (UseMSP) (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, - "WARNING: RunAsGid for MSP ignored, check group ids (egid=%d, want=%d)\n", + "WARNING: RunAsUser for MSP ignored, check group ids (egid=%d, want=%d)\n", (int) EffGid, (int) runasgid); } @@ -3129,7 +3200,7 @@ setoption(opt, val, safe, sticky, e) else if (UseMSP) (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, - "WARNING: RunAsGid for MSP ignored, check group ids (egid=%d, want=%d)\n", + "WARNING: RunAsUser for MSP ignored, check group ids (egid=%d, want=%d)\n", (int) EffGid, (int) gr->gr_gid); } @@ -3282,13 +3353,13 @@ setoption(opt, val, safe, sticky, e) else MaxMimeFieldLength = MaxMimeHeaderLength / 2; - if (MaxMimeHeaderLength < 0) + if (MaxMimeHeaderLength <= 0) MaxMimeHeaderLength = 0; else if (MaxMimeHeaderLength < 128) (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, "Warning: MaxMimeHeaderLength: header length limit set lower than 128\n"); - if (MaxMimeFieldLength < 0) + if (MaxMimeFieldLength <= 0) MaxMimeFieldLength = 0; else if (MaxMimeFieldLength < 40) (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, diff --git a/gnu/dist/sendmail/sendmail/recipient.c b/gnu/dist/sendmail/sendmail/recipient.c index fce417d808b..fd2d7364a56 100644 --- a/gnu/dist/sendmail/sendmail/recipient.c +++ b/gnu/dist/sendmail/sendmail/recipient.c @@ -1,11 +1,11 @@ -/* $NetBSD: recipient.c,v 1.9 2003/06/01 14:07:08 atatat Exp $ */ +/* $NetBSD: recipient.c,v 1.10 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: recipient.c,v 1.9 2003/06/01 14:07:08 atatat Exp $"); +__RCSID("$NetBSD: recipient.c,v 1.10 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -19,7 +19,7 @@ __RCSID("$NetBSD: recipient.c,v 1.9 2003/06/01 14:07:08 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: recipient.c,v 8.330.2.1 2002/08/27 20:21:02 gshapiro Exp") +SM_RCSID("@(#)Id: recipient.c,v 8.330.2.4 2003/10/06 20:43:29 ca Exp") static void includetimeout __P((void)); static ADDRESS *self_reference __P((ADDRESS *)); @@ -175,6 +175,7 @@ sendtolist(list, ctladdr, sendq, aliaslevel, e) SM_NONVOLATILE char delimiter; /* the address delimiter */ SM_NONVOLATILE int naddrs; SM_NONVOLATILE int i; + char *endp; char *oldto = e->e_to; char *SM_NONVOLATILE bufp; char buf[MAXNAME + 1]; @@ -212,6 +213,7 @@ sendtolist(list, ctladdr, sendq, aliaslevel, e) } else bufp = sm_malloc_x(i); + endp = bufp + i; SM_TRY { @@ -223,12 +225,16 @@ sendtolist(list, ctladdr, sendq, aliaslevel, e) auto char *delimptr; register ADDRESS *a; + SM_ASSERT(p < endp); + /* parse the address */ while ((isascii(*p) && isspace(*p)) || *p == ',') p++; + SM_ASSERT(p < endp); a = parseaddr(p, NULLADDR, RF_COPYALL, delimiter, &delimptr, e, true); p = delimptr; + SM_ASSERT(p < endp); if (a == NULL) continue; a->q_next = al; @@ -397,7 +403,8 @@ removefromlist(list, sendq, e) for (pq = sendq; (q = *pq) != NULL; pq = &q->q_next) { if (!QS_IS_DEAD(q->q_state) && - sameaddr(q, &a)) + (sameaddr(q, &a) || + strcmp(q->q_paddr, a.q_paddr) == 0)) { if (tTd(25, 5)) { diff --git a/gnu/dist/sendmail/sendmail/sendmail.0 b/gnu/dist/sendmail/sendmail/sendmail.0 index 032f4a2a079..71ad44cbab7 100644 --- a/gnu/dist/sendmail/sendmail/sendmail.0 +++ b/gnu/dist/sendmail/sendmail/sendmail.0 @@ -1,9 +1,7 @@ +SENDMAIL(8) SENDMAIL(8) -SENDMAIL(8) SENDMAIL(8) - - NNAAMMEE sendmail - an electronic mail transport agent @@ -16,66 +14,49 @@ SSYYNNOOPPSSIISS ssmmttppdd DDEESSCCRRIIPPTTIIOONN - SSeennddmmaaiill sends a message to one or more _r_e_c_i_p_i_e_n_t_s_, rout- - ing the message over whatever networks are necessary. - SSeennddmmaaiill does internetwork forwarding as necessary to - deliver the message to the correct place. - - SSeennddmmaaiill is not intended as a user interface routine; - other programs provide user-friendly front ends; sseennddmmaaiill - is used only to deliver pre-formatted messages. - - With no flags, sseennddmmaaiill reads its standard input up to an - end-of-file or a line consisting only of a single dot and - sends a copy of the message found there to all of the - addresses listed. It determines the network(s) to use - based on the syntax and contents of the addresses. - - Local addresses are looked up in a file and aliased appro- - priately. Aliasing can be prevented by preceding the - address with a backslash. Beginning with 8.10, the sender - is included in any alias expansions, e.g., if `john' sends - to `group', and `group' includes `john' in the expansion, - then the letter will also be delivered to `john'. - - PPaarraammeetteerrss - --AAcc Use submit.cf even if the operation mode does not - indicate an initial mail submission. - - --AAmm Use sendmail.cf even if the operation mode indi- - cates an initial mail submission. - - --BB_t_y_p_e Set the body type to _t_y_p_e. Current legal values - are 7BIT or 8BITMIME. + SSeennddmmaaiill sends a message to one or more _r_e_c_i_p_i_e_n_t_s_, routing the message + over whatever networks are necessary. SSeennddmmaaiill does internetwork for- + warding as necessary to deliver the message to the correct place. - --bbaa Go into ARPANET mode. All input lines must end - with a CR-LF, and all messages will be generated - with a CR-LF at the end. Also, the ``From:'' and - ``Sender:'' fields are examined for the name of the - sender. + SSeennddmmaaiill is not intended as a user interface routine; other programs + provide user-friendly front ends; sseennddmmaaiill is used only to deliver pre- + formatted messages. - --bbdd Run as a daemon. SSeennddmmaaiill will fork and run in - background listening on socket 25 for incoming SMTP - connections. This is normally run from /etc/rc. - - - - - Date: 2002/05/24 15:42:13 1 + With no flags, sseennddmmaaiill reads its standard input up to an end-of-file + or a line consisting only of a single dot and sends a copy of the mes- + sage found there to all of the addresses listed. It determines the + network(s) to use based on the syntax and contents of the addresses. + Local addresses are looked up in a file and aliased appropriately. + Aliasing can be prevented by preceding the address with a backslash. + Beginning with 8.10, the sender is included in any alias expansions, + e.g., if `john' sends to `group', and `group' includes `john' in the + expansion, then the letter will also be delivered to `john'. + PPaarraammeetteerrss + --AAcc Use submit.cf even if the operation mode does not indicate an + initial mail submission. + --AAmm Use sendmail.cf even if the operation mode indicates an initial + mail submission. + --BB_t_y_p_e Set the body type to _t_y_p_e. Current legal values are 7BIT or + 8BITMIME. -SENDMAIL(8) SENDMAIL(8) + --bbaa Go into ARPANET mode. All input lines must end with a CR-LF, + and all messages will be generated with a CR-LF at the end. + Also, the ``From:'' and ``Sender:'' fields are examined for the + name of the sender. + --bbdd Run as a daemon. SSeennddmmaaiill will fork and run in background lis- + tening on socket 25 for incoming SMTP connections. This is nor- + mally run from /etc/rc. --bbDD Same as --bbdd except runs in foreground. --bbhh Print the persistent host status database. - --bbHH Purge expired entries from the persistent host sta- - tus database. + --bbHH Purge expired entries from the persistent host status database. --bbii Initialize the alias database. @@ -83,269 +64,205 @@ SENDMAIL(8) SENDMAIL(8) --bbpp Print a listing of the queue(s). - --bbPP Print number of entries in the queue(s); only - available with shared memory support. - - --bbss Use the SMTP protocol as described in RFC821 on - standard input and output. This flag implies all - the operations of the --bbaa flag that are compatible - with SMTP. - - --bbtt Run in address test mode. This mode reads - addresses and shows the steps in parsing; it is - used for debugging configuration tables. - - --bbvv Verify names only - do not try to collect or - deliver a message. Verify mode is normally used - for validating users or mailing lists. - - --CC_f_i_l_e Use alternate configuration file. SSeennddmmaaiill refuses - to run as root if an alternate configuration file - is specified. - - --dd_X Set debugging value to _X. + --bbPP Print number of entries in the queue(s); only available with + shared memory support. + + --bbss Use the SMTP protocol as described in RFC821 on standard input + and output. This flag implies all the operations of the --bbaa + flag that are compatible with SMTP. + + --bbtt Run in address test mode. This mode reads addresses and shows + the steps in parsing; it is used for debugging configuration + tables. + + --bbvv Verify names only - do not try to collect or deliver a message. + Verify mode is normally used for validating users or mailing + lists. + + --CC_f_i_l_e Use alternate configuration file. SSeennddmmaaiill gives up any + enhanced (set-user-ID or set-group-ID) privileges if an alter- + nate configuration file is specified. + + --dd_c_a_t_e_g_o_r_y.._l_e_v_e_l_._._. + Set the debugging flag for _c_a_t_e_g_o_r_y to _l_e_v_e_l. _C_a_t_e_g_o_r_y is + either an integer or a name specifying the topic, and _l_e_v_e_l an + integer specifying the level of debugging output desired. + Higher levels generally mean more output. More than one flag + can be specified by separating them with commas. A list of + numeric debugging categories can be found in the TRACEFLAGS file + in the sendmail source distribution. + The option --dd00..11 prints the version of sseennddmmaaiill and the options + it was compiled with. + Most other categories are only useful with, and documented in, + sseennddmmaaiill's source code. --FF_f_u_l_l_n_a_m_e Set the full name of the sender. - --ff_n_a_m_e Sets the name of the ``from'' person (i.e., the - envelope sender of the mail). This address may - also be used in the From: header if that header is - missing during initial submission. The envelope - sender address is used as the recipient for deliv- - ery status notifications and may also appear in a - Return-Path: header. --ff should only be used by - ``trusted'' users (normally _r_o_o_t, _d_a_e_m_o_n, and _n_e_t_- - _w_o_r_k) or if the person you are trying to become is - the same as the person you are. Otherwise, an X- - Authentication-Warning header will be added to the - message. - - --GG Relay (gateway) submission of a message, e.g., when - rrmmaaiill calls sseennddmmaaiill .. - - - - - Date: 2002/05/24 15:42:13 2 - - - - - -SENDMAIL(8) SENDMAIL(8) - - - --hh_N Set the hop count to _N. The hop count is incre- - mented every time the mail is processed. When it - reaches a limit, the mail is returned with an error - message, the victim of an aliasing loop. If not - specified, ``Received:'' lines in the message are + --ff_n_a_m_e Sets the name of the ``from'' person (i.e., the envelope sender + of the mail). This address may also be used in the From: header + if that header is missing during initial submission. The enve- + lope sender address is used as the recipient for delivery status + notifications and may also appear in a Return-Path: header. --ff + should only be used by ``trusted'' users (normally _r_o_o_t, _d_a_e_m_o_n, + and _n_e_t_w_o_r_k) or if the person you are trying to become is the + same as the person you are. Otherwise, an X-Authentication- + Warning header will be added to the message. + + --GG Relay (gateway) submission of a message, e.g., when rrmmaaiill calls + sseennddmmaaiill .. + + --hh_N Set the hop count to _N. The hop count is incremented every time + the mail is processed. When it reaches a limit, the mail is + returned with an error message, the victim of an aliasing loop. + If not specified, ``Received:'' lines in the message are counted. - --ii Ignore dots alone on lines by themselves in incom- - ing messages. This should be set if you are read- - ing data from a file. + --ii Ignore dots alone on lines by themselves in incoming messages. + This should be set if you are reading data from a file. - --LL _t_a_g Set the identifier used in syslog messages to the - supplied _t_a_g. + --LL _t_a_g Set the identifier used in syslog messages to the supplied _t_a_g. - --NN _d_s_n Set delivery status notification conditions to _d_s_n, - which can be `never' for no notifications or a - comma separated list of the values `failure' to be - notified if delivery failed, `delay' to be notified - if delivery is delayed, and `success' to be noti- - fied when the message is successfully delivered. + --NN _d_s_n Set delivery status notification conditions to _d_s_n, which can be + `never' for no notifications or a comma separated list of the + values `failure' to be notified if delivery failed, `delay' to + be notified if delivery is delayed, and `success' to be notified + when the message is successfully delivered. --nn Don't do aliasing. --OO _o_p_t_i_o_n=_v_a_l_u_e - Set option _o_p_t_i_o_n to the specified _v_a_l_u_e. This - form uses long names. See below for more details. + Set option _o_p_t_i_o_n to the specified _v_a_l_u_e. This form uses long + names. See below for more details. --oo_x _v_a_l_u_e - Set option _x to the specified _v_a_l_u_e. This form - uses single character names only. The short names - are not described in this manual page; see the - _S_e_n_d_m_a_i_l _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e for - details. + Set option _x to the specified _v_a_l_u_e. This form uses single + character names only. The short names are not described in this + manual page; see the _S_e_n_d_m_a_i_l _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e + for details. --pp_p_r_o_t_o_c_o_l - Set the name of the protocol used to receive the - message. This can be a simple protocol name such - as ``UUCP'' or a protocol and hostname, such as - ``UUCP:ucbvax''. + Set the name of the protocol used to receive the message. This + can be a simple protocol name such as ``UUCP'' or a protocol and + hostname, such as ``UUCP:ucbvax''. --qq[_t_i_m_e] - Process saved messages in the queue at given inter- - vals. If _t_i_m_e is omitted, process the queue once. - _T_i_m_e is given as a tagged number, with `s' being - seconds, `m' being minutes (default), `h' being - hours, `d' being days, and `w' being weeks. For - example, `-q1h30m' or `-q90m' would both set the - timeout to one hour thirty minutes. By default, - sseennddmmaaiill will run in the background. This option - can be used safely with --bbdd. + Process saved messages in the queue at given intervals. If _t_i_m_e + is omitted, process the queue once. _T_i_m_e is given as a tagged + number, with `s' being seconds, `m' being minutes (default), `h' + being hours, `d' being days, and `w' being weeks. For example, + `-q1h30m' or `-q90m' would both set the timeout to one hour + thirty minutes. By default, sseennddmmaaiill will run in the back- + ground. This option can be used safely with --bbdd. --qqpp[_t_i_m_e] - Similar to --qq_t_i_m_e, except that instead of periodi- - cally forking a child to process the queue, - - - - Date: 2002/05/24 15:42:13 3 - - - - - -SENDMAIL(8) SENDMAIL(8) + Similar to --qq_t_i_m_e, except that instead of periodically forking a + child to process the queue, sendmail forks a single persistent + child for each queue that alternates between processing the + queue and sleeping. The sleep time is given as the argument; it + defaults to 1 second. The process will always sleep at least 5 + seconds if the queue was empty in the previous queue run. - - sendmail forks a single persistent child for each - queue that alternates between processing the queue - and sleeping. The sleep time is given as the argu- - ment; it defaults to 1 second. The process will - always sleep at least 5 seconds if the queue was - empty in the previous queue run. - - --qqf Process saved messages in the queue once and do not - fork(), but run in the foreground. + --qqf Process saved messages in the queue once and do not fork(), but + run in the foreground. --qqG name Process jobs in queue group called _n_a_m_e only. - --qq[_!]I substr - Limit processed jobs to those containing _s_u_b_s_t_r as - a substring of the queue id or not when _! is spec- - ified. + --qq[_!]I_s_u_b_s_t_r + Limit processed jobs to those containing _s_u_b_s_t_r as a substring + of the queue id or not when _! is specified. - --qq[_!]R substr - Limit processed jobs to those containing _s_u_b_s_t_r as - a substring of one of the recipients or not when _! - is specified. + --qq[_!]R_s_u_b_s_t_r + Limit processed jobs to those containing _s_u_b_s_t_r as a substring + of one of the recipients or not when _! is specified. - --qq[_!]S substr - Limit processed jobs to those containing _s_u_b_s_t_r as - a substring of the sender or not when _! is speci- - fied. + --qq[_!]S_s_u_b_s_t_r + Limit processed jobs to those containing _s_u_b_s_t_r as a substring + of the sender or not when _! is specified. --RR _r_e_t_u_r_n - Set the amount of the message to be returned if the - message bounces. The _r_e_t_u_r_n parameter can be - `full' to return the entire message or `hdrs' to - return only the headers. In the latter case also - local bounces return only the headers. + Set the amount of the message to be returned if the message + bounces. The _r_e_t_u_r_n parameter can be `full' to return the + entire message or `hdrs' to return only the headers. In the + latter case also local bounces return only the headers. --rr_n_a_m_e An alternate and obsolete form of the --ff flag. - --tt Read message for recipients. To:, Cc:, and Bcc: - lines will be scanned for recipient addresses. The - Bcc: line will be deleted before transmission. + --tt Read message for recipients. To:, Cc:, and Bcc: lines will be + scanned for recipient addresses. The Bcc: line will be deleted + before transmission. --VV _e_n_v_i_d - Set the original envelope id. This is propagated - across SMTP to servers that support DSNs and is - returned in DSN-compliant error messages. + Set the original envelope id. This is propagated across SMTP to + servers that support DSNs and is returned in DSN-compliant error + messages. - --vv Go into verbose mode. Alias expansions will be - announced, etc. + --vv Go into verbose mode. Alias expansions will be announced, etc. --XX _l_o_g_f_i_l_e - Log all traffic in and out of mailers in the indi- - cated log file. This should only be used as a last - resort for debugging mailer bugs. It will log a - lot of data very quickly. - - - - Date: 2002/05/24 15:42:13 4 - - - - - -SENDMAIL(8) SENDMAIL(8) - + Log all traffic in and out of mailers in the indicated log file. + This should only be used as a last resort for debugging mailer + bugs. It will log a lot of data very quickly. - ---- Stop processing command flags and use the rest of - the arguments as addresses. + ---- Stop processing command flags and use the rest of the arguments + as addresses. OOppttiioonnss - There are also a number of processing options that may be - set. Normally these will only be used by a system admin- - istrator. Options may be set either on the command line - using the --oo flag (for short names), the --OO flag (for long - names), or in the configuration file. This is a partial - list limited to those options that are likely to be useful - on the command line and only shows the long names; for a - complete list (and details), consult the _S_e_n_d_m_a_i_l _I_n_s_t_a_l_- - _l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e. The options are: + There are also a number of processing options that may be set. Nor- + mally these will only be used by a system administrator. Options may + be set either on the command line using the --oo flag (for short names), + the --OO flag (for long names), or in the configuration file. This is a + partial list limited to those options that are likely to be useful on + the command line and only shows the long names; for a complete list + (and details), consult the _S_e_n_d_m_a_i_l _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e. + The options are: AliasFile=_f_i_l_e Use alternate alias file. HoldExpensive - On mailers that are considered ``expensive'' to - connect to, don't initiate immediate connection. - This requires queueing. + On mailers that are considered ``expensive'' to connect to, + don't initiate immediate connection. This requires queueing. CheckpointInterval=_N - Checkpoint the queue file after every _N successful - deliveries (default 10). This avoids excessive - duplicate deliveries when sending to long mailing - lists interrupted by system crashes. + Checkpoint the queue file after every _N successful deliveries + (default 10). This avoids excessive duplicate deliveries when + sending to long mailing lists interrupted by system crashes. DeliveryMode=_x - Set the delivery mode to _x. Delivery modes are `i' - for interactive (synchronous) delivery, `b' for - background (asynchronous) delivery, `q' for queue - only - i.e., actual delivery is done the next time - the queue is run, and `d' for deferred - the same - as `q' except that database lookups for maps which - have set the -D option (default for the host map) - are avoided. + Set the delivery mode to _x. Delivery modes are `i' for interac- + tive (synchronous) delivery, `b' for background (asynchronous) + delivery, `q' for queue only - i.e., actual delivery is done the + next time the queue is run, and `d' for deferred - the same as + `q' except that database lookups for maps which have set the -D + option (default for the host map) are avoided. ErrorMode=_x - Set error processing to mode _x. Valid modes are - `m' to mail back the error message, `w' to - ``write'' back the error message (or mail it back - if the sender is not logged in), `p' to print the - errors on the terminal (default), `q' to throw away - error messages (only exit status is returned), and - `e' to do special processing for the BerkNet. If - the text of the message is not mailed back by modes - `m' or `w' and if the sender is local to this - machine, a copy of the message is appended to the - file _d_e_a_d_._l_e_t_t_e_r in the sender's home directory. + Set error processing to mode _x. Valid modes are `m' to mail + back the error message, `w' to ``write'' back the error message + (or mail it back if the sender is not logged in), `p' to print + the errors on the terminal (default), `q' to throw away error + messages (only exit status is returned), and `e' to do special + processing for the BerkNet. If the text of the message is not + mailed back by modes `m' or `w' and if the sender is local to + this machine, a copy of the message is appended to the file + _d_e_a_d_._l_e_t_t_e_r in the sender's home directory. SaveFromLine - Save UNIX-style From lines at the front of mes- - sages. - - - - Date: 2002/05/24 15:42:13 5 - - - - - -SENDMAIL(8) SENDMAIL(8) - + Save UNIX-style From lines at the front of messages. MaxHopCount=_N - The maximum number of times a message is allowed to - ``hop'' before we decide it is in a loop. + The maximum number of times a message is allowed to ``hop'' + before we decide it is in a loop. IgnoreDots - Do not take dots on a line by themselves as a mes- - sage terminator. + Do not take dots on a line by themselves as a message termina- + tor. SendMimeErrors - Send error messages in MIME format. If not set, - the DSN (Delivery Status Notification) SMTP exten- - sion is disabled. + Send error messages in MIME format. If not set, the DSN (Deliv- + ery Status Notification) SMTP extension is disabled. ConnectionCacheTimeout=_t_i_m_e_o_u_t Set connection cache timeout. @@ -357,20 +274,18 @@ SENDMAIL(8) SENDMAIL(8) The log level. MeToo=_F_a_l_s_e - Don't send to ``me'' (the sender) if I am in an - alias expansion. + Don't send to ``me'' (the sender) if I am in an alias expansion. CheckAliases - Validate the right hand side of aliases during a - newaliases(1) command. + Validate the right hand side of aliases during a newaliases(1) + command. OldStyleHeaders - If set, this message may have old style headers. - If not set, this message is guaranteed to have new - style headers (i.e., commas instead of spaces - between addresses). If set, an adaptive algorithm - is used that will correctly determine the header - format in most cases. + If set, this message may have old style headers. If not set, + this message is guaranteed to have new style headers (i.e., com- + mas instead of spaces between addresses). If set, an adaptive + algorithm is used that will correctly determine the header for- + mat in most cases. QueueDirectory=_q_u_e_u_e_d_i_r Select the directory in which to queue messages. @@ -379,111 +294,80 @@ SENDMAIL(8) SENDMAIL(8) Save statistics in the named file. Timeout.queuereturn=_t_i_m_e - Set the timeout on undelivered messages in the - queue to the specified time. After delivery has - failed (e.g., because of a host being down) for - this amount of time, failed messages will be - returned to the sender. The default is five days. + Set the timeout on undelivered messages in the queue to the + specified time. After delivery has failed (e.g., because of a + host being down) for this amount of time, failed messages will + be returned to the sender. The default is five days. UserDatabaseSpec=_u_s_e_r_d_a_t_a_b_a_s_e - If set, a user database is consulted to get for- - warding information. You can consider this an - - - - Date: 2002/05/24 15:42:13 6 - - - - - -SENDMAIL(8) SENDMAIL(8) - - - adjunct to the aliasing mechanism, except that the - database is intended to be distributed; aliases are - local to a particular host. This may not be avail- - able if your sendmail does not have the USERDB - option compiled in. + If set, a user database is consulted to get forwarding informa- + tion. You can consider this an adjunct to the aliasing mecha- + nism, except that the database is intended to be distributed; + aliases are local to a particular host. This may not be avail- + able if your sendmail does not have the USERDB option compiled + in. ForkEachJob - Fork each job during queue runs. May be convenient - on memory-poor machines. + Fork each job during queue runs. May be convenient on memory- + poor machines. SevenBitInput Strip incoming messages to seven bits. EightBitMode=_m_o_d_e - Set the handling of eight bit input to seven bit - destinations to _m_o_d_e: m (mimefy) will convert to - seven-bit MIME format, p (pass) will pass it as - eight bits (but violates protocols), and s (strict) - will bounce the message. + Set the handling of eight bit input to seven bit destinations to + _m_o_d_e: m (mimefy) will convert to seven-bit MIME format, p (pass) + will pass it as eight bits (but violates protocols), and s + (strict) will bounce the message. MinQueueAge=_t_i_m_e_o_u_t - Sets how long a job must ferment in the queue - between attempts to send it. + Sets how long a job must ferment in the queue between attempts + to send it. DefaultCharSet=_c_h_a_r_s_e_t - Sets the default character set used to label 8-bit - data that is not otherwise labelled. + Sets the default character set used to label 8-bit data that is + not otherwise labelled. DialDelay=_s_l_e_e_p_t_i_m_e - If opening a connection fails, sleep for _s_l_e_e_p_t_i_m_e - seconds and try again. Useful on dial-on-demand - sites. + If opening a connection fails, sleep for _s_l_e_e_p_t_i_m_e seconds and + try again. Useful on dial-on-demand sites. NoRecipientAction=_a_c_t_i_o_n - Set the behaviour when there are no recipient head- - ers (To:, Cc: or Bcc:) in the message to _a_c_t_i_o_n: - none leaves the message unchanged, add-to adds a - To: header with the envelope recipients, add-appar- - ently-to adds an Apparently-To: header with the - envelope recipients, add-bcc adds an empty Bcc: - header, and add-to-undisclosed adds a header read- - ing `To: undisclosed-recipients:;'. + Set the behaviour when there are no recipient headers (To:, Cc: + or Bcc:) in the message to _a_c_t_i_o_n: none leaves the message + unchanged, add-to adds a To: header with the envelope recipi- + ents, add-apparently-to adds an Apparently-To: header with the + envelope recipients, add-bcc adds an empty Bcc: header, and add- + to-undisclosed adds a header reading `To: undisclosed-recipi- + ents:;'. MaxDaemonChildren=_N - Sets the maximum number of children that an incom- - ing SMTP daemon will allow to spawn at any time to - _N. + Sets the maximum number of children that an incoming SMTP daemon + will allow to spawn at any time to _N. ConnectionRateThrottle=_N - Sets the maximum number of connections per second - to the SMTP port to _N. - - In aliases, the first character of a name may be a verti- - cal bar to cause interpretation of the rest of the name as - - - - Date: 2002/05/24 15:42:13 7 - + Sets the maximum number of connections per second to the SMTP + port to _N. - - - -SENDMAIL(8) SENDMAIL(8) - - - a command to pipe the mail to. It may be necessary to - quote the name to keep sseennddmmaaiill from suppressing the - blanks from between arguments. For example, a common + In aliases, the first character of a name may be a vertical bar to + cause interpretation of the rest of the name as a command to pipe the + mail to. It may be necessary to quote the name to keep sseennddmmaaiill from + suppressing the blanks from between arguments. For example, a common alias is: msgs: "|/usr/bin/msgs -s" - Aliases may also have the syntax ``:include:_f_i_l_e_n_a_m_e'' to - ask sseennddmmaaiill to read the named file for a list of recipi- - ents. For example, an alias such as: + Aliases may also have the syntax ``:include:_f_i_l_e_n_a_m_e'' to ask sseennddmmaaiill + to read the named file for a list of recipients. For example, an alias + such as: poets: ":include:/usr/local/lib/poets.list" - would read _/_u_s_r_/_l_o_c_a_l_/_l_i_b_/_p_o_e_t_s_._l_i_s_t for the list of - addresses making up the group. + would read _/_u_s_r_/_l_o_c_a_l_/_l_i_b_/_p_o_e_t_s_._l_i_s_t for the list of addresses making + up the group. - SSeennddmmaaiill returns an exit status describing what it did. - The codes are defined in <_s_y_s_e_x_i_t_s_._h>: + SSeennddmmaaiill returns an exit status describing what it did. The codes are + defined in <_s_y_s_e_x_i_t_s_._h>: EX_OK Successful completion on all addresses. @@ -491,8 +375,7 @@ SENDMAIL(8) SENDMAIL(8) User name not recognized. EX_UNAVAILABLE - Catchall meaning necessary resources were not - available. + Catchall meaning necessary resources were not available. EX_SYNTAX Syntax error in address. @@ -501,53 +384,36 @@ SENDMAIL(8) SENDMAIL(8) Internal software error, including bad arguments. EX_OSERR - Temporary operating system error, such as ``cannot - fork''. + Temporary operating system error, such as ``cannot fork''. EX_NOHOST Host name not recognized. EX_TEMPFAIL - Message could not be sent immediately, but was - queued. - - If invoked as nneewwaalliiaasseess, sseennddmmaaiill will rebuild the alias - database. If invoked as mmaaiillqq, sseennddmmaaiill will print the - contents of the mail queue. If invoked as hhoossttssttaatt, sseenndd-- - mmaaiill will print the persistent host status database. If - invoked as ppuurrggeessttaatt, sseennddmmaaiill will purge expired entries - from the persistent host status database. If invoked as - ssmmttppdd, sseennddmmaaiill will act as a daemon, as if the --bbdd option - were specified. - - - - - Date: 2002/05/24 15:42:13 8 - - - - - -SENDMAIL(8) SENDMAIL(8) + Message could not be sent immediately, but was queued. + If invoked as nneewwaalliiaasseess, sseennddmmaaiill will rebuild the alias database. If + invoked as mmaaiillqq, sseennddmmaaiill will print the contents of the mail queue. + If invoked as hhoossttssttaatt, sseennddmmaaiill will print the persistent host status + database. If invoked as ppuurrggeessttaatt, sseennddmmaaiill will purge expired entries + from the persistent host status database. If invoked as ssmmttppdd, sseenndd-- + mmaaiill will act as a daemon, as if the --bbdd option were specified. NNOOTTEESS - sseennddmmaaiill often gets blamed for many problems that are - actually the result of other problems, such as overly per- - missive modes on directories. For this reason, sseennddmmaaiill - checks the modes on system directories and files to deter- - mine if they can be trusted. Although these checks can be - turned off and your system security reduced by setting the - DDoonnttBBllaammeeSSeennddmmaaiill option, the permission problems should - be fixed. For more information, see: + sseennddmmaaiill often gets blamed for many problems that are actually the + result of other problems, such as overly permissive modes on directo- + ries. For this reason, sseennddmmaaiill checks the modes on system directories + and files to determine if they can be trusted. Although these checks + can be turned off and your system security reduced by setting the DDoonntt-- + BBllaammeeSSeennddmmaaiill option, the permission problems should be fixed. For + more information, see: _h_t_t_p_:_/_/_w_w_w_._s_e_n_d_m_a_i_l_._o_r_g_/_t_i_p_s_/_D_o_n_t_B_l_a_m_e_S_e_n_d_m_a_i_l_._h_t_m_l FFIILLEESS - Except for the file _/_e_t_c_/_m_a_i_l_/_s_e_n_d_m_a_i_l_._c_f itself the fol- - lowing pathnames are all specified in _/_e_t_c_/_m_a_i_l_/_s_e_n_d_- - _m_a_i_l_._c_f. Thus, these values are only approximations. + Except for the file _/_e_t_c_/_m_a_i_l_/_s_e_n_d_m_a_i_l_._c_f itself the following path- + names are all specified in _/_e_t_c_/_m_a_i_l_/_s_e_n_d_m_a_i_l_._c_f. Thus, these values + are only approximations. /etc/mail/aliases @@ -569,12 +435,11 @@ FFIILLEESS temp files SSEEEE AALLSSOO - binmail(1), mail(1), rmail(1), syslog(3), aliases(5), - mailaddr(7), rc(8) + binmail(1), mail(1), rmail(1), syslog(3), aliases(5), mailaddr(7), + rc(8) - DARPA Internet Request For Comments _R_F_C_8_1_9, _R_F_C_8_2_1, - _R_F_C_8_2_2. _S_e_n_d_m_a_i_l _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e, No. 8, - SMM. + DARPA Internet Request For Comments _R_F_C_8_1_9, _R_F_C_8_2_1, _R_F_C_8_2_2. _S_e_n_d_m_a_i_l + _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e, No. 8, SMM. http://www.sendmail.org/ @@ -583,12 +448,4 @@ HHIISSTTOORRYY - - - - - - - Date: 2002/05/24 15:42:13 9 - - + Date: 2003/12/01 17:02:00 SENDMAIL(8) diff --git a/gnu/dist/sendmail/sendmail/sendmail.8 b/gnu/dist/sendmail/sendmail/sendmail.8 index 90bdda65f1b..757a5759de9 100644 --- a/gnu/dist/sendmail/sendmail/sendmail.8 +++ b/gnu/dist/sendmail/sendmail/sendmail.8 @@ -9,10 +9,10 @@ .\" the sendmail distribution. .\" .\" -.\" Id: sendmail.8,v 8.51 2002/05/24 15:42:13 ca Exp -.\" $NetBSD: sendmail.8,v 1.7 2003/06/01 14:07:08 atatat Exp $ +.\" Id: sendmail.8,v 8.51.2.3 2003/12/01 17:02:00 ca Exp +.\" $NetBSD: sendmail.8,v 1.8 2004/03/25 19:14:31 atatat Exp $ .\" -.TH SENDMAIL 8 "Date: 2002/05/24 15:42:13" +.TH SENDMAIL 8 "Date: 2003/12/01 17:02:00" .SH NAME sendmail \- an electronic mail transport agent @@ -151,11 +151,32 @@ users or mailing lists. .BI \-C file Use alternate configuration file. .B Sendmail -refuses to run as root if an alternate configuration file is specified. -.TP -.BI \-d X -Set debugging value to -.IR X . +gives up any enhanced (set-user-ID or set-group-ID) privileges +if an alternate configuration file is specified. +.TP +.BI \-d category . level... +Set the debugging flag for +.I category +to +.IR level . +.I Category +is either an integer or a name specifying the topic, and +.I level +an integer specifying the level of debugging output desired. +Higher levels generally mean more output. +More than one flag can be specified by separating them with commas. +A list of numeric debugging categories can be found in the TRACEFLAGS file +in the sendmail source distribution. +.br +The option +.B \-d0.1 +prints the version of +.B sendmail +and the options it was compiled with. +.br +Most other categories are only useful with, and documented in, +.BR sendmail 's +source code. .ne 1i .TP .BI \-F fullname @@ -296,21 +317,21 @@ Process jobs in queue group called .I name only. .TP -\fB\-q\fR[\fI!\fR]I substr +\fB\-q\fR[\fI!\fR]I\fIsubstr\fR Limit processed jobs to those containing .I substr as a substring of the queue id or not when .I ! is specified. .TP -\fB\-q\fR[\fI!\fR]R substr +\fB\-q\fR[\fI!\fR]R\fIsubstr\fR Limit processed jobs to those containing .I substr as a substring of one of the recipients or not when .I ! is specified. .TP -\fB\-q\fR[\fI!\fR]S substr +\fB\-q\fR[\fI!\fR]S\fIsubstr\fR Limit processed jobs to those containing .I substr as a substring of the sender or not when diff --git a/gnu/dist/sendmail/sendmail/sendmail.h b/gnu/dist/sendmail/sendmail/sendmail.h index 23b8fe18fa2..8eaad79c480 100644 --- a/gnu/dist/sendmail/sendmail/sendmail.h +++ b/gnu/dist/sendmail/sendmail/sendmail.h @@ -1,4 +1,4 @@ -/* $NetBSD: sendmail.h,v 1.13 2003/06/01 14:07:08 atatat Exp $ */ +/* $NetBSD: sendmail.h,v 1.14 2004/03/25 19:14:31 atatat Exp $ */ /* * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. @@ -49,7 +49,7 @@ #ifdef _DEFINE # ifndef lint -SM_UNUSED(static char SmailId[]) = "@(#)Id: sendmail.h,v 8.919.2.17 2003/03/12 22:42:52 gshapiro Exp"; +SM_UNUSED(static char SmailId[]) = "@(#)Id: sendmail.h,v 8.919.2.29 2003/11/07 00:08:02 ca Exp"; # endif /* ! lint */ #endif /* _DEFINE */ @@ -187,6 +187,10 @@ SM_UNUSED(static char SmailId[]) = "@(#)Id: sendmail.h,v 8.919.2.17 2003/03/12 2 #endif /* ! INADDR_NONE */ +/* (f)open() modes for queue files */ +# define QF_O_EXTRA 0 + + /* ** An 'argument class' describes the storage allocation status ** of an object pointed to by an argument to a function. @@ -1053,6 +1057,7 @@ struct rewrite #define MATCHZERO CANONHOST #define MAXMATCH 9 /* max params per rewrite */ +#define MAX_MAP_ARGS 10 /* max arguments for map */ /* external <==> internal mapping table */ struct metamac @@ -1697,7 +1702,7 @@ EXTERN int MilterLogLevel; # if _FFR_MILTER_PERDAEMON /* functions */ -extern void setup_daemon_milters __P(()); +extern void setup_daemon_milters __P((void)); # endif /* _FFR_MILTER_PERDAEMON */ #endif /* MILTER */ @@ -1963,12 +1968,13 @@ extern void quarantine_queue __P((char *, int)); extern char *queuename __P((ENVELOPE *, int)); extern void queueup __P((ENVELOPE *, bool, bool)); extern bool runqueue __P((bool, bool, bool, bool)); -extern int run_work_group __P((int, int)); +extern bool run_work_group __P((int, int)); extern void set_def_queueval __P((QUEUEGRP *, bool)); extern void setup_queues __P((bool)); extern bool setnewqueue __P((ENVELOPE *)); extern bool shouldqueue __P((long, time_t)); extern void sync_queue_time __P((void)); +extern void init_qid_alg __P((void)); extern int print_single_queue __P((int, int)); #if REQUIRES_DIR_FSYNC # define SYNC_DIR(path, panic) sync_dir(path, panic) @@ -2120,6 +2126,19 @@ extern unsigned char tTdvect[100]; /* trace vector */ var = _newval; \ } while (0) +#define _CHECK_RESTART \ + do \ + { \ + if (ShutdownRequest != NULL) \ + shutdown_daemon(); \ + else if (RestartRequest != NULL) \ + restart_daemon(); \ + else if (RestartWorkGroup) \ + restart_marked_work_groups(); \ + } while (0) + +# define CHECK_RESTART _CHECK_RESTART + /* ** Global variables. */ @@ -2424,7 +2443,7 @@ extern void cleanstrcpy __P((char *, char *, int)); extern void cleanup_shm __P((bool)); #endif /* SM_CONF_SHM */ extern void clrdaemon __P((void)); -extern void collect __P((SM_FILE_T *, bool, HDR **, ENVELOPE *)); +extern void collect __P((SM_FILE_T *, bool, HDR **, ENVELOPE *, bool)); extern time_t convtime __P((char *, int)); extern char **copyplist __P((char **, bool, SM_RPOOL_T *)); extern void copy_class __P((int, int)); @@ -2503,7 +2522,7 @@ extern SIGFUNC_DECL reapchild __P((int)); extern int releasesignal __P((int)); extern void resetlimits __P((void)); extern void restart_daemon __P((void)); -extern void restart_marked_work_groups __P(()); +extern void restart_marked_work_groups __P((void)); extern bool rfc822_string __P((char *)); extern bool savemail __P((ENVELOPE *, bool)); extern void seed_random __P((void)); diff --git a/gnu/dist/sendmail/sendmail/sfsasl.c b/gnu/dist/sendmail/sendmail/sfsasl.c index b8e8820ee96..32f1bfd2f3f 100644 --- a/gnu/dist/sendmail/sendmail/sfsasl.c +++ b/gnu/dist/sendmail/sendmail/sfsasl.c @@ -1,11 +1,11 @@ -/* $NetBSD: sfsasl.c,v 1.10 2003/06/01 14:07:08 atatat Exp $ */ +/* $NetBSD: sfsasl.c,v 1.11 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: sfsasl.c,v 1.10 2003/06/01 14:07:08 atatat Exp $"); +__RCSID("$NetBSD: sfsasl.c,v 1.11 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -15,7 +15,7 @@ __RCSID("$NetBSD: sfsasl.c,v 1.10 2003/06/01 14:07:08 atatat Exp $"); */ #include <sm/gen.h> -SM_RCSID("@(#)Id: sfsasl.c,v 8.91.2.2 2002/09/12 21:07:50 ca Exp") +SM_RCSID("@(#)Id: sfsasl.c,v 8.91.2.5 2003/08/08 17:30:11 ca Exp") #include <stdlib.h> #include <sendmail.h> #include <errno.h> @@ -107,6 +107,11 @@ sasl_open(fp, info, flags, rpool) struct sasl_info *si = (struct sasl_info *) info; so = (struct sasl_obj *) sm_malloc(sizeof(struct sasl_obj)); + if (so == NULL) + { + errno = ENOMEM; + return -1; + } so->fp = si->fp; so->conn = si->conn; @@ -145,6 +150,8 @@ sasl_close(fp) struct sasl_obj *so; so = (struct sasl_obj *) fp->f_cookie; + if (so == NULL) + return 0; if (so->fp != NULL) { sm_io_close(so->fp, SM_TIME_DEFAULT); @@ -198,6 +205,9 @@ sasl_read(fp, buf, size) ** data since it might be larger than the allowed size. ** Therefore we use a static pointer and return portions of it ** if necessary. + ** XXX Note: This function is not thread-safe nor can it be used + ** on more than one file. A correct implementation would store + ** this data in fp->f_cookie. */ # if SASL >= 20000 @@ -292,6 +302,8 @@ sasl_write(fp, buf, size) /* XXX result == 0? */ ret = sm_io_write(so->fp, SM_TIME_DEFAULT, &outbuf[total], outlen); + if (ret <= 0) + return ret; outlen -= ret; total += ret; } @@ -453,6 +465,11 @@ tls_open(fp, info, flags, rpool) struct tls_info *ti = (struct tls_info *) info; so = (struct tls_obj *) sm_malloc(sizeof(struct tls_obj)); + if (so == NULL) + { + errno = ENOMEM; + return -1; + } so->fp = ti->fp; so->con = ti->con; @@ -489,6 +506,8 @@ tls_close(fp) struct tls_obj *so; so = (struct tls_obj *) fp->f_cookie; + if (so == NULL) + return 0; if (so->fp != NULL) { sm_io_close(so->fp, SM_TIME_DEFAULT); @@ -588,7 +607,12 @@ tls_read(fp, buf, size) save_errno = (errno == 0) ? EIO : errno; again = MAX_TLS_IOS; - if (LogLevel > 7) + if (LogLevel > 9) + sm_syslog(LOG_WARNING, NOQID, + "STARTTLS: read error=%s (%d), errno=%d, get_error=%s", + err, r, errno, + ERR_error_string(ERR_get_error(), NULL)); + else if (LogLevel > 7) sm_syslog(LOG_WARNING, NOQID, "STARTTLS: read error=%s (%d)", err, r); errno = save_errno; @@ -680,7 +704,12 @@ tls_write(fp, buf, size) save_errno = (errno == 0) ? EIO : errno; again = MAX_TLS_IOS; - if (LogLevel > 7) + if (LogLevel > 9) + sm_syslog(LOG_WARNING, NOQID, + "STARTTLS: write error=%s (%d), errno=%d, get_error=%s", + err, r, errno, + ERR_error_string(ERR_get_error(), NULL)); + else if (LogLevel > 7) sm_syslog(LOG_WARNING, NOQID, "STARTTLS: write error=%s (%d)", err, r); errno = save_errno; @@ -695,7 +724,7 @@ tls_write(fp, buf, size) ** Parameters: ** fin -- data input source being replaced ** fout -- data output source being replaced -** conn -- the tls connection pointer +** con -- the tls connection pointer ** ** Returns: ** -1 on error diff --git a/gnu/dist/sendmail/sendmail/srvrsmtp.c b/gnu/dist/sendmail/sendmail/srvrsmtp.c index 7b460d396bc..91b3c5c6a7e 100644 --- a/gnu/dist/sendmail/sendmail/srvrsmtp.c +++ b/gnu/dist/sendmail/sendmail/srvrsmtp.c @@ -1,7 +1,7 @@ -/* $NetBSD: srvrsmtp.c,v 1.10 2003/06/01 14:07:08 atatat Exp $ */ +/* $NetBSD: srvrsmtp.c,v 1.11 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: srvrsmtp.c,v 1.10 2003/06/01 14:07:08 atatat Exp $"); +__RCSID("$NetBSD: srvrsmtp.c,v 1.11 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -22,7 +22,7 @@ __RCSID("$NetBSD: srvrsmtp.c,v 1.10 2003/06/01 14:07:08 atatat Exp $"); # include <libmilter/mfdef.h> #endif /* MILTER */ -SM_RCSID("@(#)Id: srvrsmtp.c,v 8.829.2.22 2003/02/19 02:45:40 ca Exp") +SM_RCSID("@(#)Id: srvrsmtp.c,v 8.829.2.34 2004/01/14 19:13:46 ca Exp") #if SASL || STARTTLS # include <sys/time.h> @@ -73,6 +73,38 @@ static void printvrfyaddr __P((ADDRESS *, bool, bool)); static void rcpt_esmtp_args __P((ADDRESS *, char *, char *, ENVELOPE *)); static char *skipword __P((char *volatile, char *)); static void setup_smtpd_io __P((void)); + +#if SASL +# if SASL >= 20000 +static int reset_saslconn __P((sasl_conn_t **_conn, char *_hostname, + char *_remoteip, char *_localip, + char *_auth_id, sasl_ssf_t *_ext_ssf)); + +# define RESET_SASLCONN \ + result = reset_saslconn(&conn, hostname, remoteip, localip, auth_id, \ + &ext_ssf); \ + if (result != SASL_OK) \ + { \ + /* This is pretty fatal */ \ + goto doquit; \ + } + +# else /* SASL >= 20000 */ +static int reset_saslconn __P((sasl_conn_t **_conn, char *_hostname, + struct sockaddr_in *_saddr_r, + struct sockaddr_in *_saddr_l, + sasl_external_properties_t *_ext_ssf)); +# define RESET_SASLCONN \ + result = reset_saslconn(&conn, hostname, &saddr_r, &saddr_l, &ext_ssf); \ + if (result != SASL_OK) \ + { \ + /* This is pretty fatal */ \ + goto doquit; \ + } + +# endif /* SASL >= 20000 */ +#endif /* SASL */ + extern ENVELOPE BlankEnvelope; #define SKIP_SPACE(s) while (isascii(*s) && isspace(*s)) \ @@ -373,6 +405,7 @@ smtp(nullserver, d_flags, e) volatile unsigned int n_etrn = 0; /* count of ETRN */ volatile unsigned int n_noop = 0; /* count of NOOP/VERB/etc */ volatile unsigned int n_helo = 0; /* count of HELO/EHLO */ + volatile int save_sevenbitinput; bool ok; #if _FFR_BLOCK_PROXIES || _FFR_ADAPTIVE_EOL volatile bool first; @@ -404,10 +437,13 @@ smtp(nullserver, d_flags, e) char *auth_id; const char *out; sasl_ssf_t ext_ssf; + char localip[60], remoteip[60]; # else /* SASL >= 20000 */ char *out; const char *errstr; sasl_external_properties_t ext_ssf; + struct sockaddr_in saddr_l; + struct sockaddr_in saddr_r; # endif /* SASL >= 20000 */ sasl_security_properties_t ssp; sasl_ssf_t *ssf; @@ -437,6 +473,7 @@ smtp(nullserver, d_flags, e) #endif /* PIPELINING */ volatile time_t log_delay = (time_t) 0; + save_sevenbitinput = SevenBitInput; smtp.sm_nrcpts = 0; #if MILTER smtp.sm_milterize = (nullserver == NULL); @@ -574,7 +611,6 @@ smtp(nullserver, d_flags, e) SOCKADDR_LEN_T addrsize; SOCKADDR saddr_l; SOCKADDR saddr_r; - char localip[60], remoteip[60]; addrsize = sizeof(saddr_r); if (getpeername(sm_io_getinfo(InChannel, SM_IO_WHAT_FD, @@ -613,8 +649,6 @@ smtp(nullserver, d_flags, e) if (in != NULL && strcmp(in, "inet") == 0) { SOCKADDR_LEN_T addrsize; - struct sockaddr_in saddr_l; - struct sockaddr_in saddr_r; addrsize = sizeof(struct sockaddr_in); if (getpeername(sm_io_getinfo(InChannel, SM_IO_WHAT_FD, @@ -684,6 +718,9 @@ smtp(nullserver, d_flags, e) } #endif /* SASL */ +#if STARTTLS +#endif /* STARTTLS */ + #if MILTER if (smtp.sm_milterize) { @@ -772,7 +809,10 @@ smtp(nullserver, d_flags, e) /* If this an smtps connection, start TLS now */ smtps = bitnset(D_SMTPS, d_flags); if (smtps) + { + Errors = 0; goto starttls; + } greeting: @@ -981,6 +1021,7 @@ smtp(nullserver, d_flags, e) { authenticating = SASL_NOT_AUTH; message("501 5.5.2 missing input"); + RESET_SASLCONN; continue; } # endif /* 0 */ @@ -990,6 +1031,7 @@ smtp(nullserver, d_flags, e) /* rfc 2254 4. */ message("501 5.0.0 AUTH aborted"); + RESET_SASLCONN; continue; } @@ -1012,6 +1054,7 @@ smtp(nullserver, d_flags, e) # if SASL >= 20000 sm_free(in); # endif /* SASL >= 20000 */ + RESET_SASLCONN; continue; } @@ -1166,6 +1209,7 @@ smtp(nullserver, d_flags, e) # else /* SASL >= 20000 */ errstr == NULL ? "" : errstr); # endif /* SASL >= 20000 */ + RESET_SASLCONN; authenticating = SASL_NOT_AUTH; } } @@ -1250,6 +1294,7 @@ smtp(nullserver, d_flags, e) case CMDEHLO: case CMDNOOP: case CMDRSET: + case CMDERROR: /* process normally */ break; @@ -1415,6 +1460,7 @@ smtp(nullserver, d_flags, e) # else /* SASL >= 20000 */ errstr); # endif /* SASL >= 20000 */ + RESET_SASLCONN; break; } auth_type = newstr(p); @@ -1442,6 +1488,7 @@ smtp(nullserver, d_flags, e) /* start over? */ authenticating = SASL_NOT_AUTH; + RESET_SASLCONN; } else { @@ -1511,6 +1558,8 @@ smtp(nullserver, d_flags, e) else if ((srv_ssl = SSL_new(srv_ctx)) == NULL) { message("454 4.3.3 TLS not available: error generating SSL handle"); + if (LogLevel > 8) + tlslogerr("server"); # if _FFR_SMTP_SSL goto tls_done; # else /* _FFR_SMTP_SSL */ @@ -1822,7 +1871,7 @@ tlsfail: ok = AllowBogusHELO; break; } - if (strchr("[].-_#", *q) == NULL) + if (strchr("[].-_#:", *q) == NULL) break; } @@ -2130,6 +2179,9 @@ tlsfail: RealUserName); } + /* reset to default value */ + SevenBitInput = save_sevenbitinput; + /* now parse ESMTP arguments */ e->e_msgsize = 0; addr = p; @@ -2293,6 +2345,29 @@ tlsfail: case CMDRCPT: /* rcpt -- designate recipient */ DELAY_CONN("RCPT"); + if (BadRcptThrottle > 0 && + n_badrcpts >= BadRcptThrottle) + { + if (LogLevel > 5 && + n_badrcpts == BadRcptThrottle) + { + sm_syslog(LOG_INFO, e->e_id, + "%s: Possible SMTP RCPT flood, throttling.", + CurSmtpClient); + + /* To avoid duplicated message */ + n_badrcpts++; + } + + /* + ** Don't use exponential backoff for now. + ** Some servers will open more connections + ** and actually overload the receiver even + ** more. + */ + + (void) sleep(1); + } if (!smtp.sm_gotmail) { usrerr("503 5.0.0 Need MAIL before RCPT"); @@ -2339,29 +2414,6 @@ tlsfail: e, true); macdefine(&e->e_macro, A_PERM, macid("{addr_type}"), NULL); - if (BadRcptThrottle > 0 && - n_badrcpts >= BadRcptThrottle) - { - if (LogLevel > 5 && - n_badrcpts == BadRcptThrottle) - { - sm_syslog(LOG_INFO, e->e_id, - "%s: Possible SMTP RCPT flood, throttling.", - CurSmtpClient); - - /* To avoid duplicated message */ - n_badrcpts++; - } - - /* - ** Don't use exponential backoff for now. - ** Some servers will open more connections - ** and actually overload the receiver even - ** more. - */ - - (void) sleep(1); - } if (Errors > 0) goto rcpt_done; if (a == NULL) @@ -3009,7 +3061,7 @@ smtp_data(smtp, e) e->e_flags |= EF_NL_NOT_EOL; #endif /* _FFR_ADAPTIVE_EOL */ - collect(InChannel, true, NULL, e); + collect(InChannel, true, NULL, e, true); /* redefine message size */ (void) sm_snprintf(buf, sizeof buf, "%ld", e->e_msgsize); @@ -3101,7 +3153,7 @@ smtp_data(smtp, e) doublequeue = false; aborting = Errors > 0; - if (!aborting && + if (!(aborting || bitset(EF_DISCARD, e->e_flags)) && #if _FFR_QUARANTINE (QueueMode == QM_QUARANTINE || e->e_quarmsg == NULL) && #endif /* _FFR_QUARANTINE */ @@ -3968,7 +4020,7 @@ saslmechs(conn, mechlist) # if SASL >= 20000 result = sasl_listmech(conn, NULL, "", " ", "", (const char **) mechlist, - (unsigned int *)&len, (unsigned int *)&num); + (unsigned int *)&len, &num); # else /* SASL >= 20000 */ result = sasl_listmech(conn, "user", /* XXX */ "", " ", "", mechlist, @@ -4320,3 +4372,84 @@ help(topic, e) (void) sm_io_close(hf, SM_TIME_DEFAULT); } + +#if SASL +/* +** RESET_SASLCONN -- reset SASL connection data +** +** Parameters: +** conn -- SASL connection context +** hostname -- host name +** various connection data +** +** Returns: +** SASL result +*/ + +static int +reset_saslconn(sasl_conn_t ** conn, char *hostname, +# if SASL >= 20000 + char *remoteip, char *localip, + char *auth_id, sasl_ssf_t * ext_ssf) +# else /* SASL >= 20000 */ + struct sockaddr_in * saddr_r, struct sockaddr_in * saddr_l, + sasl_external_properties_t * ext_ssf) +# endif /* SASL >= 20000 */ +{ + int result; + + sasl_dispose(conn); +# if SASL >= 20000 + result = sasl_server_new("smtp", hostname, NULL, NULL, NULL, + NULL, 0, conn); +# elif SASL > 10505 + /* use empty realm: only works in SASL > 1.5.5 */ + result = sasl_server_new("smtp", hostname, "", NULL, 0, conn); +# else /* SASL >= 20000 */ + /* use no realm -> realm is set to hostname by SASL lib */ + result = sasl_server_new("smtp", hostname, NULL, NULL, 0, + conn); +# endif /* SASL >= 20000 */ + if (result != SASL_OK) + return result; + +# if SASL >= 20000 +# if NETINET || NETINET6 + if (remoteip != NULL) + result = sasl_setprop(*conn, SASL_IPREMOTEPORT, remoteip); + if (result != SASL_OK) + return result; + + if (localip != NULL) + result = sasl_setprop(*conn, SASL_IPLOCALPORT, localip); + if (result != SASL_OK) + return result; +# endif /* NETINET || NETINET6 */ + + result = sasl_setprop(*conn, SASL_SSF_EXTERNAL, ext_ssf); + if (result != SASL_OK) + return result; + + result = sasl_setprop(*conn, SASL_AUTH_EXTERNAL, auth_id); + if (result != SASL_OK) + return result; +# else /* SASL >= 20000 */ +# if NETINET + if (saddr_r != NULL) + result = sasl_setprop(*conn, SASL_IP_REMOTE, saddr_r); + if (result != SASL_OK) + return result; + + if (saddr_l != NULL) + result = sasl_setprop(*conn, SASL_IP_LOCAL, saddr_l); + if (result != SASL_OK) + return result; +# endif /* NETINET */ + + result = sasl_setprop(*conn, SASL_SSF_EXTERNAL, ext_ssf); + if (result != SASL_OK) + return result; +# endif /* SASL >= 20000 */ + return SASL_OK; +} +#endif /* SASL */ diff --git a/gnu/dist/sendmail/sendmail/stab.c b/gnu/dist/sendmail/sendmail/stab.c index e1ad602cadc..edc364f91b3 100644 --- a/gnu/dist/sendmail/sendmail/stab.c +++ b/gnu/dist/sendmail/sendmail/stab.c @@ -1,11 +1,11 @@ -/* $NetBSD: stab.c,v 1.8 2003/06/01 14:07:08 atatat Exp $ */ +/* $NetBSD: stab.c,v 1.9 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: stab.c,v 1.8 2003/06/01 14:07:08 atatat Exp $"); +__RCSID("$NetBSD: stab.c,v 1.9 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2001, 2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -19,7 +19,7 @@ __RCSID("$NetBSD: stab.c,v 1.8 2003/06/01 14:07:08 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: stab.c,v 8.86 2001/12/29 04:27:56 ca Exp") +SM_RCSID("@(#)Id: stab.c,v 8.86.4.1 2003/03/31 17:44:24 ca Exp") /* ** STAB -- manage the symbol table @@ -285,7 +285,7 @@ queueup_macros(class, qfp, e) if (s->s_symtype == ST_CLASS && bitnset(bitidx(class), s->s_class) && - (m = macid(s->s_name)) != '\0' && + (m = macid(s->s_name)) != 0 && (p = macvalue(m, e)) != NULL) { (void) sm_io_fprintf(qfp, SM_TIME_DEFAULT, diff --git a/gnu/dist/sendmail/sendmail/udb.c b/gnu/dist/sendmail/sendmail/udb.c index fb1c745d3cb..711052d7889 100644 --- a/gnu/dist/sendmail/sendmail/udb.c +++ b/gnu/dist/sendmail/sendmail/udb.c @@ -1,11 +1,11 @@ -/* $NetBSD: udb.c,v 1.6 2003/06/01 14:07:09 atatat Exp $ */ +/* $NetBSD: udb.c,v 1.7 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: udb.c,v 1.6 2003/06/01 14:07:09 atatat Exp $"); +__RCSID("$NetBSD: udb.c,v 1.7 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -20,9 +20,9 @@ __RCSID("$NetBSD: udb.c,v 1.6 2003/06/01 14:07:09 atatat Exp $"); #include <sendmail.h> #if USERDB -SM_RCSID("@(#)Id: udb.c,v 8.153.4.4 2002/12/03 17:57:41 gshapiro Exp (with USERDB)") +SM_RCSID("@(#)Id: udb.c,v 8.153.4.5 2003/04/03 16:31:00 ca Exp (with USERDB)") #else /* USERDB */ -SM_RCSID("@(#)Id: udb.c,v 8.153.4.4 2002/12/03 17:57:41 gshapiro Exp (without USERDB)") +SM_RCSID("@(#)Id: udb.c,v 8.153.4.5 2003/04/03 16:31:00 ca Exp (without USERDB)") #endif /* USERDB */ #if USERDB @@ -182,7 +182,7 @@ udbexpand(a, sendq, aliaslevel, e) keylen = sm_strlcpyn(keybuf, sizeof keybuf, 2, user, ":maildrop"); /* if name is too long, assume it won't match */ - if (keylen > sizeof keybuf) + if (keylen >= sizeof keybuf) return EX_OK; /* build actual database key */ diff --git a/gnu/dist/sendmail/sendmail/usersmtp.c b/gnu/dist/sendmail/sendmail/usersmtp.c index cc89a6eb3eb..119cae8f4e9 100644 --- a/gnu/dist/sendmail/sendmail/usersmtp.c +++ b/gnu/dist/sendmail/sendmail/usersmtp.c @@ -1,7 +1,7 @@ -/* $NetBSD: usersmtp.c,v 1.10 2003/06/01 14:07:09 atatat Exp $ */ +/* $NetBSD: usersmtp.c,v 1.11 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: usersmtp.c,v 1.10 2003/06/01 14:07:09 atatat Exp $"); +__RCSID("$NetBSD: usersmtp.c,v 1.11 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -19,7 +19,7 @@ __RCSID("$NetBSD: usersmtp.c,v 1.10 2003/06/01 14:07:09 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: usersmtp.c,v 8.437.2.9 2003/03/15 23:57:52 gshapiro Exp") +SM_RCSID("@(#)Id: usersmtp.c,v 8.437.2.10 2003/05/05 23:51:47 ca Exp") #include <sysexits.h> @@ -1094,7 +1094,7 @@ getsecret(conn, context, id, psecret) len + 1); if (*psecret == NULL) return SASL_FAIL; - (void) sm_strlcpy((*psecret)->data, authpass, len + 1); + (void) sm_strlcpy((char *) (*psecret)->data, authpass, len + 1); (*psecret)->len = (unsigned long) len; return SASL_OK; } diff --git a/gnu/dist/sendmail/sendmail/util.c b/gnu/dist/sendmail/sendmail/util.c index c34d8af434f..f9e94296e8b 100644 --- a/gnu/dist/sendmail/sendmail/util.c +++ b/gnu/dist/sendmail/sendmail/util.c @@ -1,11 +1,11 @@ -/* $NetBSD: util.c,v 1.10 2003/06/01 14:07:09 atatat Exp $ */ +/* $NetBSD: util.c,v 1.11 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: util.c,v 1.10 2003/06/01 14:07:09 atatat Exp $"); +__RCSID("$NetBSD: util.c,v 1.11 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -19,7 +19,7 @@ __RCSID("$NetBSD: util.c,v 1.10 2003/06/01 14:07:09 atatat Exp $"); #include <sendmail.h> -SM_RCSID("@(#)Id: util.c,v 8.363.2.5 2002/12/12 22:50:41 ca Exp") +SM_RCSID("@(#)Id: util.c,v 8.363.2.10 2003/10/15 17:19:14 ca Exp") #include <sysexits.h> #include <sm/xtrap.h> @@ -396,7 +396,7 @@ truncate_at_delim(str, len, delim) *p = '\0'; if (p - str + 4 < len) { - *p++ = ':'; + *p++ = (char) delim; *p = '\0'; (void) sm_strlcat(str, "...", len); return; @@ -2386,7 +2386,8 @@ str2prt(s) *h++ = 'r'; break; default: - (void) sm_snprintf(h, l, "%03o", (int) c); + (void) sm_snprintf(h, l, "%03o", + (unsigned int)((unsigned char) c)); /* ** XXX since l is unsigned this may @@ -2420,7 +2421,7 @@ str2prt(s) ** false -- otherwise */ -int +bool path_is_dir(pathname, createflag) char *pathname; bool createflag; diff --git a/gnu/dist/sendmail/sendmail/version.c b/gnu/dist/sendmail/sendmail/version.c index 50890aa6168..64ea011be1d 100644 --- a/gnu/dist/sendmail/sendmail/version.c +++ b/gnu/dist/sendmail/sendmail/version.c @@ -1,11 +1,11 @@ -/* $NetBSD: version.c,v 1.14 2003/09/17 20:23:00 tron Exp $ */ +/* $NetBSD: version.c,v 1.15 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: version.c,v 1.14 2003/09/17 20:23:00 tron Exp $"); +__RCSID("$NetBSD: version.c,v 1.15 2004/03/25 19:14:31 atatat Exp $"); #endif /* - * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -19,6 +19,6 @@ __RCSID("$NetBSD: version.c,v 1.14 2003/09/17 20:23:00 tron Exp $"); #include <sm/gen.h> -SM_RCSID("@(#)Id: version.c,v 8.104.2.15 2003/03/19 21:19:53 ca Exp") +SM_RCSID("@(#)Id: version.c,v 8.104.2.26 2004/01/13 00:29:26 ca Exp") -char Version[] = "8.12.9p1"; +char Version[] = "8.12.11"; diff --git a/gnu/dist/sendmail/smrsh/README b/gnu/dist/sendmail/smrsh/README index c42f4e26caa..f97d8abeb4f 100644 --- a/gnu/dist/sendmail/smrsh/README +++ b/gnu/dist/sendmail/smrsh/README @@ -44,7 +44,17 @@ With gcc, the GNU C compiler, use the -static option. or host.domain% sh Build LDOPTS=-static - +The following C defines can be set defined to change the search path and +the bin directory used by smrsh. + +-DSMRSH_PATH=\"path\" \"/bin:/usr/bin:/usr/ucb\" The default search + path. +-DSMRSH_CMDDIR=\"dir\" \"/usr/adm/sm.bin\" The default smrsh + program directory + +These can be added to the devtools/Site/site.config.m4 file using the +global M4 macro confENVDEF or the smrsh specific M4 macro +conf_smrsh_ENVDEF. As root, install smrsh in /usr/libexec. Using the Build script: @@ -153,4 +163,4 @@ a typical system follows: host.domain# /usr/sbin/sendmail -bd -q30m -Revision: 8.8, Last updated Date: 2001/01/24 00:05:58 +Revision: 8.8.4.1, Last updated Date: 2003/05/26 04:29:42 diff --git a/gnu/dist/sendmail/smrsh/smrsh.8 b/gnu/dist/sendmail/smrsh/smrsh.8 index 76d14db4ca5..17b6e50ccad 100644 --- a/gnu/dist/sendmail/smrsh/smrsh.8 +++ b/gnu/dist/sendmail/smrsh/smrsh.8 @@ -9,10 +9,10 @@ .\" the sendmail distribution. .\" .\" -.\" Id: smrsh.8,v 8.16 2002/04/25 13:33:40 ca Exp -.\" $NetBSD: smrsh.8,v 1.5 2003/06/01 14:07:10 atatat Exp $ +.\" Id: smrsh.8,v 8.16.2.2 2003/10/07 18:05:37 ca Exp +.\" $NetBSD: smrsh.8,v 1.6 2004/03/25 19:14:31 atatat Exp $ .\" -.TH SMRSH 8 "Date: 2002/04/25 13:33:40" +.TH SMRSH 8 "Date: 2003/10/07 18:05:37" .SH NAME smrsh \- restricted shell for sendmail .SH SYNOPSIS @@ -48,7 +48,7 @@ It also rejects any commands with the characters or `\en' (newline) on the command line to prevent ``end run'' attacks. It allows ``||'' and ``&&'' to enable commands like: -``"|exec /usr/local/bin/procmail -f- /etc/procmailrcs/user || exit 75"'' +``"|exec /usr/local/bin/filter || exit 75"'' .PP Initial pathnames on programs are stripped, so forwarding to ``/usr/ucb/vacation'', @@ -61,9 +61,8 @@ all actually forward to .PP System administrators should be conservative about populating the sm.bin directory. -Reasonable additions are +For example, a reasonable additions is .IR vacation (1), -.IR procmail (1), and the like. No matter how brow-beaten you may be, never include any shell or shell-like program @@ -75,6 +74,12 @@ directory. Note that this does not restrict the use of shell or perl scripts in the sm.bin directory (using the ``#!'' syntax); it simply disallows execution of arbitrary programs. +Also, including mail filtering programs such as +.IR procmail (1) +is a very bad idea. +.IR procmail (1) +allows users to run arbitrary programs in their +.IR procmailrc (5). .SH COMPILATION Compilation should be trivial on most systems. You may need to use \-DSMRSH_PATH=\e"\fIpath\fP\e" @@ -84,6 +89,11 @@ and/or \-DSMRSH_CMDDIR=\e"\fIdir\fP\e" to change the default program directory (defaults to ``/usr/adm/sm.bin''). .SH FILES -/usr/adm/sm.bin \- directory for restricted programs +/usr/adm/sm.bin \- default directory for restricted programs on most OSs +.PP +/var/adm/sm.bin \- directory for restricted programs on HP UX and Solaris +.PP +/usr/libexec/sm.bin \- directory for restricted programs on FreeBSD (>= 3.3) + .SH SEE ALSO sendmail(8) diff --git a/gnu/dist/sendmail/smrsh/smrsh.c b/gnu/dist/sendmail/smrsh/smrsh.c index ced1873d8d7..d9a1afa20c3 100644 --- a/gnu/dist/sendmail/smrsh/smrsh.c +++ b/gnu/dist/sendmail/smrsh/smrsh.c @@ -1,7 +1,7 @@ -/* $NetBSD: smrsh.c,v 1.11 2003/06/01 14:07:10 atatat Exp $ */ +/* $NetBSD: smrsh.c,v 1.12 2004/03/25 19:14:31 atatat Exp $ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: smrsh.c,v 1.11 2003/06/01 14:07:10 atatat Exp $"); +__RCSID("$NetBSD: smrsh.c,v 1.12 2004/03/25 19:14:31 atatat Exp $"); #endif /* @@ -26,7 +26,7 @@ SM_IDSTR(copyright, Copyright (c) 1993\n\ The Regents of the University of California. All rights reserved.\n") -SM_IDSTR(id, "@(#)Id: smrsh.c,v 8.58.2.2 2002/09/24 21:40:05 ca Exp") +SM_IDSTR(id, "@(#)Id: smrsh.c,v 8.58.2.5 2003/12/15 17:09:39 ca Exp") /* ** SMRSH -- sendmail restricted shell @@ -124,8 +124,9 @@ addcmd(s, cmd, len) if (s == NULL || *s == '\0') return; + /* enough space for s (len) and CMDDIR + "/" and '\0'? */ if (sizeof newcmdbuf - strlen(newcmdbuf) <= - len + (cmd ? (strlen(CMDDIR) + 1) : 0)) + len + 1 + (cmd ? (strlen(CMDDIR) + 1) : 0)) { (void)sm_io_fprintf(smioerr, SM_TIME_DEFAULT, "%s: command too long: %s\n", prg, par); @@ -136,7 +137,7 @@ addcmd(s, cmd, len) } if (cmd) (void) sm_strlcat2(newcmdbuf, CMDDIR, "/", sizeof newcmdbuf); - (void) sm_strlcat(newcmdbuf, s, sizeof newcmdbuf); + (void) strncat(newcmdbuf, s, len); } int @@ -429,7 +430,8 @@ main(argc, argv) #ifdef DEBUG (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, "%s\n", newcmdbuf); #endif /* DEBUG */ - (void) execle("/bin/sh", "/bin/sh", "-c", newcmdbuf, NULL, newenv); + (void) execle("/bin/sh", "/bin/sh", "-c", newcmdbuf, + (char *)NULL, newenv); save_errno = errno; #ifndef DEBUG syslog(LOG_CRIT, "Cannot exec /bin/sh: %s", sm_errstring(errno)); diff --git a/gnu/dist/sendmail/vacation/vacation.0 b/gnu/dist/sendmail/vacation/vacation.0 index 5a68c6a95a6..5f4c70aa75f 100644 --- a/gnu/dist/sendmail/vacation/vacation.0 +++ b/gnu/dist/sendmail/vacation/vacation.0 @@ -1,157 +1,115 @@ +VACATION(1) VACATION(1) -VACATION(1) VACATION(1) - - NNAAMMEE vacation - E-mail auto-responder SSYYNNOOPPSSIISS - vvaaccaattiioonn [--aa _a_l_i_a_s] [--CC _c_f_f_i_l_e] [--dd] [--ff _d_a_t_a_b_a_s_e] [--ii] - [--II] [--ll] [--mm _m_e_s_s_a_g_e] [--rr _i_n_t_e_r_v_a_l] [--ss _a_d_d_r_e_s_s] [--tt - _t_i_m_e] [--UU] [--xx] [--zz] _l_o_g_i_n + vvaaccaattiioonn [--aa _a_l_i_a_s] [--CC _c_f_f_i_l_e] [--dd] [--ff _d_a_t_a_b_a_s_e] [--ii] [--II] [--ll] [--mm + _m_e_s_s_a_g_e] [--rr _i_n_t_e_r_v_a_l] [--ss _a_d_d_r_e_s_s] [--tt _t_i_m_e] [--UU] [--xx] [--zz] _l_o_g_i_n DDEESSCCRRIIPPTTIIOONN - VVaaccaattiioonn returns a message, _~_/_._v_a_c_a_t_i_o_n_._m_s_g by default, to - the sender informing them that you are currently not read- - ing your mail. The message is only sent to each sender - once per reply interval (see --rr below). The intended use - is in a _._f_o_r_w_a_r_d file. For example, your _._f_o_r_w_a_r_d file - might have: + VVaaccaattiioonn returns a message, _~_/_._v_a_c_a_t_i_o_n_._m_s_g by default, to the sender + informing them that you are currently not reading your mail. The mes- + sage is only sent to each sender once per reply interval (see --rr + below). The intended use is in a _._f_o_r_w_a_r_d file. For example, your + _._f_o_r_w_a_r_d file might have: \eric, "|/usr/bin/vacation -a allman eric" - which would send messages to you (assuming your login name - was eric) and reply to any messages for ``eric'' or ``all- - man''. + which would send messages to you (assuming your login name was eric) + and reply to any messages for ``eric'' or ``allman''. Available options: --aa _a_l_i_a_s - Handle messages for _a_l_i_a_s in the same manner as - those received for the user's login name. + Handle messages for _a_l_i_a_s in the same manner as those received + for the user's login name. --CC _c_f_p_a_t_h - Specify pathname of the sendmail configuration - file. This option is ignored if --UU is specified. - This option defaults to the standard sendmail con- - figuration file, located at /etc/mail/sendmail.cf - on most systems. - - --dd Send error/debug messages to stderr instead of sys- - log. Otherwise, fatal errors, such as calling - vvaaccaattiioonn with incorrect arguments, or with non- - existent _l_o_g_i_ns, are logged in the system log file, - using syslog(8). This should only be used on the - command line, not in your _._f_o_r_w_a_r_d file. - - --ff _f_i_l_e_n_a_m_e - Use _f_i_l_e_n_a_m_e as name of the database instead of - _~_/_._v_a_c_a_t_i_o_n_._d_b or _~_/_._v_a_c_a_t_i_o_n_._{_d_i_r_,_p_a_g_}. Unless - the _f_i_l_e_n_a_m_e starts with / it is relative to ~. - - --ii Initialize the vacation database files. It should - be used before you modify your _._f_o_r_w_a_r_d file. This - should only be used on the command line, not in - your _._f_o_r_w_a_r_d file. - - --II Same as --ii (for backwards compatibility). This - should only be used on the command line, not in - - - - Date: 2002/06/21 21:28:06 1 - - - + Specify pathname of the sendmail configuration file. This + option is ignored if --UU is specified. This option defaults to + the standard sendmail configuration file, located at + /etc/mail/sendmail.cf on most systems. + --dd Send error/debug messages to stderr instead of syslog. Other- + wise, fatal errors, such as calling vvaaccaattiioonn with incorrect + arguments, or with non-existent _l_o_g_i_ns, are logged in the system + log file, using syslog(8). This should only be used on the com- + mand line, not in your _._f_o_r_w_a_r_d file. -VACATION(1) VACATION(1) + --ff _f_i_l_e_n_a_m_e + Use _f_i_l_e_n_a_m_e as name of the database instead of _~_/_._v_a_c_a_t_i_o_n_._d_b + or _~_/_._v_a_c_a_t_i_o_n_._{_d_i_r_,_p_a_g_}. Unless the _f_i_l_e_n_a_m_e starts with / it + is relative to ~. + --ii Initialize the vacation database files. It should be used + before you modify your _._f_o_r_w_a_r_d file. This should only be used + on the command line, not in your _._f_o_r_w_a_r_d file. - your _._f_o_r_w_a_r_d file. + --II Same as --ii (for backwards compatibility). This should only be + used on the command line, not in your _._f_o_r_w_a_r_d file. - --ll List the content of the vacation database file - including the address and the associated time of - the last auto-response to that address. This - should only be used on the command line, not in - your _._f_o_r_w_a_r_d file. + --ll List the content of the vacation database file including the + address and the associated time of the last auto-response to + that address. This should only be used on the command line, not + in your _._f_o_r_w_a_r_d file. --mm _f_i_l_e_n_a_m_e - Use _f_i_l_e_n_a_m_e as name of the file containing the - message to send instead of _~_/_._v_a_c_a_t_i_o_n_._m_s_g. Unless - the _f_i_l_e_n_a_m_e starts with / it is relative to ~. + Use _f_i_l_e_n_a_m_e as name of the file containing the message to send + instead of _~_/_._v_a_c_a_t_i_o_n_._m_s_g. Unless the _f_i_l_e_n_a_m_e starts with / + it is relative to ~. --rr _i_n_t_e_r_v_a_l - Set the reply interval to _i_n_t_e_r_v_a_l days. The - default is one week. An interval of ``0'' or - ``infinite'' (actually, any non-numeric character) - will never send more than one reply. The --rr option - should only be used when the vacation database is - initialized (see --ii above). + Set the reply interval to _i_n_t_e_r_v_a_l days. The default is one + week. An interval of ``0'' or ``infinite'' (actually, any non- + numeric character) will never send more than one reply. The --rr + option should only be used when the vacation database is ini- + tialized (see --ii above). --ss _a_d_d_r_e_s_s - Use _a_d_d_r_e_s_s instead of the incoming message sender - address on the _F_r_o_m line as the recipient for the - vacation message. + Use _a_d_d_r_e_s_s instead of the incoming message sender address on + the _F_r_o_m line as the recipient for the vacation message. --tt _t_i_m_e - Ignored, available only for compatibility with - Sun's vacation program. - - --UU Do not attempt to lookup _l_o_g_i_n in the password - file. The -f and -m options must be used to spec- - ify the database and message file since there is no - home directory for the default settings for these - options. - - --xx Reads an exclusion list from stdin (one address per - line). Mails coming from an address in this exclu- - sion list won't get a reply by vvaaccaattiioonn. It is - possible to exclude complete domains by specifying - ``@domain'' as element of the exclusion list. This - should only be used on the command line, not in - your _._f_o_r_w_a_r_d file. - - --zz Set the sender of the vacation message to ``<>'' - instead of the user. This probably violates the - RFCs since vacation messages are not required by a - standards-track RFC to have a null reverse-path. - - VVaaccaattiioonn reads the first line from the standard input for - a UNIX ``From'' line to determine the sender. Sendmail(8) - includes this ``From'' line automatically. - - No message will be sent unless _l_o_g_i_n (or an _a_l_i_a_s supplied - - - - Date: 2002/06/21 21:28:06 2 - - - - - -VACATION(1) VACATION(1) - - - using the --aa option) is part of either the ``To:'' or - ``Cc:'' headers of the mail. No messages from - ``???-REQUEST'', ``???-RELAY'', ``???-OWNER'', - ``OWNER-???'', ``Postmaster'', ``UUCP'', ``MAILER'', or - ``MAILER-DAEMON'' will be replied to (where these strings - are case insensitive) nor is a notification sent if a - ``Precedence: bulk'' or ``Precedence: junk'' line is - included in the mail headers. The people who have sent - you messages are maintained as a db(3) or dbm(3) database - in the file _._v_a_c_a_t_i_o_n_._d_b or _._v_a_c_a_t_i_o_n_._{_d_i_r_,_p_a_g_} in your - home directory. - - VVaaccaattiioonn expects a file _._v_a_c_a_t_i_o_n_._m_s_g, in your home direc- - tory, containing a message to be sent back to each sender. - It should be an entire message (including headers). For - example, it might contain: + Ignored, available only for compatibility with Sun's vacation + program. + + --UU Do not attempt to lookup _l_o_g_i_n in the password file. The -f and + -m options must be used to specify the database and message file + since there is no home directory for the default settings for + these options. + + --xx Reads an exclusion list from stdin (one address per line). + Mails coming from an address in this exclusion list won't get a + reply by vvaaccaattiioonn. It is possible to exclude complete domains + by specifying ``@domain'' as element of the exclusion list. + This should only be used on the command line, not in your _._f_o_r_- + _w_a_r_d file. + + --zz Set the sender of the vacation message to ``<>'' instead of the + user. This probably violates the RFCs since vacation messages + are not required by a standards-track RFC to have a null + reverse-path. + + VVaaccaattiioonn reads the first line from the standard input for a UNIX + ``From'' line to determine the sender. Sendmail(8) includes this + ``From'' line automatically. + + No message will be sent unless _l_o_g_i_n (or an _a_l_i_a_s supplied using the --aa + option) is part of either the ``To:'' or ``Cc:'' headers of the mail. + No messages from ``???-REQUEST'', ``???-RELAY'', ``???-OWNER'', + ``OWNER-???'', ``Postmaster'', ``UUCP'', ``MAILER'', or ``MAILER-DAE- + MON'' will be replied to (where these strings are case insensitive) nor + is a notification sent if a ``Precedence: bulk'' or ``Precedence: + junk'' line is included in the mail headers. The people who have sent + you messages are maintained as a db(3) or dbm(3) database in the file + _._v_a_c_a_t_i_o_n_._d_b or _._v_a_c_a_t_i_o_n_._{_d_i_r_,_p_a_g_} in your home directory. + + VVaaccaattiioonn expects a file _._v_a_c_a_t_i_o_n_._m_s_g, in your home directory, contain- + ing a message to be sent back to each sender. It should be an entire + message (including headers). For example, it might contain: From: eric@CS.Berkeley.EDU (Eric Allman) Subject: I am on vacation @@ -178,21 +136,4 @@ HHIISSTTOORRYY - - - - - - - - - - - - - - - - Date: 2002/06/21 21:28:06 3 - - + Date: 2002/06/21 21:28:06 VACATION(1) |
