no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Last revision | |||
— | postfix_config_for_outgoing_smarthost [26.12.2017 11:54] – created Pascal Suter | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== postfix config for outgoing smarthost with TLS authentication ====== | ||
+ | this is a short how-to, to get your postfix mailserver to send outgoing mail via a smarthost that requires TLS authenticatin: | ||
+ | |||
+ | create a password file with the following contents: | ||
+ | echo " | ||
+ | chmod 600 / | ||
+ | postmap / | ||
+ | edit main.cf | ||
+ | nano / | ||
+ | and add / modify these lines: | ||
+ | < | ||
+ | relayhost = mail.w3design.ch: | ||
+ | smtp_use_tls=yes | ||
+ | smtp_sasl_auth_enable = yes | ||
+ | smtp_sasl_password_maps = hash:/ | ||
+ | smtp_sasl_security_options = noanonymous | ||
+ | smtp_tls_security_level = encrypt | ||
+ | </ | ||
+ | also make sure you're not creating an open realy server for everybody to use. for example limit your accetpable mail networks to localhost only is a good starting point (in main.cf as well): | ||
+ | mynetworks = 127.0.0.0/8 [:: | ||
+ | now check your neew config and reload it: | ||
+ | postfix check | ||
+ | postfix reload | ||
+ | montior your mail logs and send a test message to see what happens: | ||
+ | tail -f / | ||
+ | in another terminal: | ||
+ | echo "this is a test " | mail mail@psuter.ch -s test | ||