6

We need to accept email from a server that sends out using a non-existing domain. That server is not under my control.

In my main.cf I have

smtpd_client_restrictions       = permit_mynetworks,
                              hash:/etc/postfix/access,
                              permit_sasl_authenticated

in /etc/postfix/access I have

<server's ip>                 OK
vps1.nonexistingdomain.com         OK

However, when I recieve messages from that server in my logs I see:

Jul 26 10:30:07 mail3 postfix/smtpd[24044]: NOQUEUE: reject: RCPT from vps1.nonexistingdomain.com[ip address]: 554 5.1.8 <[email protected]>: Sender address rejected: Domain not found; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<vps1.nonexistingdomain.com>

As another workaround I tried to manually hardcode this hostname:ip into my /etc/hosts, but that makes no difference.

1
  • You shall not fix other people's failures. Will you always configure your server when someone else is not capable to administer their system?
    – mailq
    Jul 28, 2012 at 22:33

2 Answers 2

3

In /etc/postfix/main.cf, place the server's IP address in mynetworks.

Example (where the IP addres is 198.51.100.43):

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 198.51.100.43
3
  • Yup, adding that server's IP to mynetworks resolved this problem. Should I keep other config changes that I made above or is mynetworks entry sufficient for everything?
    – Mxx
    Jul 26, 2012 at 19:27
  • 1
    The mynetworks change is all you need. It's not necessary to put the IP address in /etc/postfix/access. Jul 26, 2012 at 19:38
  • Under the right circumstances you do indeed need an access check in smtpd_sender_restrictions. It depends upon whether you have "permit_mynetworks" in smtpd_sender_restrictions and whether it comes before or after other checks.
    – datn
    Mar 6, 2016 at 23:58
7

Right now, probably:

~ $ sudo postconf smtpd_sender_restrictions
smtpd_sender_restrictions = reject_unknown_sender_domain

Should be?

~ $ sudo postconf smtpd_sender_restrictions
smtpd_sender_restrictions = check_sender_access reject_unknown_sender_domain

option set in main.cf
You'll need to postalias /etc/postfix/access if you haven't already.

Also, chastise the sender for not owning the domain they're sending from (or not having had created the appropriate subdomain).

1
  • Before I resorted to modifying our mail config I fought long and hard with them to fix this problem on their end..Alas here I am. :(
    – Mxx
    Jul 26, 2012 at 17:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .