projects
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
typoes
[exim.git]
/
src
/
src
/
deliver.c
diff --git
a/src/src/deliver.c
b/src/src/deliver.c
index 53712b269ca9cd1cd3ae8c198529fbe1c2aec8e0..9066a14becd8b13c0a35d5a7d40882f9225055c9 100644
(file)
--- a/
src/src/deliver.c
+++ b/
src/src/deliver.c
@@
-703,7
+703,7
@@
if (LOGGING(incoming_interface) && LOGGING(outgoing_interface)
s = LOGGING(outgoing_port)
? string_append(s, sizep, ptrp, 2, US"]:",
string_sprintf("%d", sending_port))
s = LOGGING(outgoing_port)
? string_append(s, sizep, ptrp, 2, US"]:",
string_sprintf("%d", sending_port))
- : string_cat(s, sizep, ptrp, "]", 1);
+ : string_cat(s, sizep, ptrp,
US
"]", 1);
}
return s;
}
}
return s;
}
@@
-763,7
+763,7
@@
return s;
-#if
def EXPERIMENTAL
_EVENT
+#if
ndef DISABLE
_EVENT
uschar *
event_raise(uschar * action, const uschar * event, uschar * ev_data)
{
uschar *
event_raise(uschar * action, const uschar * event, uschar * ev_data)
{
@@
-829,7
+829,7
@@
deliver_localpart = save_local;
deliver_domain = save_domain;
router_name = transport_name = NULL;
}
deliver_domain = save_domain;
router_name = transport_name = NULL;
}
-#endif /*
EXPERIMENTAL
_EVENT*/
+#endif /*
DISABLE
_EVENT*/
@@
-854,7
+854,7
@@
the log line, and reset the store afterwards. Remote deliveries should always
have a pointer to the host item that succeeded; local deliveries can have a
pointer to a single host item in their host list, for use by the transport. */
have a pointer to the host item that succeeded; local deliveries can have a
pointer to a single host item in their host list, for use by the transport. */
-#if
def EXPERIMENTAL
_EVENT
+#if
ndef DISABLE
_EVENT
/* presume no successful remote delivery */
lookup_dnssec_authenticated = NULL;
#endif
/* presume no successful remote delivery */
lookup_dnssec_authenticated = NULL;
#endif
@@
-872,7
+872,7
@@
else
if (LOGGING(sender_on_delivery) || msg)
s = string_append(s, &size, &ptr, 3, US" F=<",
if (LOGGING(sender_on_delivery) || msg)
s = string_append(s, &size, &ptr, 3, US" F=<",
-#ifdef
EXPERIMENTAL_INTERNATIONAL
+#ifdef
SUPPORT_I18N
testflag(addr, af_utf8_downcvt)
? string_address_utf8_to_alabel(sender_address, NULL)
:
testflag(addr, af_utf8_downcvt)
? string_address_utf8_to_alabel(sender_address, NULL)
:
@@
-928,7
+928,7
@@
else
if (continue_sequence > 1)
s = string_cat(s, &size, &ptr, US"*", 1);
if (continue_sequence > 1)
s = string_cat(s, &size, &ptr, US"*", 1);
-#if
def EXPERIMENTAL
_EVENT
+#if
ndef DISABLE
_EVENT
deliver_host_address = addr->host_used->address;
deliver_host_port = addr->host_used->port;
deliver_host = addr->host_used->name;
deliver_host_address = addr->host_used->address;
deliver_host_port = addr->host_used->port;
deliver_host = addr->host_used->name;
@@
-999,7
+999,7
@@
store we used to build the line after writing it. */
s[ptr] = 0;
log_write(0, flags, "%s", s);
s[ptr] = 0;
log_write(0, flags, "%s", s);
-#if
def EXPERIMENTAL
_EVENT
+#if
ndef DISABLE
_EVENT
if (!msg) msg_event_raise(US"msg:delivery", addr);
#endif
if (!msg) msg_event_raise(US"msg:delivery", addr);
#endif
@@
-1085,9
+1085,7
@@
if (addr->message)
)
&& ( Ustrstr(s, "mysql") != NULL
|| Ustrstr(s, "pgsql") != NULL
)
&& ( Ustrstr(s, "mysql") != NULL
|| Ustrstr(s, "pgsql") != NULL
-#ifdef EXPERIMENTAL_REDIS
|| Ustrstr(s, "redis") != NULL
|| Ustrstr(s, "redis") != NULL
-#endif
|| Ustrstr(s, "sqlite") != NULL
|| Ustrstr(s, "ldap:") != NULL
|| Ustrstr(s, "ldapdn:") != NULL
|| Ustrstr(s, "sqlite") != NULL
|| Ustrstr(s, "ldap:") != NULL
|| Ustrstr(s, "ldapdn:") != NULL
@@
-1439,7
+1437,7
@@
else
log_write(0, LOG_MAIN, "** %s", s);
log_write(0, LOG_MAIN, "** %s", s);
-#if
def EXPERIMENTAL
_EVENT
+#if
ndef DISABLE
_EVENT
msg_event_raise(US"msg:fail:delivery", addr);
#endif
msg_event_raise(US"msg:fail:delivery", addr);
#endif
@@
-5771,7
+5769,7
@@
if (process_recipients != RECIP_IGNORE)
recipient_item *r = recipients_list + i;
address_item *new = deliver_make_addr(r->address, FALSE);
new->prop.errors_address = r->errors_to;
recipient_item *r = recipients_list + i;
address_item *new = deliver_make_addr(r->address, FALSE);
new->prop.errors_address = r->errors_to;
-#ifdef
EXPERIMENTAL_INTERNATIONAL
+#ifdef
SUPPORT_I18N
if ((new->prop.utf8_msg = message_smtputf8))
{
new->prop.utf8_downcvt = message_utf8_downconvert == 1;
if ((new->prop.utf8_msg = message_smtputf8))
{
new->prop.utf8_downcvt = message_utf8_downconvert == 1;
@@
-5862,7
+5860,7
@@
if (process_recipients != RECIP_IGNORE)
break;
}
break;
}
-#if
def EXPERIMENTAL
_EVENT
+#if
ndef DISABLE
_EVENT
if (process_recipients != RECIP_ACCEPT)
{
uschar * save_local = deliver_localpart;
if (process_recipients != RECIP_ACCEPT)
{
uschar * save_local = deliver_localpart;
@@
-6842,16
+6840,13
@@
prevents actual delivery. */
else if (!dont_deliver)
retry_update(&addr_defer, &addr_failed, &addr_succeed);
else if (!dont_deliver)
retry_update(&addr_defer, &addr_failed, &addr_succeed);
-/* Send DSN for successful messages */
-addr_dsntmp = addr_succeed;
+/* Send DSN for successful messages if requested */
addr_senddsn = NULL;
addr_senddsn = NULL;
-
while(addr_dsntmp
)
+
for (addr_dsntmp = addr_succeed; addr_dsntmp; addr_dsntmp = addr_dsntmp->next
)
{
/* af_ignore_error not honored here. it's not an error */
{
/* af_ignore_error not honored here. it's not an error */
- DEBUG(D_deliver)
- {
- debug_printf("DSN: processing router : %s\n"
+ DEBUG(D_deliver) debug_printf("DSN: processing router : %s\n"
"DSN: processing successful delivery address: %s\n"
"DSN: Sender_address: %s\n"
"DSN: orcpt: %s flags: %d\n"
"DSN: processing successful delivery address: %s\n"
"DSN: Sender_address: %s\n"
"DSN: orcpt: %s flags: %d\n"
@@
-6866,7
+6861,6
@@
while(addr_dsntmp)
addr_dsntmp->address,
addr_dsntmp->dsn_aware
);
addr_dsntmp->address,
addr_dsntmp->dsn_aware
);
- }
/* send report if next hop not DSN aware or a router flagged "last DSN hop"
and a report was requested */
/* send report if next hop not DSN aware or a router flagged "last DSN hop"
and a report was requested */
@@
-6886,8
+6880,6
@@
while(addr_dsntmp)
}
else
DEBUG(D_deliver) debug_printf("DSN: not sending DSN success message\n");
}
else
DEBUG(D_deliver) debug_printf("DSN: not sending DSN success message\n");
-
- addr_dsntmp = addr_dsntmp->next;
}
if (addr_senddsn)
}
if (addr_senddsn)
@@
-6961,7
+6953,7
@@
if (addr_senddsn)
if (auth_xtextdecode(dsn_envid, &xdec_envid) > 0)
fprintf(f, "Original-Envelope-ID: %s\n", dsn_envid);
else
if (auth_xtextdecode(dsn_envid, &xdec_envid) > 0)
fprintf(f, "Original-Envelope-ID: %s\n", dsn_envid);
else
- fprintf(f, "X-Original-Envelope-ID: error decoding xtext formated ENVID\n");
+ fprintf(f, "X-Original-Envelope-ID: error decoding xtext format
t
ed ENVID\n");
}
fputc('\n', f);
}
fputc('\n', f);
@@
-7327,7
+7319,7
@@
wording. */
}
/* output machine readable part */
}
/* output machine readable part */
-#ifdef
EXPERIMENTAL_INTERNATIONAL
+#ifdef
SUPPORT_I18N
if (message_smtputf8)
fprintf(f, "--%s\n"
"Content-type: message/global-delivery-status\n\n"
if (message_smtputf8)
fprintf(f, "--%s\n"
"Content-type: message/global-delivery-status\n\n"
@@
-7347,7
+7339,7
@@
wording. */
if (auth_xtextdecode(dsn_envid, &xdec_envid) > 0)
fprintf(f, "Original-Envelope-ID: %s\n", dsn_envid);
else
if (auth_xtextdecode(dsn_envid, &xdec_envid) > 0)
fprintf(f, "Original-Envelope-ID: %s\n", dsn_envid);
else
- fprintf(f, "X-Original-Envelope-ID: error decoding xtext formated ENVID\n");
+ fprintf(f, "X-Original-Envelope-ID: error decoding xtext format
t
ed ENVID\n");
}
fputc('\n', f);
}
fputc('\n', f);
@@
-7409,6
+7401,9
@@
wording. */
if (dsn_ret == dsn_ret_hdrs)
topt |= topt_no_body;
else
if (dsn_ret == dsn_ret_hdrs)
topt |= topt_no_body;
else
+ {
+ struct stat statbuf;
+
/* no full body return at all? */
if (!bounce_return_body)
{
/* no full body return at all? */
if (!bounce_return_body)
{
@@
-7417,18
+7412,20
@@
wording. */
if (dsn_ret == dsn_ret_full)
dsnnotifyhdr = dsnlimitmsg;
}
if (dsn_ret == dsn_ret_full)
dsnnotifyhdr = dsnlimitmsg;
}
+ /* line length limited... return headers only if oversize */
/* size limited ... return headers only if limit reached */
/* size limited ... return headers only if limit reached */
- else if (bounce_return_size_limit > 0)
- {
- struct stat statbuf;
- if (fstat(deliver_datafile, &statbuf) == 0 && statbuf.st_size > max)
- {
- topt |= topt_no_body;
-
dsnnotifyhdr = dsnlimitmsg
;
- }
+ else if ( max_received_linelength > bounce_return_linesize_limit
+ || ( bounce_return_size_limit > 0
+ && fstat(deliver_datafile, &statbuf) == 0
+ && statbuf.st_size > max
+ ) )
+ {
+
topt |= topt_no_body
;
+ dsnnotifyhdr = dsnlimitmsg;
}
}
+ }
-#ifdef
EXPERIMENTAL_INTERNATIONAL
+#ifdef
SUPPORT_I18N
if (message_smtputf8)
fputs(topt & topt_no_body ? "Content-type: message/global-headers\n\n"
: "Content-type: message/global\n\n",
if (message_smtputf8)
fputs(topt & topt_no_body ? "Content-type: message/global-headers\n\n"
: "Content-type: message/global\n\n",
@@
-7564,7
+7561,7
@@
if (!addr_defer)
/* Unset deliver_freeze so that we won't try to move the spool files further down */
deliver_freeze = FALSE;
/* Unset deliver_freeze so that we won't try to move the spool files further down */
deliver_freeze = FALSE;
-#if
def EXPERIMENTAL
_EVENT
+#if
ndef DISABLE
_EVENT
(void) event_raise(event_action, US"msg:complete", NULL);
#endif
}
(void) event_raise(event_action, US"msg:complete", NULL);
#endif
}
@@
-7756,6
+7753,7
@@
else if (addr_defer != (address_item *)(+1))
FILE *wmf = NULL;
FILE *f = fdopen(fd, "wb");
uschar * bound;
FILE *wmf = NULL;
FILE *f = fdopen(fd, "wb");
uschar * bound;
+ int topt;
if (warn_message_file)
if (!(wmf = Ufopen(warn_message_file, "rb")))
if (warn_message_file)
if (!(wmf = Ufopen(warn_message_file, "rb")))
@@
-7874,7
+7872,7
@@
else if (addr_defer != (address_item *)(+1))
if (auth_xtextdecode(dsn_envid, &xdec_envid) > 0)
fprintf(f,"Original-Envelope-ID: %s\n", dsn_envid);
else
if (auth_xtextdecode(dsn_envid, &xdec_envid) > 0)
fprintf(f,"Original-Envelope-ID: %s\n", dsn_envid);
else
- fprintf(f,"X-Original-Envelope-ID: error decoding xtext formated ENVID\n");
+ fprintf(f,"X-Original-Envelope-ID: error decoding xtext format
t
ed ENVID\n");
}
fputc('\n', f);
}
fputc('\n', f);
@@
-7902,7
+7900,7
@@
else if (addr_defer != (address_item *)(+1))
fflush(f);
/* header only as required by RFC. only failure DSN needs to honor RET=FULL */
fflush(f);
/* header only as required by RFC. only failure DSN needs to honor RET=FULL */
-
int
topt = topt_add_return_path | topt_no_body;
+ topt = topt_add_return_path | topt_no_body;
transport_filter_argv = NULL; /* Just in case */
return_path = sender_address; /* In case not previously set */
/* Write the original email out */
transport_filter_argv = NULL; /* Just in case */
return_path = sender_address; /* In case not previously set */
/* Write the original email out */
@@
-8074,7
+8072,7
@@
if (!regex_PRDR) regex_PRDR =
regex_must_compile(US"\\n250[\\s\\-]PRDR(\\s|\\n|$)", FALSE, TRUE);
#endif
regex_must_compile(US"\\n250[\\s\\-]PRDR(\\s|\\n|$)", FALSE, TRUE);
#endif
-#ifdef
EXPERIMENTAL_INTERNATIONAL
+#ifdef
SUPPORT_I18N
if (!regex_UTF8) regex_UTF8 =
regex_must_compile(US"\\n250[\\s\\-]SMTPUTF8(\\s|\\n|$)", FALSE, TRUE);
#endif
if (!regex_UTF8) regex_UTF8 =
regex_must_compile(US"\\n250[\\s\\-]SMTPUTF8(\\s|\\n|$)", FALSE, TRUE);
#endif