Between compatability issues, and automated updates,
our sending-only postfix hosts managed to have in
/etc/postfix/main.cf

===========================================================================
[...]
smtpd_relay_restrictions = permit_mynetworks
[...]
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
[...]
inet_interfaces = loopback-only
inet_protocols = ipv4
===========================================================================

(Should have instead something like...)
smtpd_relay_restrictions = permit_mynetworks, reject

The missing ", reject" type parameter caused regular complaints as the
smtpd could not start.  (From /var/log/mail.log)


Aug 10 16:05:14 ubuntu1804-306 postfix/smtpd[38121]: fatal: in parameter 
smtpd_relay_restrictions or smtpd_recipient_restrictions, specify at least one 
working instance of: reject_unauth_destination, defer_unauth_destination, 
reject, defer, defer_if_permit or check_relay_domains
Aug 10 16:05:15 ubuntu1804-306 postfix/master[3492]: warning: process 
/usr/lib/postfix/sbin/smtpd pid 38121 exit status 1
Aug 10 16:05:15 ubuntu1804-306 postfix/master[3492]: warning: 
/usr/lib/postfix/sbin/smtpd: bad command startup -- throttling
Aug 10 16:06:15 ubuntu1804-306 postfix/smtpd[38175]: fatal: in parameter 
smtpd_relay_restrictions or smtpd_recipient_restrictions, specify at least one 
working instance of: reject_unauth_destination, defer_unauth_destination, 
reject, defer, defer_if_permit or check_relay_domains
Aug 10 16:06:16 ubuntu1804-306 postfix/master[3492]: warning: process 
/usr/lib/postfix/sbin/smtpd pid 38175 exit status 1
Aug 10 16:06:16 ubuntu1804-306 postfix/master[3492]: warning: 
/usr/lib/postfix/sbin/smtpd: bad command startup -- throttling

This had the interesting result that attempts to
test with "netcat localhost smtp" would hang.
I.e. preventing such "bogus MUAs".

(Adding the ", reject" caused "netcat localhost smtp" to work).

However, /usr/lib/sendmail would appear to work fine to
send outgoing mail.  Headers seem to suggest that messages
do get queued without using an smtp connection at all.

To wit...

 Received: by u1804news3.lxc (Postfix, from userid 1001)
         id 7DFE31CC13FE; Mon, 10 Aug 2020 18:47:57 -0400 (EDT)

And we hadn't received user complaints about not being able
to send outgoing mail.

I can't find an "official" way to listen on no inet_interfaces.

I can't see a big argument against preventing unauthenticated
smtp conversations from localhost.  Would that be a reasonable
configuration for postfix to be changed to allow? (assuming it
is not currently allowed; perhaps I just can't find how to do it).

Or, will, under some circumstances, the actual loopback interface
be required, e.g. in backlog situations?

(Perhaps eventually we should switch to authenticated localhost
smtp connections, but that's a different thing).
(And is "PIPELINING" support involved here, too?)


Adrian Pepper
arpep...@uwaterloo.ca


Reply via email to