On Wed, Apr 15, 2020 at 3:35 PM Wietse Venema <wie...@porcupine.org> wrote: > > Vieri Di Paola: > > Hi, > > > > I'm using postfix as an smtp filter (antispam) which then forwards the > > messages to another mail server with user mailboxes. > > > > This server has private IP addr. 10.0.0.1, and the mailbox server has > > private IP addr. 10.0.0.10. > > So, external e-mails are first received by this filter and then > > forwarded to the mailboxes. > > > > It has been working fine for years, but a few days ago some e-mails > > were not coming in anymore, and the logs on the filtering server show > > messages such as this one: > > > > postfix/smtp[13093]: A306E1240B1: to=<m...@mydomain.org>, relay=none, > > delay=0.06, delays=0.06/0/0/0, dsn=5.4.6, status=bounced (mail for > > 10.0.0.10 loops back to myself) > > What has changed? > > > I'm still trying to understand what that means exactly. > > 1) It means that postfix/smtp[13093] received a request to deliver > mail for mydomain.org. > > ***Perhaps it should not have received that request.***
Yes, it should receive requests for mydomain.org. It is the antispam server where all e-mail for mydomain.org should go through first before being handed over to the mailbox server at 10.0.0.10. > 2) It means that postfix/smtp[13093] looked up the MX for mydomain.org > and found that Postfix itself (through the inet_interfaces and > proxy_interfaces parameter values) is MX for mydomain.org. > > ***Perhaps inet_interfaces or proxy_interfaces are in error.*** > > Either way, the Postfix SMTP client will not deliver mail to an IP > address that Postfix is already receiving mail on. Sorry if I might sound foolish, but why? Isn't what "transport" is for? I have another postfix server doing exactly the same thing (slightly different version, and I cannot seem to find the diff). It receives/accepts e-mails for mydomain.org, applies filters (antispam, etc), and then delivers them to another internal mail server via "transport". > > # grep mydomain.org /etc/postfix/* > > /etc/postfix/main.cf:proxy_interfaces = mail1.mydomain.org > > mail2.mydomain.org > > Note: that makes the proxy_interfaces dependent on /etc/hosts, DNS, > and so on. All of these can change without ever touching Postfix > code or configuration. Yes, but the name resolution as posted previously seems *just fine*. Even if mail2.mydomain.org were to point to this Postfix server, why would it not honor the "transport" directive as shown here below? > > /etc/postfix/transport:mydomain.org smtp:[10.0.0.10] > > I would not analyze this without a proper diagram. One Postfix > instance that delivers mail to itself is an invitation for mailer > loops. What do you mean by that? Doesn't this entry mean that all mail for mydomain.org should be sent to 10.0.0.10? Thanks for the kind help. If you need more config settings or DNS lookups, please don't hesitate to ask. Vieri PS: I had quite a few messages as seen in postqueue when I had the dreaded "loops back to myself" messages. I did a postqueue -f to force delivery again, but now postqueue -p shows nothing. Have I lost all messages for good, or is there a subdir where these "bounced" messages are kept?