Don’t know why but it took me a couple of hours to successfully set-up the e-mail server.
I followed the instructions posted on the digitalocean website, but during the first try of connecting to the e-mail server the error “pam_authenticate() failed: Authentication failure (/etc/pam.d/smtp missing?” appeared in the e-mail server logs. (/var/log/mail.info)
After deleting everything with the command “apt-get remove packagename” and purging the configuration files with the command “dpkg -P packagename” I tried a reinstall. The installation guide can be found here or on the wiki page.
That worked! The only thing I had forgotten was to add a rule to the main.cf of Postfix configuration file, so an authenticated user could sent e-mail after logging in. I’ve added the next lines to sent e-mail via an external e-mail client:
smtpd_recipient_restrictions = permit_sasl_authenticated check_recipient_access hash:/etc/postfix/filtered_domains permit_mynetworks reject_unauth_destination
- watching TV and just following an installation guide without thinking isn’t a smart thing to do.
- for every Postfix error I’ve encountered there is a post with a solution on ‘the net’.
- the e-mail ‘relay’ option has automatically been disabled in the current Postfix versions.
- understanding just the basics of the Postfix and Dovecot configuration files can help to implement basic security rules such as anti-spam rules and pre-processing rules for e-mail.