Andreas Schulze | 1 Feb 2010 07:38
Picon
Favicon

LMTP-Server: missing headers

Hello,

I just installed dovecot2-beta2 and configured the lmtp-server + postfix (no virtual users)

postfix:
mail_version = 2.7-20100117
mailbox_transport = lmtp:unix:lmtp-server
lmtp_assume_final = yes

dovecot:
service lmtp {
  executable = lmtp
  protocol = lmtp
  unix_listener /var/spool/postfix/lmtp-server {
    group = postfix
    mode = 0660
    user = postfix
  }
}

Mail gets delivered to ~user/Maildir/
Feb  1 06:57:39 testhost dovecot: lmtp(8238): Connect from local
Feb  1 06:57:39 testhost postfix/lmtp[8237]: 07108A3608: to=<sca <at> testhost.example.org>,
orig_to=<root>, relay=testhost.example.org[lmtp-server], delay=0.67,
delays=0.22/0.03/0.22/0.2, dsn=2.0.0, status=sent (250 2.0.0 <sca <at> testhost.example.org>
lwjfEVNtZksuIAAA4eG3hw Saved)
Feb  1 06:57:39 testhost dovecot: lmtp(8238, sca <at> testhost.example.org): lwjfEVNtZksuIAAA4eG3hw:
msgid=<20100201055739.07108A3608 <at> testhost.example.org>: saved mail to INBOX

Second try: postfix using deliver
(Continue reading)

Timo Sirainen | 1 Feb 2010 10:32
Picon
Picon
Favicon

Re: LMTP-Server: missing headers

On 1.2.2010, at 8.38, Andreas Schulze wrote:

> In the first case there are *no* Return-Path and Delivered-To Headers.
> In the (most common) second case the *are* present.
> Why these Headers are not included while using the LMTP-Server?

I guess I could add Return-Path header. I could also add Delivered-To as long as there is only a single
recipient, but adding it for multiple recipients would make everything much more difficult than I'd like.

I was wondering about Delivered-To header before too. What do people use it for?

Nicolas KOWALSKI | 1 Feb 2010 11:07
Favicon

Re: LMTP-Server: missing headers

Timo Sirainen <tss <at> iki.fi> writes:

>> In the first case there are *no* Return-Path and Delivered-To Headers.
>> In the (most common) second case the *are* present.
>> Why these Headers are not included while using the LMTP-Server?

I agree about the Return-Path missing, but the Delivered-To is
specific to Postfix, see: http://www.postfix.org/faq.html#delivered

> I guess I could add Return-Path header. I could also add Delivered-To as long as there is only a single
recipient, but adding it for multiple recipients would make everything much more difficult than I'd like.
>
> I was wondering about Delivered-To header before too. What do people
> use it for?

According to the above link:

"The purpose is to stop mail forwarding loops as early as possible"

--

-- 
Nicolas

Andrzej Adam Filip | 1 Feb 2010 12:14
Picon

Re: LMTP-Server: missing headers [Delivered-To]

Timo Sirainen <tss <at> iki.fi> wrote:
> On 1.2.2010, at 8.38, Andreas Schulze wrote:
>
>> In the first case there are *no* Return-Path and Delivered-To Headers.
>> In the (most common) second case the *are* present.
>> Why these Headers are not included while using the LMTP-Server?
>
> I guess I could add Return-Path header. 

Of course you plan a command line option to turn it off, do not you? :-)

> I could also add Delivered-To as long as there is only a single
> recipient, but adding it for multiple recipients would make everything
> much more difficult than I'd like.
>
> I was wondering about Delivered-To header before too. What do people
> use it for?

It may be useful if multiple "envelope recipients" are delivered to
single mailbox e.g. "plussed addresses" user+detail <at> example.net
or tss+tss=example.net <at> example.org (would be handy for fetchmail).

--

-- 
[pl>en: Andrew] Andrzej Adam Filip : anfi <at> onet.eu
The denunciation of the young is a necessary part of the hygiene of older
people, and greatly assists in the circulation of the blood.
  -- Logan Pearsall Smith

