Postfix - messages from invalid domains getting through
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Postfix - messages from invalid domains getting through
We're using Postfix on a SuSE Linux system as our first line of defense to filter incoming email, the mail is subsequently passed on to another internal system. There are messages *to* users in invalid domains slipping through and I'm not sure why. By "invalid domains" I mean domains which are not part of my organization such as sesmail.com, psv.nl, yifan.com, etc. The invalid domains in question are not listed in the relay_domains section of the main.cf file nor are there any users listed in the relay_recipients file @ any of the invalid domains. Any Postfix experts out there have a suggestion on what to check / look for?
Thanks in advance
Scott
Here's the main.cf file:
Note, I've removed commented out info and I've changed the data under relay_domains and myhostname.
The mail logs show destination addresses like this:
<iqajikyye5444@chello.nl> -> <usera@mydomain.com>
<211348@ilikeclick.com> -> <userb@mydomain.com>
<phonicsm59@websitedesignforbusiness.com> -> <userc@mydomain.com>
NOTE: I substituted the real user email addresses with usera@mydomain.com, userb@mydomain.com, and userc@mydomain.com.
Is this the same as "sender specific routing"?
It looks like this is disabled by default: http://www.postfix.org/postconf.5.ht...rusted_routing (turned off by default)
but I went ahead and added the line "allow_untrusted_routing = no" just to make sure. That didn't fix the problem.
We have two locations, each has a different inbound Internet connection.
At each location we've got a system setup with SuSE Linux, Postfix, SpamAssassin, ClamAV. These are the systems I'm working on.
Mail from Internet goes to one or the other SuSE server, from there, we send it to a Barracuda Spam Firewall. Any messages that make it through the Barracuda, go to our end user mail server (running MS Exchange).
We do it this way for a couple reasons, first, the Barracuda provides (I believe) a better level of protection (my comment is mostly focused on their spam protection), second, by using the Linux systems as our Internet gateway devices, we only need to purchase one Barracuda.
We do not filter any outbound mail so the only mail going to the Barracuda is inbound from the SuSE servers.
The messages in question are making it through the SuSE system to the Barracuda. The Barracuda is stopping them.
The goal is to prevent these messages from making it to the Barracuda. "These messages" are defined as messages which have a final destination email address outside my environment.
Run "postconf -n", what is mynetworks set to? I'm guessing that "permit_mynetworks" in smtpd_recipient_restrictions is matching before "reject_unauth_destination"
Ok, I'm trying to follow the logic of the setting to see how the messages are getting through. I know it starts on the left, and takes the first match. Are you suggesting that the lack of an explicit $mynetworks setting is allowing any destination to match "permit_mynetworks"?
Sounds like I need to remove permit_mynetworks or put it at the right end of the restrictions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.