Bernardo Pons a écrit :
> Hi all,
>  
> I'm looking for a way to add a header to the messages before they are
> delivered to a multidrop mailbox with virtual aliases.  
>  
> After searching the postfix-users list archives I've found that
> this subject has been already discused here and I've found a message
> from Zoltan Balogh that seemed to be exactly what I needed:
>  
> ------8<--------------------------------------------------------------------------------------------
>> So basically I just need to help fetchmail "guessing" the correct
>> envelope recipients by appending "X-Envelope-To" (or similar header
>> entry) to the email message. I did the following:
>>
>>     smtpd_recipient_restrictions =
>>         ...
>>         check_recipient_access pcre:/etc/postfix/recipient_access
>>
>> /etc/postfix/check_recipient_access:
>>    /(....@somedomain.com)/ <mailto:....@somedomain.com)/> PREPEND
> X-Envelope-To: <$1>

please use the "text" button to avoid these annoying "<mailto...>" addons.

> ------8<--------------------------------------------------------------------------------------------
>  

This is bad. it exposes Bcc recipients.

use recipient_bcc_maps instead. then the Delivered-To header should be
enough. if you have a more complex setup (later rewrite, do start with
recipient_bcc_maps, then ask a new question, with relevant infos).

> But it doesn't work for me. No header is added at all!
>  

well, unless your expression is wrong or your rule isn't called, it
should "work". but as said above, this is the wrong approach (all
recipients see all the headers, so Bcc recipients are disclosed).


> Maybe it is because I use LMTP as a delivery method from Postfix to Cyrus?
>  
> Should I place the check_recipient_access rule in another phase of smtp
> check instead of smtpd_recipient_restrictions?
>  
> Thanks
> 
> -- 
> Bernardo Pons
> 

Reply via email to