Differences
This shows you the differences between two versions of the page.
— | linux:postfix_as_relay [2019/10/31 08:55] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Postfix: external backup SMTP ====== | ||
+ | Edit transport.cf and specify what to transport where, and what to discard | ||
+ | <code bash |transport.cf> | ||
+ | example.com smtp: | ||
+ | example2.com smtp: | ||
+ | example3.com smtp: | ||
+ | * discard: | ||
+ | </ | ||
+ | Edit main.cf and enter relay domains | ||
+ | <code bash |main.cf> | ||
+ | smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) | ||
+ | biff = no | ||
+ | append_dot_mydomain = no | ||
+ | delay_warning_time = 1h | ||
+ | |||
+ | readme_directory = no | ||
+ | |||
+ | compatibility_level = 2 | ||
+ | |||
+ | # TLS parameters - provide a valid certificate | ||
+ | smtpd_tls_cert_file=/ | ||
+ | smtpd_tls_key_file=/ | ||
+ | smtpd_use_tls=yes | ||
+ | smtpd_tls_session_cache_database = btree: | ||
+ | smtp_tls_session_cache_database = btree: | ||
+ | |||
+ | |||
+ | smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination | ||
+ | myhostname = mail.example.com | ||
+ | alias_maps = hash:/ | ||
+ | alias_database = hash:/ | ||
+ | mydestination = $myhostname, | ||
+ | relayhost = | ||
+ | mynetworks = 127.0.0.0/8 [:: | ||
+ | mailbox_size_limit = 0 | ||
+ | recipient_delimiter = + | ||
+ | inet_interfaces = all | ||
+ | inet_protocols = all | ||
+ | default_transport = discard: | ||
+ | relay_domains = example.com, | ||
+ | maximal_queue_lifetime = 5d | ||
+ | maximal_backoff_time = 2h | ||
+ | minimal_backoff_time = 15m | ||
+ | queue_run_delay = 15m | ||
+ | </ |