From a55ba7798d3a8043bfdfbc426aadf49fb8a17d2a Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 26 Dec 2007 21:16:58 +0000 Subject: [PATCH] BCC mapping page --- postfix/CHANGELOG | 2 ++ postfix/acl_security.pl | 1 + postfix/bcc.cgi | 38 ++++++++++++++++++++++++++++++++++++++ postfix/defaultacl | 1 + postfix/help/bcc.html | 13 +++++++++++++ postfix/images/bcc.gif | Bin 0 -> 2745 bytes postfix/index.cgi | 2 +- postfix/lang/en | 8 +++++++- postfix/map_chooser.cgi | 4 ++-- postfix/postfix-lib.pl | 8 ++++++++ postfix/save_opts_bcc.cgi | 28 ++++++++++++++++++++++++++++ 11 files changed, 101 insertions(+), 4 deletions(-) create mode 100755 postfix/bcc.cgi create mode 100644 postfix/help/bcc.html create mode 100755 postfix/images/bcc.gif create mode 100755 postfix/save_opts_bcc.cgi diff --git a/postfix/CHANGELOG b/postfix/CHANGELOG index 4b61bc29e..c69d1affc 100644 --- a/postfix/CHANGELOG +++ b/postfix/CHANGELOG @@ -48,3 +48,5 @@ Maps in MySQL and LDAP databases can be viewed and edited in the same way that t Fixed a bug that prevented comments and manual map editing, and added back support for PCRE and BTREE maps. Added a button for manually editing the aliases file. Added more SMTP relaying restrictions. +---- Changes since 1.390 ---- +Outgoing email from selected addresses and domains can now be BCCd automatically using the new BCC Mapping page. diff --git a/postfix/acl_security.pl b/postfix/acl_security.pl index 657b1e6d5..081d48bde 100644 --- a/postfix/acl_security.pl +++ b/postfix/acl_security.pl @@ -2,6 +2,7 @@ require 'postfix-lib.pl'; @acl_pages = ("resource", "address_rewriting", "aliases", "general", "canonical", "virtual", "transport", "relocated", "header","body", + "bcc", "local_delivery", "smtpd", "sasl","smtp", "rate", "debug", "ldap", "master", "startstop", "mailq", "postfinger", "manual"); diff --git a/postfix/bcc.cgi b/postfix/bcc.cgi new file mode 100755 index 000000000..ebe1c4bea --- /dev/null +++ b/postfix/bcc.cgi @@ -0,0 +1,38 @@ +#!/usr/local/bin/perl + +require './postfix-lib.pl'; + +$access{'bcc'} || &error($text{'bcc_ecannot'}); +&ui_print_header(undef, $text{'bcc_title'}, "", "bcc"); + + +# alias general options + +print "
\n"; +print "\n"; +print "\n"; +print "
$text{'bcc_title'}
\n"; + +$none = $text{'opts_none'}; + +print "\n"; +&option_mapfield("sender_bcc_maps", 60, $none); +print "\n"; + +print "

\n"; +print "

\n"; +print "
\n"; +print "
\n"; + + +if (&get_current_value("sender_bcc_maps") eq "") +{ + print ($text{'no_map'}."

"); +} +else +{ + &generate_map_edit("sender_bcc_maps", $text{'map_click'}." ". + "".&hlink("$text{'help_map_format'}", "virtual")."\n
\n"); +} + +&ui_print_footer("", $text{'index_return'}); diff --git a/postfix/defaultacl b/postfix/defaultacl index 59d61f301..6af0629f0 100644 --- a/postfix/defaultacl +++ b/postfix/defaultacl @@ -28,3 +28,4 @@ master=1 manual=1 dir=/ sasl=1 +bcc=1 diff --git a/postfix/help/bcc.html b/postfix/help/bcc.html new file mode 100644 index 000000000..f493fdc0f --- /dev/null +++ b/postfix/help/bcc.html @@ -0,0 +1,13 @@ +
BCC Mapping
+ +This table allows you to have outgoing email sent via your Postfix server +automatically BCCd to another email address. Typically this is used to logging +to contents of all outgoing messages, or for bandwidth accounting.

+ +Each entry in the map has a sender's email address on the left-hand side, and +an address to BCC to on the right. Alternately, the left-hand part can be a +domain name prefixed by @, such as @example.com, which will +match all sender addresses in that domain.

+ +