[exim-cvs] sender verify callout

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] sender verify callout
Gitweb: http://git.exim.org/exim.git/commitdiff/f358d5e0ef3cb10a0a6d107f70e9e0442087f6f2
Commit:     f358d5e0ef3cb10a0a6d107f70e9e0442087f6f2
Parent:     b04be5e70485a99e9e6fad2313ffa9f99735767f
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Thu Apr 9 22:15:53 2015 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Apr 12 23:36:24 2015 +0100


    sender verify callout
---
 src/src/acl.c                            |    3 ++
 src/src/transports/smtp.c                |    2 +-
 test/log/4201                            |   23 +++++++++++-
 test/rejectlog/4201                      |    5 +++
 test/scripts/4200-International/4201     |   53 +++++++++++++++++++++++++++
 test/scripts/4200-International/REQUIRES |    1 +
 test/stdout/4201                         |   58 ++++++++++++++++++++++++++++++
 7 files changed, 143 insertions(+), 2 deletions(-)


diff --git a/src/src/acl.c b/src/src/acl.c
index e16fbb9..5c0de55 100644
--- a/src/src/acl.c
+++ b/src/src/acl.c
@@ -2079,6 +2079,9 @@ else if (verify_sender_address != NULL)
     uschar *save_address_data = deliver_address_data;


     sender_vaddr = deliver_make_addr(verify_sender_address, TRUE);
+#ifdef EXPERIMENTAL_INTERNATIONAL
+    sender_vaddr->p.utf8 = message_smtputf8;
+#endif
     if (no_details) setflag(sender_vaddr, af_sverify_told);
     if (verify_sender_address[0] != 0)
       {
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index c648855..92df8fa 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -574,7 +574,7 @@ if (*errno_value == ERRNO_WRITEINCOMPLETE)
 /* Handle lack of advertised SMTPUTF8, for international message */
 if (*errno_value == ERRNO_UTF8_FWD)
   {
-  *message = US string_sprintf("utf8 support required but not offerred for forwarding");
+  *message = US string_sprintf("utf8 support required but not offered for forwarding");
   DEBUG(D_deliver|D_transport) debug_printf("%s\n", *message);
   return TRUE;
   }
diff --git a/test/log/4201 b/test/log/4201
index 467bb6c..959070a 100644
--- a/test/log/4201
+++ b/test/log/4201
@@ -15,7 +15,7 @@
 1999-03-02 09:44:33 End queue run: pid=pppp -qqff
 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
 1999-03-02 09:44:33 10HmbB-0005vi-00 <= यहलोगहिन्दीक्योंनहींबोलसकतेहैं@japanese.なぜみんな日本語を話してくれないのか.local U=CALLER P=utf8local-esmtp S=sss for userz@???
-1999-03-02 09:44:33 10HmbB-0005vi-00 ** userz@??? F=<यहलोगहिन्दीक्योंनहींबोलसकतेहैं@japanese.なぜみんな日本語を話してくれないのか.local> R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1]: utf8 support required but not offerred for forwarding
+1999-03-02 09:44:33 10HmbB-0005vi-00 ** userz@??? F=<यहलोगहिन्दीक्योंनहींबोलसकतेहैं@japanese.なぜみんな日本語を話してくれないのか.local> R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1]: utf8 support required but not offered for forwarding
 1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> R=10HmbB-0005vi-00 U=EXIMUSER P=local S=sss for यहलोगहिन्दीक्योंनहींबोलसकतेहैं@japanese.なぜみんな日本語を話してくれないのか.local
 1999-03-02 09:44:33 10HmbC-0005vi-00 no immediate delivery: queued by ACL
 1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
