LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Outgoing-only postfix server (https://www.linuxquestions.org/questions/linux-server-73/outgoing-only-postfix-server-704659/)

viniosity 02-14-2009 01:43 PM

Outgoing-only postfix server
 
I've inherited a postfix/courier setup that I'm not too familiar with. Looks like SpamAssassin is also in the mix. I'd like to modify my setup to reject all incoming email (only outgoing should work). Is there a quick change I can make to a config file to do that? I don't even want this stuff passed on to SpamAssassin..

Thanks in advance..

bmarx 02-15-2009 08:01 AM

Why not just reject all addresses from accessing port 25 with iptables, except the ones you want :)

viniosity 02-15-2009 09:29 AM

Quote:

Originally Posted by bmarx (Post 3444186)
Why not just reject all addresses from accessing port 25 with iptables, except the ones you want :)

That's actually a *great* idea.. I'll do that! I am still curious on the proper postfix config but your solution will definitely help me out.

billymayday 02-15-2009 05:33 PM

Depending on your network setup, you should be able to control this using smtpd in master.cf.

For example, if you have 2 NICs, 192.168.0.1 and 192.169.1.1, and the first is your internal LAN and the second is the external WAN, replace
Code:

smtp      inet  n      -      n      -      -      smtpd
with
Code:

127.0.0.1:smtp      inet  n      -      n      -      -      smtpd
192.168.0.1:smtp      inet  n      -      n      -      -      smtpd

and then postfix will only listen on localhost and 192.168.0.1

How to deal with the SA issue will depend on how it's set up.

Mr. ameya sathe 02-15-2009 10:10 PM

Standard steps given in RHEL deployment guide
 
* Edit the /etc/postfix/main.cf file with a text editor, such as vi.
* Comment the mydomain line by inserting the hash mark (#).
* Comment the myorigin = $mydomain line.
* Comment the myhostname line.
* Comment the mydestination = $myhostname, localhost.$mydomain line.
* Comment the mynetworks line.
* Comment the inet_interfaces = all line.
* Restart the postfix service.:twocents:


All times are GMT -5. The time now is 12:55 AM.