I have a postfix mail server (postfix-2.3.3-2.1.centos.mysql_pgsql) hosting 20-30 virtual domains on mysql.

Now I find myself with the need to make that server also the secondary MX for another specific domain that I was for all users.

If I understand the steps correctly (from http://www.postfix.org/STANDARD_CONFIGURATION_README.html#firewall), I need to:
Add the MX record to DNS,

Add a relay_domains entry:
relay_domains = the.backed-up.domain.tld

add:
relay_recipient_maps = hash:/etc/postfix/relay_recipients

Add an entry to /etc/postfix/relay_recipients:
@the.backed-up.domain.tld x
(and rebuild the hash)

restart postfix.

That about it?

Rick


[r...@agencymail filter.d]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
bounce_queue_lifetime = 2d
bounce_size_limit = 50000
bounce_template_file = /etc/postfix/bounce.cf
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = amavisd-new:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
default_rbl_reply = $rbl_code Service unavailable; $rbl_class [$rbl_what] blocked using $rbl_domain${rbl_reason?; $rbl_reason}
delay_warning_time = 2h
disable_vrfy_command = yes
header_checks = pcre:/etc/postfix/header_checks
home_mailbox = Maildir/
html_directory = /var/www/html/postfix
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
maximal_queue_lifetime = 2d
message_size_limit = 30720000
mime_header_checks = pcre:/etc/postfix/mime_header_checks
mydestination = localhost $myhostname
mydomain = example.com
myhostname = agencymail.example.com
myorigin = example2.com
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
receive_override_options = no_address_mappings
recipient_delimiter = +
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
show_user_unknown_table_name = no
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_tls_loglevel = 2
smtp_use_tls = yes
smtpd_client_connection_rate_limit = 30
smtpd_client_restrictions =
smtpd_data_restrictions = reject_multi_recipient_bounce
smtpd_helo_required = yes
smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_non_fqdn_sender permit_mynetworks permit_sasl_authenticated check_client_access hash:/etc/postfix/agencies reject_unauth_destination check_helo_access pcre:/etc/postfix/helo_checks check_sender_access hash:/etc/postfix/access reject_unknown_sender_domain reject_rbl_client zen.spamhaus.org reject_rbl_client bl.spamcop.net reject_rbl_client dnsbl.sorbs.net reject_rbl_client cbl.abuseat.org
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = /var/spool/postfix/private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions =
smtpd_tls_cert_file = /etc/httpd/certs/agencymail_example_com.crt
smtpd_tls_key_file = /etc/httpd/certs/agencymail.example.com.key.no.password
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:105
virtual_mailbox_base = /var/spool/mail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:1015


Rick Steeves
http://www.sinister.net

"The more I learn, it seems, the less I know." Frazz

Reply via email to