address_item *addr_orig;
deliver_localpart = addr->local_part;
+ deliver_localpart_verified = addr->local_part_verified;
deliver_localpart_prefix = addr->prefix;
deliver_localpart_prefix_v = addr->prefix_v;
deliver_localpart_suffix = addr->suffix;
CUSS &deliver_domain_orig,
CUSS &deliver_domain_parent,
CUSS &deliver_localpart,
+ CUSS &deliver_localpart_verified,
CUSS &deliver_localpart_data,
CUSS &deliver_localpart_orig,
CUSS &deliver_localpart_parent,
verifying. This has to be explicit because it is referenced in more than one
source module. */
-#define ADDRESS_EXPANSIONS_COUNT 18
+#define ADDRESS_EXPANSIONS_COUNT 19
/* The maximum permitted number of command-line (-D) macro definitions. We
need a limit only to make it easier to generate argument vectors for re-exec
r->name, addr->local_part);
return SKIP;
}
- deliver_localpart_verified = string_copy(US (*pw)->pw_name);
+ addr->local_part_verified =
+ deliver_localpart_verified = string_copy(US (*pw)->pw_name);
deliver_home = string_copy(US (*pw)->pw_dir);
local_user_gid = (*pw)->pw_gid;
local_user_uid = (*pw)->pw_uid;
if (r->router_home_directory)
{
- uschar *router_home = expand_string(r->router_home_directory);
- if (!router_home)
- {
- if (!f.expand_string_forcedfail)
- {
- *perror = string_sprintf("failed to expand \"%s\" for "
- "router_home_directory: %s", r->router_home_directory,
- expand_string_message);
- return DEFER;
- }
- }
- else
+ uschar * router_home = expand_string(r->router_home_directory);
+ if (router_home)
{
setflag(addr, af_home_expanded); /* Note set from router_home_directory */
deliver_home = router_home;
}
+ else if (!f.expand_string_forcedfail)
+ {
+ *perror = string_sprintf("failed to expand \"%s\" for "
+ "router_home_directory: %s", r->router_home_directory,
+ expand_string_message);
+ return DEFER;
+ }
}
/* Skip if the sender condition is not met. We leave this one till after the
the local part sorted. */
router_name = r->name;
- deliver_localpart_verified = NULL;
deliver_set_expansions(addr);
/* For convenience, the pre-router checks are in a separate function, which
uschar *cc_local_part; /* caseful local part */
uschar *lc_local_part; /* lowercased local part */
uschar *local_part; /* points to cc or lc version */
+ uschar *local_part_verified; /* result from check_local_user */
uschar *prefix; /* stripped prefix of local part */
uschar *prefix_v; /* variable part of above */
uschar *suffix; /* stripped suffix of local part */
--- /dev/null
+# Exim test configuration 0587
+
+.include DIR/aux-var/std_conf_prefix
+
+
+# ----- Main settings -----
+
+domainlist local_domains = @
+
+acl_smtp_rcpt = accept
+trusted_users = CALLER
+
+
+# ----- Routers -----
+
+begin routers
+
+dump_remote_domains:
+ driver = redirect
+ domains = ! +local_domains
+ data = :blackhole:
+
+localuser:
+ driver = accept
+ check_local_user
+ transport = local_delivery
+
+
+# ----- Transports -----
+
+begin transports
+
+local_delivery:
+ driver = appendfile
+ file = DIR/test-mail/$local_part_verified
+
+# End
--- /dev/null
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= someone@some.domain U=CALLER P=local-smtp S=sss
+1999-03-02 09:44:33 10HmaX-0005vi-00 => :blackhole: <b@remote> R=dump_remote_domains
+1999-03-02 09:44:33 10HmaX-0005vi-00 => CALLER <CALLER@the.local.host.name> R=localuser T=local_delivery
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= someone@some.domain U=CALLER P=local-smtp S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <a@remote> R=dump_remote_domains
+1999-03-02 09:44:33 10HmaY-0005vi-00 => CALLER <CALLER@the.local.host.name> R=localuser T=local_delivery
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
--- /dev/null
+# $local_part_verified, multi-rcpt message
+#
+exim -bs -odi
+mail from:<someone@some.domain>
+rcpt to:<CALLER@HOSTNAME>
+rcpt to:<b@remote>
+data
+.
+quit
+****
+exim -bs -odi
+mail from:<someone@some.domain>
+rcpt to:<a@remote>
+rcpt to:<CALLER@HOSTNAME>
+data
+.
+quit
+****
--- /dev/null
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaX-0005vi-00\r
+221 the.local.host.name closing connection\r
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaY-0005vi-00\r
+221 the.local.host.name closing connection\r