• sendmail authentication using dovecot or imap

    From Michael Grant@21:1/5 to All on Sat Oct 21 14:58:04 2023
    Does anyone have a working example they could share with me of how to set up sendmail on debian to authenticate using dovecot imap? Or some example using pam with sendmail to use dovecot's user file?

    I want to allow users to authenticate using usernames that are of the form user@domain and dovecot's virtual user database is set up to do that. Seems like either pam or imap auth.

    Thanks

    Michael Grant

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Moock@21:1/5 to All on Mon Oct 23 07:16:13 2023
    Am 21.10.2023 14:58 schrieb Michael Grant:

    Does anyone have a working example they could share with me of how to
    set up sendmail on debian to authenticate using dovecot imap? Or
    some example using pam with sendmail to use dovecot's user file?

    Configure Cyrus SASL to use PAM for sendmail (see file /etc/pam.d/smtp).
    Then configure there to use a PAM IMAP module.
    I found https://github.com/wdoekes/pam-imap.
    I haven't tried that and I don't have much experience with PAM.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Grant@21:1/5 to Marco Moock on Mon Oct 23 07:05:22 2023
    On Monday, 23 October 2023 at 07:16:22 UTC+2, Marco Moock wrote:
    Am 21.10.2023 14:58 schrieb Michael Grant:

    Does anyone have a working example they could share with me of how to
    set up sendmail on debian to authenticate using dovecot imap? Or
    some example using pam with sendmail to use dovecot's user file?
    Configure Cyrus SASL to use PAM for sendmail (see file /etc/pam.d/smtp).
    Then configure there to use a PAM IMAP module.
    I found https://github.com/wdoekes/pam-imap.
    I haven't tried that and I don't have much experience with PAM.

    I already have sendmail using sasl2 and pam, but against the passwd file.

    It looks like imap is part of either sasl2 or pam, I see reference to /etc/sysconfig/saslauthd which I don't have on debian. There's something called 'rimap' as a mechanism. I've not found any working examples how to set this up on debian though.

    Has anyone actually set this up with sendmai? I'd love to see a working example. Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From J.O. Aho@21:1/5 to Michael Grant on Mon Oct 23 16:55:47 2023
    On 23/10/2023 16.05, Michael Grant wrote:
    On Monday, 23 October 2023 at 07:16:22 UTC+2, Marco Moock wrote:
    Am 21.10.2023 14:58 schrieb Michael Grant:

    Does anyone have a working example they could share with me of how to
    set up sendmail on debian to authenticate using dovecot imap? Or
    some example using pam with sendmail to use dovecot's user file?
    Configure Cyrus SASL to use PAM for sendmail (see file /etc/pam.d/smtp).
    Then configure there to use a PAM IMAP module.
    I found https://github.com/wdoekes/pam-imap.
    I haven't tried that and I don't have much experience with PAM.

    I already have sendmail using sasl2 and pam, but against the passwd file.

    It looks like imap is part of either sasl2 or pam, I see reference to /etc/sysconfig/saslauthd which I don't have on debian. There's something called 'rimap' as a mechanism. I've not found any working examples how to set this up on debian though.

    Has anyone actually set this up with sendmai? I'd love to see a working example. Thanks.

    I used to have a setup with sendmail and dovecot, PAM set up to use
    pam_mysql for authentication. The pam file looked something like:

    auth sufficient pam_mysql.so verbose=0 crypt=4 user=admin passwd=pass host=db.localnet db=mail table=users usercolumn=user passwdcolumn=password

    account optional pam_mysql.so verbose=0 crypt=4 user=admin passwd=pass host=db.localnet db=mail table=users usercolumn=user passwdcolumn=password


    The imap4/imap4s/imaps/pop3/pop3s/pops/sendmail/sieve were symlinks of smtp

    The pam will want to have username@realm while my dovecot was setup to
    want to have them as separate, which lead to I made a view in the
    database that I used for pam queries, where I merged the user column and
    domain column to one column that held the whole email address. This no
    issue when not having a lot of users.

    --
    //Aho

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)