Hi there,

Here is my input to your question and I hope it to be helpful.

You can use Exim instead of sendmail as MTA and Dovecot as IMAP server, in Exim use LMTP transport for authentication and recieving emails  as well as SMTP for outgoing emails alongside dovecot and use sql-auth in dovecot so to have the virtual users functionality. You will be able to have more options in terms of password encryption.

Refer to dovecot lmtp setup with Exim documentation and many other available resources on how to configure virtual users. Also, refer to Sidn.nl tutorials on how to configure EXIM mail server, it was very helpful to me.

In terms of virtual users with same mail box, you can create one user and forward emails from another user using EXIM redirect router. I have not tested creating another user and symlinking its mail directory to the first user but it might work. I recommend to give it a try.

Use e.g. for symlinking:-

ln -s /home/mail/USER1 /home/mail/USER2

Good luck.

Zakaria.




On 24 Jan 2022 19:06, steph.mag220@netcourrier.com wrote:

Hi,
Up to now, I used PAM of each user in order to send and receive email. ( BTW, sending email, a use authentication was required and we used the login and passwd of the user on the system

Now, for dovecot, I start to use MD5 passwrd.. and that sounds to be OK

auth_mechanisms = plain login cram-md5
passdb {
  driver = passwd-file
  # Path for passwd-file. Also set the default password scheme.
  args = scheme=cram-md5 /etc/cram-md5.pwd
}

But changing the passwrd for the user1..  he can retrieve emails from dovecot, but cannot send anymore, because sending emails kept the old passwrd. ( using the PAM)

1) How can I says sendmail to use the same passwd file ( with MD5) than dovecot ?

2) Ideally, I would like to create virtual users for the same mailbox  Is that possible ?

like 2 files Users and PAsswrds pointing out the mailbox : maildir :/home/mailbox/user1
ex :
user1@foo.com  passwrd1  /home/mailbox/generic_mails
and
user2 passwrd2  home/mailbox/generic_mails

How can I do that ?

Thanks for your help