Pascal Volk | 1 Feb 2010 17:24
Favicon

Re: LMTP-Server: missing headers

On 02/01/2010 10:32 AM Timo Sirainen wrote:
> I guess I could add Return-Path header. I could also add Delivered-To as long as there is only a single
recipient, but adding it for multiple recipients would make everything much more difficult than I'd like.
> 
> I was wondering about Delivered-To header before too. What do people use it for?

What about a X-Original-To header?

I use it for:
 [X] mail filtering

Regards,
Pascal
--

-- 
The trapper recommends today: cafebabe.1003217 <at> localdomain.org

Timo Sirainen | 1 Feb 2010 17:32
Picon
Picon
Favicon

Re: LMTP-Server: missing headers

On Mon, 2010-02-01 at 17:24 +0100, Pascal Volk wrote:
> On 02/01/2010 10:32 AM Timo Sirainen wrote:
> > I guess I could add Return-Path header. I could also add Delivered-To as long as there is only a single
recipient, but adding it for multiple recipients would make everything much more difficult than I'd like.
> > 
> > I was wondering about Delivered-To header before too. What do people use it for?
> 
> What about a X-Original-To header?

Is that any different from Delivered-To?

> I use it for:
>  [X] mail filtering

How about Sieve's :envelope instead? (or whatever it was called)

Charles Marcus | 1 Feb 2010 17:37

Re: LMTP-Server: missing headers

On 2010-02-01 11:32 AM, Timo Sirainen <tss <at> iki.fi> wrote:
> On Mon, 2010-02-01 at 17:24 +0100, Pascal Volk wrote:
>> On 02/01/2010 10:32 AM Timo Sirainen wrote:
>>> I guess I could add Return-Path header. I could also add Delivered-To as long as there is only a single
recipient, but adding it for multiple recipients would make everything much more difficult than I'd like.
>>>
>>> I was wondering about Delivered-To header before too. What do people use it for?

>> What about a X-Original-To header?
> 
> Is that any different from Delivered-To?

Dunno if it is different, but I like having the X-Original-To header -
it lets me see that the message was originally was to an alias (when it
was).

--

-- 

Best regards,

Charles

Pascal Volk | 1 Feb 2010 17:55
Favicon

Re: LMTP-Server: missing headers

On 02/01/2010 05:37 PM Charles Marcus wrote:
> On 2010-02-01 11:32 AM, Timo Sirainen <tss <at> iki.fi> wrote:
>> On Mon, 2010-02-01 at 17:24 +0100, Pascal Volk wrote:
>>> What about a X-Original-To header?
>> Is that any different from Delivered-To?

It's a X-$WHATEVER-header.
As mentioned by Nicolas: Postfix uses the Delivered-To header for for
mail delivery loop detection.

Could you know which funny sieve/.forward files users place on a mail
system? ;-)

> Dunno if it is different, but I like having the X-Original-To header -
> it lets me see that the message was originally was to an alias (when it
> was).

Yeah, the X-Original-To header is prepended to the headers. So the user
can see it if she/he looks into the mail headers.
This info may also be available in a "Received: from …for <recipient> …"
header.

If the X-Original-To header was prepended, users do not have to update
their sieve rules, when the admin updates to Dovecot v2.0.0 with lmpt.

Sieve envelope:
I'm using it, since I'm using Dovecot v2.0.alpha?
It's just one require argument more.

Regards,
(Continue reading)

Warren Baker | 1 Feb 2010 18:05
Picon
Gravatar

Re: LMTP-Server: missing headers

On 1 February 2010 11:32, Timo Sirainen <tss <at> iki.fi> wrote:
> On 1.2.2010, at 8.38, Andreas Schulze wrote:
>
>> In the first case there are *no* Return-Path and Delivered-To Headers.
>> In the (most common) second case the *are* present.
>> Why these Headers are not included while using the LMTP-Server?
>
> I guess I could add Return-Path header. I could also add Delivered-To as long as there is only a single
recipient, but adding it for multiple recipients would make everything much more difficult than I'd like.
>
> I was wondering about Delivered-To header before too. What do people use it for?

