It took 4 steps:
- Create an archive email account (which can be in the
same domain)
- Create a bcc map file
- Edit postfix’s mail.cf file
- Reload postfix
- Test
Setting
up the archive
Setup a email account just for the
archive – it can be in the same domain (because postfix won’t loop bcc’ing to
itself) or a different domain. I recommend ‘archive’ followed some random
numbers. You don’t want the dictionary attackers to find your archive and spam
them. Make the password non-obvious and see warning below about sharing it with
staff.
Create
bcc map
1
2
3
|
cd /etc/postfix
echo "@your-domain.com"
"archive12345@your-domain.com" > bcc_map
postmap bcc_map
|
If you want to archive an additional
domain edit bcc_map and add another similarly patterned line. Note if you just
wanted to archive one person’s email you could use a line like: bob@example.com
archive12345@your-domain.com
Edit
main.cf
Add these lines to /etc/postfix/mail.cf
1
2
|
sender_bcc_maps = hash:/etc/postfix/bcc_maps
recipient_bcc_maps = hash:/etc/postfix/bcc_maps
|
Reload
1
|
# /etc/init.d/postfix reload
|
Test
Send an email to the domain or email
address you’re trying to archive. To read that email and reply back. Now you
should be able to find 2 emails (minimum) in the archive12345 inbox.
Warning
Now that the archive is working,
change the archive email password. Use a long random password on the archive’s
acount and don/t record it or remember it.
If any staff asks to see the archive
by having access to the archive via IMAP, beware. Anyone using IMAP can
(and will by accident) delete archive emails.
When there is a real need to read an
archive or search it, the best thing would be to allow access to a clone of the
archive with IMAP access, then destroy the copy (so the client doesn’t get in
the habit of using it like a regular email account).
ngoài ra chúng ta có thể tạo BCC bằng cách:
always_bcc = <users-email-address>
hai cách khác nhau chổ nào thì trải nhiệm mới biết :D
ngoài ra chúng ta có thể tạo BCC bằng cách:
always_bcc = <users-email-address>
hai cách khác nhau chổ nào thì trải nhiệm mới biết :D
No comments:
Post a Comment