On Mon, 03 Aug 2009, Tim Coote wrote:

> I've been a happy user and recommender of postfix for about 8 years now. 

You've been using Postfix long enough to include 'postconf -n' and the other
information as outlined in DEBUG_README. :-)

> For historical reasons, I was using the Delivered-To: header as part of 
> an IMAP Sieve rule. However, I seem to have lost this header in my  
> inbound mail. I'm using Cyrus IMAP as my Message Store and Spambayes as a 
> content filter. Cyrus is driven through LMTP.  I'm using a fedora build 
> of postfix "postfix-2.5.6-1.fc10.i386".  I also have postfix on a 
> firewall (postfix-2.2.11-1.rh8), which I used to use to forward mail to 
> my more current system. However, the firewall MTA now merely forwards to 
> the 'internal' MTA.  I'd guess that the firewall MTA used to prepend the 
> Delivered-To: header, but I haven't been able to check that.
>
> The problem that I have is that I cannot get that Delivered-To: header  
> reinstated. I've changed the smtp entry in master.cf to:
> smtp      inet  n       -       n       -       -       smtpd
>  -o content_filter=spambayes:dummy
>
> and added the spambayes entry:
>
> spambayes unix  -       n       n       -       -       pipe
>  flags=O user=tim argv=/usr/local/bin/sbwrapper.sh ${sender} $ 
> {recipient}
>
> I've added the following to main.cf as recommended:
> spambayes_destination_recipient_limit = 1
>
> Although it doesn't seem to make much difference.
>
> The flags=O.... in master.cf gives me an X-Originally-To: mail header  
> and there's no 'Delivered-To:' header, but if I change it to  
> flags=D...., mail gets bounced by the loop detection code.

The bounce is sensible; you add a Delivered-To: header before the mail is
actually delivered by the appropriate delivery agent, which by design bounces
mail that is destined for f...@bar.org when f...@bar.org already appears in the
Delivered-To:.

> I see from the documentation that some loop detection logic may have  
> changed around version 2.3, but I don't think that the Delivered-To:  
> header was removed. 

The header was not 'removed'; for example, local(8) and virtual(8) still add
the header when delivering mail to intended recipients.

> There's no particular reason for trying to generate the Delivered-To:  
> header through the callout to the content filter, but it seemed an easy 
> place to plug it in.  

It is a bad place to plug it in given the way loop detection works.

> I've tried the debugging suggested, but I cannot see any Delivered-To:  
> header at all.
>
> Hoping someone can help, even if it's just to point me at something that 
> says that Delivered-To's dead so that I can rework what I want to do.

Show 'postconf -n', some log output of the bounce, and the rest of master.cf.

-- 
Sahil Tandon <sa...@tandon.net>

Reply via email to