Dennis Birkholz wrote:
> Hello together,
> 
> is it possible to make DBmail insert a Delivered-To-header or a
> what-ever named header that holds the email-address that it accepted the
> mail for? I want to use it for Sieve-filtering.

The sieve code already has full access to the envelope recipient. So you
should be able to use the envelope test in your sieve scripts.

require "envelope";
if envelope :all :is "from" "[EMAIL PROTECTED]" {
    discard;
}


should work. But Aaron's input is authorative here. Aaron?

> 
> Our setup uses Postfix and DBmail, connected via "virtual_transport". I
> hoped that Postfix inserts such a header but it does not even with
> "prepend_delivered_header = command, file, forward" so it is not
> possible to detect the mail-address the mail was accepted for.

That's a feature. Only when using a pipe delivery (dbmail-smtp) will
postfix add the delivered-to header, not when using the lmtp route.

> 
> Hopefully the dbmail-lmtpd has such a feature, or maybe somewhere is a
> "X-DBmail-Received-for"-header or something that can be enabled.

Injecting the envelope recipient into the actual message is no-go.
Consider a message that is delivered to X local recipients. Currently
that results in a single physmessage entry, and X messages entries.
Adding such a header would break this behaviour.

So: try the envelope test in your sieve script, and fill a bug if it
doesn't work (yet).

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl

Reply via email to