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)

I'm still trying to understand what that means exactly.

# grep mydomain.org /etc/postfix/*
/etc/postfix/main.cf:proxy_interfaces = mail1.mydomain.org mail2.mydomain.org
/etc/postfix/main.cf:relay_domains = mydomain.org mydomain2.org
/etc/postfix/relay_recipients:@mydomain.org     x
Binary file /etc/postfix/relay_recipients.db matches
/etc/postfix/transport:mydomain.org     smtp:[10.0.0.10]
Binary file /etc/postfix/transport.db matches

Host resolution on the postfix server:
# host mail1.mydomain.org
mail1.mydomain.org has address 10.0.0.2
# host mail2.mydomain.org
mail2.mydomain.org has address 10.0.0.1

NB: mail1.mydomain.org (10.0.0.2) is another postfix antispam server
in the private network, but that shouldn't matter here.

# dig +nocookie -t MX mydomain.org

; <<>> DiG 9.11.1-P1 <<>> +nocookie -t MX mydomain.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43328
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 4

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;mydomain.org.                  IN      MX

;; ANSWER SECTION:
mydomain.org.           3600    IN      MX      100 mail2.mydomain.org.
mydomain.org.           3600    IN      MX      10 mail1.mydomain.org.

;; ADDITIONAL SECTION:
mail2.mydomain.org.     3600    IN      A       10.0.0.1
mail1.mydomain.org.     3600    IN      A       10.0.0.2

;; Query time: 0 msec
;; SERVER: 10.0.0.31#53(10.0.0.31)
;; WHEN: Wed Apr 15 09:56:15 CEST 2020
;; MSG SIZE  rcvd: 155

I don't know how postfix decides that the mail destined to the mailbox
server (10.0.0.10) should loop back to itself.

How can I debug this?
What should I be looking for?

Regards,

Vieri

Reply via email to