We recently began accepting mail for another business. One of the addresses needs to be forwarded to an external address. I need to remap user1@domainC to user2@domainD. I'm not using virtual domains currently and I am concerned by adding them I'll miss something and require a fire extinguisher.
I added the alias and tried both newaliases and postalias, and also manually reloaded postfix. The messages to user1@domainC continue to be routed to our internal mail server instead of back out to the internet.
I tried adding it in transport and pointed it to DomainD's MX server, but it created a loop because that server points all DomainC mail to us and the transport doesn't re-write the address.
I know this has to be simple, but I haven't stumbled across the necessary changes. I'd appreciate specific changes instead of pointing me to the HowTo's, FAQ, Postfix website, etc.
Here's my postconf:
---
2bounce_notice_recipient = 2bounce
access_map_reject_code = 554
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_percent_hack = no
biff = no
body_checks = regexp:/etc/postfix/body_checks
command_directory = /usr/local/sbin
config_directory = /etc/postfix
daemon_directory = /usr/local/libexec/postfix
debug_peer_level = 2
default_privs = nobody
defer_code = 554
delay_warning_time = 12
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks
ignore_mx_lookup_error = no
inet_interfaces = all
invalid_hostname_reject_code = 554
local_recipient_maps =
local_transport = error:local mail delivery is disabled on this machine
luser_relay = /dev/null
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
maps_rbl_reject_code = 554
masquerade_domains = $mydomain
masquerade_exceptions = root
message_size_limit = 20971520
mydomain = DomainA
myhostname = mailtruck2.DomainA
mynetworks = PubIP1/24, 127.0.0.0/8, 192.168.0.0/24, PubIP2/25
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/local/bin/newaliases
non_fqdn_reject_code = 554
notify_classes = resource, software
queue_directory = /var/spool/postfix
readme_directory = no
recipient_delimiter = +
reject_code = 554
relay_domains = $mydestination, DomainA, DomainB, DomainC
relay_domains_reject_code = 554
relay_recipient_maps = hash:$config_directory/relay_recipients.proto
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
show_user_unknown_table_name = no
smtpd_banner = $myhostname NO UCE ESMTP
smtpd_client_restrictions = reject_unauth_pipelining, permit
smtpd_delay_reject = yes
smtpd_error_sleep_time = 10
smtpd_hard_error_limit = 5
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, check_helo_access hash:/usr/local/etc/postfix/helo_access, reject_non_fqdn_hostname, reject_invalid_hostname, permit
smtpd_junk_command_limit = 3
smtpd_soft_error_limit = 2
strict_rfc821_envelopes = yes
swap_bangpath = no
transport_maps = hash:$config_directory/transport
unknown_address_reject_code = 554
unknown_client_reject_code = 554
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 554
unknown_relay_recipient_reject_code = 554
unknown_virtual_alias_reject_code = 554
unknown_virtual_mailbox_reject_code = 554
---
A subset of my /etc/postfix/aliases:
---
# Put your local aliases here.
user1: user2@domainD
---
Thanks!
Jim
I added the alias and tried both newaliases and postalias, and also manually reloaded postfix. The messages to user1@domainC continue to be routed to our internal mail server instead of back out to the internet.
I tried adding it in transport and pointed it to DomainD's MX server, but it created a loop because that server points all DomainC mail to us and the transport doesn't re-write the address.
I know this has to be simple, but I haven't stumbled across the necessary changes. I'd appreciate specific changes instead of pointing me to the HowTo's, FAQ, Postfix website, etc.
Here's my postconf:
---
2bounce_notice_recipient = 2bounce
access_map_reject_code = 554
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_percent_hack = no
biff = no
body_checks = regexp:/etc/postfix/body_checks
command_directory = /usr/local/sbin
config_directory = /etc/postfix
daemon_directory = /usr/local/libexec/postfix
debug_peer_level = 2
default_privs = nobody
defer_code = 554
delay_warning_time = 12
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks
ignore_mx_lookup_error = no
inet_interfaces = all
invalid_hostname_reject_code = 554
local_recipient_maps =
local_transport = error:local mail delivery is disabled on this machine
luser_relay = /dev/null
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
maps_rbl_reject_code = 554
masquerade_domains = $mydomain
masquerade_exceptions = root
message_size_limit = 20971520
mydomain = DomainA
myhostname = mailtruck2.DomainA
mynetworks = PubIP1/24, 127.0.0.0/8, 192.168.0.0/24, PubIP2/25
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/local/bin/newaliases
non_fqdn_reject_code = 554
notify_classes = resource, software
queue_directory = /var/spool/postfix
readme_directory = no
recipient_delimiter = +
reject_code = 554
relay_domains = $mydestination, DomainA, DomainB, DomainC
relay_domains_reject_code = 554
relay_recipient_maps = hash:$config_directory/relay_recipients.proto
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
show_user_unknown_table_name = no
smtpd_banner = $myhostname NO UCE ESMTP
smtpd_client_restrictions = reject_unauth_pipelining, permit
smtpd_delay_reject = yes
smtpd_error_sleep_time = 10
smtpd_hard_error_limit = 5
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, check_helo_access hash:/usr/local/etc/postfix/helo_access, reject_non_fqdn_hostname, reject_invalid_hostname, permit
smtpd_junk_command_limit = 3
smtpd_soft_error_limit = 2
strict_rfc821_envelopes = yes
swap_bangpath = no
transport_maps = hash:$config_directory/transport
unknown_address_reject_code = 554
unknown_client_reject_code = 554
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 554
unknown_relay_recipient_reject_code = 554
unknown_virtual_alias_reject_code = 554
unknown_virtual_mailbox_reject_code = 554
---
A subset of my /etc/postfix/aliases:
---
# Put your local aliases here.
user1: user2@domainD
---
Thanks!
Jim