From: Wietse Venema Date: Wed, 7 Apr 1999 05:00:00 +0000 (-0500) Subject: snapshot-19990407 X-Git-Tag: v20010228~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81579aed914e923f9c19c90ada501d7b89ed24ba;p=thirdparty%2Fpostfix.git snapshot-19990407 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 37978e9af..8928a7d0b 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -2537,7 +2537,23 @@ Apologies for any names omitted. 19990406 Cleanup: changed MIME header information to make bounces - RFC 1892 compliant. + more RFC 1892 compliant. + +19990407 + + Feature: "best_mx_transport = local" delivers mail locally + if the local machine is the best mail exchanger (by default, + mail is bounced with a "mail loops back to myself" error). + + Config: in order to make feature tracking easier the source + code distribution now has a copy of the default settings in + conf/main.cf.default. + + Feature: separate configurable postmaster addresses for + single bounces (bounce_notice_recipient), double bounces + (2bounce_notice_recipient), delayed mail (delay_notice_recipient), + and for other mailer errors (error_notice_recipient). The + default for all is "postmaster". Future: diff --git a/postfix/bounce/bounce.c b/postfix/bounce/bounce.c index f550c2190..8f1300a53 100644 --- a/postfix/bounce/bounce.c +++ b/postfix/bounce/bounce.c @@ -45,6 +45,12 @@ /* this program. See the Postfix \fBmain.cf\fR file for syntax details /* and for default values. Use the \fBpostfix reload\fR command after /* a configuration change. +/* .IP \fBbounce_notice_recipient\fR +/* The recipient of single bounce postmaster notices. +/* .IP \fB2bounce_notice_recipient\fR +/* The recipient of double bounce postmaster notices. +/* .IP \fBdelay_notice_recipient\fR +/* The recipient of "delayed mail" postmaster notices. /* .IP \fBbounce_size_limit\fR /* Limit the amount of original message context that is sent in /* a non-delivery notification. @@ -104,6 +110,9 @@ int var_bounce_limit; int var_max_queue_time; int var_delay_warn_time; char *var_notify_classes; +char *var_bounce_rcpt; +char *var_2bounce_rcpt; +char *var_delay_rcpt; /* * We're single threaded, so we can avoid some memory allocation overhead. @@ -276,6 +285,9 @@ int main(int argc, char **argv) }; static CONFIG_STR_TABLE str_table[] = { VAR_NOTIFY_CLASSES, DEF_NOTIFY_CLASSES, &var_notify_classes, 0, 0, + VAR_BOUNCE_RCPT, DEF_BOUNCE_RCPT, &var_bounce_rcpt, 1, 0, + VAR_2BOUNCE_RCPT, DEF_2BOUNCE_RCPT, &var_2bounce_rcpt, 1, 0, + VAR_DELAY_RCPT, DEF_DELAY_RCPT, &var_delay_rcpt, 1, 0, 0, }; diff --git a/postfix/bounce/bounce_notify_service.c b/postfix/bounce/bounce_notify_service.c index 9746a9e33..5b15104fd 100644 --- a/postfix/bounce/bounce_notify_service.c +++ b/postfix/bounce/bounce_notify_service.c @@ -105,11 +105,13 @@ static int bounce_header(VSTREAM *bounce, VSTRING *buf, const char *dest, MAIL_ADDR_MAIL_DAEMON); if (flush) { - post_mail_fputs(bounce, STREQ(dest, mail_addr_postmaster()) ? + post_mail_fputs(bounce, dest == var_bounce_rcpt + || dest == var_2bounce_rcpt || dest == var_delay_rcpt ? "Subject: Postmaster Copy: Undelivered Mail" : "Subject: Undelivered Mail Returned to Sender"); } else { - post_mail_fputs(bounce, STREQ(dest, mail_addr_postmaster()) ? + post_mail_fputs(bounce, dest == var_bounce_rcpt + || dest == var_2bounce_rcpt || dest == var_delay_rcpt ? "Subject: Postmaster Warning: Delayed Mail" : "Subject: Delayed Mail (still being retried)"); } @@ -335,6 +337,7 @@ int bounce_notify_service(char *service, char *queue_name, VSTREAM *bounce; int notify_mask = name_mask(mail_error_masks, var_notify_classes); VSTRING *boundary = vstring_alloc(100); + char *postmaster; /* * Unique string for multi-part message boundaries. @@ -382,8 +385,9 @@ int bounce_notify_service(char *service, char *queue_name, if (SKIP_IF_BOUNCE || SKIP_IF_DELAY) { bounce_status = 0; } else { + postmaster = flush ? var_2bounce_rcpt : var_delay_rcpt; if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(), - mail_addr_postmaster(), + postmaster, NULL_CLEANUP_FLAGS, "BOUNCE")) != 0) { @@ -393,7 +397,7 @@ int bounce_notify_service(char *service, char *queue_name, * reason for the bounce, and the headers of the original * message. Don't bother sending the boiler-plate text. */ - if (!bounce_header(bounce, buf, mail_addr_postmaster(), + if (!bounce_header(bounce, buf, postmaster, STR(boundary), flush) && bounce_diagnostics(service, bounce, buf, queue_id, STR(boundary)) == 0) @@ -447,11 +451,12 @@ int bounce_notify_service(char *service, char *queue_name, * don't retransmit the bounce that we just generated, just log a * warning. */ + postmaster = flush ? var_bounce_rcpt : var_delay_rcpt; if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(), - mail_addr_postmaster(), + postmaster, NULL_CLEANUP_FLAGS, "BOUNCE")) != 0) { - if (!bounce_header(bounce, buf, mail_addr_postmaster(), + if (!bounce_header(bounce, buf, postmaster, STR(boundary), flush) && bounce_diagnostics(service, bounce, buf, queue_id, STR(boundary)) == 0) diff --git a/postfix/conf/main.cf.default b/postfix/conf/main.cf.default new file mode 100644 index 000000000..dbb120309 --- /dev/null +++ b/postfix/conf/main.cf.default @@ -0,0 +1,131 @@ +2bounce_notice_recipient = postmaster +access_map_reject_code = 550 +alias_database = hash:/etc/aliases +alias_maps = hash:/etc/aliases +allow_mail_to_commands = alias,forward +allow_mail_to_files = alias,forward +allow_percent_hack = yes +always_bcc = +append_at_myorigin = yes +append_dot_mydomain = yes +best_mx_transport = +biff = yes +bounce_notice_recipient = postmaster +bounce_size_limit = 50000 +canonical_maps = +command_directory = $program_directory +command_time_limit = 1000 +daemon_directory = $program_directory +daemon_timeout = 18000 +debug_peer_level = 2 +debug_peer_list = +default_database_type = hash +default_destination_concurrency_limit = 10 +default_destination_recipient_limit = 50 +default_privs = nobody +default_process_limit = 50 +default_transport = smtp +defer_transports = +delay_notice_recipient = postmaster +delay_warning_time = 0 +deliver_lock_attempts = 5 +deliver_lock_delay = 1 +disable_dns_lookups = no +dont_remove = 0 +double_bounce_sender = double-bounce +duplicate_filter_limit = 1000 +empty_address_recipient = MAILER-DAEMON +error_notice_recipient = postmaster +fallback_relay = +fallback_transport = +fork_attempts = 5 +fork_delay = 1 +forward_path = $home/.forward${recipient_delimiter}${extension},$home/.forward +hash_queue_depth = 2 +hash_queue_names = defer +header_size_limit = 102400 +home_mailbox = +hopcount_limit = 50 +ignore_mx_lookup_error = no +inet_interfaces = all +initial_destination_concurrency = 2 +invalid_hostname_reject_code = 501 +ipc_idle = 100 +ipc_timeout = 3600 +line_length_limit = 2048 +local_command_shell = +local_destination_concurrency_limit = $default_destination_concurrency_limit +local_destination_recipient_limit = $default_destination_recipient_limit +luser_relay = +mail_name = Postfix +mail_owner = postfix +mail_spool_directory = /var/mail +mail_version = Snapshot-19990407 +mailbox_command = +mailbox_transport = +maps_rbl_domains = rbl.maps.vix.com +maps_rbl_reject_code = 550 +masquerade_domains = +masquerade_exceptions = +max_idle = 100 +max_use = 100 +maximal_backoff_time = 4000 +maximal_queue_lifetime = 5 +message_size_limit = 10240000 +minimal_backoff_time = 1000 +mydestination = $myhostname, localhost.$mydomain +myorigin = $myhostname +non_fqdn_reject_code = 504 +notify_classes = resource,software +owner_request_special = yes +process_id_directory = pid +program_directory = /usr/libexec/postfix +qmgr_message_active_limit = 1000 +qmgr_message_recipient_limit = 10000 +queue_directory = /var/spool/postfix +queue_minfree = 0 +queue_run_delay = 1000 +recipient_canonical_maps = +recipient_delimiter = +recipient_feature_delimiter = +reject_code = 550 +relay_domains = $mydestination, $virtual_maps +relay_domains_reject_code = 550 +relayhost = +relocated_maps = +sender_canonical_maps = +service_throttle_time = 60 +smtp_connect_timeout = 0 +smtp_data_done_timeout = 600 +smtp_data_init_timeout = 120 +smtp_data_xfer_timeout = 180 +smtp_destination_concurrency_limit = $default_destination_concurrency_limit +smtp_destination_recipient_limit = $default_destination_recipient_limit +smtp_helo_timeout = 300 +smtp_mail_timeout = 300 +smtp_quit_timeout = 300 +smtp_rcpt_timeout = 300 +smtp_skip_4xx_greeting = no +smtp_skip_quit_response = yes +smtpd_banner = $myhostname ESMTP $mail_name +smtpd_client_restrictions = +smtpd_error_sleep_time = 5 +smtpd_etrn_restrictions = +smtpd_hard_error_limit = 100 +smtpd_helo_required = no +smtpd_helo_restrictions = +smtpd_recipient_limit = 1000 +smtpd_recipient_restrictions = permit_mynetworks,check_relay_domains +smtpd_sender_restrictions = +smtpd_soft_error_limit = 10 +smtpd_timeout = 300 +soft_bounce = no +stale_lock_time = 500 +swap_bangpath = yes +transport_maps = +transport_retry_time = 60 +trigger_timeout = 10 +unknown_address_reject_code = 450 +unknown_client_reject_code = 450 +unknown_hostname_reject_code = 450 +virtual_maps = diff --git a/postfix/conf/master.cf b/postfix/conf/master.cf index 9b991f612..95a929603 100644 --- a/postfix/conf/master.cf +++ b/postfix/conf/master.cf @@ -7,7 +7,9 @@ # Service: any name that is valid for the specified transport type # (the next field). With INET transports, a service is specified as # host:port. The host part (and colon) may be omitted. Either host -# or port may be given in symbolic form or in numeric form. +# or port may be given in symbolic form or in numeric form. Examples +# for the SMTP server: localhost:smtp receives mail via the loopback +# interface only; 10025 receives mail on port 10025. # # Transport type: "inet" for Internet sockets, "unix" for UNIX-domain # sockets, "fifo" for named pipes. diff --git a/postfix/conf/sample-misc.cf b/postfix/conf/sample-misc.cf index 90dea7c21..fb6544e71 100644 --- a/postfix/conf/sample-misc.cf +++ b/postfix/conf/sample-misc.cf @@ -191,6 +191,15 @@ myorigin = $myhostname # notify_classes = 2bounce,resource,software notify_classes = resource,software +# The following parameters specify who gets postmaster notices if +# one of the above error conditions is recognized. All parameters +# default to "postmaster". +# +bounce_notice_recipient = postmaster +2bounce_notice_recipient = postmaster +delay_notice_recipient = postmaster +error_notice_recipient = postmaster + # The process_id_directory specifies a lock file directory relative # to the Postfix queue directory. This facility is used by the master # daemon to lock out other master daemon instances. diff --git a/postfix/conf/sample-smtp.cf b/postfix/conf/sample-smtp.cf index 69819ffbb..90bf4d9c2 100644 --- a/postfix/conf/sample-smtp.cf +++ b/postfix/conf/sample-smtp.cf @@ -5,6 +5,14 @@ # MISCELLANEOUS CONTROLS # +# The best_mx_transport parameter controls what happens when the +# local system is listed as the best MX host for a destination. By +# default, Postfix reports a "mail loops back to myself" error and +# bounces the message. Specify "best_mx_transport = local" to pass +# the mail to the local delivery agent. +# +best_mx_transport = + # The fallback_relay parameter specifies zero or more hosts or domains # to hand off mail to if a message destination is not found, or if a # destination is unreachable. diff --git a/postfix/global/Makefile.in b/postfix/global/Makefile.in index 70d6a2f0b..ccf259c53 100644 --- a/postfix/global/Makefile.in +++ b/postfix/global/Makefile.in @@ -48,7 +48,7 @@ HDRS = been_here.h bounce.h canon_addr.h clean_env.h cleanup_user.h \ quote_822_local.h rec_streamlf.h rec_type.h recipient_list.h \ record.h resolve_clnt.h resolve_local.h rewrite_clnt.h sent.h \ smtp_stream.h split_addr.h string_list.h sys_exits.h timed_ipc.h \ - tok822.h clnt_stream.h + tok822.h clnt_stream.h deliver_pass.h TESTSRC = rec2stream.c stream2rec.c recdump.c WARN = -W -Wformat -Wimplicit -Wmissing-prototypes \ -Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \ @@ -341,10 +341,11 @@ deliver_pass.o: ../include/msg.h deliver_pass.o: ../include/vstring.h deliver_pass.o: ../include/vbuf.h deliver_pass.o: ../include/vstream.h -deliver_pass.o: mail_proto.h -deliver_pass.o: ../include/iostuff.h +deliver_pass.o: deliver_pass.h deliver_pass.o: deliver_request.h deliver_pass.o: recipient_list.h +deliver_pass.o: mail_proto.h +deliver_pass.o: ../include/iostuff.h deliver_request.o: deliver_request.c deliver_request.o: ../include/sys_defs.h deliver_request.o: ../include/msg.h diff --git a/postfix/global/deliver_pass.c b/postfix/global/deliver_pass.c index 31196be1c..fea9faafc 100644 --- a/postfix/global/deliver_pass.c +++ b/postfix/global/deliver_pass.c @@ -12,11 +12,20 @@ /* DELIVER_REQUEST *request; /* const char *address; /* long offset; +/* +/* int deliver_pass_all(class, service, request) +/* const char *class; +/* const char *service; +/* DELIVER_REQUEST *request; /* DESCRIPTION /* This module implements the client side of the `queue manager /* to delivery agent' protocol, passing one recipient on from /* one delivery agent to another. /* +/* deliver_pass() delegates delivery of the named recipient. +/* +/* deliver_pass_all() delegates an entire delivery request. +/* /* Arguments: /* .IP class /* Destination delivery agent service class @@ -56,8 +65,7 @@ /* Global library. */ -#include -#include +#include /* deliver_pass_initial_reply - retrieve initial delivery process response */ @@ -146,3 +154,19 @@ int deliver_pass(const char *class, const char *service, return (status); } + +/* deliver_pass_all - pass entire delivery request */ + +int deliver_pass_all(const char *class, const char *service, + DELIVER_REQUEST *request) +{ + RECIPIENT_LIST *list; + RECIPIENT *rcpt; + int status = 0; + + list = &request->rcpt_list; + for (rcpt = list->info; rcpt < list->info + list->len; rcpt++) + status |= deliver_pass(class, service, request, + rcpt->address, rcpt->offset); + return (status); +} diff --git a/postfix/global/deliver_pass.h b/postfix/global/deliver_pass.h new file mode 100644 index 000000000..39e3e0f06 --- /dev/null +++ b/postfix/global/deliver_pass.h @@ -0,0 +1,37 @@ +#ifndef _DELIVER_PASS_H_INCLUDED_ +#define _DELIVER_PASS_H_INCLUDED_ + +/*++ +/* NAME +/* deliver_pass 3h +/* SUMMARY +/* deliver request pass_through +/* SYNOPSIS +/* #include +/* DESCRIPTION +/* .nf + + /* + * Global library. + */ +#include +#include + + /* + * External interface. + */ +extern int deliver_pass(const char *, const char *, DELIVER_REQUEST *, const char *, long); +extern int deliver_pass_all(const char *, const char *, DELIVER_REQUEST *); + +/* LICENSE +/* .ad +/* .fi +/* The Secure Mailer license must be distributed with this software. +/* AUTHOR(S) +/* Wietse Venema +/* IBM T.J. Watson Research +/* P.O. Box 704 +/* Yorktown Heights, NY 10598, USA +/*--*/ + +#endif diff --git a/postfix/global/mail_params.h b/postfix/global/mail_params.h index ef3f83f60..bac96d26d 100644 --- a/postfix/global/mail_params.h +++ b/postfix/global/mail_params.h @@ -80,6 +80,25 @@ extern char *var_myhostname; #define VAR_MYDOMAIN "mydomain" /* my domain name */ extern char *var_mydomain; + /* + * Where to send postmaster copies of bounced mail, and other notices. + */ +#define VAR_BOUNCE_RCPT "bounce_notice_recipient" +#define DEF_BOUNCE_RCPT "postmaster" +extern char *var_bounce_rcpt; + +#define VAR_2BOUNCE_RCPT "2bounce_notice_recipient" +#define DEF_2BOUNCE_RCPT "postmaster" +extern char *var_2bounce_rcpt; + +#define VAR_DELAY_RCPT "delay_notice_recipient" +#define DEF_DELAY_RCPT "postmaster" +extern char *var_delay_rcpt; + +#define VAR_ERROR_RCPT "error_notice_recipient" +#define DEF_ERROR_RCPT "postmaster" +extern char *var_error_rcpt; + /* * Virtual host support. Default is to listen on all machine interfaces. */ @@ -471,6 +490,10 @@ extern int var_hash_queue_depth; * each message. Unfortunately, some mailers misbehave and disconnect (smap) * when given more recipients than they are willing to handle. */ +#define VAR_BESTMX_TRANSP "best_mx_transport" +#define DEF_BESTMX_TRANSP "" +extern char *var_bestmx_transp; + #define VAR_SMTP_CONN_TMOUT "smtp_connect_timeout" #define DEF_SMTP_CONN_TMOUT 0 extern int var_smtp_conn_tmout; diff --git a/postfix/global/mail_version.h b/postfix/global/mail_version.h index f437158f8..f43e8f264 100644 --- a/postfix/global/mail_version.h +++ b/postfix/global/mail_version.h @@ -15,7 +15,7 @@ * Version of this program. */ #define VAR_MAIL_VERSION "mail_version" -#define DEF_MAIL_VERSION "Snapshot-19990406" +#define DEF_MAIL_VERSION "Snapshot-19990407" extern char *var_mail_version; /* LICENSE diff --git a/postfix/html/bounce.8.html b/postfix/html/bounce.8.html index 43c762e81..5dbe797ed 100644 --- a/postfix/html/bounce.8.html +++ b/postfix/html/bounce.8.html @@ -55,9 +55,9 @@ BOUNCE(8) BOUNCE(8) details and for default values. Use the postfix reload command after a configuration change. - bounce_size_limit - Limit the amount of original message context that - is sent in a non-delivery notification. + bounce_notice_recipient + The recipient of single bounce postmaster notices. + @@ -71,13 +71,23 @@ BOUNCE(8) BOUNCE(8) BOUNCE(8) BOUNCE(8) + 2bounce_notice_recipient + The recipient of double bounce postmaster notices. + + delay_notice_recipient + The recipient of "delayed mail" postmaster notices. + + bounce_size_limit + Limit the amount of original message context that + is sent in a non-delivery notification. + mail_name - Use this mail system name in the introductory text + Use this mail system name in the introductory text at the start of a bounce message. notify_classes - Notify the postmaster of bounced mail when this - parameter includes the bounce class. For privacy + Notify the postmaster of bounced mail when this + parameter includes the bounce class. For privacy reasons, the message body is not included. SEE ALSO @@ -86,7 +96,7 @@ BOUNCE(8) BOUNCE(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) @@ -107,16 +117,6 @@ BOUNCE(8) BOUNCE(8) - - - - - - - - - - diff --git a/postfix/html/faq.html b/postfix/html/faq.html index 512b9701e..aabe60783 100644 --- a/postfix/html/faq.html +++ b/postfix/html/faq.html @@ -42,6 +42,8 @@
  • Sending mail to a FAX machine +
  • Mail fails with timeout or lost connection +
  • Undefined symbols: ___dn_expand, ___res_init etc.
  • Using DB libraries on Solaris etc. @@ -598,6 +600,78 @@ Note: be sure to not advertise fax.your.domain in the DNS...
    +

    Mail fails with timeout or lost connection

    + +Occasionally, mail fails with "timed out while sending end of data +-- message may be sent more than once", or with: "lost connection after DATA". +Network outages happen, systems crash. There isn't much you can +do about it. + +

    + +However, when you see mail deliveries fail consistently, you may +have a different problem: broken path MTU discovery. + +

    + +A little background is in order. With the SMTP protocol, the HELO, +MAIL FROM and RCPT TO commands and responses are relatively short. +When you're talking to sendmail, every command and every response +is sent as a separate packet, because sendmail cannot implement +ESMTP command pipelining. + +

    + +The message content, however, is sent as a few datagrams, each +datagram typically a kbyte large or even bigger, depending on your +local network MTU. + +

    + +When mail fails consistently due to a timeout, I suspect that the +sending machine runs a modern UNIX which implements path MTU +discovery. That causes the machine to send packets as large as it +would send over the LAN, with the IP DONT'T FRAGMENT bit set, +preventing intermediate routers from fragmenting the packets that +are too big for their networks. + +

    + +Depending on what network path a message follows, some router on +the way responds with an ICMP MUST FRAGMENT message saying the +packet is too big. Normally, the sending machine will re-send the +data after chopping it up into smaller pieces. + +

    + +However, things break when some router closer to the sending system +is dropping such ICMP feedback messages, in a mistaken attempt to +protect systems against certain attacks. In that case, the ICMP +feedback message never reaches the sending machine, and the connection +times out. + +

    + +This is the same configuration problem that causes trouble with +web servers behind a misconfigured packet filter: small images/files +are sent intact, large images/files time out because the server +does not see the MUST FRAGMENT ICMP feedback messages. + +

    + +Workaround: disable path MTU discovery at the sending machine. Mail +will get out, but of course everyone else will still suffer. How +to disable path MTU discovery? It depends. Solaris has an ndd +command; other systems use different means such as sysctl +to control kernel parameters on a running system. + +

    + +Fix: find the router that drops the ICMP MUST FRAGMENT messages, +and convince the person responsible for it to fix the configuration. + +


    +

    Undefined symbols: ___dn_expand, ___res_init etc.

    Question: When I build Postfix I get the following errors: diff --git a/postfix/html/postalias.1.html b/postfix/html/postalias.1.html index 4af185bff..c91c73756 100644 --- a/postfix/html/postalias.1.html +++ b/postfix/html/postalias.1.html @@ -39,27 +39,27 @@ POSTALIAS(1) POSTALIAS(1) tiple -v options make the software increasingly verbose. + B-w Do not warn about duplicate entries; silently + ignore them. + Arguments: file_type The type of database to be produced. - btree The output is a btree file, named - file_name.db. This is available only on + btree The output is a btree file, named + file_name.db. This is available only on systems with support for db databases. - dbm The output consists of two files, named - file_name.pag and file_name.dir. This is - available only on systems with support for + dbm The output consists of two files, named + file_name.pag and file_name.dir. This is + available only on systems with support for dbm databases. - hash The output is a hashed file, named - file_name.db. This is available only on + hash The output is a hashed file, named + file_name.db. This is available only on systems with support for db databases. - When no file_type is specified, the software uses - the database type specified via the database_type - 1 @@ -71,15 +71,17 @@ POSTALIAS(1) POSTALIAS(1) POSTALIAS(1) POSTALIAS(1) - configuration parameter. The default value for + When no file_type is specified, the software uses + the database type specified via the database_type + configuration parameter. The default value for this parameter depends on the host environment. file_name - The name of the alias database source file when + The name of the alias database source file when rebuilding a database. DIAGNOSTICS - Problems are logged to the standard error stream. No out- + Problems are logged to the standard error stream. No out- put means no problems were detected. Duplicate entries are skipped and are flagged with a warning. @@ -91,12 +93,12 @@ POSTALIAS(1) POSTALIAS(1) Enable verbose logging for debugging purposes. CONFIGURATION PARAMETERS - The following main.cf parameters are especially relevant - to this program. See the Postfix main.cf file for syntax + The following main.cf parameters are especially relevant + to this program. See the Postfix main.cf file for syntax details and for default values. database_type - Default alias database type. On many UNIX systems, + Default alias database type. On many UNIX systems, the default type is either dbm or hash. STANDARDS @@ -107,7 +109,7 @@ POSTALIAS(1) POSTALIAS(1) sendmail(1) mail posting and compatibility interface. LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) @@ -126,8 +128,6 @@ POSTALIAS(1) POSTALIAS(1) - - 2 diff --git a/postfix/html/postmap.1.html b/postfix/html/postmap.1.html index 950b96b2b..9b01928dc 100644 --- a/postfix/html/postmap.1.html +++ b/postfix/html/postmap.1.html @@ -57,8 +57,8 @@ POSTMAP(1) POSTMAP(1) tiple -v options make the software increasingly verbose. - Arguments: - + B-w Do not warn about duplicate entries; silently + ignore them. @@ -71,28 +71,30 @@ POSTMAP(1) POSTMAP(1) POSTMAP(1) POSTMAP(1) + Arguments: + file_type The type of database to be produced. - btree The output file is a btree file, named - file_name.db. This is available only on + btree The output file is a btree file, named + file_name.db. This is available only on systems with support for db databases. - dbm The output consists of two files, named - file_name.pag and file_name.dir. This is - available only on systems with support for + dbm The output consists of two files, named + file_name.pag and file_name.dir. This is + available only on systems with support for dbm databases. - hash The output file is a hashed file, named - file_name.db. This is available only on + hash The output file is a hashed file, named + file_name.db. This is available only on systems with support for db databases. - When no file_type is specified, the software uses - the database type specified via the database_type + When no file_type is specified, the software uses + the database type specified via the database_type configuration parameter. file_name - The name of the lookup table source file when + The name of the lookup table source file when rebuilding a database. DIAGNOSTICS @@ -109,12 +111,12 @@ POSTMAP(1) POSTMAP(1) CONFIGURATION PARAMETERS database_type - Default output database type. On many UNIX sys- - tems, the default database type is either hash or + Default output database type. On many UNIX sys- + tems, the default database type is either hash or dbm. LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) @@ -126,8 +128,6 @@ POSTMAP(1) POSTMAP(1) - - 2 diff --git a/postfix/html/smtp.8.html b/postfix/html/smtp.8.html index 036a46c70..2988053e3 100644 --- a/postfix/html/smtp.8.html +++ b/postfix/html/smtp.8.html @@ -74,16 +74,26 @@ SMTP(8) SMTP(8) command after a configuration change. Miscellaneous + best_mx_transport + Name of the delivery transport to use when the + local machine is the most-preferred mail exchanger + (by default, a mailer loop is reported, and the + message is bounced). + debug_peer_level - Verbose logging level increment for hosts that + Verbose logging level increment for hosts that match a pattern in the debug_peer_list parameter. debug_peer_list - List of domain or network patterns. When a remote - host matches a pattern, increase the verbose log- - ging level by the amount specified in the + List of domain or network patterns. When a remote + host matches a pattern, increase the verbose log- + ging level by the amount specified in the debug_peer_level parameter. + error_notice_recipient + Recipient of protocol/policy/resource/software + error notices. + fallback_relay Hosts to hand off mail to if a message destination is not found or if a destination is unreachable. @@ -115,16 +125,6 @@ SMTP(8) SMTP(8) Resource controls smtp_destination_concurrency_limit Limit the number of parallel deliveries to the same - destination. The default limit is taken from the - default_destination_concurrency_limit parameter. - - smtp_destination_recipient_limit - Limit the number of recipients per message deliv- - ery. The default limit is taken from the - default_destination_recipient_limit parameter. - -Timeout controls - @@ -137,6 +137,15 @@ SMTP(8) SMTP(8) SMTP(8) SMTP(8) + destination. The default limit is taken from the + default_destination_concurrency_limit parameter. + + smtp_destination_recipient_limit + Limit the number of recipients per message deliv- + ery. The default limit is taken from the + default_destination_recipient_limit parameter. + +Timeout controls smtp_connect_timeout Timeout in seconds for completing a TCP connection. When no connection can be made within the deadline, @@ -182,15 +191,6 @@ SMTP(8) SMTP(8) SEE ALSO bounce(8) non-delivery status reports - master(8) process manager - qmgr(8) queue manager - syslogd(8) system logging - -LICENSE - The Secure Mailer license must be distributed with this - software. - - @@ -203,6 +203,14 @@ SMTP(8) SMTP(8) SMTP(8) SMTP(8) + master(8) process manager + qmgr(8) queue manager + syslogd(8) system logging + +LICENSE + The Secure Mailer license must be distributed with this + software. + AUTHOR(S) Wietse Venema IBM T.J. Watson Research @@ -243,14 +251,6 @@ SMTP(8) SMTP(8) - - - - - - - - diff --git a/postfix/html/smtpd.8.html b/postfix/html/smtpd.8.html index 1f3636dba..354870d1b 100644 --- a/postfix/html/smtpd.8.html +++ b/postfix/html/smtpd.8.html @@ -93,38 +93,38 @@ SMTPD(8) SMTPD(8) ging level by the amount specified in the debug_peer_level parameter. + error_notice_recipient + Recipient of protocol/policy/resource/software + error notices. + hopcount_limit Limit the number of Received: message headers. notify_classes List of error classes. Of special interest are: - policy When a client violates any policy, mail a + policy When a client violates any policy, mail a transcript of the entire SMTP session to the postmaster. protocol - When a client violates the SMTP protocol or + When a client violates the SMTP protocol or issues an unimplemented command, mail a transcript of the entire SMTP session to the postmaster. smtpd_banner - Text that follows the 220 status code in the SMTP + Text that follows the 220 status code in the SMTP greeting banner. smtpd_recipient_limit - Restrict the number of recipients that the SMTP + Restrict the number of recipients that the SMTP server accepts per message delivery. smtpd_timeout - Limit the time to send a server response and to + Limit the time to send a server response and to receive a client request. -Resource controls - line_length_limit - Limit the amount of memory in bytes used for the - handling of partial input lines. @@ -137,13 +137,18 @@ SMTPD(8) SMTPD(8) SMTPD(8) SMTPD(8) +Resource controls + line_length_limit + Limit the amount of memory in bytes used for the + handling of partial input lines. + message_size_limit Limit the total size in bytes of a message, includ- ing on-disk storage for envelope information. queue_minfree - Minimal amount of free space in bytes in the queue - file system for the SMTP server to accept any mail + Minimal amount of free space in bytes in the queue + file system for the SMTP server to accept any mail at all. Tarpitting @@ -153,11 +158,11 @@ SMTPD(8) SMTPD(8) smtpd_soft_error_limit When an SMTP client has made this number of errors, - wait error_count seconds before responding to any + wait error_count seconds before responding to any client request. smtpd_hard_error_limit - Disconnect after a client has made this number of + Disconnect after a client has made this number of errors. UCE control restrictions @@ -166,31 +171,26 @@ SMTPD(8) SMTPD(8) tem. smtpd_helo_required - Require that clients introduce themselves at the + Require that clients introduce themselves at the beginning of an SMTP session. smtpd_helo_restrictions - Restrict what client hostnames are allowed in HELO + Restrict what client hostnames are allowed in HELO and EHLO commands. smtpd_sender_restrictions - Restrict what sender addresses are allowed in MAIL + Restrict what sender addresses are allowed in MAIL FROM commands. smtpd_recipient_restrictions - Restrict what recipient addresses are allowed in + Restrict what recipient addresses are allowed in RCPT TO commands. smtpd_etrn_restrictions Restrict what domain names can be used in ETRN com- mands, and what clients may issue ETRN commands. - maps_rbl_domains - List of DNS domains that publish the addresses of - blacklisted hosts. - relay_domains - Restrict what domains or networks this mail system @@ -203,40 +203,46 @@ SMTPD(8) SMTPD(8) SMTPD(8) SMTPD(8) + maps_rbl_domains + List of DNS domains that publish the addresses of + blacklisted hosts. + + relay_domains + Restrict what domains or networks this mail system will relay mail from or to. UCE control responses access_map_reject_code - Server response when a client violates an access + Server response when a client violates an access database restriction. invalid_hostname_reject_code - Server response when a client violates the + Server response when a client violates the reject_invalid_hostname restriction. maps_rbl_reject_code - Server response when a client violates the + Server response when a client violates the maps_rbl_domains restriction. reject_code - Response code when the client matches a reject + Response code when the client matches a reject restriction. relay_domains_reject_code - Server response when a client attempts to violate + Server response when a client attempts to violate the mail relay policy. unknown_address_reject_code - Server response when a client violates the + Server response when a client violates the reject_unknown_address restriction. unknown_client_reject_code - Server response when a client without address to - name mapping violates the reject_unknown_clients + Server response when a client without address to + name mapping violates the reject_unknown_clients restriction. unknown_hostname_reject_code - Server response when a client violates the + Server response when a client violates the reject_unknown_hostname restriction. SEE ALSO @@ -245,12 +251,24 @@ SMTPD(8) SMTPD(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) Wietse Venema IBM T.J. Watson Research + + + + 4 + + + + + +SMTPD(8) SMTPD(8) + + P.O. Box 704 Yorktown Heights, NY 10598, USA @@ -260,7 +278,55 @@ SMTPD(8) SMTPD(8) - 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 diff --git a/postfix/local/Makefile.in b/postfix/local/Makefile.in index 91c0f429e..fabd97719 100644 --- a/postfix/local/Makefile.in +++ b/postfix/local/Makefile.in @@ -305,13 +305,14 @@ mailbox.o: ../include/sent.h mailbox.o: ../include/mypwd.h mailbox.o: ../include/been_here.h mailbox.o: ../include/mail_params.h +mailbox.o: ../include/deliver_pass.h +mailbox.o: ../include/deliver_request.h +mailbox.o: ../include/recipient_list.h mailbox.o: ../include/mail_proto.h mailbox.o: ../include/iostuff.h mailbox.o: local.h mailbox.o: ../include/tok822.h mailbox.o: ../include/resolve_clnt.h -mailbox.o: ../include/deliver_request.h -mailbox.o: ../include/recipient_list.h mailbox.o: biff_notify.h maildir.o: maildir.c maildir.o: ../include/sys_defs.h diff --git a/postfix/local/mailbox.c b/postfix/local/mailbox.c index bb7d736b8..8888813d2 100644 --- a/postfix/local/mailbox.c +++ b/postfix/local/mailbox.c @@ -74,7 +74,7 @@ #include #include #include -#include +#include /* Application-specific. */ diff --git a/postfix/man/man1/postalias.1 b/postfix/man/man1/postalias.1 index d01cfe234..22e0ca9fd 100644 --- a/postfix/man/man1/postalias.1 +++ b/postfix/man/man1/postalias.1 @@ -34,6 +34,8 @@ a new database from the entries in \fBfile_name\fR. .IP \fB-v\fR Enable verbose logging for debugging purposes. Multiple \fB-v\fR options make the software increasingly verbose. +.IP \f\B-w\fR +Do not warn about duplicate entries; silently ignore them. .PP Arguments: .IP \fIfile_type\fR diff --git a/postfix/man/man1/postmap.1 b/postfix/man/man1/postmap.1 index 70df09230..a70be1401 100644 --- a/postfix/man/man1/postmap.1 +++ b/postfix/man/man1/postmap.1 @@ -53,6 +53,8 @@ a new database from the entries in \fBfile_name\fR. .IP \fB-v\fR Enable verbose logging for debugging purposes. Multiple \fB-v\fR options make the software increasingly verbose. +.IP \f\B-w\fR +Do not warn about duplicate entries; silently ignore them. .PP Arguments: .IP \fIfile_type\fR diff --git a/postfix/man/man8/bounce.8 b/postfix/man/man8/bounce.8 index e148cc171..7f74c2373 100644 --- a/postfix/man/man8/bounce.8 +++ b/postfix/man/man8/bounce.8 @@ -59,6 +59,12 @@ The following \fBmain.cf\fR parameters are especially relevant to this program. See the Postfix \fBmain.cf\fR file for syntax details and for default values. Use the \fBpostfix reload\fR command after a configuration change. +.IP \fBbounce_notice_recipient\fR +The recipient of single bounce postmaster notices. +.IP \fB2bounce_notice_recipient\fR +The recipient of double bounce postmaster notices. +.IP \fBdelay_notice_recipient\fR +The recipient of "delayed mail" postmaster notices. .IP \fBbounce_size_limit\fR Limit the amount of original message context that is sent in a non-delivery notification. diff --git a/postfix/man/man8/smtp.8 b/postfix/man/man8/smtp.8 index 38093ac2b..6dbd17a8b 100644 --- a/postfix/man/man8/smtp.8 +++ b/postfix/man/man8/smtp.8 @@ -71,6 +71,10 @@ a configuration change. .SH Miscellaneous .ad .fi +.IP \fBbest_mx_transport\fR +Name of the delivery transport to use when the local machine +is the most-preferred mail exchanger (by default, a mailer +loop is reported, and the message is bounced). .IP \fBdebug_peer_level\fR Verbose logging level increment for hosts that match a pattern in the \fBdebug_peer_list\fR parameter. @@ -78,6 +82,8 @@ pattern in the \fBdebug_peer_list\fR parameter. List of domain or network patterns. When a remote host matches a pattern, increase the verbose logging level by the amount specified in the \fBdebug_peer_level\fR parameter. +.IP \fBerror_notice_recipient\fR +Recipient of protocol/policy/resource/software error notices. .IP \fBfallback_relay\fR Hosts to hand off mail to if a message destination is not found or if a destination is unreachable. diff --git a/postfix/man/man8/smtpd.8 b/postfix/man/man8/smtpd.8 index c838208b3..9ff7a6df7 100644 --- a/postfix/man/man8/smtpd.8 +++ b/postfix/man/man8/smtpd.8 @@ -83,6 +83,8 @@ pattern in the \fBdebug_peer_list\fR parameter. List of domain or network patterns. When a remote host matches a pattern, increase the verbose logging level by the amount specified in the \fBdebug_peer_level\fR parameter. +.IP \fBerror_notice_recipient\fR +Recipient of protocol/policy/resource/software error notices. .IP \fBhopcount_limit\fR Limit the number of \fBReceived:\fR message headers. .IP \fBnotify_classes\fR diff --git a/postfix/postconf/Makefile.in b/postfix/postconf/Makefile.in index 4c7043bff..4d18315f6 100644 --- a/postfix/postconf/Makefile.in +++ b/postfix/postconf/Makefile.in @@ -12,6 +12,7 @@ TESTPROG= MAKES = bool_table.h bool_vars.h int_table.h int_vars.h str_table.h \ str_vars.h PROG = postconf +SAMPLES = ../conf/main.cf.default INC_DIR = ../include LIBS = ../lib/libglobal.a ../lib/libutil.a @@ -20,12 +21,15 @@ LIBS = ../lib/libglobal.a ../lib/libutil.a $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) +../conf/main.cf.default: $(PROG) Makefile + ./$(PROG) -d |egrep -v '^(myhostname|mydomain|mynetworks) ' >$@ + Makefile: Makefile.in (set -e; echo "# DO NOT EDIT"; $(OPTS) sh ../makedefs; cat $?) >$@ test: $(TESTPROG) -update: ../bin/$(PROG) +update: ../bin/$(PROG) $(SAMPLES) ../bin/$(PROG): $(PROG) cp $(PROG) ../bin diff --git a/postfix/smtp/Makefile.in b/postfix/smtp/Makefile.in index 91e217546..6d528e880 100644 --- a/postfix/smtp/Makefile.in +++ b/postfix/smtp/Makefile.in @@ -82,6 +82,8 @@ smtp.o: ../include/mail_params.h smtp.o: ../include/config.h smtp.o: ../include/debug_peer.h smtp.o: ../include/mail_error.h +smtp.o: ../include/mail_proto.h +smtp.o: ../include/iostuff.h smtp.o: ../include/mail_server.h smtp.o: smtp.h smtp.o: ../include/argv.h diff --git a/postfix/smtp/smtp.c b/postfix/smtp/smtp.c index 48274ac30..60c840b35 100644 --- a/postfix/smtp/smtp.c +++ b/postfix/smtp/smtp.c @@ -55,6 +55,10 @@ /* .SH Miscellaneous /* .ad /* .fi +/* .IP \fBbest_mx_transport\fR +/* Name of the delivery transport to use when the local machine +/* is the most-preferred mail exchanger (by default, a mailer +/* loop is reported, and the message is bounced). /* .IP \fBdebug_peer_level\fR /* Verbose logging level increment for hosts that match a /* pattern in the \fBdebug_peer_list\fR parameter. @@ -62,6 +66,8 @@ /* List of domain or network patterns. When a remote host matches /* a pattern, increase the verbose logging level by the amount /* specified in the \fBdebug_peer_level\fR parameter. +/* .IP \fBerror_notice_recipient\fR +/* Recipient of protocol/policy/resource/software error notices. /* .IP \fBfallback_relay\fR /* Hosts to hand off mail to if a message destination is not found /* or if a destination is unreachable. @@ -163,6 +169,7 @@ #include #include #include +#include /* Single server skeleton. */ @@ -192,6 +199,8 @@ int var_smtp_skip_4xx_greeting; int var_ign_mx_lookup_err; int var_skip_quit_resp; char *var_fallback_relay; +char *var_bestmx_transp; +char *var_error_rcpt; /* * Global variables. smtp_errno is set by the address lookup routines and by @@ -245,16 +254,21 @@ static int deliver_message(DELIVER_REQUEST *request) msg_info("%s: file %s", myname, VSTREAM_PATH(state->src)); /* - * Establish an SMTP session and deliver this message to (limited batches - * of) recipients. XXX By doing the recipient batching in the SMTP agent - * instead of in the queue manager, we're stuck with one connection per - * message per domain. But, the queue manager should not have hard-wired - * logic that is specific to SMTP processing. At the end, notify the - * postmaster of any protocol errors. + * Establish an SMTP session and deliver this message to all requested + * recipients. At the end, notify the postmaster of any protocol errors. + * Optionally deliver mail locally when this machine is the best mail + * exchanger. */ if ((state->session = smtp_connect(request->nexthop, why)) == 0) { - smtp_site_fail(state, smtp_errno == SMTP_RETRY ? 450 : 550, - "%s", vstring_str(why)); + if (smtp_errno == SMTP_OK) { + if (*var_bestmx_transp == 0) + msg_panic("smtp_errno botch"); + state->status = deliver_pass_all(MAIL_CLASS_PRIVATE, + var_bestmx_transp, + request); + } else + smtp_site_fail(state, smtp_errno == SMTP_RETRY ? 450 : 550, + "%s", vstring_str(why)); } else { debug_peer_check(state->session->host, state->session->addr); if (smtp_helo(state) == 0) @@ -314,6 +328,8 @@ int main(int argc, char **argv) VAR_DEBUG_PEER_LIST, DEF_DEBUG_PEER_LIST, &var_debug_peer_list, 0, 0, VAR_NOTIFY_CLASSES, DEF_NOTIFY_CLASSES, &var_notify_classes, 0, 0, VAR_FALLBACK_RELAY, DEF_FALLBACK_RELAY, &var_fallback_relay, 0, 0, + VAR_BESTMX_TRANSP, DEF_BESTMX_TRANSP, &var_bestmx_transp, 0, 0, + VAR_ERROR_RCPT, DEF_ERROR_RCPT, &var_error_rcpt, 1, 0, 0, }; static CONFIG_INT_TABLE int_table[] = { diff --git a/postfix/smtp/smtp_addr.c b/postfix/smtp/smtp_addr.c index f1d2bea13..380d37cbd 100644 --- a/postfix/smtp/smtp_addr.c +++ b/postfix/smtp/smtp_addr.c @@ -22,7 +22,10 @@ /* exchanger hosts listed for the named domain. Addresses are /* returned in most-preferred first order. The result is truncated /* so that it contains only hosts that are more preferred than the -/* local mail server itself. +/* local mail server itself. When the "best MX is local" feature +/* is enabled, the local system is allowed to be the best mail +/* exchanger, and the result is a null list pointer. Otherwise, +/* mailer loops are treated as an error. /* /* When no mail exchanger is listed in the DNS for \fIname\fR, the /* request is passed to smtp_host_addr(). @@ -286,8 +289,11 @@ static DNS_RR *smtp_truncate_self(DNS_RR *addr_list, unsigned pref, smtp_print_addr("truncated", addr); dns_rr_free(addr); if (last == 0) { - vstring_sprintf(why, "mail for %s loops back to myself", name); - smtp_errno = SMTP_FAIL; + if (*var_bestmx_transp == 0) { + vstring_sprintf(why, "mail for %s loops back to myself", + name); + smtp_errno = SMTP_FAIL; + } addr_list = 0; } else { last->next = 0; diff --git a/postfix/smtp/smtp_chat.c b/postfix/smtp/smtp_chat.c index 143e7d256..7d3547461 100644 --- a/postfix/smtp/smtp_chat.c +++ b/postfix/smtp/smtp_chat.c @@ -246,7 +246,7 @@ void smtp_chat_notify(SMTP_STATE *state) #define INDENT 4 notice = post_mail_fopen_nowait(mail_addr_double_bounce(), - mail_addr_postmaster(), + var_error_rcpt, NULL_CLEANUP_FLAGS, "NOTICE"); if (notice == 0) { msg_warn("postmaster notify: %m"); @@ -254,7 +254,7 @@ void smtp_chat_notify(SMTP_STATE *state) } post_mail_fprintf(notice, "From: %s (Mail Delivery System)", mail_addr_mail_daemon()); - post_mail_fprintf(notice, "To: %s (Postmaster)", mail_addr_postmaster()); + post_mail_fprintf(notice, "To: %s (Postmaster)", var_error_rcpt); post_mail_fprintf(notice, "Subject: %s SMTP client: errors from %s", var_mail_name, session->host); post_mail_fputs(notice, ""); diff --git a/postfix/smtpd/smtpd.c b/postfix/smtpd/smtpd.c index 0f2ff5435..80f4b7e54 100644 --- a/postfix/smtpd/smtpd.c +++ b/postfix/smtpd/smtpd.c @@ -67,6 +67,8 @@ /* List of domain or network patterns. When a remote host matches /* a pattern, increase the verbose logging level by the amount /* specified in the \fBdebug_peer_level\fR parameter. +/* .IP \fBerror_notice_recipient\fR +/* Recipient of protocol/policy/resource/software error notices. /* .IP \fBhopcount_limit\fR /* Limit the number of \fBReceived:\fR message headers. /* .IP \fBnotify_classes\fR @@ -273,6 +275,7 @@ int var_reject_code; int var_smtpd_err_sleep; int var_non_fqdn_code; char *var_always_bcc; +char *var_error_rcpt; /* * Global state, for stand-alone mode queue file cleanup. When this is @@ -1153,6 +1156,7 @@ int main(int argc, char **argv) VAR_ETRN_CHECKS, DEF_ETRN_CHECKS, &var_etrn_checks, 0, 0, VAR_MAPS_RBL_DOMAINS, DEF_MAPS_RBL_DOMAINS, &var_maps_rbl_domains, 0, 0, VAR_ALWAYS_BCC, DEF_ALWAYS_BCC, &var_always_bcc, 0, 0, + VAR_ERROR_RCPT, DEF_ERROR_RCPT, &var_error_rcpt, 1, 0, 0, }; diff --git a/postfix/smtpd/smtpd_chat.c b/postfix/smtpd/smtpd_chat.c index 6e97b4c94..95d9d9b11 100644 --- a/postfix/smtpd/smtpd_chat.c +++ b/postfix/smtpd/smtpd_chat.c @@ -193,7 +193,7 @@ void smtpd_chat_notify(SMTPD_STATE *state) #define INDENT 4 notice = post_mail_fopen_nowait(mail_addr_double_bounce(), - mail_addr_postmaster(), + var_error_rcpt, NULL_CLEANUP_FLAGS, "NOTICE"); if (notice == 0) { msg_warn("postmaster notify: %m"); @@ -201,7 +201,7 @@ void smtpd_chat_notify(SMTPD_STATE *state) } post_mail_fprintf(notice, "From: %s (Mail Delivery System)", mail_addr_mail_daemon()); - post_mail_fprintf(notice, "To: %s (Postmaster)", mail_addr_postmaster()); + post_mail_fprintf(notice, "To: %s (Postmaster)", var_error_rcpt); post_mail_fprintf(notice, "Subject: %s SMTP server: errors from %s[%s]", var_mail_name, state->name, state->addr); post_mail_fputs(notice, "");