user at domain splitting not working

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Fri Jul 18 07:31:28 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 17 Jul 2014, Ricardo Branco wrote:

> Also just to note that Postfix is not the problem here, that has now been 
> ruled out

I compiled to current hg version of Dovecot:

changeset:   17627:fd0616d553b0
tag:         tip
user:        Timo Sirainen <tss at iki.fi>
date:        Fri Jul 11 16:49:35 2014 +0300
summary:     mailbox_list_index=yes: Don't update INBOX's STATUS 
information to index.

I created a new user

adduser --gecos 'DV test' --disabled-password dvtest

I have setup a Dovecot config with: http://pastebin.com/XKNn6W24

Because sieve did not compile, I removed sieve from your config.

Then I added "@" to auth_username_chars, because of this error:

Info: userdb(?): Username character disallowed by auth_username_chars: 0x40 (username: dvtest at example.com)

Then I ran:

(echo LHLO loc; echo 'mail from:<skdovecot at example.net>';
  echo 'rcpt to:<dvtest at example.com>'; echo data; sleep 1;
echo "To: <dvtest at example.com>
From: <ska at mail.inf.h-brs.de>
Subject: Test

Test
.")|socat - UNIX:/var/spool/postfix/private/dovecot-lmtp

250-8BITMIME
250-ENHANCEDSTATUSCODES
250 PIPELINING
250 2.1.0 OK
250 2.1.5 OK
354 OK
250 2.0.0 <dvtest at example.com> GjcYKafIyFPPdwAAbZ2bpg Saved

==============================

Enabled password for user

# passwd dvtest

Connect to IMAP

# telnet localhost 143
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE 
SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT 
CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 ESEARCH ESORT 
SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS ACL SPECIAL-USE STARTTLS 
AUTH=PLAIN AUTH=LOGIN] I am ready.
1 login dvtest at example.com pwd

Jul 18 09:20:12 auth-worker(31129): Error: passwd-file /etc/passwd: User root has invalid UID '0'
Jul 18 09:20:12 auth-worker(31129): Debug: passwd-file /etc/passwd: Read 41 users in 0 secs
Jul 18 09:20:12 auth-worker(31129): Debug: pam(dvtest,127.0.0.1): lookup service=dovecot
Jul 18 09:20:12 auth-worker(31129): Debug: pam(dvtest,127.0.0.1): #1/1 style=1 msg=Password:
Jul 18 09:20:12 auth: Debug: client passdb out: OK      1       user=dvtest     original_user=dvtest at example.com
Jul 18 09:20:12 auth: Debug: master in: REQUEST 3026321409      31071   1       1fd6a55253e45ae1eda745081b58bccc        session_pid=31130       request_auth_token
Jul 18 09:20:12 auth: Debug: passwd-file(dvtest,127.0.0.1,<MVmPlnL+TAB/AAAB>): lookup: user=dvtest file=/etc/passwd
Jul 18 09:20:12 auth: Debug: master userdb out: USER    3026321409      dvtest  uid=1000        gid=30007       home=/home/dvtest       auth_token=df55b42a58c6f34fac16dc677e8f5c5b518a3bbc     auth_user=dvtest at example.com
Jul 18 09:20:12 imap-login: Info: Login: user=<dvtest>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=31130, secured, session=<MVmPlnL+TAB/AAAB>
Jul 18 09:20:13 imap(dvtest): Error: net_connect_unix(/tmp/dovecot/imap-postlogin) failed: Connection refused

Although the login did not succeed completely, I do assume that the last 
error means that original_user=dvtest at example.com had been authentificated 
as user=dvtest via PAM successfully as master userdb out has all relevant 
information.

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBU8jNUHz1H7kL/d9rAQKcsQf/bTKmToYgZ7/2Yie1Kg0+IsggZMAumEMP
3Jkraj3OkESmXG7xzQK27PDjtB1ipzyDTgVWvzV7u2HMsY5hM68gph/q3TrBfh5O
p0N+jCFHUACNQGnPi8yXrt1spVyMovfUmk/rHaWqr87HDSndnR/bsWh1yVoyDUXg
7ZZ+DcDbb8E3lb12eeuZwAnupk5w064h4lLHiGvL0gurbxlCMmaiRPh7NuuaY7YS
aqR/o+P4DwU0XS1FCkV59djEkT6K7JyDV3oYdIGn0dEH3m4Lf4gM/wmmncg7QLok
qE0kikY9DbOl61mwGV6BE5OI4iM01giMiFsoQpNFLHbi/808lYOGnQ==
=4xeB
-----END PGP SIGNATURE-----


More information about the dovecot mailing list