Email MX Backup doesn't send to relay_domains

Discussion in 'Server Operation' started by danjde, Aug 26, 2017.

  1. danjde

    danjde New Member

    Hi friends,
    I'm setting up an MX backup server (Postfix) on Debian Jessie as suggested here.
    Seem to me to have made all correctly but obviously it is not so because the backup server does not send to the main server :-|
    Could you help me to understand where I 'm wrong?

    DNS

    MX 10 server1.org
    MX 20 server2.org


    This i my main.cf, where server1.or is the primary and server2.org is the backup MX :

    Code:
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    append_dot_mydomain = no
    readme_directory = no
    smtpd_tls_cert_file = /etc/fullchain.pem
    smtpd_tls_key_file = /etc/privkey.pem
    smtpd_use_tls=yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
    smtpd_client_restrictions = reject_unknown_reverse_client_hostname
    smtpd_recipient_restrictions =
      reject_non_fqdn_sender,
      reject_unauth_destination,
      reject_unknown_reverse_client_hostname,
      reject_invalid_helo_hostname,
      reject_non_fqdn_helo_hostname,
      reject_unknown_sender_domain,
      reject_non_fqdn_recipient
    myhostname = server2.org
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = server2.org, localhost.server2.org, localhost
    relay_domains = $mydestination, server1.org
    transport_maps = hash:/etc/postfix/transport
    relay_recipient_maps =
    relayhost =
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    maximal_queue_lifetime = 50d
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3
    virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
    virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
    virtual_transport = lmtp:unix:private/dovecot-lmtp
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    smtpd_sasl_auth_enable = yes
    smtpd_tls_security_level = may
    smtpd_tls_auth_only = yes
    smtpd_milters = unix:/spamass/spamass.sock
    milter_connect_macros = i j {daemon_name} v {if_name} _
    smtpd_sender_login_maps = mysql:/etc/postfix/mysql-email2email.cf,mysql:/etc/postfix/mysql-virtual-alias-maps.cf

    Many thanks!
    Davide
     

Share This Page