Postfix user at domain splitting

Ricardo Branco ricardo at
Thu Jul 17 21:10:29 UTC 2014

We have been using LDA in the past with our old Sendmail system, on our 
new mail server we were proposing to use LMTP with Postfix.
LMTP does not work at all, it just keeps saying that the user is not 
recognised, LDA on the otherhand does work.
I am unable to login via IMAP/POP using the full email address of the 
user even after the settings below are set.
I have set auth_username_format=%n, also put username_format=%n in the 
userdb, even tried it in PAM but that just breaks it all.
I just cant seem to make it all work, if i just use the username then 
its all fine but that does not resolve where i am planning to do.

On 17/07/2014 21:36, Steffen wrote:
> Hash: SHA1
> Ricardo Branco wrote:
>> Latest config
>> Ricardo Branco wrote, On 16/07/2014 14:56:
>>> Shows that auth is not honouring the %n i have. Does the
>>> username_format need to be only in the userdb section or also the
>>> passdb part?
>>> Ricardo Branco wrote, On 15/07/2014 18:23:
>>>> That was done for testing to see if it made any difference when
>>>> I moved to LDA, in LDA mode it seems to not care if that is %n
>>>> or %u, it always takes the first part of the email address
>>>> which is weird. Ive just tested again to confirm on %n and its
>>>> not working so ive reverted again back to LDA which does. Seems
>>>> to not matter how that variable is set it does not do
>>>> anything.
>>>> When using %n ive tried to see if I can login via IMAP with the
>>>> whole username but again no, this is the error, note the
>>>> difference between the 'user' field on each line.
>>>> Jul 15 18:22:17 imap-login: Info: Login:
>>>> user=<mark.whittaker>, method=PLAIN, rip=,
>>>> lip=, mpid=9493, session=<VVE8pj7+9wAKAAC0> Jul 15
>>>> 18:22:20 imap-login: Info: Disconnected: Shutting down (auth
>>>> failed, 4 attempts in 37 secs):
>>>> user=<mark.whittaker at>, method=PLAIN, rip=,
>>>> lip=, TLS, session=<Vjs9pD7+IgAKAAAD>
> Hi Ricardo,
> I seem to miss something: You are talking about LMTP and LDA, then
> present a log of an IMAP login attempt. Neither LDA not LMTP should
> need any authentification, where should the password come from? And
> yes, for auth you will need %n in passdb, too. username_format is not
> documented for passdb { driver = pam}, but you could try.
> Could you post a log of a LMTP delivery, when %n is in effect _and_
> you are sure have reloaded Dovecot?
>>>> Steffen Kaiser wrote, On 15/07/2014 13:18:
>> On Tue, 15 Jul 2014, Ricardo Branco wrote:
>>>>>>> Attached files
>>>>>>> Nick Edwards wrote, On 15/07/2014 10:19:
>>>>>>>> you need to show doveconf -n and what you have in the
>>>>>>>> master.conf for dovecot
>>>>>>>> On 7/15/14, Ricardo Branco <ricardo at> wrote:
>>>>>>>>> I have been trying looking though all the wiki
>>>>>>>>> documents to setup LMTP. It now seems to all be
>>>>>>>>> connected except that it keeps saying that the user
>>>>>>>>> is not recognised when postfix sends to LMTP, it
>>>>>>>>> sends the full recipent email address but seems that
>>>>>>>>> on the dovecot side it is unable to work with this. I
>>>>>>>>> have checked the userdb and made sure its using %n
>>>>>>>>> but alas it still does not work.
>> userdb { args = username_format=%u /etc/passwd driver =
>> passwd-file name = passwd-file }
>> In opposite to your sentence I see a %u there.
>>>>>>>>> Currently ive had to revert to using LDA as it works
>>>>>>>>> fine with that but i still dont know how as the
>>>>>>>>> postfix config variable $RECIPIENT is the full email
>>>>>>>>> address and does not seem to matter to LDA.
>> -- Steffen Kaiser
> - -- 
> Steffen Kaiser
> H Bonn-Rhein-Sieg         | e-mail: Steffen.Kaiser at H-BRS.DE
> FB Informatik             |
> Grantham-Allee 20         | phone : +49 2241/865-203
> 53757 Sankt Augustin      |
> Germany - Deutschland     | fax   : +49 2241/865-8203
> - -- 
> Steffen
> Version: GnuPG v1.4.9 (Darwin)
> Comment: Using GnuPG with undefined -
> DfZjRykZGYn1S2wb0S0UT9bvp0mxYABxSPuwEHOkAu56qtIJz/l37eneNE/mtyag
> 2ZxnWa6cJsEngKgkGA9+2OnKKZEeU5fI3RhN6VRDjCxwV0DnI9fpf/vvYli1s3GK
> LMeZq3cDVzZ+L23B2hBmWAOd1C9JU2mVRAchBF83TiEn+n7vAYGPGD9enFMphVBx
> PjF24YRquVYMW3Dv+bSrPRgAFo/WCoZ7Lur7kZ6f3jaO6irUw7yMYvu8GdWi8AFB
> y5CGOUBhCdsgEuZB4i2n1u+otgK+VhnF9+dLWSM5QB8uRTs+WRi5/w==
> =Gpq3

More information about the dovecot mailing list