diff --git a/postfix/0README b/postfix/0README index 9023f6fd7..8538cebe2 100644 --- a/postfix/0README +++ b/postfix/0README @@ -2,8 +2,13 @@ Purpose of this document ======================== This document provides a road map of the Postfix mail system source -code distribution. I suggest that you take a few minutes to read -this file, and then proceed with the INSTALL instructions. +code distribution. I suggest that you + +- take a few minutes to read this file, + +- review the RELEASE_NOTES file for incompatible changes, + +- and then proceed with the INSTALL instructions. Introduction ============ diff --git a/postfix/BEWARE b/postfix/BEWARE deleted file mode 100644 index 1b0c41829..000000000 --- a/postfix/BEWARE +++ /dev/null @@ -1,11 +0,0 @@ -LINUX SYSLOGD PERFORMANCE -========================= - -LINUX syslogd uses synchronous writes by default, which is very -expensive. For services such as mail it is recommended that you -disable synchronous logfile writes by editing /etc/syslog.conf and -by prepending a - to the logfile name: - - mail.* -/var/log/mail.log - -Send a "kill -HUP" to the syslogd to make the change effective. diff --git a/postfix/FILTER_README b/postfix/FILTER_README index 709a009b7..adb7d28fd 100644 --- a/postfix/FILTER_README +++ b/postfix/FILTER_README @@ -178,6 +178,11 @@ log in, and can be given a "*" password and non-existent shell and home directory. This user handles all potentially dangerous mail content - that is why it should be a separate account. +In the above example, Postfix listens on port localhost:10025. If +you want to have your filter listening on port localhost:10025 +instead of Postfix, then you must run your filter as a stand-alone +program. + The /some/where/filter command is most likely a PERL script. PERL has modules that make talking SMTP easy. The command-line specifies that mail should be sent back into Postfix via localhost port 10026. diff --git a/postfix/HISTORY b/postfix/HISTORY index cee5cc5d3..d51dc47eb 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -4948,6 +4948,15 @@ Apologies for any names omitted. Code cleanup: Postfix should now run with no alias database. Code cleanup: local_destination_recipient_limit and - local_destination_concurrency_limit are not first-class + local_destination_concurrency_limit have become first-class configuration parameters. Files: global/mail_params.h, *qmgr/qmgr.c, postconf/postconf.c. + +20010226 + + Documentation suggestions by Lars Hecking and Richard + Huxton, Matthias Andree and many others. + + Code cleanup: some queue/transport operations need to be + moved, after the code cleanup of the recipient/concurrency + limit handling. Patrik Rak. Files: *qmgr/qmgr_message.c. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 6c8a4c82d..1372a752f 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -1,3 +1,8 @@ +Release 20010228 differs from snapshot 20010228 in that the virtual +delivery agent and nqmgr queue manager are left out. That software +will become part of the official release when it has not changed +in a while. + Incompatible changes with snapshot-20010225 =========================================== diff --git a/postfix/conf/main.cf b/postfix/conf/main.cf index a618ef772..ee1c90c70 100644 --- a/postfix/conf/main.cf +++ b/postfix/conf/main.cf @@ -4,6 +4,9 @@ # The general format is lines with parameter = value pairs. Lines # that begin with whitespace continue the previous line. A value can # contain references to other $names or ${name}s. +# +# NOTE - CHANGE NO MORE THAN 2-3 PARAMETERS AT A TIME, AND TEST IF +# POSTFIX STILL WORKS AFTER EVERY CHANGE. # SOFT BOUNCE # @@ -129,6 +132,9 @@ mail_owner = postfix # through Postfix. See the smtpd_recipient_restrictions parameter # in file sample-smtpd.cf. # +# You can specify the list of "trusted" network addresses by hand +# or you can let Postfix do it for you (which is the default). +# # By default (mynetworks_style = subnet), Postfix "trusts" SMTP # clients in the same IP subnetworks as the local machine. # On Linux, this does works correctly only with interfaces specified @@ -136,7 +142,9 @@ mail_owner = postfix # # Specify "mynetworks_style = class" when Postfix should "trust" SMTP # clients in the same IP class A/B/C networks as the local machine. -# This used to be the default. It is appropriate for service providers. +# Don't do this with a dialup site - it would cause Postfix to "trust" +# your entire provider's network. Instead, specify an explicit +# mynetworks list by hand, as described below. # # Specify "mynetworks_style = host" when Postfix should "trust" # only the local machine. @@ -145,10 +153,12 @@ mail_owner = postfix # mynetworks_style = subnet # mynetworks_style = host -# Instead of using mynetworks_style to implicitly derive the mynetworks -# list from local machine addresses, you can specify an explicit list -# of network/netmask patterns, where the mask specifies the number of -# bits in the network part of a host address. +# Alternatively, you can specify the mynetworks list by hand, in +# which case Postfix ignores the mynetworks_style setting. +# +# Specify an explicit list of network/netmask patterns, where the +# mask specifies the number of bits in the network part of a host +# address. # # You can also specify the absolute pathname of a pattern file instead # of listing the patterns here. diff --git a/postfix/conf/sample-misc.cf b/postfix/conf/sample-misc.cf index 27ddd9a75..14f9e19b2 100644 --- a/postfix/conf/sample-misc.cf +++ b/postfix/conf/sample-misc.cf @@ -218,12 +218,17 @@ myorigin = $myhostname # through Postfix. See the smtpd_recipient_restrictions parameter # in file sample-smtpd.cf. # +# You can specify the list of "trusted" network addresses by hand +# or you can let Postfix do it for you (which is the default). +# # By default (mynetworks_style = subnet), Postfix "trusts" SMTP # clients in the same IP subnetworks as the local machine. # # Specify "mynetworks_style = class" when Postfix should "trust" SMTP # clients in the same IP class A/B/C networks as the local machine. -# This used to be the default. It is appropriate for service providers. +# Don't do this with a dialup site - it would cause Postfix to "trust" +# your entire provider's network. Instead, specify an explicit +# mynetworks list by hand, as described below. # # Specify "mynetworks_style = host" when Postfix should "trust" # only the local machine. @@ -232,10 +237,12 @@ myorigin = $myhostname # mynetworks_style = subnet # mynetworks_style = host -# Instead of using mynetworks_style to implicitly derive the mynetworks -# list from local machine addresses, you can specify an explicit list -# of network/netmask patterns, where the mask specifies the number of -# bits in the network part of a host address. +# Alternatively, you can specify the mynetworks list by hand, in +# which case Postfix ignores the mynetworks_style setting. +# +# Specify an explicit list of network/netmask patterns, where the +# mask specifies the number of bits in the network part of a host +# address. # # You can also specify the absolute pathname of a pattern file instead # of listing the patterns here. diff --git a/postfix/conf/sample-smtpd.cf b/postfix/conf/sample-smtpd.cf index aa80fd291..ec7714d60 100644 --- a/postfix/conf/sample-smtpd.cf +++ b/postfix/conf/sample-smtpd.cf @@ -108,12 +108,17 @@ smtpd_hard_error_limit = 100 # through Postfix. See the smtpd_recipient_restrictions parameter # in file sample-smtpd.cf. # +# You can specify the list of "trusted" network addresses by hand +# or you can let Postfix do it for you (which is the default). +# # By default (mynetworks_style = subnet), Postfix "trusts" SMTP # clients in the same IP subnetworks as the local machine. # # Specify "mynetworks_style = class" when Postfix should "trust" SMTP # clients in the same IP class A/B/C networks as the local machine. -# This used to be the default. It is appropriate for service providers. +# Don't do this with a dialup site - it would cause Postfix to "trust" +# your entire provider's network. Instead, specify an explicit +# mynetworks list by hand, as described below. # # Specify "mynetworks_style = host" when Postfix should "trust" # only the local machine. @@ -122,10 +127,12 @@ smtpd_hard_error_limit = 100 mynetworks_style = subnet # mynetworks_style = host -# Instead of using mynetworks_style to implicitly derive the mynetworks -# list from local machine addresses, you can specify an explicit list -# of network/netmask patterns, where the mask specifies the number of -# bits in the network part of a host address. +# Alternatively, you can specify the mynetworks list by hand, in +# which case Postfix ignores the mynetworks_style setting. +# +# Specify an explicit list of network/netmask patterns, where the +# mask specifies the number of bits in the network part of a host +# address. # # You can also specify the absolute pathname of a pattern file instead # of listing the patterns here. diff --git a/postfix/html/backstage.html b/postfix/html/backstage.html index 5ce551c04..577a3c032 100644 --- a/postfix/html/backstage.html +++ b/postfix/html/backstage.html @@ -57,6 +57,22 @@ or in order to resolve a destination. queue status. This is the program behind the mailq command. +
+ +
+ +
@@ -352,8 +355,10 @@ subnetworks that Postfix is connected to.
-To specify the list of trusted networks by hand, specify -network blocks in CIDR (network/mask) notation, for example: +Alternatively, you can specify the mynetworks list by hand, +in which case Postfix ignores the mynetworks_style setting. +To specify the list of trusted networks by hand, specify network +blocks in CIDR (network/mask) notation, for example:
@@ -363,6 +368,11 @@ network blocks in CIDR (network/mask) notation, for example:
+
+You can also specify the absolute pathname of a pattern file instead
+of listing the patterns in the main.cf file.
+
My own network addresses
The inet_interfaces parameter specifies all network interface
diff --git a/postfix/html/faq.html b/postfix/html/faq.html
index 0e39f9d05..d48c5be2f 100644
--- a/postfix/html/faq.html
+++ b/postfix/html/faq.html
@@ -22,10 +22,12 @@
+
+
-
-
+
+Examples of software that is used successfully with Postfix:
+
+
+
+
+
+
+
+
+
+
+
+Unfortunately, some Linux systems have a helpful utility called
+linuxconf that automatically "fixes" file permissions to
+what they are supposed to be for Sendmail's sendmail command.
+Even when you reset the set-uid bit on the Postfix sendmail
+executable file, linuxconf will happily turn it on again
+for you.
+
+
+
+On SuSE systems the file permission fixing utulity is called
+SuSEconfig. Other Linux systems may use different names.
+The usual disclaimers about mileages etc. apply.
+
+
+
+
@@ -2647,8 +2751,8 @@ the same queue file name.
-If you have to delete a large amount of mail, it is safer to stop
-Postfix first.
+If you have to delete a large amount of mail, you must stop Postfix
+first.
Postfix warnings and error messages
+
+
+
+
+
+Example configurations
@@ -78,24 +100,6 @@
Postfix warnings and error messages
-
-
-
-
-
-Sendmail incompatibility
@@ -309,6 +313,44 @@ mailbox
+POP or IMAP problems
+
+Postfix is a mail delivery system. Postfix does not implement
+services such as POP or IMAP to read mail. Several POP/IMAP
+implementations exist that can cooperate with software such as
+Postfix.
+
+
+
+
+
+
+
Stand-alone machine
Out of the box, Postfix should work without change on a stand-alone
@@ -866,6 +908,68 @@ following command as root:
+sendmail has set-uid root file permissions, or is run from a
+set-uid root process
+
+Traditionally, the UNIX sendmail command is installed with
+set-uid root permissions. Even many MTAs other than Sendmail ship
+with a set-uid root sendmail command. This is not the case
+with Postfix. The Postfix sendmail command is designed not
+to be set-uid.
+
+Solutions
+
+
+
+
+
+
+
+
+
+# /etc/rc.d/init.d/linuxconf stop && rpm --erase linuxconf
+
+
+
+
+and to make sure that in /etc/rc.config,
+PERMISSIONS_SECURITY mentions local last, EXAMPLE:
+
+
+/usr/sbin/sendmail root.root 755
+
+
+
+
+
+CHECK_PERMISSIONS=set
+PERMISSION_SECURITY="secure local"
+
+
+
Running hundreds of Postfix processes on FreeBSD
With hundreds of Postfix processes, the kernel will eventually
@@ -2629,8 +2733,8 @@ Note: be sure to not advertise fax.your.domain in the DNS :-)
Deleting a message from the Postfix queue
-To delete ONE message with queue id ABCDEF from the Postfix queue,
-it is not necessary to stop Postfix.
+To delete ONE message with queue id ABCDEF (e.g., from mailq
+output) from the Postfix queue, it is not necessary to stop Postfix.
diff --git a/postfix/html/local.8.html b/postfix/html/local.8.html
index 04aa4eb83..e909eaa28 100644
--- a/postfix/html/local.8.html
+++ b/postfix/html/local.8.html
@@ -360,9 +360,10 @@ LOCAL(8) LOCAL(8)
recipient_delimiter
Separator between username and address extension.
- test_home_directory
+ require_home_directory
Require that a recipient's home directory is acces-
sible by the recipient before attempting delivery.
+ Defer delivery otherwise.
Mailbox delivery
fallback_transport
@@ -388,7 +389,6 @@ LOCAL(8) LOCAL(8)
External command to use for mailbox delivery. The
command executes with the recipient privileges
(exception: root). The string is subject to $name
- expansions.
@@ -401,6 +401,8 @@ LOCAL(8) LOCAL(8)
LOCAL(8) LOCAL(8)
+ expansions.
+
mailbox_transport
Message transport to use for mailbox delivery to
all local recipients, whether or not they are found
@@ -420,7 +422,7 @@ LOCAL(8) LOCAL(8)
stale_lock_time
Limit the time after which a stale lock is removed.
- mailbox__delivery_lock
+ mailbox_delivery_lock
What file locking method(s) to use when delivering
to a UNIX-style mailbox. The default setting is
system dependent. For a list of available file
@@ -456,8 +458,6 @@ LOCAL(8) LOCAL(8)
-
-
7
diff --git a/postfix/man/man8/local.8 b/postfix/man/man8/local.8
index db1f94677..c0929a6ac 100644
--- a/postfix/man/man8/local.8
+++ b/postfix/man/man8/local.8
@@ -312,9 +312,9 @@ forwarding, delivery to command or file. Specify zero or more of:
forwarding mail is not recommended.
.IP \fBrecipient_delimiter\fR
Separator between username and address extension.
-.IP \fBtest_home_directory\fR
+.IP \fBrequire_home_directory\fR
Require that a recipient's home directory is accessible by the
-recipient before attempting delivery.
+recipient before attempting delivery. Defer delivery otherwise.
.SH Mailbox delivery
.ad
.fi
@@ -351,7 +351,7 @@ Time in seconds between successive attempts to acquire
an exclusive lock.
.IP \fBstale_lock_time\fR
Limit the time after which a stale lock is removed.
-.IP \fBmailbox__delivery_lock\fR
+.IP \fBmailbox_delivery_lock\fR
What file locking method(s) to use when delivering to a UNIX-style
mailbox.
The default setting is system dependent. For a list of available
diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h
index d1dadc6b3..f0445eecd 100644
--- a/postfix/src/global/mail_version.h
+++ b/postfix/src/global/mail_version.h
@@ -15,7 +15,7 @@
* Version of this program.
*/
#define VAR_MAIL_VERSION "mail_version"
-#define DEF_MAIL_VERSION "Snapshot-20010225"
+#define DEF_MAIL_VERSION "Snapshot-20010228"
extern char *var_mail_version;
/* LICENSE
diff --git a/postfix/src/local/local.c b/postfix/src/local/local.c
index 1118acd18..931b2c98f 100644
--- a/postfix/src/local/local.c
+++ b/postfix/src/local/local.c
@@ -284,9 +284,9 @@
/* forwarding mail is not recommended.
/* .IP \fBrecipient_delimiter\fR
/* Separator between username and address extension.
-/* .IP \fBtest_home_directory\fR
+/* .IP \fBrequire_home_directory\fR
/* Require that a recipient's home directory is accessible by the
-/* recipient before attempting delivery.
+/* recipient before attempting delivery. Defer delivery otherwise.
/* .SH Mailbox delivery
/* .ad
/* .fi
@@ -323,7 +323,7 @@
/* an exclusive lock.
/* .IP \fBstale_lock_time\fR
/* Limit the time after which a stale lock is removed.
-/* .IP \fBmailbox__delivery_lock\fR
+/* .IP \fBmailbox_delivery_lock\fR
/* What file locking method(s) to use when delivering to a UNIX-style
/* mailbox.
/* The default setting is system dependent. For a list of available
diff --git a/postfix/src/master/master_sig.c b/postfix/src/master/master_sig.c
index a113b13c6..ca501e918 100644
--- a/postfix/src/master/master_sig.c
+++ b/postfix/src/master/master_sig.c
@@ -214,6 +214,8 @@ void master_sigsetup(void)
msg_fatal("pipe: %m");
non_blocking(SIG_PIPE_WRITE_FD, NON_BLOCKING);
non_blocking(SIG_PIPE_READ_FD, NON_BLOCKING);
+ close_on_exec(SIG_PIPE_WRITE_FD, CLOSE_ON_EXEC);
+ close_on_exec(SIG_PIPE_READ_FD, CLOSE_ON_EXEC);
event_enable_read(SIG_PIPE_READ_FD, master_sig_event, (char *) 0);
#endif
diff --git a/postfix/src/nqmgr/qmgr_message.c b/postfix/src/nqmgr/qmgr_message.c
index ad19aebae..5d56eba03 100644
--- a/postfix/src/nqmgr/qmgr_message.c
+++ b/postfix/src/nqmgr/qmgr_message.c
@@ -685,8 +685,16 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
at = strrchr(STR(reply.recipient), '@');
len = (at ? (at - STR(reply.recipient)) : strlen(STR(reply.recipient)));
- if ((transport = qmgr_transport_find(STR(reply.transport))) == 0)
- transport = qmgr_transport_create(STR(reply.transport));
+ /*
+ * Look up or instantiate the proper transport. We're working a
+ * little ahead, doing queue management stuff that used to be done
+ * way down.
+ */
+ if (transport == 0 || !STREQ(transport->name, STR(reply.transport))) {
+ if ((transport = qmgr_transport_find(STR(reply.transport))) == 0)
+ transport = qmgr_transport_create(STR(reply.transport));
+ queue = 0;
+ }
if (transport->recipient_limit == 1) {
VSTRING_SPACE(reply.nexthop, len + 1);
memmove(STR(reply.nexthop) + len + 1, STR(reply.nexthop),
@@ -740,6 +748,7 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
* bind each recipient to an in-core queue instance which is needed
* anyway. That gives all information needed for recipient grouping.
*/
+#if 0
/*
* Look up or instantiate the proper transport.
@@ -749,6 +758,7 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
transport = qmgr_transport_create(STR(reply.transport));
queue = 0;
}
+#endif
/*
* This transport is dead. Defer delivery to this recipient.
diff --git a/postfix/src/qmgr/qmgr_message.c b/postfix/src/qmgr/qmgr_message.c
index 7ec5521d9..e696fb4a7 100644
--- a/postfix/src/qmgr/qmgr_message.c
+++ b/postfix/src/qmgr/qmgr_message.c
@@ -565,8 +565,16 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
at = strrchr(STR(reply.recipient), '@');
len = (at ? (at - STR(reply.recipient)) : strlen(STR(reply.recipient)));
- if ((transport = qmgr_transport_find(STR(reply.transport))) == 0)
- transport = qmgr_transport_create(STR(reply.transport));
+ /*
+ * Look up or instantiate the proper transport. We're working a
+ * little ahead, doing queue management stuff that used to be done
+ * way down.
+ */
+ if (transport == 0 || !STREQ(transport->name, STR(reply.transport))) {
+ if ((transport = qmgr_transport_find(STR(reply.transport))) == 0)
+ transport = qmgr_transport_create(STR(reply.transport));
+ queue = 0;
+ }
if (transport->recipient_limit == 1) {
VSTRING_SPACE(reply.nexthop, len + 1);
memmove(STR(reply.nexthop) + len + 1, STR(reply.nexthop),
@@ -620,6 +628,7 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
* bind each recipient to an in-core queue instance which is needed
* anyway. That gives all information needed for recipient grouping.
*/
+#if 0
/*
* Look up or instantiate the proper transport.
@@ -629,6 +638,7 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
transport = qmgr_transport_create(STR(reply.transport));
queue = 0;
}
+#endif
/*
* This transport is dead. Defer delivery to this recipient.