Empty from address bounce messages postfix

Hello,

We've got 2 postfix servers. One is a smtp server(server1) and the other is pop/imap server(server2). When I send a message to an unknow user the smtp server(server1) wants to send I bounce message back to me. The bounce message is send to the incoming mailserver(server2)which is correct. I don't recieve that message and when i look at the logs I see the following:
 said: 554 5.7.1 This message has been blocked because the return email domain is invalid.(failed to obtain DNS record for domain ) (in reply to end of DATA command))

The return path is empty thats why I get this message. How can I prevent this?

Hope somebody can help me out.
 
NetaffairsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bevhostCommented:
The rules in you main.cf are not in the correct order or your missing a permit somewhere.
You should permit all mail from server1 to server2.
eg
add server1's ip address to mynetworks or something to allow it to bypass the later checks.

If you're not sure, post your main.cf here and we can take a look.
0
NetaffairsAuthor Commented:
Hello bevhost,

Thanks!

I found it. This is a part of the main.cf:
smtpd_recipient_restrictions =
   permit_mynetworks,
   check_client_access hash:/etc/postfix/access,
   reject_unauth_destination,
   reject_non_fqdn_recipient,
   reject_non_fqdn_sender,
   reject_unknown_sender_domain

I want to keep using this part and "whitelist"server1. Is that possible?
0
bevhostCommented:
if you add the ip address of server1 to mynetworks OR /etc/postfix/access (as a permit)
then the rules below that would never get processed (for that client IP).
0
NetaffairsAuthor Commented:
I added our iprange and i did a postfix reload but that didn't help. Do i need to stop and start postfix?
0
bevhostCommented:
When you change an access file, you have to rebuild the database.
eg

# postmap hash:access

This creates a file access.db which is the file postfix actaully uses.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.