off.
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.223 2005/09/12 14:03:42 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.224 2005/09/12 15:09:55 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
PH/42 (But a TF fix): In a domain list, Exim incorrectly matched @[] if the IP
address in a domain literal was a prefix of an interface address.
+PH/43 (Again a TF fix): In the dnslookup router, do not apply widen_domains
+ when verifying a sender address, unless rewrite_headers is false.
+
Exim version 4.52
-----------------
-/* $Cambridge: exim/src/src/route.c,v 1.5 2005/03/15 11:37:21 ph10 Exp $ */
+/* $Cambridge: exim/src/src/route.c,v 1.6 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
HDEBUG(D_route) debug_printf("calling %s router\n", r->name);
- yield = (r->info->code)(r, addr, pw, verify != v_none, paddr_local,
- paddr_remote, addr_new, addr_succeed);
+ yield = (r->info->code)(r, addr, pw, verify, paddr_local, paddr_remote,
+ addr_new, addr_succeed);
if (yield == FAIL)
{
-/* $Cambridge: exim/src/src/routers/accept.c,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/accept.c,v 1.3 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
router_instance *rblock, /* data for this instantiation */
address_item *addr, /* address we are working on */
struct passwd *pw, /* passwd entry after check_local_user */
- BOOL verify, /* TRUE when verifying */
+ int verify, /* v_none/v_recipient/v_sender/v_expn */
address_item **addr_local, /* add it to this if it's local */
address_item **addr_remote, /* add it to this if it's remote */
address_item **addr_new, /* put new addresses on here */
-/* $Cambridge: exim/src/src/routers/accept.h,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/accept.h,v 1.3 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/* The main and initialization entry points for the router */
extern int accept_router_entry(router_instance *, address_item *,
- struct passwd *, BOOL, address_item **, address_item **,
+ struct passwd *, int, address_item **, address_item **,
address_item **, address_item **);
extern void accept_router_init(router_instance *);
-/* $Cambridge: exim/src/src/routers/dnslookup.c,v 1.4 2005/06/17 14:20:48 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/dnslookup.c,v 1.5 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
router_instance *rblock, /* data for this instantiation */
address_item *addr, /* address we are working on */
struct passwd *pw, /* passwd entry after check_local_user */
- BOOL verify, /* TRUE when verifying */
+ int verify, /* v_none/v_recipient/v_sender/v_expn */
address_item **addr_local, /* add it to this if it's local */
address_item **addr_remote, /* add it to this if it's remote */
address_item **addr_new, /* put new addresses on here */
be something in the "ch" toplevel domain, but it also might be xxx.ch.xyz.com.
The choice of pre- or post-widening affects which takes precedence. If ever
somebody comes up with some kind of requirement for pre-widening, presumably
-with some conditions under which it is done, it can be selected here. */
-
-if (ob->widen_domains != NULL)
+with some conditions under which it is done, it can be selected here.
+
+The rewrite_headers option works only when routing an address at transport
+time, because the alterations to the headers are not persistent so must be
+worked out immediately before they are used. Sender addresses are routed for
+verification purposes, but never at transport time, so any header changes that
+you might expect as a result of sender domain widening do not occur. Therefore
+we do not perform widening when verifying sender addresses; however, widening
+sender addresses is OK if we do not have to rewrite the headers. The
+suppression of widening for sender addresses is silent because it is the normal
+desirable behaviour. */
+
+if (ob->widen_domains != NULL && (verify != v_sender || !ob->rewrite_headers))
{
listptr = ob->widen_domains;
widen = string_nextinlist(&listptr, &widen_sep, widen_buffer,
-/* $Cambridge: exim/src/src/routers/dnslookup.h,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/dnslookup.h,v 1.3 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/* The main and initialization entry points for the router */
extern int dnslookup_router_entry(router_instance *, address_item *,
- struct passwd *, BOOL, address_item **, address_item **,
+ struct passwd *, int, address_item **, address_item **,
address_item **, address_item **);
extern void dnslookup_router_init(router_instance *);
-/* $Cambridge: exim/src/src/routers/ipliteral.c,v 1.4 2005/01/11 15:51:03 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/ipliteral.c,v 1.5 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
router_instance *rblock, /* data for this instantiation */
address_item *addr, /* address we are working on */
struct passwd *pw, /* passwd entry after check_local_user */
- BOOL verify, /* TRUE when verifying */
+ int verify, /* v_none/v_recipient/v_sender/v_expn */
address_item **addr_local, /* add it to this if it's local */
address_item **addr_remote, /* add it to this if it's remote */
address_item **addr_new, /* put new addresses on here */
-/* $Cambridge: exim/src/src/routers/ipliteral.h,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/ipliteral.h,v 1.3 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/* The main and initialization entry points for the router */
extern int ipliteral_router_entry(router_instance *, address_item *,
- struct passwd *, BOOL, address_item **, address_item **,
+ struct passwd *, int, address_item **, address_item **,
address_item **, address_item **);
extern void ipliteral_router_init(router_instance *);
-/* $Cambridge: exim/src/src/routers/iplookup.c,v 1.3 2005/06/27 14:29:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/iplookup.c,v 1.4 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
router_instance *rblock, /* data for this instantiation */
address_item *addr, /* address we are working on */
struct passwd *pw, /* passwd entry after check_local_user */
- BOOL verify, /* TRUE when verifying */
+ int verify, /* v_none/v_recipient/v_sender/v_expn */
address_item **addr_local, /* add it to this if it's local */
address_item **addr_remote, /* add it to this if it's remote */
address_item **addr_new, /* put new addresses on here */
-/* $Cambridge: exim/src/src/routers/iplookup.h,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/iplookup.h,v 1.3 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/* The main and initialization entry points for the router */
extern int iplookup_router_entry(router_instance *, address_item *,
- struct passwd *, BOOL, address_item **, address_item **,
+ struct passwd *, int, address_item **, address_item **,
address_item **, address_item **);
extern void iplookup_router_init(router_instance *);
-/* $Cambridge: exim/src/src/routers/manualroute.c,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/manualroute.c,v 1.3 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
router_instance *rblock, /* data for this instantiation */
address_item *addr, /* address we are working on */
struct passwd *pw, /* passwd entry after check_local_user */
- BOOL verify, /* TRUE when verifying */
+ int verify, /* v_none/v_recipient/v_sender/v_expn */
address_item **addr_local, /* add it to this if it's local */
address_item **addr_remote, /* add it to this if it's remote */
address_item **addr_new, /* put new addresses on here */
if (hostlist[0] == 0)
{
- if (verify) goto ROUTED;
+ if (verify != v_none) goto ROUTED;
addr->message = string_sprintf("error in %s router: no host(s) specified "
"for domain %s", rblock->name, domain);
log_write(0, LOG_MAIN, "%s", addr->message);
defined for these hosts. It will be a remote one, as a local transport is
dealt with above. However, we don't need one if verifying only. */
-if (transport == NULL && !verify)
+if (transport == NULL && verify == v_none)
{
log_write(0, LOG_MAIN, "Error in %s router: no transport defined",
rblock->name);
-/* $Cambridge: exim/src/src/routers/manualroute.h,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/manualroute.h,v 1.3 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/* The main and initialization entry points for the router */
extern int manualroute_router_entry(router_instance *, address_item *,
- struct passwd *, BOOL, address_item **, address_item **,
+ struct passwd *, int, address_item **, address_item **,
address_item **, address_item **);
extern void manualroute_router_init(router_instance *);
-/* $Cambridge: exim/src/src/routers/queryprogram.c,v 1.5 2005/06/27 14:29:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/queryprogram.c,v 1.6 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
router_instance *rblock, /* data for this instantiation */
address_item *addr, /* address we are working on */
struct passwd *pw, /* passwd entry after check_local_user */
- BOOL verify, /* TRUE when verifying */
+ int verify, /* v_none/v_recipient/v_sender/v_expn */
address_item **addr_local, /* add it to this if it's local */
address_item **addr_remote, /* add it to this if it's remote */
address_item **addr_new, /* put new addresses on here */
-/* $Cambridge: exim/src/src/routers/queryprogram.h,v 1.2 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/queryprogram.h,v 1.3 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/* The main and initialization entry points for the router */
extern int queryprogram_router_entry(router_instance *, address_item *,
- struct passwd *, BOOL, address_item **, address_item **,
+ struct passwd *, int, address_item **, address_item **,
address_item **, address_item **);
extern void queryprogram_router_init(router_instance *);
-/* $Cambridge: exim/src/src/routers/redirect.c,v 1.13 2005/06/27 15:11:04 tom Exp $ */
+/* $Cambridge: exim/src/src/routers/redirect.c,v 1.14 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
Arguments:
rblock the router control block
addr the address being routed
- verify true if verifying
+ verify v_none/v_recipient/v_sender/v_expn
addr_prop point to the propagated block, which is where the
new values are to be placed
static int
sort_errors_and_headers(router_instance *rblock, address_item *addr,
- BOOL verify, address_item_propagated *addr_prop)
+ int verify, address_item_propagated *addr_prop)
{
int frc = rf_get_errors_address(addr, rblock, verify,
&(addr_prop->errors_address));
router_instance *rblock, /* data for this instantiation */
address_item *addr, /* address we are working on */
struct passwd *pw, /* passwd entry after check_local_user */
- BOOL verify, /* TRUE when verifying */
+ int verify, /* v_none/v_recipient/v_sender/v_expn */
address_item **addr_local, /* add it to this if it's local */
address_item **addr_remote, /* add it to this if it's remote */
address_item **addr_new, /* put new addresses on here */
/* When verifying and testing addresses, the "logwrite" command in filters
must be bypassed. */
-if (!verify && !address_test_mode) options |= RDO_REALLOG;
+if (verify == v_none && !address_test_mode) options |= RDO_REALLOG;
/* Sort out the fixed or dynamic uid/gid. This uid is used (a) for reading the
file (and interpreting a filter) and (b) for running the transports for
/* Forward SRS */
/* No point in actually performing SRS if we are just verifying a recipient */
- if((srs_action & 1) && !verify && (sender_address ? sender_address[0] != 0 : FALSE))
+ if((srs_action & 1) && verify == v_none &&
+ (sender_address ? sender_address[0] != 0 : FALSE))
{
srs_orig_sender = sender_address;
if (eblock != NULL)
{
if (!moan_skipped_syntax_errors(
- rblock->name, /* For message content */
- eblock, /* Ditto */
- (verify || address_test_mode)?
- NULL : ob->syntax_errors_to, /* Who to mail */
- generated != NULL, /* True if not all failed */
- ob->syntax_errors_text)) /* Custom message */
+ rblock->name, /* For message content */
+ eblock, /* Ditto */
+ (verify != v_none || address_test_mode)?
+ NULL : ob->syntax_errors_to, /* Who to mail */
+ generated != NULL, /* True if not all failed */
+ ob->syntax_errors_text)) /* Custom message */
return DEFER;
if (filtertype != FILTER_FORWARD || generated == NULL)
if (frc == FF_DELIVERED)
{
- if (generated == NULL && !verify && !address_test_mode)
+ if (generated == NULL && verify == v_none && !address_test_mode)
{
log_write(0, LOG_MAIN, "=> %s <%s> R=%s", discarded, addr->address,
rblock->name);
-/* $Cambridge: exim/src/src/routers/redirect.h,v 1.5 2005/05/24 08:15:02 tom Exp $ */
+/* $Cambridge: exim/src/src/routers/redirect.h,v 1.6 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/* The main and initialization entry points for the router */
extern int redirect_router_entry(router_instance *, address_item *,
- struct passwd *, BOOL, address_item **, address_item **,
+ struct passwd *, int, address_item **, address_item **,
address_item **, address_item **);
extern void redirect_router_init(router_instance *);
-/* $Cambridge: exim/src/src/routers/rf_get_errors_address.c,v 1.3 2005/01/04 10:00:44 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/rf_get_errors_address.c,v 1.4 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
Arguments:
addr the input address
rblock the router instance
- verify TRUE when verifying
+ verify v_none / v_recipient / v_sender / v_expn
errors_to point the errors address here
Returns: OK if no problem
int
rf_get_errors_address(address_item *addr, router_instance *rblock,
- BOOL verify, uschar **errors_to)
+ int verify, uschar **errors_to)
{
uschar *s;
not be a sender address. We also need to save and restore the expansion values
associated with an address. */
-if (verify)
+if (verify != v_none)
{
*errors_to = s;
DEBUG(D_route)
-/* $Cambridge: exim/src/src/structs.h,v 1.6 2005/05/24 08:15:02 tom Exp $ */
+/* $Cambridge: exim/src/src/structs.h,v 1.7 2005/09/12 15:09:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
router_instance *,
struct address_item *,
struct passwd *,
- BOOL,
+ int,
struct address_item **,
struct address_item **,
struct address_item **,