0

I've got a small jack-of-all-trades server running CentOS 7 Linux. Now I need to add email support to it (SMTP/POP3/IMAP/webmail). Most of it is pretty clear, except for one thing - I'd like to separate linux users from email users. That is, for every email account I don't want to make a server user as well. Also, if there are emails [email protected] and [email protected], I'd like them to be separate accounts. And, of course, users should be able to use their email addresses as usernames for the mail-related services.

How can I do that? I don't even know what keywords to search for (yes, I've tried googling, but came up empty handed).

3 Answers 3

3

This kind of configuration uses virtual domains. This is supported by most IMAP/POP3 servers as well as most MTAs. It takes extra work to configure.

Try to use one authentication mechanism for both. The easiest is likely to have your SMTP server to use the Mail Delivery Agent (such as Dovecot) for mailbox lookups and user authentication. You should provide authenticated access on the Submission port (587) for users to send mail.

1
  • Accepted for the keyword "virtual domain" and the idea that postfix can use dovecot for mailbox lookups. I actually found out this earlier myself, but you're the only one here that mentioned it.
    – Vilx-
    Jun 9, 2016 at 14:27
4

That depends on the choice of applications you like to use. With SASL you're able to use seperate SMTP authentication:
http://www.postfix.org/SASL_README.html
If you choose i.e. dovecot as your preferred imapd, you can also set up an independent authentication from the system accounts:
http://wiki2.dovecot.org/Authentication/Mechanisms
Consider using a SQL or LDAP solution for the handling of many accounts. Webmail is usually depending on the auth mechs of the imapd, so every solution should work well.

3

First, you need to differentiate your software needs. Courier always uses end user system accounts to store mails, Dovecot can be configured not to use them, and Cyrus never uses system accounts (all email is stored under cyrus:mail system account, and authentication is only performed against non-system sasl databases).

In general, Courier and Dovecot is much easier to set up with system accounts, in contrast Cyrus is very easy to set up with non-system accounts.

You must log in to answer this question.

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