diff --git a/postfix/HISTORY b/postfix/HISTORY index 435f5c65a..b914324e7 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -19039,7 +19039,7 @@ Apologies for any names omitted. Security violation: by default, LMDB 0.9.9 writes uninitialized heap memory to a world-readable database file, as chunks - of up to 4096 bytes. This is a gross memory disclosure + of up to 4096 bytes. This is a huge memory disclosure vulnerability: memory content that a program does not intend to share ends up in a world-readable file. The content of uninitialized heap memory depends on program execution @@ -19068,3 +19068,8 @@ Apologies for any names omitted. This was primarily an issue with non-HTML output, but it does not hurt to do this also for HTML. Files: proto/Makefile.in, proto/MULTI_INSTANCE_README.html. + +20121104 + + Feature: ${queue_id} macro support for the pipe(8) delivery + agent by Andreas Schulze. File: pipe/pipe.c. diff --git a/postfix/html/pipe.8.html b/postfix/html/pipe.8.html index afe2b5a2e..9705d00e5 100644 --- a/postfix/html/pipe.8.html +++ b/postfix/html/pipe.8.html @@ -223,37 +223,37 @@ PIPE(8) PIPE(8) and $(name) are also recognized. Specify $$ where a single $ is wanted. - ${client_address} + ${client_address} This macro expands to the remote client net- work address. This feature is available as of Postfix 2.2. - ${client_helo} + ${client_helo} This macro expands to the remote client HELO command parameter. This feature is available as of Postfix 2.2. - ${client_hostname} + ${client_hostname} This macro expands to the remote client hostname. This feature is available as of Postfix 2.2. - ${client_port} + ${client_port} This macro expands to the remote client TCP port number. This feature is available as of Postfix 2.5. - ${client_protocol} + ${client_protocol} This macro expands to the remote client pro- tocol. This feature is available as of Postfix 2.2. - ${domain} + ${domain} This macro expands to the domain portion of the recipient address. For example, with an address user+foo@domain the domain is @@ -264,45 +264,45 @@ PIPE(8) PIPE(8) This feature is available as of Postfix 2.5. - ${extension} + ${extension} This macro expands to the extension part of a recipient address. For example, with an address user+foo@domain the extension is foo. A command-line argument that contains - ${extension} expands into as many command- + ${extension} expands into as many command- line arguments as there are recipients. This information is modified by the u flag for case folding. - ${mailbox} + ${mailbox} This macro expands to the complete local part of a recipient address. For example, with an address user+foo@domain the mailbox is user+foo. A command-line argument that contains - ${mailbox} expands to as many command-line + ${mailbox} expands to as many command-line arguments as there are recipients. This information is modified by the u flag for case folding. - ${nexthop} + ${nexthop} This macro expands to the next-hop hostname. This information is modified by the h flag for case folding. - ${original_recipient} + ${original_recipient} This macro expands to the complete recipient address before any address rewriting or aliasing. A command-line argument that contains - ${original_recipient} expands to as many + ${original_recipient} expands to as many command-line arguments as there are recipi- ents. @@ -311,143 +311,149 @@ PIPE(8) PIPE(8) This feature is available as of Postfix 2.5. - ${recipient} + ${queue_id} + This macro expands to the queue id. + + This feature is available as of Postfix + 2.11. + + ${recipient} This macro expands to the complete recipient address. - A command-line argument that contains - ${recipient} expands to as many command-line + A command-line argument that contains + ${recipient} expands to as many command-line arguments as there are recipients. - This information is modified by the hqu + This information is modified by the hqu flags for quoting and case folding. - ${sasl_method} - This macro expands to the name of the SASL + ${sasl_method} + This macro expands to the name of the SASL authentication mechanism in the AUTH command - when the Postfix SMTP server received the + when the Postfix SMTP server received the message. This feature is available as of Postfix 2.2. - ${sasl_sender} - This macro expands to the SASL sender name - (i.e. the original submitter as per RFC - 4954) in the MAIL FROM command when the + ${sasl_sender} + This macro expands to the SASL sender name + (i.e. the original submitter as per RFC + 4954) in the MAIL FROM command when the Postfix SMTP server received the message. This feature is available as of Postfix 2.2. - ${sasl_username} - This macro expands to the SASL user name in + ${sasl_username} + This macro expands to the SASL user name in the AUTH command when the Postfix SMTP server received the message. This feature is available as of Postfix 2.2. - ${sender} - This macro expands to the envelope sender + ${sender} + This macro expands to the envelope sender address. By default, the null sender address - expands to MAILER-DAEMON; this can be - changed with the null_sender attribute, as + expands to MAILER-DAEMON; this can be + changed with the null_sender attribute, as described above. - This information is modified by the q flag + This information is modified by the q flag for quoting. - ${size} - This macro expands to Postfix's idea of the - message size, which is an approximation of + ${size} + This macro expands to Postfix's idea of the + message size, which is an approximation of the size of the message as delivered. - ${user} + ${user} This macro expands to the username part of a - recipient address. For example, with an + recipient address. For example, with an address user+foo@domain the username part is user. - A command-line argument that contains - ${user} expands into as many command-line + A command-line argument that contains + ${user} expands into as many command-line arguments as there are recipients. - This information is modified by the u flag + This information is modified by the u flag for case folding. STANDARDS RFC 3463 (Enhanced status codes) DIAGNOSTICS - Command exit status codes are expected to follow the con- - ventions defined in <sysexits.h>. Exit status 0 means + Command exit status codes are expected to follow the con- + ventions defined in <sysexits.h>. Exit status 0 means normal successful completion. In the case of a non-zero exit status, a limited amount of command output is reported in an delivery status notifica- - tion. When the output begins with a 4.X.X or 5.X.X - enhanced status code, the status code takes precedence - over the non-zero exit status (Postfix version 2.3 and + tion. When the output begins with a 4.X.X or 5.X.X + enhanced status code, the status code takes precedence + over the non-zero exit status (Postfix version 2.3 and later). - Problems and transactions are logged to syslogd(8). Cor- - rupted message files are marked so that the queue manager + Problems and transactions are logged to syslogd(8). Cor- + rupted message files are marked so that the queue manager can move them to the corrupt queue for further inspection. SECURITY - This program needs a dual personality 1) to access the - private Postfix queue and IPC mechanisms, and 2) to exe- + This program needs a dual personality 1) to access the + private Postfix queue and IPC mechanisms, and 2) to exe- cute external commands as the specified user. It is there- fore security sensitive. CONFIGURATION PARAMETERS - Changes to main.cf are picked up automatically as pipe(8) - processes run for only a limited amount of time. Use the + Changes to main.cf are picked up automatically as pipe(8) + processes run for only a limited amount of time. Use the command "postfix reload" to speed up a change. - The text below provides only a parameter summary. See + The text below provides only a parameter summary. See postconf(5) for more details including examples. RESOURCE AND RATE CONTROLS - In the text below, transport is the first field in a mas- - ter.cf entry. + In the text below, transport is the first field in a mas- + ter.cf entry. transport_destination_concurrency_limit ($default_destina- tion_concurrency_limit) Limit the number of parallel deliveries to the same - destination, for delivery via the named transport. + destination, for delivery via the named transport. The limit is enforced by the Postfix queue manager. transport_destination_recipient_limit ($default_destina- tion_recipient_limit) - Limit the number of recipients per message deliv- - ery, for delivery via the named transport. The + Limit the number of recipients per message deliv- + ery, for delivery via the named transport. The limit is enforced by the Postfix queue manager. transport_time_limit ($command_time_limit) - Limit the time for delivery to external command, + Limit the time for delivery to external command, for delivery via the named transport. The limit is enforced by the pipe delivery agent. - Postfix 2.4 and later support a suffix that speci- - fies the time unit: s (seconds), m (minutes), h + Postfix 2.4 and later support a suffix that speci- + fies the time unit: s (seconds), m (minutes), h (hours), d (days), w (weeks). The default time unit is seconds. MISCELLANEOUS CONTROLS config_directory (see 'postconf -d' output) - The default location of the Postfix main.cf and + The default location of the Postfix main.cf and master.cf configuration files. daemon_timeout (18000s) - How much time a Postfix daemon process may take to - handle a request before it is terminated by a + How much time a Postfix daemon process may take to + handle a request before it is terminated by a built-in watchdog timer. delay_logging_resolution_limit (2) - The maximal number of digits after the decimal + The maximal number of digits after the decimal point when logging sub-second delay values. export_environment (see 'postconf -d' output) - The list of environment variables that a Postfix + The list of environment variables that a Postfix process will export to non-Postfix processes. ipc_timeout (3600s) @@ -459,25 +465,25 @@ PIPE(8) PIPE(8) and most Postfix daemon processes. max_idle (100s) - The maximum amount of time that an idle Postfix - daemon process waits for an incoming connection + The maximum amount of time that an idle Postfix + daemon process waits for an incoming connection before terminating voluntarily. max_use (100) - The maximal number of incoming connections that a - Postfix daemon process will service before termi- + The maximal number of incoming connections that a + Postfix daemon process will service before termi- nating voluntarily. process_id (read-only) - The process ID of a Postfix command or daemon + The process ID of a Postfix command or daemon process. process_name (read-only) - The process name of a Postfix command or daemon + The process name of a Postfix command or daemon process. queue_directory (see 'postconf -d' output) - The location of the Postfix top-level queue direc- + The location of the Postfix top-level queue direc- tory. recipient_delimiter (empty) @@ -488,8 +494,8 @@ PIPE(8) PIPE(8) The syslog facility of Postfix logging. syslog_name (see 'postconf -d' output) - The mail system name that is prepended to the - process name in syslog records, so that "smtpd" + The mail system name that is prepended to the + process name in syslog records, so that "smtpd" becomes, for example, "postfix/smtpd". SEE ALSO @@ -501,7 +507,7 @@ PIPE(8) PIPE(8) syslogd(8), system logging LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) diff --git a/postfix/man/man8/pipe.8 b/postfix/man/man8/pipe.8 index a24a5ee48..dc594a814 100644 --- a/postfix/man/man8/pipe.8 +++ b/postfix/man/man8/pipe.8 @@ -207,27 +207,27 @@ In addition to the form ${\fIname\fR}, the forms $\fIname\fR and $(\fIname\fR) are also recognized. Specify \fB$$\fR where a single \fB$\fR is wanted. .RS -.IP \fB${\fBclient_address\fR}\fR +.IP \fB${client_address}\fR This macro expands to the remote client network address. .sp This feature is available as of Postfix 2.2. -.IP \fB${\fBclient_helo\fR}\fR +.IP \fB${client_helo}\fR This macro expands to the remote client HELO command parameter. .sp This feature is available as of Postfix 2.2. -.IP \fB${\fBclient_hostname\fR}\fR +.IP \fB${client_hostname}\fR This macro expands to the remote client hostname. .sp This feature is available as of Postfix 2.2. -.IP \fB${\fBclient_port\fR}\fR +.IP \fB${client_port}\fR This macro expands to the remote client TCP port number. .sp This feature is available as of Postfix 2.5. -.IP \fB${\fBclient_protocol\fR}\fR +.IP \fB${client_protocol}\fR This macro expands to the remote client protocol. .sp This feature is available as of Postfix 2.2. -.IP \fB${\fBdomain\fR}\fR +.IP \fB${domain}\fR This macro expands to the domain portion of the recipient address. For example, with an address \fIuser+foo@domain\fR the domain is \fIdomain\fR. @@ -235,81 +235,85 @@ the domain is \fIdomain\fR. This information is modified by the \fBh\fR flag for case folding. .sp This feature is available as of Postfix 2.5. -.IP \fB${\fBextension\fR}\fR +.IP \fB${extension}\fR This macro expands to the extension part of a recipient address. For example, with an address \fIuser+foo@domain\fR the extension is \fIfoo\fR. .sp -A command-line argument that contains \fB${\fBextension\fR}\fR expands +A command-line argument that contains \fB${extension}\fR expands into as many command-line arguments as there are recipients. .sp This information is modified by the \fBu\fR flag for case folding. -.IP \fB${\fBmailbox\fR}\fR +.IP \fB${mailbox}\fR This macro expands to the complete local part of a recipient address. For example, with an address \fIuser+foo@domain\fR the mailbox is \fIuser+foo\fR. .sp -A command-line argument that contains \fB${\fBmailbox\fR}\fR +A command-line argument that contains \fB${mailbox}\fR expands to as many command-line arguments as there are recipients. .sp This information is modified by the \fBu\fR flag for case folding. -.IP \fB${\fBnexthop\fR}\fR +.IP \fB${nexthop}\fR This macro expands to the next-hop hostname. .sp This information is modified by the \fBh\fR flag for case folding. -.IP \fB${\fBoriginal_recipient\fR}\fR +.IP \fB${original_recipient}\fR This macro expands to the complete recipient address before any address rewriting or aliasing. .sp A command-line argument that contains -\fB${\fBoriginal_recipient\fR}\fR expands to as many +\fB${original_recipient}\fR expands to as many command-line arguments as there are recipients. .sp This information is modified by the \fBhqu\fR flags for quoting and case folding. .sp This feature is available as of Postfix 2.5. -.IP \fB${\fBrecipient\fR}\fR +.IP \fB${queue_id}\fR +This macro expands to the queue id. +.sp +This feature is available as of Postfix 2.11. +.IP \fB${recipient}\fR This macro expands to the complete recipient address. .sp -A command-line argument that contains \fB${\fBrecipient\fR}\fR +A command-line argument that contains \fB${recipient}\fR expands to as many command-line arguments as there are recipients. .sp This information is modified by the \fBhqu\fR flags for quoting and case folding. -.IP \fB${\fBsasl_method\fR}\fR +.IP \fB${sasl_method}\fR This macro expands to the name of the SASL authentication mechanism in the AUTH command when the Postfix SMTP server received the message. .sp This feature is available as of Postfix 2.2. -.IP \fB${\fBsasl_sender\fR}\fR +.IP \fB${sasl_sender}\fR This macro expands to the SASL sender name (i.e. the original submitter as per RFC 4954) in the MAIL FROM command when the Postfix SMTP server received the message. .sp This feature is available as of Postfix 2.2. -.IP \fB${\fBsasl_username\fR}\fR +.IP \fB${sasl_username}\fR This macro expands to the SASL user name in the AUTH command when the Postfix SMTP server received the message. .sp This feature is available as of Postfix 2.2. -.IP \fB${\fBsender\fR}\fR +.IP \fB${sender}\fR This macro expands to the envelope sender address. By default, the null sender address expands to MAILER-DAEMON; this can be changed with the \fBnull_sender\fR attribute, as described above. .sp This information is modified by the \fBq\fR flag for quoting. -.IP \fB${\fBsize\fR}\fR +.IP \fB${size}\fR This macro expands to Postfix's idea of the message size, which is an approximation of the size of the message as delivered. -.IP \fB${\fBuser\fR}\fR +.IP \fB${user}\fR This macro expands to the username part of a recipient address. For example, with an address \fIuser+foo@domain\fR the username part is \fIuser\fR. .sp -A command-line argument that contains \fB${\fBuser\fR}\fR expands +A command-line argument that contains \fB${user}\fR expands into as many command-line arguments as there are recipients. .sp This information is modified by the \fBu\fR flag for case folding. diff --git a/postfix/mantools/postlink b/postfix/mantools/postlink index 75083a73c..233a9828f 100755 --- a/postfix/mantools/postlink +++ b/postfix/mantools/postlink @@ -830,7 +830,7 @@ while (<>) { s/[]*header_checks[<\/bB>]*\(5\)/$&<\/a>/g; s/[]*main\.cf[<\/bB>]*/$&<\/a>/g; - s/[]*master\.cf[<\/bB>]*/$&<\/a>/g; + s/[]*mas[-<\/bB>]*\n* *[]*ter\.cf[<\/bB>]*/$&<\/a>/g; # Hyperlink README document names diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index d4dbebdc1..af0c64ee1 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 "20131104" +#define MAIL_RELEASE_DATE "20131105" #define MAIL_VERSION_NUMBER "2.11" #ifdef SNAPSHOT diff --git a/postfix/src/pipe/pipe.c b/postfix/src/pipe/pipe.c index b6329f02f..6c4da668c 100644 --- a/postfix/src/pipe/pipe.c +++ b/postfix/src/pipe/pipe.c @@ -197,27 +197,27 @@ /* $(\fIname\fR) are also recognized. Specify \fB$$\fR where a single /* \fB$\fR is wanted. /* .RS -/* .IP \fB${\fBclient_address\fR}\fR +/* .IP \fB${client_address}\fR /* This macro expands to the remote client network address. /* .sp /* This feature is available as of Postfix 2.2. -/* .IP \fB${\fBclient_helo\fR}\fR +/* .IP \fB${client_helo}\fR /* This macro expands to the remote client HELO command parameter. /* .sp /* This feature is available as of Postfix 2.2. -/* .IP \fB${\fBclient_hostname\fR}\fR +/* .IP \fB${client_hostname}\fR /* This macro expands to the remote client hostname. /* .sp /* This feature is available as of Postfix 2.2. -/* .IP \fB${\fBclient_port\fR}\fR +/* .IP \fB${client_port}\fR /* This macro expands to the remote client TCP port number. /* .sp /* This feature is available as of Postfix 2.5. -/* .IP \fB${\fBclient_protocol\fR}\fR +/* .IP \fB${client_protocol}\fR /* This macro expands to the remote client protocol. /* .sp /* This feature is available as of Postfix 2.2. -/* .IP \fB${\fBdomain\fR}\fR +/* .IP \fB${domain}\fR /* This macro expands to the domain portion of the recipient /* address. For example, with an address \fIuser+foo@domain\fR /* the domain is \fIdomain\fR. @@ -225,81 +225,85 @@ /* This information is modified by the \fBh\fR flag for case folding. /* .sp /* This feature is available as of Postfix 2.5. -/* .IP \fB${\fBextension\fR}\fR +/* .IP \fB${extension}\fR /* This macro expands to the extension part of a recipient address. /* For example, with an address \fIuser+foo@domain\fR the extension is /* \fIfoo\fR. /* .sp -/* A command-line argument that contains \fB${\fBextension\fR}\fR expands +/* A command-line argument that contains \fB${extension}\fR expands /* into as many command-line arguments as there are recipients. /* .sp /* This information is modified by the \fBu\fR flag for case folding. -/* .IP \fB${\fBmailbox\fR}\fR +/* .IP \fB${mailbox}\fR /* This macro expands to the complete local part of a recipient address. /* For example, with an address \fIuser+foo@domain\fR the mailbox is /* \fIuser+foo\fR. /* .sp -/* A command-line argument that contains \fB${\fBmailbox\fR}\fR +/* A command-line argument that contains \fB${mailbox}\fR /* expands to as many command-line arguments as there are recipients. /* .sp /* This information is modified by the \fBu\fR flag for case folding. -/* .IP \fB${\fBnexthop\fR}\fR +/* .IP \fB${nexthop}\fR /* This macro expands to the next-hop hostname. /* .sp /* This information is modified by the \fBh\fR flag for case folding. -/* .IP \fB${\fBoriginal_recipient\fR}\fR +/* .IP \fB${original_recipient}\fR /* This macro expands to the complete recipient address before any /* address rewriting or aliasing. /* .sp /* A command-line argument that contains -/* \fB${\fBoriginal_recipient\fR}\fR expands to as many +/* \fB${original_recipient}\fR expands to as many /* command-line arguments as there are recipients. /* .sp /* This information is modified by the \fBhqu\fR flags for quoting /* and case folding. /* .sp /* This feature is available as of Postfix 2.5. -/* .IP \fB${\fBrecipient\fR}\fR +/* .IP \fB${queue_id}\fR +/* This macro expands to the queue id. +/* .sp +/* This feature is available as of Postfix 2.11. +/* .IP \fB${recipient}\fR /* This macro expands to the complete recipient address. /* .sp -/* A command-line argument that contains \fB${\fBrecipient\fR}\fR +/* A command-line argument that contains \fB${recipient}\fR /* expands to as many command-line arguments as there are recipients. /* .sp /* This information is modified by the \fBhqu\fR flags for quoting /* and case folding. -/* .IP \fB${\fBsasl_method\fR}\fR +/* .IP \fB${sasl_method}\fR /* This macro expands to the name of the SASL authentication /* mechanism in the AUTH command when the Postfix SMTP server /* received the message. /* .sp /* This feature is available as of Postfix 2.2. -/* .IP \fB${\fBsasl_sender\fR}\fR +/* .IP \fB${sasl_sender}\fR /* This macro expands to the SASL sender name (i.e. the original /* submitter as per RFC 4954) in the MAIL FROM command when /* the Postfix SMTP server received the message. /* .sp /* This feature is available as of Postfix 2.2. -/* .IP \fB${\fBsasl_username\fR}\fR +/* .IP \fB${sasl_username}\fR /* This macro expands to the SASL user name in the AUTH command /* when the Postfix SMTP server received the message. /* .sp /* This feature is available as of Postfix 2.2. -/* .IP \fB${\fBsender\fR}\fR +/* .IP \fB${sender}\fR /* This macro expands to the envelope sender address. By default, /* the null sender address expands to MAILER-DAEMON; this can /* be changed with the \fBnull_sender\fR attribute, as described /* above. /* .sp /* This information is modified by the \fBq\fR flag for quoting. -/* .IP \fB${\fBsize\fR}\fR +/* .IP \fB${size}\fR /* This macro expands to Postfix's idea of the message size, which /* is an approximation of the size of the message as delivered. -/* .IP \fB${\fBuser\fR}\fR +/* .IP \fB${user}\fR /* This macro expands to the username part of a recipient address. /* For example, with an address \fIuser+foo@domain\fR the username /* part is \fIuser\fR. /* .sp -/* A command-line argument that contains \fB${\fBuser\fR}\fR expands +/* A command-line argument that contains \fB${user}\fR expands /* into as many command-line arguments as there are recipients. /* .sp /* This information is modified by the \fBu\fR flag for case folding. @@ -501,6 +505,7 @@ #define PIPE_DICT_SASL_METHOD "sasl_method" /* key */ #define PIPE_DICT_SASL_USERNAME "sasl_username" /* key */ #define PIPE_DICT_SASL_SENDER "sasl_sender" /* key */ +#define PIPE_DICT_QUEUE_ID "queue_id" /* key */ /* * Flags used to pass back the type of special parameter found by @@ -600,6 +605,7 @@ static int parse_callback(int type, VSTRING *buf, char *context) PIPE_DICT_SASL_METHOD, 0, PIPE_DICT_SASL_USERNAME, 0, PIPE_DICT_SASL_SENDER, 0, + PIPE_DICT_QUEUE_ID, 0, 0, 0, }; struct cmd_flags *p; @@ -736,7 +742,7 @@ static ARGV *expand_argv(const char *service, char **argv, msg_warn("no @ in recipient address: %s", rcpt_list->info[i].address); if (*var_rcpt_delim == 0 - || (ext = split_addr(STR(buf), var_rcpt_delim)) == 0) + || (ext = split_addr(STR(buf), var_rcpt_delim)) == 0) ext = ""; /* insert null arg */ dict_update(PIPE_DICT_TABLE, PIPE_DICT_EXTENSION, ext); } @@ -1220,6 +1226,8 @@ static int deliver_message(DELIVER_REQUEST *request, char *service, char **argv) request->sasl_username); dict_update(PIPE_DICT_TABLE, PIPE_DICT_SASL_SENDER, request->sasl_sender); + dict_update(PIPE_DICT_TABLE, PIPE_DICT_QUEUE_ID, + request->queue_id); vstring_free(buf); if ((expanded_argv = expand_argv(service, attr.command, diff --git a/postfix/src/util/dict_lmdb.c b/postfix/src/util/dict_lmdb.c index 2bc032107..3b9987d7f 100644 --- a/postfix/src/util/dict_lmdb.c +++ b/postfix/src/util/dict_lmdb.c @@ -566,7 +566,7 @@ DICT *dict_lmdb_open(const char *path, int open_flags, int dict_flags) * * By default, LMDB 0.9.9 writes uninitialized heap memory to a * world-readable database file, as chunks of up to 4096 bytes. This is a - * gross memory disclosure vulnerability: memory content that a program + * huge memory disclosure vulnerability: memory content that a program * does not intend to share ends up in a world-readable file. The content * of uninitialized heap memory depends on program execution history. * That history includes code execution in other libraries that are