Postfix to receive mail from all Internet

Posted on 2006-05-15
Last Modified: 2010-03-18
Hi All,

I have configured postfix on our server and it works fine on our local network. We can send & recieve, even POP3 without any problem.

However, for testing reasons I sent e-mails from outside addresses, but they are not being delivered. The log sais "Relay access is denied". I read all kinds of HOWTOs and manuals, but can't get this work.

If I set "mynetwork_style = subnet" then all mail coming from the Internet will be dropped because of "relay access is denied". If I open my postfix to the whole word by setting "mynetwork" to a stupid something that filters nothing out, then I will be the relay station of the entire world's, which I obviously do not want to be.

So, how do I make it to receive mail that comes for our domain names, and drop all the rest?
Question by:PappP
    LVL 25

    Expert Comment

    please post, I need to know what your restrictions are.

    Author Comment


    I got this shorted out. It was a real dumb mistake on my part: I put the www to mydestinations in the main config file (ie. instead of I wrote I corrected this and now it works fine.

    There is one problem though, still worth the 175 points. I got 35-40 hits each minute, asking for e-mail relay. Postfix correctly denies that, but at the same time fills up the syslog to the point where it grows out of control. So the question is: how to prevent the "Relay access denied" messages from being logged?
    LVL 25

    Accepted Solution

    I'm not positive exactly how to do it, but you need to mess with the mail facility logging in the syslog.conf file.

    however, I highly do not recommend not logging relay access denied messages.  I would think this would be a warning level message and it has to deal with security of your box.  Every mail server is going to get these because spammers.  If I were you, I'd figure out how to enlarge the /var/log directory by possibly putting it on its own larger partition, rotate the logs more often (be careful on this one, the more you rotate, the less historical data you have to go thru if you do get compromised), or keep less logs (same problem as rotating the logs more often).

    Author Comment

    OK I agree 100%.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    This video discusses moving either the default database or any database to a new volume.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now