There is also Exim's Envelope-To: header which is sometimes useful for
a catchall maildrop scenario. Fetchmail, by default, also makes use of
X-Envelope-To:. If i remember right sendmail can be configured to add
X-Envelope-To:.

Which, as another posted pointed out, is mainly used for mail filtering.

Maybe the envelope address header to be added can be a config file option?

.warren

Timo Sirainen | 1 Feb 2010 19:01
Picon
Picon
Favicon

Re: LMTP-Server: missing headers

On Mon, 2010-02-01 at 19:05 +0200, Warren Baker wrote:
> There is also Exim's Envelope-To: header which is sometimes useful for
> a catchall maildrop scenario. Fetchmail, by default, also makes use of
> X-Envelope-To:. If i remember right sendmail can be configured to add
> X-Envelope-To:.
> 
> Which, as another posted pointed out, is mainly used for mail filtering.
> 
> Maybe the envelope address header to be added can be a config file option?

It's beginning to sound like I should add "lmtp_headers" setting where
you could do all kinds of "interesting" things like:

lmtp_headers = \
  Return-Path: %f\n \
  Envelope-To: %t\n \
  X-Envelope-To: %t\n \
  X-Original-To: %t\n \
  Delivered-To: %t\n

Noel Butler | 1 Feb 2010 23:03
Favicon

Re: LMTP-Server: missing headers

On Mon, 2010-02-01 at 20:01 +0200, Timo Sirainen wrote:

> 
> It's beginning to sound like I should add "lmtp_headers" setting where
> you could do all kinds of "interesting" things like:
> 
> lmtp_headers = \
>   Return-Path: %f\n \
>   Envelope-To: %t\n \
>   X-Envelope-To: %t\n \
>   X-Original-To: %t\n \
>   Delivered-To: %t\n

That's the best approach, it will then offer no excuses for people
whining that their header 'X-bah' isn't supported :)

Roderick A. Anderson | 2 Feb 2010 01:03

Re: LMTP-Server: missing headers

Noel Butler wrote:
> On Mon, 2010-02-01 at 20:01 +0200, Timo Sirainen wrote:
> 
> 
>> It's beginning to sound like I should add "lmtp_headers" setting where
>> you could do all kinds of "interesting" things like:
>>
>> lmtp_headers = \
>>   Return-Path: %f\n \
>>   Envelope-To: %t\n \
>>   X-Envelope-To: %t\n \
>>   X-Original-To: %t\n \
>>   Delivered-To: %t\n
> 
> 
> That's the best approach, it will then offer no excuses for people
> whining that their header 'X-bah' isn't supported :)

++1

\\||/
Rod
--

-- 

Steffen Kaiser | 2 Feb 2010 09:51
Picon

Re: LMTP-Server: missing headers


On Mon, 1 Feb 2010, Timo Sirainen wrote:

> It's beginning to sound like I should add "lmtp_headers" setting where
> you could do all kinds of "interesting" things like:
>
> lmtp_headers = \
>  Return-Path: %f\n \
>  Envelope-To: %t\n \
>  X-Envelope-To: %t\n \
>  X-Original-To: %t\n \
>  Delivered-To: %t\n

Charles wrote:

"Dunno if it is different, but I like having the X-Original-To header -
it lets me see that the message was originally was to an alias (when it
was)."

In LMTPd it is to late to insert that information, therefore I would 
change the syntax a bit, e.g.

   <at> X-Original-To: %t\n
  +X-Original-To: %t\n
  X-Original-To: %t\n

" <at> " forces to overwrite existing headers, "+" adds another header, none 
adds the header if none is present.

In Charles's case, the no-prefix variant would be ideal, because usually 
(Continue reading)

Dominik Schulz | 4 Feb 2010 16:56
Gravatar

Re: LMTP-Server: missing headers

Am Montag 01 Februar 2010 19:01:02 schrieb Timo Sirainen:
> It's beginning to sound like I should add "lmtp_headers" setting where
> you could do all kinds of "interesting" things like:

That'd be great!

+1

--

-- 
Mit freundlichen Grüßen / Best Regards
Dominik

Gmane