Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 12-10-2010, 08:49 AM   #1
LQ Newbie
Registered: Dec 2005
Posts: 6

Rep: Reputation: 0
Postfix recipient restrictions....

I'm working on setting up some postfix servers on my network.

Their function is simple I believe.

I have 2 internal domains ( and that are identified in my transport file and look something like this:

#/etc/postfix/transport     smtp:[exchFE.fqdn.lan]:25     smtp:[exchFE.fqdn.lan]:25
Any mail that is not addressed to one of those domain names, should be delivered to the relayhost as defined in the file.

relayhost = 172.16.x.x
~~~ SNIP ~~~

I need to put some restrictions in place.

I need to be able to define a list of IP addresses that can send to the 2 internal domains, and a seperate list of IP addresses that can use the relayhost.

How would you go about this?

- The background: This is a large multi subnet LAN. We have dozens of servers on our production network that need to send emails to various employees (on an Exchange server) with logs from jobs, information, whatever.

Some of the scripts and jobs need to email vendors and external domains. The relay host is in a DMZ and it is another SMTP server that our webservers use to relay mail. That smtp server relays to an external third party who scrubs scans and sends.
Old 12-11-2010, 05:46 AM   #2
Senior Member
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
Off hand, I am not sure how to filter based upon IP address. It may be possible, though. there are a TON of configurations you can set in Postfix and I would suggest that you look into the smtpd_sender restrictions here. There is also an address restrictions section, here, that may be of interest. These pages also show a lot of sample scenario configurations and perhaps one of them will closely match your needs.
Old 12-11-2010, 02:53 PM   #3
Senior Member
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,328

Rep: Reputation: 254Reputation: 254Reputation: 254
The access (man 5 access)table is IP based, and you can possibly use the FILTER transport:destination rule to make such decisions.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Postfix recipient restrictions problem 3dd13 Linux - Server 2 03-26-2008 10:20 AM
Postfix whitelisting by recipient address? carlmarshall Linux - Server 4 12-07-2006 07:12 AM
Postfix on RH 9 'No Recipient' in queue rangert Linux - Server 3 10-25-2006 11:57 AM
postfix and php : recipient unknown jodaog Linux - Software 1 03-13-2005 09:25 AM
postfix - wrong recipient address iliah Linux - Networking 2 09-26-2004 09:34 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:46 AM.

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