Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix not picking up SASL / Postgres authentication
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lostinspace2011
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 214

PostPosted: Mon Aug 31, 2020 4:18 am    Post subject: Postfix not picking up SASL / Postgres authentication Reply with quote

When trying to send an email using a local system account everything works fine. However using an account defined in the postgresql database I am getting the following error:

Quote:
==> auth.log <==
Aug 31 12:11:01 goldberry saslauthd[17078]: : released accept lock
Aug 31 12:11:01 goldberry saslauthd[17079]: : acquired accept lock
Aug 31 12:11:01 goldberry saslauthd[17078]: pam_unix(smtp:auth): check pass; user unknown
Aug 31 12:11:01 goldberry saslauthd[17078]: pam_unix(smtp:auth): authentication failure; logname=root uid=0 euid=0 tty= ruser= rhost=
Aug 31 12:11:03 goldberry saslauthd[17078]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
Aug 31 12:11:03 goldberry saslauthd[17078]: : auth failure: [user=mailuser] [service=smtp] [realm=abc.com] [mech=pam] [reason=PAM auth error]

==> mail.log <==
Aug 31 12:11:03 goldberry postfix/smtpd[17257]: warning: SASL authentication failure: Couldn't fetch entry from /etc/sasl2/sasldb2
Aug 31 12:11:03 goldberry postfix/smtpd[17257]: warning: SASL authentication failure: Password verification failed
Aug 31 12:11:03 goldberry postfix/smtpd[17257]: warning: gateway.abc.com[192.168.0.1]: SASL PLAIN authentication failed: generic failur


It appears as it if isn't picking up the postgresql integration and only tries to use the sasldb2 file. Even adding the users to the sasldb2 file didn't resolve the problem.

I did try and follow the suggestions from: https://wiki.gentoo.org/wiki/Complete_Virtual_Mail_Server/SMTP_Authentication#Configuring_postfix_with_cyrus-sasl

My configuration used to work, but a recent upgrade must have broken it.

Any pointers on how to debug this further
Back to top
View user's profile Send private message
alamahant
Guru
Guru


Joined: 23 Mar 2019
Posts: 557

PostPosted: Mon Aug 31, 2020 9:38 am    Post subject: Reply with quote

Hi
Have you configured postfix and dovecot for virtual domains?
I think you can delegate sasl-auth to dovecot.
Maybe you dont need cyrus-sasl.
Here is sasl related entries from my main.cf
Code:

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks, permit_auth_destination, permit_sasl_authenticated, reject


Also is it possible that an update replaced your master.cf??
:D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum