some of the main.cf config

#Auth Stuff
smtpd_sasl_auth_enable = yes
#Dovecot
#smtpd_sasl_path = private/auth
#smtpd_sasl_type = dovecot

#Cyrus
smtpd_sasl_type = cyrus
smtpd_sasl_path = smtpd

#SASL Common
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname

/usr/home/postfix/config/sasl points to the smtpd postfix lib

lrwxr-xr-x 1 root wheel - 31B Mar 27 2013 smtpd.conf -> /usr/local/lib/sasl2/smtpd.conf


example smtpd.conf file (needed for auth) :

# cat smtpd.conf
#Local Password Database
#pwcheck_method: saslauthd
#mech_list: login plain
#saslauthd_path: /var/run/saslauthd

#Postygres
pwcheck_method: auxprop
mech_list: PLAIN LOGIN
auxprop_plugin: sql
sql_engine: pgsql
sql_hostnames: xxxxxxxx
sql_database: xxxxxxx
sql_user: xxxxxx
sql_passwd: xxxxxxxxx
sql_select: SELECT password FROM email_users WHERE username = '%u@%r' and password <> 'alias' and currentcount_bad < 30 and status = True

#Logging?
log_level: 7

_________________________________________________________________

note select statement and db connection needs to match however to talk to your db?







Have A Happy Saturday !!!

Thanks - Paul Kudla (Manager SCOM.CA Internet Services Inc.)


Scom.ca Internet Services <http://www.scom.ca>
004-1009 Byron Street South
Whitby, Ontario - Canada
L1N 4S3

Toronto 416.642.7266
Main 1.866.411.7266
Fax 1.888.892.7266
Email p...@scom.ca

On 11/4/2023 7:32 PM, Michael Peddemors wrote:

Why use Dovecot/IMAP at all for the SMTP Authentication, can't you simply go direct to your database?

On 2023-11-03 09:55, Nick Lockheart wrote:
I have a Dovecot IMAP server and a Postfix server on separate machines.
The user information is stored in a MariaDB database that is replicated
on both servers.

Postfix needs to authenticate outgoing mail against our valid user
database. I believe this requires us to install a "dummy" Dovecot on
the Postfix server so that Dovecot SASL can provide authentication to
Postfix from the database.

I think Cyrus had a standalone Cyrus-SASL package, but Dovecot doesn't?

If I wanted to setup a Dovecot instance on the Postfix server just for
the purposes of SMTP authentication, and not use it to handle any mail,
what is the minimum configuration required to make that work?

Is the dovecot-common package (Debian) enough? Or do I need the full
dovecot-imap package?

What protocols go in the protocols directive? Can you just make it
"protocols = auth" to disable IMAP connections?

_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


_______________________________________________
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org

Reply via email to