summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Kistner <tom@duncanthrax.net>2005-07-23 20:46:42 +0000
committerTom Kistner <tom@duncanthrax.net>2005-07-23 20:46:42 +0000
commiteafd343b6e1c31d86ddd53bbd90d9380630c25c3 (patch)
treede3c262f86fc7cbe95a4ef9dfc7b4f002905b498 /src
parent12cdb9e795e0eae66f39c93b1e87cb8c3dab8177 (diff)
Added "success_on_redirect" address verification option
Diffstat (limited to 'src')
-rw-r--r--src/src/acl.c10
-rw-r--r--src/src/macros.h3
-rw-r--r--src/src/verify.c14
3 files changed, 21 insertions, 6 deletions
diff --git a/src/src/acl.c b/src/src/acl.c
index 60c0fc3e0..7bab711e0 100644
--- a/src/src/acl.c
+++ b/src/src/acl.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/acl.c,v 1.41 2005/06/27 14:29:43 ph10 Exp $ */
+/* $Cambridge: exim/src/src/acl.c,v 1.42 2005/07/23 20:46:42 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -1338,6 +1338,7 @@ BOOL verify_header_sender = FALSE;
BOOL defer_ok = FALSE;
BOOL callout_defer_ok = FALSE;
BOOL no_details = FALSE;
+BOOL success_on_redirect = FALSE;
address_item *sender_vaddr = NULL;
uschar *verify_sender_address = NULL;
uschar *pm_mailfrom = NULL;
@@ -1480,6 +1481,7 @@ while ((ss = string_nextinlist(&list, &sep, big_buffer, big_buffer_size))
{
if (strcmpic(ss, US"defer_ok") == 0) defer_ok = TRUE;
else if (strcmpic(ss, US"no_details") == 0) no_details = TRUE;
+ else if (strcmpic(ss, US"success_on_redirect") == 0) success_on_redirect = TRUE;
/* These two old options are left for backwards compatibility */
@@ -1737,6 +1739,9 @@ else if (verify_sender_address != NULL)
else
verify_options |= vopt_fake_sender;
+ if (success_on_redirect)
+ verify_options |= vopt_success_on_redirect;
+
/* The recipient, qualify, and expn options are never set in
verify_options. */
@@ -1788,6 +1793,9 @@ else
{
address_item addr2;
+ if (success_on_redirect)
+ verify_options |= vopt_success_on_redirect;
+
/* We must use a copy of the address for verification, because it might
get rewritten. */
diff --git a/src/src/macros.h b/src/src/macros.h
index 91419c968..d4a09e875 100644
--- a/src/src/macros.h
+++ b/src/src/macros.h
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/macros.h,v 1.16 2005/06/27 14:29:04 ph10 Exp $ */
+/* $Cambridge: exim/src/src/macros.h,v 1.17 2005/07/23 20:46:42 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -617,6 +617,7 @@ enum { v_none, v_sender, v_recipient, v_expn };
#define vopt_callout_no_cache 0x0040 /* disable callout cache */
#define vopt_callout_recipsender 0x0080 /* use real sender to verify recip */
#define vopt_callout_recippmaster 0x0100 /* use postmaster to verify recip */
+#define vopt_success_on_redirect 0x0200
/* Values for fields in callout cache records */
diff --git a/src/src/verify.c b/src/src/verify.c
index e4b25beaf..c727177b5 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/verify.c,v 1.22 2005/06/27 14:29:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/verify.c,v 1.23 2005/07/23 20:46:42 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -813,6 +813,8 @@ Arguments:
rewriting and messages from callouts
vopt_qualify => qualify an unqualified address; else error
vopt_expn => called from SMTP EXPN command
+ vopt_success_on_redirect => when a new address is generated
+ the verification instantly succeeds
These ones are used by do_callout() -- the options variable
is passed to it.
@@ -850,6 +852,7 @@ BOOL allok = TRUE;
BOOL full_info = (f == NULL)? FALSE : (debug_selector != 0);
BOOL is_recipient = (options & vopt_is_recipient) != 0;
BOOL expn = (options & vopt_expn) != 0;
+BOOL success_on_redirect = (options & vopt_success_on_redirect) != 0;
int i;
int yield = OK;
int verify_type = expn? v_expn :
@@ -1219,9 +1222,12 @@ while (addr_new != NULL)
generated address. */
if (!full_info && /* Stop if short info wanted AND */
- (addr_new == NULL || /* No new address OR */
- addr_new->next != NULL || /* More than one new address OR */
- testflag(addr_new, af_pfr))) /* New address is pfr */
+ (((addr_new == NULL || /* No new address OR */
+ addr_new->next != NULL || /* More than one new address OR */
+ testflag(addr_new, af_pfr))) /* New address is pfr */
+ || /* OR */
+ (addr_new != NULL && /* At least one new address AND */
+ success_on_redirect))) /* success_on_redirect is set */
{
if (f != NULL) fprintf(f, "%s %s\n", address,
address_test_mode? "is deliverable" : "verified");