Thanks for your post Oklit.
Can I elaborate a bit on #1? lets say we're not using procmail, is it possible to use sieve to achieve this? If so, can you explain how? (I've been following an online tutorial by Christian Haas and an extention project (I dont have the link right now) that is using fetchmail and sieve. The fetchmail part is clear. But I'm not too sure what the sieve part is for. I suspect it is to achieve something like this.
Also, if I do end up using procmail, is it possible to somehow tell postfix (I'm not sure, but I've seen the use of something like %u) that if the sender's email address is the same as the user's email address, then this must be put in Sent folder?
#2, 3, 4: Ok. just to make sure, in conclusion, use "always_bcc" to get all backup of BOTH sent and received? (I had thought that this would backup only sent items and I have to setup somekind of forwardings for the received emails)
Thank You
Main Topics
Browse All Topics





by: oklitPosted on 2009-08-26 at 04:48:33ID: 25186492
1. Impossible with postfix only. There is possibility to achieve this with for example procmail. Set always_bcc to some address, and configure procmail on this account. Procmail configuration won't be trivial in my opinion - you need to recognize somehow which email was received and which one was sent by your server. You may try to use something like below, but I cannot guarantee that it will work in every possible situation. domain2|yo ur_domain3 |...)
main2|your _domain3|. ..)
:0:
* ^From.*(your_domain1|your_
path/to/SENT
:0:
* ^To.*(your_domain1|your_do
path/to/INBOX
:0:
path/to/some/other/box
The last one is for catching emails which didn't match first two rules - just for safety. There is possibility, that you will have tune first two rules a little to catch all proper emails.
2. You don't need mysql here, as sender_bcc_maps and recipient_bcc_maps are not the ones you are looking for. They are for specifying which emails (from which sender and/or recipient) are supposed to be copied to your 'backup' mailbox. As you want to copy all emails, you don't need to provide specific addresses.
3. The same as previous - you don't need sender_bcc_maps. But generally - this is just file. You may name it whatever you want. In above example - you don't need to add .cf extension.
4. always_bcc is better. My explanation is in answer for your 2nd question.
5. You don't have to. It's just information, that if you have some canonical/masquerade mappings, they will be applied before copying emails due to always_bcc option.