DevHeads.net

Postings by d tbsky

how to filter all mails by rule

I want to filter all the mails send to <a href="mailto: ... at example dot com"> ... at example dot com</a>.

capture information for internal generated mails

I want to bcc all mails for archive purpose. one kind of mail is like below:

outside user (<a href="mailto: ... at gmail dot com"> ... at gmail dot com</a>) mail to -> postfix alias with settings
to forward outside (<a href="mailto: ... at example dot com"> ... at example dot com</a>) -> forward to outside user
(<a href="mailto: ... at gmail dot com"> ... at gmail dot com</a>)

"always_bcc" and "recipient_bcc_maps" won't capture mails to " ... at gmail dot com".

"sender_bcc_maps" could capture the mail, but the whole mail didn't
have any header information about " ... at gmail dot com".

can I write "sender_bcc_maps" to reveal the information about " ... at gmail dot com"?
or there are other method I can use to record the mail and envelope
information?

how to save a copy to a directory

I want to save every email copy to a Maildir format directory.
just like "always_bcc", but put the mails in some directory outside
normal mail storage area.

I wonder if this can be done with configuration, or I need to write
some transport script.

I tried to use "always_bcc=archive@localhost", but I don't know how to
let postfix save mails to "archive@localhost" to "/my_want_directory".

I tried to use "mailbox_transport_maps =
hash:/etc/postfix/archive_local". and the file "archive_local" content
is "archive local:/my_want_directory/".