I have an Exchange server in house and while we are using iHateSpam on it I want to get a higher level of control over what gets to the mail server. My solution is to setup a postfix relay that only relays addresses on a recipient list and NDRs all other messages. I am having a little trouble getting it setup.
The resources I am following are below:
http://postfix.state-of-mind.de/patrick ... index.html
I am running this on Debian with postfix from apt-get and Cyrus SASL installed manually. It is the latest 2.x release. The problem I am having is that even though it should only be relaying certain messages, it is acting like an open relay and will forward mail to any destination.
My setup files are as follows:
# see /usr/share/postfix/main.cf.dist for a commented, fuller
# version of this file.
# Do not change these directory settings - they are critical to Postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
setgid_group = postdrop
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
myhostname = filter
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = mydomain.com
local_transport = error:local mail delivery is disabled
mynetworks = 127.0.0.0/8 192.168.1.0/24 192.168.0.0/24
relay_domains = mydomain.com
parent_domain_matches_subdomains = debug_peer_list smtpd_access_maps
smtpd_recipient_restrictions = permit_mynetworks permint_sasl_authenticated reject_unauth_destination
relay_recipient_maps = hash:/etc/postfix/relay_recipients
transport_maps = hash:/etc/postfix/transport
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
virtual_alias_maps = hash:/etc/postfix/virtual
smtpd_sasl_auth_enable = yes
is a file full of my valid email addresses in the form:email@example.com