From 45b915963e2e3721fc65c7c3f50f2f65f5c54d1b Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Wed, 28 Jun 2006 16:00:23 +0000 Subject: Add acl_not_smtp_start ACL (mostly Johannes Berg's patch). --- doc/doc-txt/ChangeLog | 10 +++++--- doc/doc-txt/NewStuff | 16 ++++++++++++- src/ACKNOWLEDGMENTS | 3 ++- src/src/acl.c | 56 +++++++++++++++++++++++++++----------------- src/src/exim.c | 17 ++++++++++++-- src/src/globals.c | 5 +++- src/src/globals.h | 3 ++- src/src/macros.h | 3 ++- src/src/readconf.c | 3 ++- test/confs/0535 | 46 ++++++++++++++++++++++++++++++++++++ test/log/0535 | 6 +++++ test/mail/0535.userx | 20 ++++++++++++++++ test/scripts/0000-Basic/0535 | 7 ++++++ 13 files changed, 163 insertions(+), 32 deletions(-) create mode 100644 test/confs/0535 create mode 100644 test/log/0535 create mode 100644 test/mail/0535.userx create mode 100644 test/scripts/0000-Basic/0535 diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 1ae87c627..348c279a1 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.362 2006/06/28 13:59:12 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.363 2006/06/28 16:00:23 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -20,8 +20,8 @@ SC/03 Collect data on the number of addresses (recipients) as well TF/01 Correct an error in the documentation for the redirect router. Exim does (usually) call initgroups() when daemonizing. -TF/02 Call initgroups() when dropping privilege in exim.c, so that Exim runs with - consistent privilege compared to when running as a daemon. +TF/02 Call initgroups() when dropping privilege in exim.c, so that Exim runs + with consistent privilege compared to when running as a daemon. TF/03 Note in the spec that $authenticated_id is not set for local submissions from trusted users. @@ -52,6 +52,10 @@ PH/04 Applied Magnus Holmgren's patch to fix Bugzilla #98: transport's home PH/05 Applied Alex Kiernan's patch to fix Bugzilla #99: a problem with libradius. +PH/06 Added acl_not_smtp_start, based on Johannes Berg's patch, and set the + bit to forbid control=suppress_local_fixups in the acl_not_smtp ACL, + because it is too late at that time, and has no effect. + Exim version 4.62 ----------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index 6fa8b4b83..4f7ca8470 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/NewStuff,v 1.103 2006/06/27 14:34:26 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/NewStuff,v 1.104 2006/06/28 16:00:23 ph10 Exp $ New Features in Exim -------------------- @@ -17,6 +17,20 @@ Version 4.63 it is automatically prepended to the relative path. This action can now be prevented by setting filter_prepend_home false. +2. There is a new acl, set by acl_not_smtp_start, which is run right at the + start of receiving a non-SMTP message, before any of the message has been + read. (This is the analogue of the acl_smtp_predata ACL for SMTP input.) The + result of this ACL is ignored; it cannot be used to reject a message. If + you really need to, you could set a value in an ACL variable here and reject + based on that in the acl_not_smtp ACL. However, this ACL can be used to set + controls, and in particular, it can be used to set control=suppress_local_ + fixups, which cannot be used in the acl_not_smtp ACL because by the time + that ACL is run, it is too late. When the acl_not_smtp_start ACL is run, the + sender and recipients are known, so the "senders" and "sender_domains" + conditions and $sender_address and $recipients variables can be used. + Variables such as $authenticated_ sender are also available. It is possible + to specify added header lines in this ACL. + Version 4.62 ------------ diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS index 3a8bfbb9f..114cc64c9 100644 --- a/src/ACKNOWLEDGMENTS +++ b/src/ACKNOWLEDGMENTS @@ -1,4 +1,4 @@ -$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.48 2006/06/28 13:59:13 ph10 Exp $ +$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.49 2006/06/28 16:00:23 ph10 Exp $ EXIM ACKNOWLEDGEMENTS @@ -72,6 +72,7 @@ Ian Bell Analysis of a bug and an infelicity in clock tick code Patch for ${quote_local_part Peter Benie A number mistakes found by analysing the code Johannes Berg Suggested patch for authentication client $auth support + Suggested patch for acl_not_smtp_start Matt Bernstein LMTP over socket Suggested patch for dnslists '&' feature Mike Bethune Help with debugging an elusive ALRM signal bug diff --git a/src/src/acl.c b/src/src/acl.c index 02a2e9440..086fa68fd 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.61 2006/06/27 15:07:18 ph10 Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.62 2006/06/28 16:00:23 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -323,12 +323,14 @@ static unsigned int cond_forbids[] = { 0, /* acl */ (unsigned int) - ~((1< userx R=r1 T=t1 +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 10HmaY-0005vi-00 <= nofix@test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 => userx R=r1 T=t1 +1999-03-02 09:44:33 10HmaY-0005vi-00 Completed diff --git a/test/mail/0535.userx b/test/mail/0535.userx new file mode 100644 index 000000000..4ca2d6156 --- /dev/null +++ b/test/mail/0535.userx @@ -0,0 +1,20 @@ +From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999 +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmaX-0005vi-00 + for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +No headers supplied. + +From nofix@test.ex Tue Mar 02 09:44:33 1999 +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmaY-0005vi-00 + for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +X-Added: userx@test.ex + +No headers supplied. + diff --git a/test/scripts/0000-Basic/0535 b/test/scripts/0000-Basic/0535 new file mode 100644 index 000000000..237fa4c9c --- /dev/null +++ b/test/scripts/0000-Basic/0535 @@ -0,0 +1,7 @@ +# acl_not_smtp_start +exim -odi userx@test.ex +No headers supplied. +**** +exim -odi -f nofix@test.ex userx@test.ex +No headers supplied. +**** -- cgit v1.2.3