From: Wietse Venema Date: Wed, 16 May 2007 05:00:00 +0000 (-0500) Subject: postfix-2.5-20070516 X-Git-Tag: v2.5.0-RC1~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19df5766273acb71e4ec4040716e5b19392ad204;p=thirdparty%2Fpostfix.git postfix-2.5-20070516 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index acd7273b6..64187a232 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -9281,7 +9281,7 @@ Apologies for any names omitted. conf/mumble_table files removed, new commands added to conf/postfix-script. - Cleanups: function declared in but used as void, missing + Cleanups: function declared int but used as void, missing include file, missing const qualifier, unused variable. Matthias Andree. Files: bounce/bounce_notify_util.c, bounce/bounce_service.h, postlog/postlog.c, smtpd/smtpd_check.c, @@ -13543,12 +13543,10 @@ Apologies for any names omitted. build on a 2.6 kernel. And that two weeks after the workaround had been posted to the mailing list. File: makedefs. - Workaround: local(8) nixed the recipient file offset for - delegated transports. This broke delegation via - mailbox_transport(_maps) and fallback_transport(_maps) to - the error(8) transport. Unfortunately it is not possible - to nix the file offset for local(8) only. Files: - local/mailbox.c, local/unknown.c. + Bugfix: mailbox_transport(_maps) and fallback_transport(_maps) + were broken when used with the error(8) or discard(8) + transports. Cause: insufficient documentation. Files: + error/error.c, discard/discard.c. Wish list: diff --git a/postfix/html/error.8.html b/postfix/html/error.8.html index d66f9ead4..c14495dc2 100644 --- a/postfix/html/error.8.html +++ b/postfix/html/error.8.html @@ -17,8 +17,8 @@ ERROR(8) ERROR(8) requests from the queue manager. Each request specifies a queue file, a sender address, the reason for non-delivery (specified as the next-hop destination), and recipient - information. The reason may be prefixed with an RFC - 3463-compatible detail code. This program expects to be + information. The reason may be prefixed with an RFC + 3463-compatible detail code. This program expects to be run from the master(8) process manager. Depending on the service name in master.cf, error or diff --git a/postfix/src/discard/discard.c b/postfix/src/discard/discard.c index 17bdeceee..c0e5e6deb 100644 --- a/postfix/src/discard/discard.c +++ b/postfix/src/discard/discard.c @@ -174,13 +174,11 @@ static int deliver_message(DELIVER_REQUEST *request) (void) DSN_SIMPLE(&dsn, DSN_STATUS(dp.dsn), dp.text); for (nrcpt = 0; nrcpt < request->rcpt_list.len; nrcpt++) { rcpt = request->rcpt_list.info + nrcpt; - if (rcpt->offset >= 0) { - status = sent(BOUNCE_FLAGS(request), request->queue_id, - &request->msg_stats, rcpt, "none", &dsn); - if (status == 0 && (request->flags & DEL_REQ_FLAG_SUCCESS)) - deliver_completed(src, rcpt->offset); - result |= status; - } + status = sent(BOUNCE_FLAGS(request), request->queue_id, + &request->msg_stats, rcpt, "none", &dsn); + if (status == 0 && (request->flags & DEL_REQ_FLAG_SUCCESS)) + deliver_completed(src, rcpt->offset); + result |= status; } /* diff --git a/postfix/src/error/error.c b/postfix/src/error/error.c index 019900b2b..73777cd10 100644 --- a/postfix/src/error/error.c +++ b/postfix/src/error/error.c @@ -181,13 +181,11 @@ static int deliver_message(DELIVER_REQUEST *request, const char *def_dsn, (void) DSN_SIMPLE(&dsn, DSN_STATUS(dp.dsn), dp.text); for (nrcpt = 0; nrcpt < request->rcpt_list.len; nrcpt++) { rcpt = request->rcpt_list.info + nrcpt; - if (rcpt->offset >= 0) { - status = append(BOUNCE_FLAGS(request), request->queue_id, - &request->msg_stats, rcpt, "none", &dsn); - if (status == 0) - deliver_completed(src, rcpt->offset); - result |= status; - } + status = append(BOUNCE_FLAGS(request), request->queue_id, + &request->msg_stats, rcpt, "none", &dsn); + if (status == 0) + deliver_completed(src, rcpt->offset); + result |= status; } /* diff --git a/postfix/src/global/abounce.c b/postfix/src/global/abounce.c index f7d2dcad3..8c3169426 100644 --- a/postfix/src/global/abounce.c +++ b/postfix/src/global/abounce.c @@ -100,6 +100,12 @@ /* .IP BOUNCE_FLAG_CLEAN /* Delete the bounce log in case of an error (as in: pretend /* that we never even tried to bounce this message). +/* .IP BOUNCE_FLAG_DELRCPT +/* When specified with a flush operation, request that +/* recipients be deleted from the queue file. +/* +/* Note: the bounce daemon ignores this request when the +/* recipient queue file offset is <= 0. /* .IP BOUNCE_FLAG_COPY /* Request that a postmaster copy is sent. /* .RE diff --git a/postfix/src/global/bounce.c b/postfix/src/global/bounce.c index 31c696205..d260be766 100644 --- a/postfix/src/global/bounce.c +++ b/postfix/src/global/bounce.c @@ -83,6 +83,12 @@ /* .IP BOUNCE_FLAG_CLEAN /* Delete the bounce log in case of an error (as in: pretend /* that we never even tried to bounce this message). +/* .IP BOUNCE_FLAG_DELRCPT +/* When specified with a flush request, request that +/* recipients be deleted from the queue file. +/* +/* Note: the bounce daemon ignores this request when the +/* recipient queue file offset is <= 0. /* .IP DEL_REQ_FLAG_MTA_VRFY /* The message is an MTA-requested address verification probe. /* Update the address verification database instead of bouncing diff --git a/postfix/src/global/defer.c b/postfix/src/global/defer.c index d98bf6f33..a2b44a3e4 100644 --- a/postfix/src/global/defer.c +++ b/postfix/src/global/defer.c @@ -64,6 +64,12 @@ /* .IP BOUNCE_FLAG_CLEAN /* Delete the defer log in case of an error (as in: pretend /* that we never even tried to defer this message). +/* .IP BOUNCE_FLAG_DELRCPT +/* When specified with a flush request, request that +/* recipients be deleted from the queue file. +/* +/* Note: the bounce daemon ignores this request when the +/* recipient queue file offset is <= 0. /* .IP DEL_REQ_FLAG_MTA_VRFY /* The message is an MTA-requested address verification probe. /* Update the address verification database instead of deferring diff --git a/postfix/src/global/deliver_request.c b/postfix/src/global/deliver_request.c index d9ccc0c22..17be6541e 100644 --- a/postfix/src/global/deliver_request.c +++ b/postfix/src/global/deliver_request.c @@ -54,9 +54,15 @@ /* of the following: /* .IP \fBDEL_REQ_FLAG_SUCCESS\fR /* Delete successful recipients from the queue file. +/* +/* Note: currently, this also controls whether bounced recipients +/* are deleted. +/* +/* Note: the deliver_completed() function ignores this request +/* when the recipient queue file offset is -1. /* .IP \fBDEL_REQ_FLAG_BOUNCE\fR /* Delete bounced recipients from the queue file. Currently, -/* this flag is considered to be "always on". +/* this flag is non-functional. /* .PP /* The \fBDEL_REQ_FLAG_DEFLT\fR constant provides a convenient shorthand /* for the most common case: delete successful and bounced recipients. diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 6560b7a15..9cf7727a8 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20070515" +#define MAIL_RELEASE_DATE "20070516" #define MAIL_VERSION_NUMBER "2.5" #ifdef SNAPSHOT diff --git a/postfix/src/local/mailbox.c b/postfix/src/local/mailbox.c index 900075b02..92bd79d67 100644 --- a/postfix/src/local/mailbox.c +++ b/postfix/src/local/mailbox.c @@ -271,14 +271,17 @@ int deliver_mailbox(LOCAL_STATE state, USER_ATTR usr_attr, int *statusp) if (*var_mbox_transp_maps && transp_maps == 0) transp_maps = maps_create(VAR_MBOX_TRANSP_MAPS, var_mbox_transp_maps, DICT_FLAG_LOCK | DICT_FLAG_NO_REGSUB); + /* The -1 is a hint for the down-stream deliver_completed() function. */ if (*var_mbox_transp_maps && (map_transport = maps_find(transp_maps, state.msg_attr.user, DICT_FLAG_NONE)) != 0) { + state.msg_attr.rcpt.offset = -1L; *statusp = deliver_pass(MAIL_CLASS_PRIVATE, map_transport, state.request, &state.msg_attr.rcpt); return (YES); } if (*var_mailbox_transport) { + state.msg_attr.rcpt.offset = -1L; *statusp = deliver_pass(MAIL_CLASS_PRIVATE, var_mailbox_transport, state.request, &state.msg_attr.rcpt); return (YES); diff --git a/postfix/src/local/unknown.c b/postfix/src/local/unknown.c index 8ae8f0b12..068f9eed2 100644 --- a/postfix/src/local/unknown.c +++ b/postfix/src/local/unknown.c @@ -109,13 +109,16 @@ int deliver_unknown(LOCAL_STATE state, USER_ATTR usr_attr) if (*var_fbck_transp_maps && transp_maps == 0) transp_maps = maps_create(VAR_FBCK_TRANSP_MAPS, var_fbck_transp_maps, DICT_FLAG_LOCK | DICT_FLAG_NO_REGSUB); + /* The -1 is a hint for the down-stream deliver_completed() function. */ if (*var_fbck_transp_maps && (map_transport = maps_find(transp_maps, state.msg_attr.user, DICT_FLAG_NONE)) != 0) { + state.msg_attr.rcpt.offset = -1L; return (deliver_pass(MAIL_CLASS_PRIVATE, map_transport, state.request, &state.msg_attr.rcpt)); } if (*var_fallback_transport) { + state.msg_attr.rcpt.offset = -1L; return (deliver_pass(MAIL_CLASS_PRIVATE, var_fallback_transport, state.request, &state.msg_attr.rcpt)); }