0

I seek a Linux-based SMTP server. I've read tutorials and specs regarding Postfix SASL with Dovecot, though I can't find how to configure the list of username and password which are allowed to send email via the SMTP Server (smtpd).

In other words:

  1. In which file should I add the username and password of each client that is allowed to send email?
  2. Which format should I specify the username? Should the username include the @, such as [email protected] or is it without @, such as username.

These are the sources that I searched in:

7
  • SASL is a framework which performs authentication. So once you've set up Postfix to use some SASL configuration, usernames and passwords are configured in SASL. E.g. for Cyrus SASL I've used saslpasswd2 utility if it was set up to use sasldb, or put passwords into MySQL database if set to auxiliary sql; something similar should be done for Dovecot SASL. Notice: it's possible you're using Cyrus SASL library actually (even if your IMAP server is Dovecot, that's a yet different thing); to know for sure, run postconf smtpd_sasl_type. Commented Apr 13 at 16:54
  • Overall, it's best to put postconf -n into your question for us to see what you were changed in the Postfix configuration. Commented Apr 13 at 17:03
  • if you don't know what are you doing, take a note and look for mailcow which has an intuitive web interface
    – djdomi
    Commented Apr 13 at 18:22
  • @NikitaKipriyanov Will try thx.
    – Dor
    Commented Apr 14 at 18:39
  • @djdomi Thx, I prefer to find the specs which explain about Postfix with SASL.
    – Dor
    Commented Apr 14 at 18:39

1 Answer 1

0

Following the comment by @nikita-kipriyanov (which helped me to focus on SASL Dovecot) I successfully established a SMTP server with Postfix and Dovecot SASL.

This is approximately what I did:

I realized that I should focus on Dovecot and understand why it fails to authenticate.
I found that Dovecot files are at path /etc/dovecot.

I had read about Dovecot SASL logging here:

https://doc.dovecot.org/admin_manual/logging/

then I changed Dovecot logging configs in file /etc/dovecot/conf.d/10-logging.conf such that the logging file is at path /var/log/dovecot.log. Additionally, I made the logging much more verbose (enabled 6 config variables).

Then, from Dovecot log file I realized that the authentication mechanism is PAM, which is a standard users authentication mechanism in the OS. Also, the dovecot SASL uses the "passdb" with is the password database - read about here:
https://doc.dovecot.org/configuration_manual/authentication/password_databases_passdb/

As can be seen, the password database supports PAM among other things.

Also I noticed in the dovecot log file that the username to this PAM module is the string before the @ of the email address. For example if the email address is [email protected], then the username to PAM is bar. So I added a user to the Linux-based OS which is called bar and applied a password to it which is the same email password.

Then, the authentication was successful and email was received.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .