{"id":789,"date":"2016-02-19T12:03:55","date_gmt":"2016-02-19T11:03:55","guid":{"rendered":"http:\/\/ndk.sytes.net\/wordpress\/?p=789"},"modified":"2016-02-19T12:03:55","modified_gmt":"2016-02-19T11:03:55","slug":"postfix-sending-email-copies-of-all-incoming-and-outgoing-mails-to-another-domain-or-account","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=789","title":{"rendered":"Postfix: sending email copies of all incoming and outgoing mails to another domain or account"},"content":{"rendered":"<p>\n\tHow to send an BCC copy of every incoming and outgoing email to another account? This is fairly simple to do with postfix. First open you main.cf and add or edit following lines:\n<\/p>\n<pre>\n# vim \/etc\/postfix\/main.cf<\/pre>\n<p>\n\tnow add these two lines:\n<\/p>\n<pre>\n<code>sender_bcc_maps = regexp:\/etc\/postfix\/archive_domain\nrecipient_bcc_maps = regexp:\/etc\/postfix\/archive_domain<\/code><\/pre>\n<p>\n\t<code>just a small explanation:<\/code>\n<\/p>\n<p>\n\t<code>sender_bcc_maps is a regex based text file containing the mapping for outgoing mail<br \/>\n\trecipient_bcc_maps is a regex based text file containing the mappings for incoming mail<\/code>\n<\/p>\n<p>\n\t<code>and here is an example line in the archive_domain file:<\/code>\n<\/p>\n<pre>\n<code>\/^([^@]+)\\@example\\.com$\/    $1@archive.example.com<\/code><\/pre>\n<p>\n\t<code>the above line explained: every user @example.com will have a BCC copy send to that user @archive.example.com<\/code>\n<\/p>\n<p>\n\t&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to send an BCC copy of every incoming and outgoing email to another account? This is fairly simple to do with postfix. First open you main.cf and add or edit following lines: # vim \/etc\/postfix\/main.cf now add these two lines: sender_bcc_maps = regexp:\/etc\/postfix\/archive_domain recipient_bcc_maps = regexp:\/etc\/postfix\/archive_domain just a small explanation: sender_bcc_maps is a regex [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,7],"tags":[],"class_list":["post-789","post","type-post","status-publish","format-standard","hentry","category-linuxunix","category-servers"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=789"}],"version-history":[{"count":0,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/789\/revisions"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}