LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-14-2009, 01:43 PM   #1
viniosity
Member
 
Registered: Oct 2001
Location: Washington, DC
Distribution: Debian, Archlinux, Ubuntu, Sidux
Posts: 244

Rep: Reputation: 30
Question 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..
 
Old 02-15-2009, 08:01 AM   #2
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Rep: Reputation: 34
Why not just reject all addresses from accessing port 25 with iptables, except the ones you want
 
Old 02-15-2009, 09:29 AM   #3
viniosity
Member
 
Registered: Oct 2001
Location: Washington, DC
Distribution: Debian, Archlinux, Ubuntu, Sidux
Posts: 244

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by bmarx View Post
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.
 
Old 02-15-2009, 05:33 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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.

Last edited by billymayday; 02-15-2009 at 05:35 PM.
 
Old 02-15-2009, 10:10 PM   #5
Mr. ameya sathe
Member
 
Registered: Jul 2007
Distribution: RedHat Enterprise 5 Server Edition; Ubuntu 8.04 ; RHCE Certificate number: 805008741034103
Posts: 78
Blog Entries: 8

Rep: Reputation: Disabled
Post 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.
 
  


Reply

Tags
postfix



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuring Postfix for outgoing email degaray Linux - Software 19 05-05-2010 09:58 PM
Configuring Postfix for outgoing email jay0316 Linux - Software 1 10-20-2008 01:01 PM
Postfix how to set outgoing interface/IP? spadesmaster Fedora 2 02-10-2007 02:05 PM
postfix outgoing port ? taiwf Linux - Software 4 07-06-2006 10:59 AM
Outgoing Only mail server using Postfix opnsrc Linux - Networking 0 06-15-2006 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration