Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm setting up a mail server with Postfix and Courier-IMAP. I'd like to do SMTP authentication with rimap, so that I don't have to maintain two user DB's. The problem I'm having, is that the username postfix passes is stripped of its domain name. It should be 'john@domain.com' and it becomes 'john'.

Logging into the IMAP server works, so does testsaslauthd -u john@domain.com -p password.

Using smtpd_sasl_local_domain (setting or unsetting it) doesn't make a difference.

This post doesn't seem to be it. Even when I try to login with uasdfer@asdfasdf it strips the domain part off.

Postfix sasl:

# cat main.cf |grep -i sasl
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_rbl_client zen.spamhaus.org check_policy_service unix:private/policyd-spf

Sasl config:

# cat saslauthd |grep -v "#"|grep -v -E "^$"
START=yes
DESC="SASL Authentication Daemon"
NAME="saslauthd"
MECHANISMS="rimap"
MECH_OPTIONS="127.0.0.1"
THREADS=5
OPTIONS="-c -m /var/run/saslauthd"

Server versions:

  • Debian 6.0.7
  • Postfix 2.7.1-1+squeeze1
  • Courier 4.8.0-3
share|improve this question
    
if you add -r to your saslauthd OPTIONS? –  NickW Apr 23 '13 at 14:44
add comment

1 Answer

up vote 2 down vote accepted

You probably just need to add -r to your saslauthd OPTIONS= stanza.

From the man pages

 -r          Combine the realm with the login (with an ’@’ sign in between).  
             e.g.  login: "foo" realm: "bar" will get passed as login:
             "foo@bar".  Note that the realm will still be passed, which may
             lead to unexpected behavior.
share|improve this answer
    
That was quick :) Thanks –  Halfgaar Apr 23 '13 at 15:42
    
No problems, happy to have helped! –  NickW Apr 23 '13 at 15:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.