Multiple receiving domains/addresses

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Multiple receiving domains/addresses

Yann Rousse
This post has NOT been accepted by the mailing list yet.
Hello,

I'm running a Family/personal Postfix 3.1.4 on a Debian Stretch. Currently polishing setup…
My server has several IPv4 and IPv6 addresses, which are used for 2 domains and records.
I'm using some postfix features (see master.cf extract below) to get proper certs and helo name by binding services and settings to proper IP addresses and their reverse, for both inbound and outbound emails.
Pretty straightforward as soon as one catch the proper documentation.

I'm in the process to enable IPv6 capability for my Postfix.
Now, my noobish question: Regarding IPv4 and IPv6 addresses, is there a way to factorise somehow my configuration file ?


IPv4_address1:submission inet n       -       -       -       -       smtpd
  -o syslog_name=submission/domain1.org
  -o smtpd_tls_key_file=/path/to/file/privkey1.pem
  -o smtpd_tls_cert_file=/path/to/file/fullchain1.pem
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth
  -o smtpd_sasl_security_options=noanonymous
  -o smtpd_sasl_local_domain=mail.domain1.org
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

IPv4_address1:smtp      inet  n       -       -       -       -       smtpd
  -o syslog_name=postfix/domain1.org_in
  -o smtpd_tls_key_file=/path/to/file/privkey1.pem
  -o smtpd_tls_cert_file=/path/to/file/fullchain1.pem
  -o myhostname=mail.domain1.org
  -o smtp_bind_address=IPv4_address1
  -o smtp_helo_name=mail.domain1.org

[IPv6_address1]:submission inet n       -       -       -       -       smtpd
  -o syslog_name=submission/domain1.org
  -o smtpd_tls_key_file=/path/to/file/privkey1.pem
  -o smtpd_tls_cert_file=/path/to/file/fullchain1.pem
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth
  -o smtpd_sasl_security_options=noanonymous
  -o smtpd_sasl_local_domain=mail.domain1.org
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

[IPv6_address1]:smtp      inet  n       -       -       -       -       smtpd
  -o syslog_name=postfix/domain1.org_in
  -o smtpd_tls_key_file=/path/to/file/privkey1.pem
  -o smtpd_tls_cert_file=/path/to/file/fullchain1.pem
  -o myhostname=mail.domain1.org
  -o smtp_bind_address6=IPv6_address1
  -o smtp_helo_name=mail.domain1.org


#(sender_dependent_default_transport_maps section:)

domain1.org_smtp              unix  -       -       -       -       -       smtp
  -o syslog_name=postfix/domain1.org_out
  -o smtpd_tls_key_file=/path/to/file/privkey1.pem
  -o smtpd_tls_cert_file=/path/to/file/fullchain1.pem
  -o myhostname=mail.domain1.org
  -o smtp_bind_address=IPv4_address1
  -o smtp_bind_address6=IPv6_address1
  -o smtp_helo_name=mail.domain1.org

(Not showing the domain2.org part… not relevant for my question, imho)

Best regards,
Yann

Loading...