Free Hosting Online for WorkStations

< Previous | Contents | Next >

1.5. Mail-Stack Delivery


Another option for configuring Postfix for SMTP-AUTH is using the mail-stack-delivery package (previously packaged as dovecot-postfix). This package will install Dovecot and configure Postfix to use it for both SASL authentication and as a Mail Delivery Agent (MDA).


You may or may not want to run IMAP, IMAPS, POP3, or POP3S on your mail server. For example, if you are configuring your server to be a mail gateway, spam/virus filter, etc. If this is the case it may be easier to use the above commands to configure Postfix for SMTP-AUTH than using mail-stack-delivery.


To install the package, from a terminal prompt enter:


sudo apt install mail-stack-delivery


You should now have a working mail server, but there are a few options that you may wish to further customize. For example, the package uses the certificate and key from the ssl-cert (self signed) package, and in a production environment you should use a certificate and key generated for the host. See Section 5, “Certificates” [p. 198] for more details.


Once you have a customized certificate and key for the host, change the following options for postfix in /etc/ postfix/main.cf to match your new keys:


smtpd_tls_cert_file = #yourcertfile# smtpd_tls_key_file = #yourkeyfile#


And for Dovecot in /etc/dovecot/conf.d/10-ssl.conf:


ssl_cert = <#yourcertfile# ssl_key = <#yourkeyfile#


Then restart Postfix:


sudo systemctl restart postfix.service


Top OS Cloud Computing at OnWorks: