I have Postfix setup in a test environment, segregated from our LAN, and relaying for hosts in the test environment. Originally, I had all outbound email funneling through procmail and into a single account on the postfix box (accessed via Dovecot by the devs). This allows the developers to test production code which sends email notifications without having the email actually reach it's intended recipient.
Now I need to actually allow for one host to relay to the actual world and not the "funnel" account. I still need to "lie" and accept email from any sender to anywhere (in the test environment of course) and funnel it into the funneluser account. I'm not quite sure what to even google for as this isn't a typical postfix setup. How can I add an exception for a single sending host, given the config below?
UPDATE
The noted "duplicate question" does not, at this time, contain a working example for postfix 2.9.6-1~12.04
.
postconf: warning: /etc/postfix/master.cf: unused parameter: smtpd_client_restriction=check
/usr/sbin/postconf: warning: /etc/postfix/master.cf: unused parameter: smtpd_client_restriction=check
Neither am I certain it's actually a duplicate as the answer appears to route mail based on user@domain pair. I want to route based on the connected host IP address or DNS hostname. I have posted a question to the linked "duplicate" in an attempt to resolve the issue.
My main.conf looks like this:
myhostname = cliff.blah.net
alias_database = hash:/etc/aliases
mydestination = regexp:/etc/postfix/virtual_domains
virtual_alias_maps = regexp:/etc/postfix/virtual
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.2.1.0/24
mailbox_command = /usr/bin/procmail
relay_domains = .blah.net
smtpd_recipient_restrictions = permit_mynetworks, permit_auth_destination, reject
local_recipient_maps =
virtual and virtual_domains are here:
# cat virtual
/@/ funnelmail
# cat virtual_domains
/.*/ MATCH
UPDATE2 I cannot get the example at the link above working. Maybe there is a difference in postfix versions or too many typos I don't know. I did get multipole instances running with same server on different ports but cannot post my solution here because someone closed the thread so good luck.