I have a production mailing system in place. The initial setup was done with system users. Each domain has a system user and in the end all mail to the same domain goes to the same account (and later moved to specific folders based on procmail configuration for that system user). Dovecot responsibility is handling imap for Maildirs. Sendmail for SMTP.
The system users have a procmail configuration in their homedir as well as the Maildir itself. So the mail for the system users is in /home/{user}/Maildir. Procmail config is in /home/{user}/.
I'm now looking to switch to virtual users in an effort to make this more and easily scalable.
I've modified the dovecot configuration to use virtual users based on a passwd-file. The passwd-file (both userdb and passdb, together with a separate id for each virtualuser) path is /home/{domain}/passwd (I actually first wanted to have 1 passwd-file for all domains but I didn't got it to work, but perhaps I can revisit this later). The entries in the passwd-file point to /home/{domain}/, for which the {user} part is a symlink to the system user homedir (for example /home/{user} if he has such an entry). It enables me to first migrate the Dovecot part and later the Sendmail/procmail part.
The dovecot setup works fine. Sendmail is still delivering to the /home/{user} location but due to the symlinks Dovecot can reach the Maildirs.
I'm now looking into modifying my sendmail setup to deliver mail to these virtualusers's homedirs through Dovecot's LDA capability however I'm afraid at that point my procmail setup will be broken.
What's the proper way to make Sendmail use Dovecot LDA with still processing procmail config(or perhaps this is still a sendmail setting)? Sendmail now uses virtusertable to deliver email to the specific user account (so user1@example.com domain1user; user2@example.com domain1user, ...). Not sure if this is relevant.
Any other remarks are welcome as well as I'd rather have a full picture and don't break the setup. In a later phase Sendmail might be replaced by postfix but for now it's doing what it should be doing so that's low priority.