Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 '' and it becomes 'john'.

Logging into the IMAP server works, so does testsaslauthd -u -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 |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 check_policy_service unix:private/policyd-spf

Sasl config:

# cat saslauthd |grep -v "#"|grep -v -E "^$"
DESC="SASL Authentication Daemon"
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
My problem was this and that Postfix is chroot-jailed so /var/run/saslauthd becomes /var/spool/postfix/var/run/saslauthd – phunehehe Jan 3 '15 at 10:21
up vote 6 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

Your Answer


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.