mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-29 13:18:12 +00:00
postfix-2.6.11
This commit is contained in:
parent
ed7930b3a2
commit
4dee1483aa
@ -15482,3 +15482,48 @@ Apologies for any names omitted.
|
|||||||
reuse a server SASL handle after authentication failure.
|
reuse a server SASL handle after authentication failure.
|
||||||
Problem reported by Thomas Jarosch of Intra2net AG. File:
|
Problem reported by Thomas Jarosch of Intra2net AG. File:
|
||||||
smtpd/smtpd_proto.c.
|
smtpd/smtpd_proto.c.
|
||||||
|
|
||||||
|
20110418
|
||||||
|
|
||||||
|
Bugfix (introduced Postfix 2.3): the Milter client reported
|
||||||
|
some "file too large" errors as temporary errors. Problem
|
||||||
|
reported by Michael Tokarev. File: milter/milter8.c.
|
||||||
|
|
||||||
|
20110420
|
||||||
|
|
||||||
|
Performance: a high load of DSN success notification requests
|
||||||
|
could slow down the queue manager. Solution: make the trace
|
||||||
|
client asynchronous, just like the bounce and defer clients.
|
||||||
|
Problem reported by Eduardo M. Stelmaszczyk of terra.com.br.
|
||||||
|
Files: global/abounce.[hc], *qmgr/qmgr_active.c (the
|
||||||
|
qmgr_active.c files are identical).
|
||||||
|
|
||||||
|
20110426
|
||||||
|
|
||||||
|
Bugfix (introduced in Postfix 1.1): the local(8) delivery
|
||||||
|
agent ignored table lookup errors in mailbox_command_maps,
|
||||||
|
mailbox_transport_maps, and fallback_transport_maps. Problem
|
||||||
|
reported by William Ono. Files: local/command.c, local/mailbox.c,
|
||||||
|
local/unknown.c.
|
||||||
|
|
||||||
|
20110601
|
||||||
|
|
||||||
|
Cleanup: don't supply the "-o stress" command-line option
|
||||||
|
with a single-process service. File: master/master_ent.c.
|
||||||
|
|
||||||
|
Bugfix (introduced Postfix 2.6 with master_service_disable)
|
||||||
|
loop control error when parsing a malformed master.cf file.
|
||||||
|
Found by Coverity. File: master/master_ent.c.
|
||||||
|
|
||||||
|
20110614
|
||||||
|
|
||||||
|
Linux kernel version 3 support. Linus Torvalds has reset
|
||||||
|
the counters for reasons not related to changes in code.
|
||||||
|
Files: makedefs, util/sys_defs.h.
|
||||||
|
|
||||||
|
20110615
|
||||||
|
|
||||||
|
Workaround: some Spamhaus RHSBL rejects lookups with "No
|
||||||
|
IP queries" even if the name has an alphanumerical prefix.
|
||||||
|
We play safe, and skip RHSBL queries for names ending in a
|
||||||
|
numerical suffix. File: smtpd/smtpd_check.c.
|
||||||
|
@ -331,6 +331,33 @@ EOF
|
|||||||
rm -f makedefs.test makedefs.test.[co];;
|
rm -f makedefs.test makedefs.test.[co];;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
Linux.3*) SYSTYPE=LINUX3
|
||||||
|
if [ -f /usr/include/db.h ]
|
||||||
|
then
|
||||||
|
: we are all set
|
||||||
|
elif [ -f /usr/include/db/db.h ]
|
||||||
|
then
|
||||||
|
CCARGS="$CCARGS -I/usr/include/db"
|
||||||
|
else
|
||||||
|
# On a properly installed system, Postfix builds
|
||||||
|
# by including <db.h> and by linking with -ldb
|
||||||
|
echo "No <db.h> include file found." 1>&2
|
||||||
|
echo "Install the appropriate db*-devel package first." 1>&2
|
||||||
|
echo "See the RELEASE_NOTES file for more information." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
SYSLIBS="-ldb"
|
||||||
|
for name in nsl resolv
|
||||||
|
do
|
||||||
|
for lib in /usr/lib64 /lib64 /usr/lib /lib
|
||||||
|
do
|
||||||
|
test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
|
||||||
|
SYSLIBS="$SYSLIBS -l$name"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
done
|
||||||
|
done
|
||||||
|
;;
|
||||||
GNU.0*|GNU/kFreeBSD.[567]*)
|
GNU.0*|GNU/kFreeBSD.[567]*)
|
||||||
SYSTYPE=GNU0
|
SYSTYPE=GNU0
|
||||||
# Postfix no longer needs DB 1.85 compatibility
|
# Postfix no longer needs DB 1.85 compatibility
|
||||||
|
@ -305,7 +305,7 @@ esac
|
|||||||
|
|
||||||
install_root_prompt="the prefix for installed file names. Specify
|
install_root_prompt="the prefix for installed file names. Specify
|
||||||
this ONLY if you are building ready-to-install packages for
|
this ONLY if you are building ready-to-install packages for
|
||||||
distribution to other machines."
|
distribution to OTHER machines. See PACKAGE_README for instructions."
|
||||||
|
|
||||||
tempdir_prompt="a directory for scratch files while installing
|
tempdir_prompt="a directory for scratch files while installing
|
||||||
Postfix. You must have write permission in this directory."
|
Postfix. You must have write permission in this directory."
|
||||||
|
@ -67,9 +67,21 @@
|
|||||||
/* int dsn_ret;
|
/* int dsn_ret;
|
||||||
/* void (*callback)(int status, char *context);
|
/* void (*callback)(int status, char *context);
|
||||||
/* char *context;
|
/* char *context;
|
||||||
|
/*
|
||||||
|
/* void atrace_flush(flags, queue, id, encoding, sender,
|
||||||
|
/* dsn_envid, dsn_ret, callback, context)
|
||||||
|
/* int flags;
|
||||||
|
/* const char *queue;
|
||||||
|
/* const char *id;
|
||||||
|
/* const char *encoding;
|
||||||
|
/* const char *sender;
|
||||||
|
/* const char *dsn_envid;
|
||||||
|
/* int dsn_ret;
|
||||||
|
/* void (*callback)(int status, char *context);
|
||||||
|
/* char *context;
|
||||||
/* DESCRIPTION
|
/* DESCRIPTION
|
||||||
/* This module implements an asynchronous interface to the
|
/* This module implements an asynchronous interface to the
|
||||||
/* bounce/defer service for submitting sender notifications
|
/* bounce/defer/trace service for submitting sender notifications
|
||||||
/* without waiting for completion of the request.
|
/* without waiting for completion of the request.
|
||||||
/*
|
/*
|
||||||
/* abounce_flush() bounces the specified message to
|
/* abounce_flush() bounces the specified message to
|
||||||
@ -92,6 +104,10 @@
|
|||||||
/* the specified sender, including the defer log that was
|
/* the specified sender, including the defer log that was
|
||||||
/* built with defer_append().
|
/* built with defer_append().
|
||||||
/*
|
/*
|
||||||
|
/* atrace_flush() returns the specified message to the specified
|
||||||
|
/* sender, including the message delivery record log that was
|
||||||
|
/* built with vtrace_append().
|
||||||
|
/*
|
||||||
/* Arguments:
|
/* Arguments:
|
||||||
/* .IP flags
|
/* .IP flags
|
||||||
/* The bitwise OR of zero or more of the following (specify
|
/* The bitwise OR of zero or more of the following (specify
|
||||||
@ -359,3 +375,15 @@ void adefer_warn(int flags, const char *queue, const char *id,
|
|||||||
flags, queue, id, encoding, sender, dsn_envid, dsn_ret,
|
flags, queue, id, encoding, sender, dsn_envid, dsn_ret,
|
||||||
callback, context);
|
callback, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* atrace_flush - asynchronous trace flush */
|
||||||
|
|
||||||
|
void atrace_flush(int flags, const char *queue, const char *id,
|
||||||
|
const char *encoding, const char *sender,
|
||||||
|
const char *dsn_envid, int dsn_ret,
|
||||||
|
ABOUNCE_FN callback, char *context)
|
||||||
|
{
|
||||||
|
abounce_request(MAIL_CLASS_PRIVATE, var_trace_service, BOUNCE_CMD_TRACE,
|
||||||
|
flags, queue, id, encoding, sender, dsn_envid, dsn_ret,
|
||||||
|
callback, context);
|
||||||
|
}
|
||||||
|
@ -24,6 +24,7 @@ typedef void (*ABOUNCE_FN) (int, char *);
|
|||||||
extern void abounce_flush(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
|
extern void abounce_flush(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
|
||||||
extern void adefer_flush(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
|
extern void adefer_flush(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
|
||||||
extern void adefer_warn(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
|
extern void adefer_warn(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
|
||||||
|
extern void atrace_flush(int, const char *, const char *, const char *, const char *, const char *, int, ABOUNCE_FN, char *);
|
||||||
|
|
||||||
extern void abounce_flush_verp(int, const char *, const char *, const char *, const char *, const char *, int, const char *, ABOUNCE_FN, char *);
|
extern void abounce_flush_verp(int, const char *, const char *, const char *, const char *, const char *, int, const char *, ABOUNCE_FN, char *);
|
||||||
extern void adefer_flush_verp(int, const char *, const char *, const char *, const char *, const char *, int, const char *, ABOUNCE_FN, char *);
|
extern void adefer_flush_verp(int, const char *, const char *, const char *, const char *, const char *, int, const char *, ABOUNCE_FN, char *);
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20110509"
|
#define MAIL_RELEASE_DATE "20110707"
|
||||||
#define MAIL_VERSION_NUMBER "2.6.10"
|
#define MAIL_VERSION_NUMBER "2.6.11"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
|
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
|
||||||
|
@ -278,6 +278,7 @@ int deliver_mailbox(LOCAL_STATE state, USER_ATTR usr_attr, int *statusp)
|
|||||||
transp_maps = maps_create(VAR_MBOX_TRANSP_MAPS, var_mbox_transp_maps,
|
transp_maps = maps_create(VAR_MBOX_TRANSP_MAPS, var_mbox_transp_maps,
|
||||||
DICT_FLAG_LOCK | DICT_FLAG_NO_REGSUB);
|
DICT_FLAG_LOCK | DICT_FLAG_NO_REGSUB);
|
||||||
/* The -1 is a hint for the down-stream deliver_completed() function. */
|
/* The -1 is a hint for the down-stream deliver_completed() function. */
|
||||||
|
dict_errno = 0;
|
||||||
if (*var_mbox_transp_maps
|
if (*var_mbox_transp_maps
|
||||||
&& (map_transport = maps_find(transp_maps, state.msg_attr.user,
|
&& (map_transport = maps_find(transp_maps, state.msg_attr.user,
|
||||||
DICT_FLAG_NONE)) != 0) {
|
DICT_FLAG_NONE)) != 0) {
|
||||||
@ -285,6 +286,11 @@ int deliver_mailbox(LOCAL_STATE state, USER_ATTR usr_attr, int *statusp)
|
|||||||
*statusp = deliver_pass(MAIL_CLASS_PRIVATE, map_transport,
|
*statusp = deliver_pass(MAIL_CLASS_PRIVATE, map_transport,
|
||||||
state.request, &state.msg_attr.rcpt);
|
state.request, &state.msg_attr.rcpt);
|
||||||
return (YES);
|
return (YES);
|
||||||
|
} else if (dict_errno != 0) {
|
||||||
|
/* Details in the logfile. */
|
||||||
|
dsb_simple(state.msg_attr.why, "4.3.0", "table lookup failure");
|
||||||
|
*statusp = DEL_STAT_DEFER;
|
||||||
|
return (YES);
|
||||||
}
|
}
|
||||||
if (*var_mailbox_transport) {
|
if (*var_mailbox_transport) {
|
||||||
state.msg_attr.rcpt.offset = -1L;
|
state.msg_attr.rcpt.offset = -1L;
|
||||||
@ -319,10 +325,15 @@ int deliver_mailbox(LOCAL_STATE state, USER_ATTR usr_attr, int *statusp)
|
|||||||
cmd_maps = maps_create(VAR_MAILBOX_CMD_MAPS, var_mailbox_cmd_maps,
|
cmd_maps = maps_create(VAR_MAILBOX_CMD_MAPS, var_mailbox_cmd_maps,
|
||||||
DICT_FLAG_LOCK | DICT_FLAG_PARANOID);
|
DICT_FLAG_LOCK | DICT_FLAG_PARANOID);
|
||||||
|
|
||||||
|
dict_errno = 0;
|
||||||
if (*var_mailbox_cmd_maps
|
if (*var_mailbox_cmd_maps
|
||||||
&& (map_command = maps_find(cmd_maps, state.msg_attr.user,
|
&& (map_command = maps_find(cmd_maps, state.msg_attr.user,
|
||||||
DICT_FLAG_NONE)) != 0) {
|
DICT_FLAG_NONE)) != 0) {
|
||||||
status = deliver_command(state, usr_attr, map_command);
|
status = deliver_command(state, usr_attr, map_command);
|
||||||
|
} else if (dict_errno != 0) {
|
||||||
|
/* Details in the logfile. */
|
||||||
|
dsb_simple(state.msg_attr.why, "4.3.0", "table lookup failure");
|
||||||
|
status = DEL_STAT_DEFER;
|
||||||
} else if (*var_mailbox_command) {
|
} else if (*var_mailbox_command) {
|
||||||
status = deliver_command(state, usr_attr, var_mailbox_command);
|
status = deliver_command(state, usr_attr, var_mailbox_command);
|
||||||
} else if (*var_home_mailbox && LAST_CHAR(var_home_mailbox) == '/') {
|
} else if (*var_home_mailbox && LAST_CHAR(var_home_mailbox) == '/') {
|
||||||
|
@ -110,12 +110,17 @@ int deliver_unknown(LOCAL_STATE state, USER_ATTR usr_attr)
|
|||||||
transp_maps = maps_create(VAR_FBCK_TRANSP_MAPS, var_fbck_transp_maps,
|
transp_maps = maps_create(VAR_FBCK_TRANSP_MAPS, var_fbck_transp_maps,
|
||||||
DICT_FLAG_LOCK | DICT_FLAG_NO_REGSUB);
|
DICT_FLAG_LOCK | DICT_FLAG_NO_REGSUB);
|
||||||
/* The -1 is a hint for the down-stream deliver_completed() function. */
|
/* The -1 is a hint for the down-stream deliver_completed() function. */
|
||||||
|
dict_errno = 0;
|
||||||
if (*var_fbck_transp_maps
|
if (*var_fbck_transp_maps
|
||||||
&& (map_transport = maps_find(transp_maps, state.msg_attr.user,
|
&& (map_transport = maps_find(transp_maps, state.msg_attr.user,
|
||||||
DICT_FLAG_NONE)) != 0) {
|
DICT_FLAG_NONE)) != 0) {
|
||||||
state.msg_attr.rcpt.offset = -1L;
|
state.msg_attr.rcpt.offset = -1L;
|
||||||
return (deliver_pass(MAIL_CLASS_PRIVATE, map_transport,
|
return (deliver_pass(MAIL_CLASS_PRIVATE, map_transport,
|
||||||
state.request, &state.msg_attr.rcpt));
|
state.request, &state.msg_attr.rcpt));
|
||||||
|
} else if (dict_errno != 0) {
|
||||||
|
/* Details in the logfile. */
|
||||||
|
dsb_simple(state.msg_attr.why, "4.3.0", "table lookup failure");
|
||||||
|
return (DEL_STAT_DEFER);
|
||||||
}
|
}
|
||||||
if (*var_fallback_transport) {
|
if (*var_fallback_transport) {
|
||||||
state.msg_attr.rcpt.offset = -1L;
|
state.msg_attr.rcpt.offset = -1L;
|
||||||
|
@ -272,7 +272,7 @@ MASTER_SERV *get_master_ent()
|
|||||||
/*
|
/*
|
||||||
* Skip blank lines and comment lines.
|
* Skip blank lines and comment lines.
|
||||||
*/
|
*/
|
||||||
do {
|
for (;;) {
|
||||||
if (readlline(buf, master_fp, &master_line) == 0) {
|
if (readlline(buf, master_fp, &master_line) == 0) {
|
||||||
vstring_free(buf);
|
vstring_free(buf);
|
||||||
vstring_free(junk);
|
vstring_free(junk);
|
||||||
@ -284,7 +284,9 @@ MASTER_SERV *get_master_ent()
|
|||||||
name = cp;
|
name = cp;
|
||||||
transport = get_str_ent(&bufp, "transport type", (char *) 0);
|
transport = get_str_ent(&bufp, "transport type", (char *) 0);
|
||||||
vstring_sprintf(junk, "%s.%s", name, transport);
|
vstring_sprintf(junk, "%s.%s", name, transport);
|
||||||
} while (match_service_match(master_disable, vstring_str(junk)) != 0);
|
if (match_service_match(master_disable, vstring_str(junk)) == 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse one logical line from the configuration file. Initialize service
|
* Parse one logical line from the configuration file. Initialize service
|
||||||
@ -526,7 +528,7 @@ MASTER_SERV *get_master_ent()
|
|||||||
argv_add(serv->args, "-u", (char *) 0);
|
argv_add(serv->args, "-u", (char *) 0);
|
||||||
if (chroot)
|
if (chroot)
|
||||||
argv_add(serv->args, "-c", (char *) 0);
|
argv_add(serv->args, "-c", (char *) 0);
|
||||||
if ((serv->flags & MASTER_FLAG_LOCAL_ONLY) == 0) {
|
if ((serv->flags & MASTER_FLAG_LOCAL_ONLY) == 0 && serv->max_proc > 1) {
|
||||||
argv_add(serv->args, "-o", "stress=" CONFIG_BOOL_YES, (char *) 0);
|
argv_add(serv->args, "-o", "stress=" CONFIG_BOOL_YES, (char *) 0);
|
||||||
serv->stress_param_val =
|
serv->stress_param_val =
|
||||||
serv->args->argv[serv->args->argc - 1] + sizeof("stress=") - 1;
|
serv->args->argv[serv->args->argc - 1] + sizeof("stress=") - 1;
|
||||||
|
@ -2462,6 +2462,7 @@ static const char *milter8_message(MILTER *m, VSTREAM *qfile,
|
|||||||
int mime_errs = 0;
|
int mime_errs = 0;
|
||||||
MILTER_MSG_CONTEXT msg_ctx;
|
MILTER_MSG_CONTEXT msg_ctx;
|
||||||
VSTRING *buf;
|
VSTRING *buf;
|
||||||
|
int saved_errno;
|
||||||
|
|
||||||
switch (milter->state) {
|
switch (milter->state) {
|
||||||
case MILTER8_STAT_ERROR:
|
case MILTER8_STAT_ERROR:
|
||||||
@ -2475,8 +2476,12 @@ static const char *milter8_message(MILTER *m, VSTREAM *qfile,
|
|||||||
if (msg_verbose)
|
if (msg_verbose)
|
||||||
msg_info("%s: message to milter %s", myname, milter->m.name);
|
msg_info("%s: message to milter %s", myname, milter->m.name);
|
||||||
if (vstream_fseek(qfile, data_offset, SEEK_SET) < 0) {
|
if (vstream_fseek(qfile, data_offset, SEEK_SET) < 0) {
|
||||||
|
saved_errno = errno;
|
||||||
msg_warn("%s: vstream_fseek %s: %m", myname, VSTREAM_PATH(qfile));
|
msg_warn("%s: vstream_fseek %s: %m", myname, VSTREAM_PATH(qfile));
|
||||||
return ("450 4.3.0 Queue file write error");
|
/* XXX This should be available from cleanup_strerror.c. */
|
||||||
|
return (saved_errno == EFBIG ?
|
||||||
|
"552 5.3.4 Message file too big" :
|
||||||
|
"451 4.3.0 Queue file write error");
|
||||||
}
|
}
|
||||||
msg_ctx.milter = milter;
|
msg_ctx.milter = milter;
|
||||||
msg_ctx.eoh_macros = eoh_macros;
|
msg_ctx.eoh_macros = eoh_macros;
|
||||||
|
@ -116,6 +116,8 @@
|
|||||||
*/
|
*/
|
||||||
static void qmgr_active_done_2_bounce_flush(int, char *);
|
static void qmgr_active_done_2_bounce_flush(int, char *);
|
||||||
static void qmgr_active_done_2_generic(QMGR_MESSAGE *);
|
static void qmgr_active_done_2_generic(QMGR_MESSAGE *);
|
||||||
|
static void qmgr_active_done_25_trace_flush(int, char *);
|
||||||
|
static void qmgr_active_done_25_generic(QMGR_MESSAGE *);
|
||||||
static void qmgr_active_done_3_defer_flush(int, char *);
|
static void qmgr_active_done_3_defer_flush(int, char *);
|
||||||
static void qmgr_active_done_3_defer_warn(int, char *);
|
static void qmgr_active_done_3_defer_warn(int, char *);
|
||||||
static void qmgr_active_done_3_generic(QMGR_MESSAGE *);
|
static void qmgr_active_done_3_generic(QMGR_MESSAGE *);
|
||||||
@ -336,10 +338,8 @@ static void qmgr_active_done_2_bounce_flush(int status, char *context)
|
|||||||
|
|
||||||
static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
|
static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
|
||||||
{
|
{
|
||||||
const char *myname = "qmgr_active_done_2_generic";
|
|
||||||
const char *path;
|
const char *path;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int status;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A delivery agent marks a queue file as corrupt by changing its
|
* A delivery agent marks a queue file as corrupt by changing its
|
||||||
@ -372,10 +372,6 @@ static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* As a temporary implementation, synchronously inform the sender of
|
|
||||||
* trace information. This will block for 10 seconds when the qmgr FIFO
|
|
||||||
* is full.
|
|
||||||
*
|
|
||||||
* XXX With multi-recipient mail, some recipients may have NOTIFY=SUCCESS
|
* XXX With multi-recipient mail, some recipients may have NOTIFY=SUCCESS
|
||||||
* and others not. Depending on what subset of recipients are delivered,
|
* and others not. Depending on what subset of recipients are delivered,
|
||||||
* a trace file may or may not be created. Even when the last partial
|
* a trace file may or may not be created. Even when the last partial
|
||||||
@ -388,18 +384,45 @@ static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
|
|||||||
*/
|
*/
|
||||||
if ((message->tflags & (DEL_REQ_FLAG_USR_VRFY | DEL_REQ_FLAG_RECORD))
|
if ((message->tflags & (DEL_REQ_FLAG_USR_VRFY | DEL_REQ_FLAG_RECORD))
|
||||||
|| (message->rflags & QMGR_READ_FLAG_NOTIFY_SUCCESS)) {
|
|| (message->rflags & QMGR_READ_FLAG_NOTIFY_SUCCESS)) {
|
||||||
status = trace_flush(message->tflags,
|
atrace_flush(message->tflags,
|
||||||
message->queue_name,
|
message->queue_name,
|
||||||
message->queue_id,
|
message->queue_id,
|
||||||
message->encoding,
|
message->encoding,
|
||||||
message->sender,
|
message->sender,
|
||||||
message->dsn_envid,
|
message->dsn_envid,
|
||||||
message->dsn_ret);
|
message->dsn_ret,
|
||||||
if (status == 0 && message->tflags_offset)
|
qmgr_active_done_25_trace_flush,
|
||||||
qmgr_message_kill_record(message, message->tflags_offset);
|
(char *) message);
|
||||||
message->flags |= status;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Asynchronous processing does not reach this point.
|
||||||
|
*/
|
||||||
|
qmgr_active_done_25_generic(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* qmgr_active_done_25_trace_flush - continue after atrace_flush() completion */
|
||||||
|
|
||||||
|
static void qmgr_active_done_25_trace_flush(int status, char *context)
|
||||||
|
{
|
||||||
|
QMGR_MESSAGE *message = (QMGR_MESSAGE *) context;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Process atrace_flush() status and continue processing.
|
||||||
|
*/
|
||||||
|
if (status == 0 && message->tflags_offset)
|
||||||
|
qmgr_message_kill_record(message, message->tflags_offset);
|
||||||
|
message->flags |= status;
|
||||||
|
qmgr_active_done_25_generic(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* qmgr_active_done_25_generic - continue processing */
|
||||||
|
|
||||||
|
static void qmgr_active_done_25_generic(QMGR_MESSAGE *message)
|
||||||
|
{
|
||||||
|
const char *myname = "qmgr_active_done_25_generic";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we get to this point we have tried all recipients for this message.
|
* If we get to this point we have tried all recipients for this message.
|
||||||
* If the message is too old, try to bounce it.
|
* If the message is too old, try to bounce it.
|
||||||
|
@ -116,6 +116,8 @@
|
|||||||
*/
|
*/
|
||||||
static void qmgr_active_done_2_bounce_flush(int, char *);
|
static void qmgr_active_done_2_bounce_flush(int, char *);
|
||||||
static void qmgr_active_done_2_generic(QMGR_MESSAGE *);
|
static void qmgr_active_done_2_generic(QMGR_MESSAGE *);
|
||||||
|
static void qmgr_active_done_25_trace_flush(int, char *);
|
||||||
|
static void qmgr_active_done_25_generic(QMGR_MESSAGE *);
|
||||||
static void qmgr_active_done_3_defer_flush(int, char *);
|
static void qmgr_active_done_3_defer_flush(int, char *);
|
||||||
static void qmgr_active_done_3_defer_warn(int, char *);
|
static void qmgr_active_done_3_defer_warn(int, char *);
|
||||||
static void qmgr_active_done_3_generic(QMGR_MESSAGE *);
|
static void qmgr_active_done_3_generic(QMGR_MESSAGE *);
|
||||||
@ -336,10 +338,8 @@ static void qmgr_active_done_2_bounce_flush(int status, char *context)
|
|||||||
|
|
||||||
static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
|
static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
|
||||||
{
|
{
|
||||||
const char *myname = "qmgr_active_done_2_generic";
|
|
||||||
const char *path;
|
const char *path;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int status;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A delivery agent marks a queue file as corrupt by changing its
|
* A delivery agent marks a queue file as corrupt by changing its
|
||||||
@ -372,10 +372,6 @@ static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* As a temporary implementation, synchronously inform the sender of
|
|
||||||
* trace information. This will block for 10 seconds when the qmgr FIFO
|
|
||||||
* is full.
|
|
||||||
*
|
|
||||||
* XXX With multi-recipient mail, some recipients may have NOTIFY=SUCCESS
|
* XXX With multi-recipient mail, some recipients may have NOTIFY=SUCCESS
|
||||||
* and others not. Depending on what subset of recipients are delivered,
|
* and others not. Depending on what subset of recipients are delivered,
|
||||||
* a trace file may or may not be created. Even when the last partial
|
* a trace file may or may not be created. Even when the last partial
|
||||||
@ -388,18 +384,45 @@ static void qmgr_active_done_2_generic(QMGR_MESSAGE *message)
|
|||||||
*/
|
*/
|
||||||
if ((message->tflags & (DEL_REQ_FLAG_USR_VRFY | DEL_REQ_FLAG_RECORD))
|
if ((message->tflags & (DEL_REQ_FLAG_USR_VRFY | DEL_REQ_FLAG_RECORD))
|
||||||
|| (message->rflags & QMGR_READ_FLAG_NOTIFY_SUCCESS)) {
|
|| (message->rflags & QMGR_READ_FLAG_NOTIFY_SUCCESS)) {
|
||||||
status = trace_flush(message->tflags,
|
atrace_flush(message->tflags,
|
||||||
message->queue_name,
|
message->queue_name,
|
||||||
message->queue_id,
|
message->queue_id,
|
||||||
message->encoding,
|
message->encoding,
|
||||||
message->sender,
|
message->sender,
|
||||||
message->dsn_envid,
|
message->dsn_envid,
|
||||||
message->dsn_ret);
|
message->dsn_ret,
|
||||||
if (status == 0 && message->tflags_offset)
|
qmgr_active_done_25_trace_flush,
|
||||||
qmgr_message_kill_record(message, message->tflags_offset);
|
(char *) message);
|
||||||
message->flags |= status;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Asynchronous processing does not reach this point.
|
||||||
|
*/
|
||||||
|
qmgr_active_done_25_generic(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* qmgr_active_done_25_trace_flush - continue after atrace_flush() completion */
|
||||||
|
|
||||||
|
static void qmgr_active_done_25_trace_flush(int status, char *context)
|
||||||
|
{
|
||||||
|
QMGR_MESSAGE *message = (QMGR_MESSAGE *) context;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Process atrace_flush() status and continue processing.
|
||||||
|
*/
|
||||||
|
if (status == 0 && message->tflags_offset)
|
||||||
|
qmgr_message_kill_record(message, message->tflags_offset);
|
||||||
|
message->flags |= status;
|
||||||
|
qmgr_active_done_25_generic(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* qmgr_active_done_25_generic - continue processing */
|
||||||
|
|
||||||
|
static void qmgr_active_done_25_generic(QMGR_MESSAGE *message)
|
||||||
|
{
|
||||||
|
const char *myname = "qmgr_active_done_25_generic";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we get to this point we have tried all recipients for this message.
|
* If we get to this point we have tried all recipients for this message.
|
||||||
* If the message is too old, try to bounce it.
|
* If the message is too old, try to bounce it.
|
||||||
|
@ -3218,6 +3218,7 @@ static int reject_rbl_domain(SMTPD_STATE *state, const char *rbl_domain,
|
|||||||
SMTPD_RBL_STATE *rbl;
|
SMTPD_RBL_STATE *rbl;
|
||||||
const char *domain;
|
const char *domain;
|
||||||
const char *reply_addr;
|
const char *reply_addr;
|
||||||
|
const char *suffix;
|
||||||
|
|
||||||
if (msg_verbose)
|
if (msg_verbose)
|
||||||
msg_info("%s: %s %s", myname, reply_class, what);
|
msg_info("%s: %s %s", myname, reply_class, what);
|
||||||
@ -3232,7 +3233,16 @@ static int reject_rbl_domain(SMTPD_STATE *state, const char *rbl_domain,
|
|||||||
return (SMTPD_CHECK_DUNNO);
|
return (SMTPD_CHECK_DUNNO);
|
||||||
} else
|
} else
|
||||||
domain = what;
|
domain = what;
|
||||||
if (domain[0] == 0)
|
|
||||||
|
/*
|
||||||
|
* XXX Some Spamhaus RHSBL rejects lookups with "No IP queries" even if
|
||||||
|
* the name has an alphanumerical prefix. We play safe, and skip RHSBL
|
||||||
|
* queries for names ending in a numerical suffix.
|
||||||
|
*/
|
||||||
|
if (domain[0] == 0 || valid_hostname(domain, DONT_GRIPE) == 0)
|
||||||
|
return (SMTPD_CHECK_DUNNO);
|
||||||
|
suffix = strrchr(domain, '.');
|
||||||
|
if (alldig(suffix == 0 ? domain : suffix + 1))
|
||||||
return (SMTPD_CHECK_DUNNO);
|
return (SMTPD_CHECK_DUNNO);
|
||||||
|
|
||||||
query = vstring_alloc(100);
|
query = vstring_alloc(100);
|
||||||
@ -3755,8 +3765,7 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
|
|||||||
name);
|
name);
|
||||||
else {
|
else {
|
||||||
cpp += 1;
|
cpp += 1;
|
||||||
if (state->helo_name
|
if (state->helo_name)
|
||||||
&& valid_hostname(state->helo_name, DONT_GRIPE))
|
|
||||||
status = reject_rbl_domain(state, *cpp, state->helo_name,
|
status = reject_rbl_domain(state, *cpp, state->helo_name,
|
||||||
SMTPD_NAME_HELO);
|
SMTPD_NAME_HELO);
|
||||||
}
|
}
|
||||||
|
@ -703,7 +703,7 @@ extern int initgroups(const char *, int);
|
|||||||
/*
|
/*
|
||||||
* LINUX.
|
* LINUX.
|
||||||
*/
|
*/
|
||||||
#ifdef LINUX2
|
#if defined(LINUX2) || defined(LINUX3)
|
||||||
#define SUPPORTED
|
#define SUPPORTED
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#define UINT32_TYPE unsigned int
|
#define UINT32_TYPE unsigned int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user