7

I am trying to have Postfix deliver local mails via Dovecot's LMTP (among other things to replace procmail with sieve). Up to now, I've been using mailbox_command = procmail - a "$EXTENSION", delivering to local ~/Maildirs.

Following http://wiki2.dovecot.org/HowTo/PostfixDovecotLMTP, I configured (postfix is chrooted) in /etc/dovecot/conf.d/10-master.conf

service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group=postfix
    user=postfix
    mode=0600
  }

and added to /etc/postfix/main.cf

mailbox_transport = lmtp:unix:private/dovecot-lmtp

Now, that almost works (Postfix talks to the LMTP socket), but LMTP is confused about the "user" eudoxos@mydomain.eu containg the domain:

Jan 11 08:22:17 s18015955 postfix/lmtp[7374]: 3D84E19B0290E: to=<eudoxos@mydomain.eu>, orig_to=<fristname.lastname@mydomain.eu>, relay=iota.mydomain.eu[private/dovecot-lmtp], delay=0.01, delays=0/0/0/0, dsn=5.1.1, status=bounced (host iota.mydomain.eu[private/dovecot-lmtp] said: 550 5.1.1 <eudoxos@mydomain.eu> User doesn't exist: eudoxos@mydomain.eu (in reply to RCPT TO command))

LMTP should be looking just for eudoxos (in LDAP) instead of eudoxos@mydomain.eu. How can I achieve that?

If I were using delivery program (LDA), recipient username is specified as argument (like mailbox_command = /usr/lib/dovecot/deliver -f "$SENDER" -a "$RECIPIENT"), but I had issues with log permissions using LDA (Dovecot wiki discourages using LDA for that reason).

  • 1
    If you have working solution please add it in answer section below – masegaloeh Jan 11 '15 at 8:04
9

You need to set:

auth_username_format = %Ln

In conf.d/10-auth.conf

That removes the domain name, and the '@'.

4

The solution was to set

user_filter = (&(objectClass=posixAccount)(uid=%n)

in /etc/dovecot/dovecot-ldap.conf.ext.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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