Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
linux:postfix [2019/01/04 02:07] – [Logging] tmadelinux:postfix [2019/10/31 12:34] – [Set Sender] tmade
Line 27: Line 27:
  
   /etc/init.d/postfix restart     /etc/init.d/postfix restart  
 +
 +====generic=====
 +If you run a postfix host without a signed domain such as "localdomain.local" you can't send mails. Therefore you need a "generic mapping":
 +  
 +Content file "/etc/postfix/generic":
 +
 +myaccount@myserver mymailadresse@domain.net
 +
 +Execute:
 +
 +  postmap /etc/postfix/generic
 +  
 +====sasl_password====
 +
 +Content "/etc/postfix/sasl_password":
 +
 +  mail.domain.net myuser@domain.net:my-strong-secret
 +
 +Execute:
 +
 +  postmap hash:/etc/postfix/sasl_password
 +  
 +
 +====main.cf====
 +
 +/etc/postfix/main.cf "satellite" example:
 +
 +<code>
 +# See /usr/share/postfix/main.cf.dist for a commented, more complete version
 +
 +
 +# Debian specific:  Specifying a file name will cause the first
 +# line of that file to be used as the name.  The Debian default
 +# is /etc/mailname.
 +#myorigin = /etc/mailname
 +
 +smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
 +biff = no
 +
 +# appending .domain is the MUA's job.
 +append_dot_mydomain = no
 +
 +# Uncomment the next line to generate "delayed mail" warnings
 +#delay_warning_time = 4h
 +
 +readme_directory = no
 +
 +# TLS parameters
 +smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
 +smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
 +smtpd_use_tls=yes
 +smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
 +smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
 +
 +# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
 +# information on enabling SSL in the smtp client.
 +
 +smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
 +myhostname = test.local
 +alias_maps = hash:/etc/aliases
 +alias_database = hash:/etc/aliases
 +myorigin = /etc/mailname
 +mydestination = $myhostname, dev.local, localhost.local, localhost
 +relayhost = mail.test.net:587
 +mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128, 10.0.0.0/24
 +mailbox_size_limit = 0
 +recipient_delimiter = +
 +inet_interfaces = loopback-only
 +inet_protocols = all
 +
 +# required if you want to send mails to a mailprovider
 +sender_canonical_maps = hash:/etc/postfix/sender_canonical
 +smtp_generic_maps = hash:/etc/postfix/generic
 +
 +smtp_tls_security_level = may
 +smtp_sasl_auth_enable = yes
 +smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
 +smtp_sasl_security_options = noanonymous
 +#smtp_tls_security_level = encrypt
 +</code>
 +
      
 ==== Transport ==== ==== Transport ====
linux/postfix.txt · Last modified: 2019/10/31 12:35 by tmade
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki