Q:

How to separate linux accounts from email accounts?

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 jenny@domain1.com and jenny@domain2.com, 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).

A:

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.

A:

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. 

A:

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.