@@ -51,3 +51,24 @@
 1999-03-02 09:44:33 10HmbI-0005vi-00 => :blackhole: <user.γλυκύρριζα@test.ex> R=localuser
 1999-03-02 09:44:33 10HmbI-0005vi-00 Completed
 1999-03-02 09:44:33 End queue run: pid=pppp -qqff
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmbJ-0005vi-00 <= userV.වැල්_මී@test.ex U=CALLER P=utf8local-esmtp S=sss for user.அதிமதுரம்@test.ex
+1999-03-02 09:44:33 10HmbK-0005vi-00 <= userV.වැල්_මී@test.ex H=localhost (the.local.host.name) [127.0.0.1] P=utf8esmtp S=sss id=E10HmbJ-0005vi-00@??? for user.அதிமதுரம்@test.ex
+1999-03-02 09:44:33 10HmbJ-0005vi-00 => user.அதிமதுரம்@test.ex F=<userV.වැල්_මී@test.ex> R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmbK-0005vi-00"
+1999-03-02 09:44:33 10HmbJ-0005vi-00 Completed
+1999-03-02 09:44:33 H=localhost (the.local.host.name) [127.0.0.1] F=<> rejected RCPT <the.local.host.name-dddddddd-testing@???>: relay not permitted
+1999-03-02 09:44:33 10HmbL-0005vi-00 <= userW@??? U=CALLER P=utf8local-esmtp S=sss for user.ഇരട്ടിമധുരം@test.ex
+1999-03-02 09:44:33 10HmbM-0005vi-00 <= userW@??? H=localhost (the.local.host.name) [127.0.0.1] P=utf8esmtp S=sss id=E10HmbL-0005vi-00@??? for user.ഇരട്ടിമധുരം@test.ex
+1999-03-02 09:44:33 10HmbL-0005vi-00 => user.ഇരട്ടിമധുരം@test.ex F=<userW@???> R=rmt T=rmt_smtp H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmbM-0005vi-00"
+1999-03-02 09:44:33 10HmbL-0005vi-00 Completed
+1999-03-02 09:44:33 Start queue run: pid=pppp -qqff
+1999-03-02 09:44:33 10HmbK-0005vi-00 => :blackhole: <user.அதிமதுரம்@test.ex> R=localuser
+1999-03-02 09:44:33 10HmbK-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbM-0005vi-00 => :blackhole: <user.ഇരട്ടിമധുരം@test.ex> R=localuser
+1999-03-02 09:44:33 10HmbM-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp -qqff
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 U=CALLER sender verify fail for <userA@???>: response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8
+1999-03-02 09:44:33 U=CALLER F=<userA@???> rejected RCPT <user.यष्टिमधु@test.ex>: Sender verify failed
+1999-03-02 09:44:33 U=CALLER sender verify fail for <userB.જેઠીમધ@test.ex>: response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8
+1999-03-02 09:44:33 U=CALLER F=<userB.જેઠીમધ@test.ex> rejected RCPT <user.ქართული@test.ex>: Sender verify failed
diff --git a/test/rejectlog/4201 b/test/rejectlog/4201
index efd8f15..a8ced2c 100644
--- a/test/rejectlog/4201
+++ b/test/rejectlog/4201
@@ -1,3 +1,8 @@
 1999-03-02 09:44:33 H=localhost (the.local.host.name) [127.0.0.1] F=<> rejected RCPT <the.local.host.name-dddddddd-testing@???>: relay not permitted
 1999-03-02 09:44:33 U=CALLER F=<CALLER@???énopuedensimplementehablarenEspañol.local> rejected RCPT <userS@???>: response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8
 1999-03-02 09:44:33 U=CALLER F=<CALLER@???ạisaohọkhôngthểchỉnóitiếngViệt.local> rejected RCPT <userT@???>: response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8
+1999-03-02 09:44:33 H=localhost (the.local.host.name) [127.0.0.1] F=<> rejected RCPT <the.local.host.name-dddddddd-testing@???>: relay not permitted
+1999-03-02 09:44:33 U=CALLER sender verify fail for <userA@???>: response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8
+1999-03-02 09:44:33 U=CALLER F=<userA@???> rejected RCPT <user.यष्टिमधु@test.ex>: Sender verify failed
+1999-03-02 09:44:33 U=CALLER sender verify fail for <userB.જેઠીમધ@test.ex>: response to "EHLO the.local.host.name" from 127.0.0.1 [127.0.0.1] did not include SMTPUTF8
+1999-03-02 09:44:33 U=CALLER F=<userB.જેઠીમધ@test.ex> rejected RCPT <user.ქართული@test.ex>: Sender verify failed
diff --git a/test/scripts/4200-International/4201 b/test/scripts/4200-International/4201
index c984f1c..946bc3e 100644
--- a/test/scripts/4200-International/4201
+++ b/test/scripts/4200-International/4201
@@ -188,3 +188,56 @@ exim -DSERVER=server -qqff
 ****
 #
 #
