Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix + SASL: mangled username
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
watson81
n00b
n00b


Joined: 12 Jul 2004
Posts: 1

PostPosted: Mon Jul 12, 2004 12:47 am    Post subject: Postfix + SASL: mangled username Reply with quote

I'm running a Postfix -> sasl -> pam -> mysql mail transfer agent. Everything worked fine until I updated sasl to the latest version last night.
Now, my mail clients can't login with their username/password pair. I'm using their complete email address as their username.
For example, username: null@patrickwatson.org
password: blahblahblah

I've done a bit of investigative work using strace and discovered that postfix is giving saslauthd the username "null" instead of the full "null@patrickwatson.org"
If my mail client uses "null@patrickwatson.org@patrickwatson.org" everything works fine.

Sending mail is the only thing that is affected. I can still receive mail fine.

Anybody have any idea what is causing this?

If you need info from the config files, please let me know. I'll be glad to supply it.
Back to top
View user's profile Send private message
blade-
n00b
n00b


Joined: 28 May 2003
Posts: 16

PostPosted: Mon Jul 12, 2004 1:44 am    Post subject: Reply with quote

I'm not sure what the problem is but I'm having the same problem. I will let you know if I get it working.
Back to top
View user's profile Send private message
blade-
n00b
n00b


Joined: 28 May 2003
Posts: 16

PostPosted: Mon Jul 12, 2004 2:00 am    Post subject: Reply with quote

Ok I found this in the ebuild, I geuss until the virtual mail guide is updated we can use the pam_mysql use flag, I might try to work on this other auxprop sql auth support tho.



ewarn
ewarn "Starting with version 2.1.17 of cyrus-sasl, the cyrus-sasl team has switched"
ewarn "to an authentication style that BREAKS pam_mysql."
ewarn
ewarn "If you are using pam_mysql, it is recommended you convert to cyrus-sasl's"
ewarn "auxprop sql authentication support using smtpd.conf."
ewarn
ewarn "If you do not wish to change your configuration, you may put "pam-mysql""
ewarn "in your USE flags to revert to the old (deprecated) authentication behavior."
ewarn
Back to top
View user's profile Send private message
blade-
n00b
n00b


Joined: 28 May 2003
Posts: 16

PostPosted: Mon Jul 12, 2004 2:46 am    Post subject: Reply with quote

Well I figured out how to use the new way, if you followed the virtual mailguide howto on this site it should be pretty much the same for you.

edit "etc/sasl2/smtpd.conf"

pwcheck_method: auxprop
auxprop_plugin: sql
sql_engine: mysql
mech_list: sql plain login
sql_hostnames: localhost
sql_user: mailsql
sql_passwd: "your password"
sql_database: mailsql
sql_statement: SELECT clear FROM users WHERE email = '%u@%r'
sql_verbose: yes


Make sure you compile mysql support into cyrus-sasl, unlike the mail guide.

I'm sure you can also undo some of the virtual mail guide steps to pam but I would rather not play with that, any help in cleaning up the old?
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