On 8/27/2010 2:17 AM, Ralph Seichter wrote:
I wonder if I was being too imprecise? I can of course provide "postconf -n"
(and/or "dovecot -n") output if it should be required to answer my question.

-------- Original Message --------
Subject: How to drop the recipient address hostname when delivering mail via 
LMTP?
Date: Wed, 25 Aug 2010 21:08:42 +0200
From: Ralph Seichter<postfix...@seichter.de>
To: postfix-users@postfix.org

There is a thread in the Dovecot mailing list discussing this subject,
but I think it best to ask here aswell:

My Dovecot 2.0 configuration contains these lines

   auth_username_format = %Ln
   service lmtp {
     unix_listener /var/spool/postfix/private/dovecot-lmtp {
       user = postfix
       group = postfix
       mode = 0660
     }
   }

and I have included the lines

   myhostname = server.domain.tld
   mydestination = $myhostname localhost.$mydomain localhost
   mailbox_transport = lmtp:unix:private/dovecot-lmtp

in my main.cf. When Postfix is asked to deliver mail to

   u...@server.domain.tld

it does so using Dovecot's LMTP socket. What bothers me about this
configuration is "auth_username_format = %Ln" in my Dovecot config.
The parameter affects all user lookups, which means that one cannot
distinguish between u...@domaina and u...@domainb during IMAP login.

I wonder how I can setup a transport which drops the @server.domain.tld
suffix when Postfix delivers mail via LMTP?

-Ralph


I think the problem is better solved in the delivery agent.

If you're using the postfix LMTP client, this might work:
http://www.postfix.org/postconf.5.html#lmtp_generic_maps
/^(.*)@server\.example\.com$/    $1
This will also mangle To: headers.


If you're using a postfix pipe(8) based transport, you could use the ${user} or ${mailbox} macros to eliminate the domain name, but these options aren't available for lmtp or smtp.
http://www.postfix.org/pipe.8.html




  -- Noel Jones

Reply via email to