My company - fred.com - sends internal mail to an external MS Office email exchange, using MailEnableAdmin on Windows, primarily for server alert mail.
The plan is to move away from MailEnableAdmin on Windows to a CentOS server.
I have successfully configured a mail relay with postfix to send internal mail to the MS Office exchange to multiple addressees.
However, we also have a client/customer that we host servers for - mary.com - and they use our existing Windows Relay to redirect messages coming into "email@example.com" to "firstname.lastname@example.org", and redirect emails coming into "email@example.com" to firstname.lastname@example.org. I have tried to 'redirect' both addresses to "email@example.com", so I'm the only one that sees them, but I can't seem to get the redirection to work.
I have tried to set up 'sender_canonical_maps', see below, but the firstname.lastname@example.org (or email@example.com) does not get redirected to firstname.lastname@example.org, it ends up being delivered to the MailEnableAdmin server, which I'm trying to avoid. What have I missed in the configuration?
To make it more "fun" the client wants the "email@example.com" emails 'stored and forwarded', but the "firstname.lastname@example.org" just forwarded on ...
I have created a local 'invoices' user, but that's within the "fred.com" domain name ... (isn't it?) ...
Code: Select all
#### sender_canonical_maps #### @fred.local @fred.com email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org
Code: Select all
#### MAIN.CF #### queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix mail_owner = postfix inet_interfaces = localhost inet_protocols = all mydestination = $myhostname, localhost.$mydomain, localhost unknown_local_recipient_reject_code = 550 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $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 relay_domains = fred.com, mary.com smtp_use_tls = yes smtp_tls_CAfile=/etc/pki/tls/certs/ca-bundle.trust.crt smtp_sasl_auth_enable = yes smtp_sasl_security_options = noanonymous smtp_sasl_tls_security_options = noanonymous smtp_tls_security_level = encrypt smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd smtp_generic_maps = hash:/etc/postfix/generic sender_canonical_classes = envelope_sender, header_sender sender_canonical_maps = hash:/etc/postfix/sender_canonical_maps smtp_send_dummy_mail_auth=no smtp_tls_loglevel=1 debug_peer_level = 2 debug_peer_list = filter1.fred.com milter_default_action = accept milter_protocol = 6 smtpd_milters = unix:/var/run/spamass-milter/spamass-milter.sock non_smtpd_milters = $smtpd_milters mailbox_command = /bin/mailx