Email configuration on dev server: At the moment I have postfix configured to route all emails sent to itself. So if you try to send and email to any address say firstname.lastname@example.org it won't be delivered the that address, instead you would check the email locally at email@example.com.
This is the expected behaviour as we don't accidentally want to email thousands of users on our dev server.
We want to use git post-receive-email to notify the testers that a new commit have been deployed and is ready for testing. I have already set this part up but obviously is re-routed by postfix as explained above.
How can I create a type of whitelist email that will not conform to the rule above. Say if the to address is firstname.lastname@example.org then it's sent to email@example.com but if the email to address is anything else then it's routed to firstname.lastname@example.org
The only special config I have is /etc/posfix/main.cnf and it contains
command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix myhostname = hostname.com mydomain = hostname.com myorigin = $mydomain mydestination = localhost, localhost.localdomain, $myhostname, localhost.$mydomain, $mydomain unknown_local_recipient_reject_code = 550 mynetworks_style = host mynetworks = 127.0.0.0/28, 10.92.40.39/24 relay_domains = $mydestination relayhost = 127.0.0.1 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases debug_peer_level = 2 debug_peer_list = 127.0.0.1, localhost debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases.postfix mailq_path = /usr/bin/mailq.postfix setgid_group = postdrop html_directory = no manpage_directory = /usr/share/man sample_directory = /usr/share/doc/postfix-2.3.3/samples readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES mailbox_size_limit = 0 always_bcc = archive@localhost