steph> Up to now, I used PAM of each user in order to send and receive steph> email. ( BTW, sending email, a use authentication was required steph> and we used the login and passwd of the user on the system So just to be clear, each user has a login on your mail server in /etc/passwd? If so, I would strongly urge you to move to using only virtual users on your mail infrastructure. steph> Now, for dovecot, I start to use MD5 passwrd.. and that sounds to be OK steph> auth_mechanisms = plain login cram-md5 steph> passdb { steph> ? driver = passwd-file steph> ? # Path for passwd-file. Also set the default password scheme. steph> ? args = scheme=cram-md5 /etc/cram-md5.pwd steph> } steph> But changing the passwrd for the user1..? he can retrieve steph> emails from dovecot, but cannot send anymore, because sending steph> emails kept the old passwrd. ( using the PAM) What is your mail software? I assume you are having your users connect to port 587 to submit emails to be sent out, correct? If so, are you using postfix, exim, sendmail or some other mailer to access email submissions and then send them out? If so, you should be able to configure your mail server to use the same password file as your new md5 password file. steph> 1) How can I says sendmail to use the same passwd file ( with MD5) than dovecot ? Ah... just saw this. And I don't know how to configure sendmail for this. I would suggest you look on the sendmail.org site for help. steph> 2) Ideally, I would like to create virtual users for the same steph> mailbox? Is that possible ? steph> like 2 files Users and PAsswrds pointing out the mailbox : steph> maildir :/home/mailbox/user1 ex : user1 at foo.com? passwrd1? steph> /home/mailbox/generic_mails and user2 passwrd2? steph> home/mailbox/generic_mails I do this myself using postfix and dovecot and it works well. I have my users defined in an sqlite3 DB, though for a small number of users I think a flat file is simpler. The trick is to have the dovecot and postfix/sendmail using the same files for the virtual users and their passwords. There are a number of tutorials out there for doing this. John
> So just to be clear, each user has a login on your mail server in > /etc/passwd? If so, I would strongly urge you to move to using only > virtual users on your mail infrastructure. >Why? Just disallow login, and that is from the perspective that a mail user should be limited mail resources. I argue exactly the opposite. Keep as much as possible linux users. As linux has been engineered for allowing multiple user accounts, and most other virtual user providers that are used here, have not.
On January 24, 2022 1:33:46 PM AKST, John Stoffel <john at stoffel.org> wrote:>steph> 1) How can I says sendmail to use the same passwd file ( with MD5) than dovecot ? > >Ah... just saw this. And I don't know how to configure sendmail for >this. I would suggest you look on the sendmail.org site for help.Too many professional bulk mailers on all those lists. I for one don't like the documentation runaround. There's a lot of stuff that's getting more complicated than it needs to be. I need SPF+DKIM+DMARC for basic spam control.>steph> 2) Ideally, I would like to create virtual users for the same >steph> mailbox? Is that possible ?I have a setup like that myself. Nothing to do with Dovecot. It's entirely up to postfix which mailbox to deliver incoming messages to, and the user's client to address outgoing mail with a proper ID.>steph> like 2 files Users and PAsswrds pointing out the mailbox : >steph> maildir :/home/mailbox/user1 ex : user1 at foo.com? passwrd1? >steph> /home/mailbox/generic_mails and user2 passwrd2? >steph> home/mailbox/generic_mails > >I do this myself using postfix and dovecot and it works well. I have >my users defined in an sqlite3 DB, though for a small number of users >I think a flat file is simpler.The performance of flat files really bogs down my system and causes me to lose mails if too many arrive or if the file grows too large.>The trick is to have the dovecot and postfix/sendmail using the same >files for the virtual users and their passwords. There are a number >of tutorials out there for doing this. > >JohnWithout a doubt there are many useful tricks and tutorials out there. I have found several very helpful. Maybe a future programming project idea: I want a system that will store all mail messages and user account info in, say, a postgresql transactional database, a little more manageable and reliable than ad hoc databasing with those flat files all over the place cluttering up the system. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.