+exim -DSERVER=server -bd -oX PORT_D
+****
+#
+# sender verify callout, pass
+exim -bs -odi -DCONTROL="verify=sender/callout"
+EHLO client.bh
+MAIL FROM: <userV.වැල්_මී@test.ex> SMTPUTF8
+RCPT TO: <user.அதிமதுரம்@test.ex>
+DATA
+Subject: test
+
+body
+.
+QUIT
+****
+# sender+random verify callout, pass
+exim -bs -odi -DCONTROL="verify=sender/callout=random"
+EHLO client.bh
+MAIL FROM: <userW@???> SMTPUTF8
+RCPT TO: <user.ഇരട്ടിമധുരം@test.ex>
+DATA
+Subject: test
+
+body
+.
+QUIT
+****
+#
+killdaemon
+exim -DSERVER=server -qqff
+****
+#
+#
+#
+#
+exim -DSERVER=server -DOPTION="" -bd -oX PORT_D
+****
+# sender verify callout, fail
+exim -bs -odi -DCONTROL="verify=sender/callout"
+EHLO client.sfail
+MAIL FROM: <userA@???> SMTPUTF8
+RCPT TO: <user.यष्टिमधु@test.ex>
+QUIT
+****
+# sender+random verify callout, fail
+exim -bs -odi -DCONTROL="verify=sender/callout=random"
+EHLO client.sfail
+MAIL FROM: <userB.જેઠીમધ@test.ex> SMTPUTF8
+RCPT TO: <user.ქართული@test.ex>
+QUIT
+****
+#
+killdaemon
diff --git a/test/scripts/4200-International/REQUIRES b/test/scripts/4200-International/REQUIRES
new file mode 100644
index 0000000..c66f680
--- /dev/null
+++ b/test/scripts/4200-International/REQUIRES
@@ -0,0 +1 @@
+support Experimental_International
diff --git a/test/stdout/4201 b/test/stdout/4201
index 9cc30f2..64517ef 100644
--- a/test/stdout/4201
+++ b/test/stdout/4201
@@ -148,3 +148,61 @@ End of script
 354 Enter message, ending with "." on a line by itself
 250 OK id=10HmbH-0005vi-00
 221 the.local.host.name closing connection
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-the.local.host.name Hello CALLER at client.bh
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250-SMTPUTF8
+250 HELP
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmbJ-0005vi-00
+221 the.local.host.name closing connection
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-the.local.host.name Hello CALLER at client.bh
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250-SMTPUTF8
+250 HELP
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmbL-0005vi-00
+221 the.local.host.name closing connection
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-the.local.host.name Hello CALLER at client.sfail
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250-SMTPUTF8
+250 HELP
+250 OK
+550-Callback setup failed while verifying <userA@???>
+550-533 mailbox name not allowed
+550-The initial connection, or a HELO or MAIL FROM:<> command was
+550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards
+550-RFC requirements, and stops you from receiving standard bounce
+550-messages. This host does not accept mail from domains whose servers
+550-refuse bounces.
+550 Sender verify failed
+221 the.local.host.name closing connection
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-the.local.host.name Hello CALLER at client.sfail
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250-SMTPUTF8
+250 HELP
+250 OK
+550-Callback setup failed while verifying <userB.જેઠીમધ@test.ex>
+550-533 mailbox name not allowed
+550-The initial connection, or a HELO or MAIL FROM:<> command was
+550-rejected. Refusing MAIL FROM:<> does not help fight spam, disregards
+550-RFC requirements, and stops you from receiving standard bounce
+550-messages. This host does not accept mail from domains whose servers
+550-refuse bounces.
+550 Sender verify failed
+221 the.local.host.name closing connection