#endif
#ifdef EXPERIMENTAL_PRDR
+ DEBUG(D_transport) debug_printf("considering PRDR...\n");
+
prdr_enable = esmtp &&
- pcre_exec(regex_PRDR, NULL, CS buffer, Ustrlen(buffer), 0,
- PCRE_EOPT, NULL, 0) >= 0;
+ (pcre_exec(regex_PRDR, NULL, CS buffer, Ustrlen(buffer), 0,
+ PCRE_EOPT, NULL, 0) >= 0) &&
+ (verify_check_this_host(&(ob->hosts_try_prdr), NULL, host->name,
+ host->address, NULL) == OK);
+ DEBUG(D_transport) debug_printf("considered PRDR...\n");
+
+ if (prdr_enable)
+ {DEBUG(D_transport) debug_printf("PRDR usable\n");}
+
+else if (!esmtp)
+ {DEBUG(D_transport) debug_printf("PRDR not possible, not esmtp\n");}
+
+else if (pcre_exec(regex_PRDR, NULL, CS buffer, Ustrlen(buffer), 0,
+ PCRE_EOPT, NULL, 0) < 0)
+ {DEBUG(D_transport) debug_printf("PRDR not offerred\n");}
+
+else if (verify_check_this_host(&(ob->hosts_try_prdr), NULL, host->name,
+ host->address, NULL) != OK)
+ {DEBUG(D_transport) debug_printf("PRDR not permitted for host\n");}
+
+else
+ {DEBUG(D_transport) debug_printf("PRDR confusion\n");}
#endif
}
while (*p) p++;
}
+#ifdef EXPERIMENTAL_PRDDR
+if (prdr_enable) /*XXX could we do this on if >1 rcpts? */
+ {
+ sprintf(CS p, " PRDR");
+ p += 5;
+ }
+#endif
+
/* If an authenticated_sender override has been specified for this transport
instance, expand it. If the expansion is forced to fail, and there was already
an authenticated_sender for this message, the original value will be used.
--- /dev/null
+# Exim test configuration 5500
+# Server PRDR
+
+LOG_SELECTOR=
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+rfc1413_query_timeout = 0s
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+# ----- Main settings -----
+
+domainlist local_domains = test.ex : *.test.ex
+
+LOG_SELECTOR
+
+qualify_domain = test.ex
+trusted_users = CALLER
+
+prdr_enable = true
+
+acl_smtp_rcpt = accept
+acl_smtp_data = data_acl
+
+# ----- ACLs -----
+
+begin acl
+
+data_acl:
+ deny local_parts = usery
+ accept
+
+# ----- Transports -----
+
+begin transports
+
+t1:
+ driver = appendfile
+ file = DIR/test-mail/$local_part
+ user = CALLER
+
+# ----- Routers -----
+
+begin routers
+
+r0:
+ driver = accept
+ transport = t1
+
+# ----- Retry -----
+
+begin retry
+
+* * F,5d,5m
+
+# End