diff -Nur smeserver-wbl-0.3.0.bz9092.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl smeserver-wbl-0.3.0.bz9092.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl
--- smeserver-wbl-0.3.0.bz9092.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl 2015-10-13 00:30:41.310389712 +0200
+++ smeserver-wbl-0.3.0.bz9092.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl 2015-10-15 22:34:01.631604797 +0200
@@ -29,22 +29,40 @@
- FORM_DESCRIPTION
-
- E-mail traffic is scanned and may be blocked due to the various screening methods enabled.
- You may use this panel to define e-mail white/black lists.
+ WBL_DESCRIPTION
+ E-mail traffic is scanned and may be blocked due to the various screening methods enabled.
+ You may use this panel to define e-mail white/black lists.
+
-
Black lists are used for rejecting e-mail traffic.
- ]]>
-
+
+ RBL_LIST
+ RBL's List
+
+
+
+ BLACK_LIST_DESCRIPTION
+ Black lists are used for rejecting e-mail traffic.
+
+
+
+ BLACK_LIST
+ Black List
+
+
+
+ WHITE_LIST_DESCRIPTION
+ White lists are used for accepting e-mail traffic.
+
+
+
+ WHITE_LIST
+ White List
# WBL_PAGE_BLACK
@@ -52,18 +70,15 @@
BLACK_TITLE
- This server includes built-in support for using two external black list methods,
- DNSBL and RHSBL. It also supports the admin defined black lists, badhelo and
- badmailfrom.
- ]]>
+ This server includes built-in support for using the admin defined black lists, badhelo and
+ badmailfrom.
DNSBL_DESCRIPTION
- DNSBL is an abbreviation for "DNS blacklist". It is a list of IP addresses known to be spammers.
+ DNSBL is an abbreviation for "DNS blacklist".
@@ -75,8 +90,7 @@
RHSBL_DESCRIPTION
- RHSBL is an abbreviation for "Right Hand Side Blacklist".
- It is a list of domain names known to be spammers.
+ RHSBL is an abbreviation for "Right Hand Side Blacklist".
@@ -115,7 +129,7 @@
WHITE_TITLE
- Use this panel to modify your servers White List settings.
+ Use this panel to modify your servers White List settings. All entries will be enabled by default
@@ -185,4 +199,24 @@
will be rejected by spamassassin.
+
+ SBLLIST_LABEL
+ RHSBL (qpsmtpd SBLList)
+
+
+ SBLLIST_DESCRIPTION
+ RHS block list - 'right hand side' of senders host/domain will be checked against the following servers
+
+
+ RBLLIST_LABEL
+ DNSBL Zones (qpsmtpd RBLList)
+
+
+ RBLLIST_DESCRIPTION
+ DNS Block List - senders IP address will be checked against the following servers
+
+
+ RBL_TITLE
+ Real-time Blackhole Lists are disabled by default. To help reduce spam you can enable RBLs here.
+
diff -Nur smeserver-wbl-0.3.0.bz9092.old/root/etc/e-smith/web/functions/wbl smeserver-wbl-0.3.0.bz9092.new/root/etc/e-smith/web/functions/wbl
--- smeserver-wbl-0.3.0.bz9092.old/root/etc/e-smith/web/functions/wbl 2015-10-13 00:30:41.316390108 +0200
+++ smeserver-wbl-0.3.0.bz9092.new/root/etc/e-smith/web/functions/wbl 2015-10-15 22:36:42.341219048 +0200
@@ -23,15 +23,35 @@
- FORM_DESCRIPTION
+
+ WBL_DESCRIPTION
+
-
-
+
+ RBL_LIST_DESCRIPTION
+
- BLACK_TITLE
+
+
+
+ BLACK_LIST_DESCRIPTION
+
+
+
+
+
+ WHITE_LIST_DESCRIPTION
+
+
+
+
+
+
+
+ RBL_TITLEDNSBL_LABEL
DNSBL_DESCRIPTION
-
+
+
+ RBLLIST_DESCRIPTION
+ RHSBL_LABEL
RHSBL_DESCRIPTION
+
+
+ SBLLIST_DESCRIPTION
+
+
+
+
+
+
+
+ BLACK_TITLEWHITE_TITLE
-
-
-
- get_prop('qpsmtpd', 'RHSBL') || 'disabled');
}
+sub get_sbllist
+{
+my $sbllistform = $db->get_prop('qpsmtpd', 'SBLList') || '';
+$sbllistform =~ s/:/\n/g;
+return $sbllistform;
+}
+
+sub get_rbllist
+{
+my $rbllistform = $db->get_prop('qpsmtpd', 'RBLList') || '';
+$rbllistform =~ s/:/\n/g;
+return $rbllistform;
+}
+
sub get_badhelo
{
my %list = $wdb->get('badhelo')->props;
@@ -71,13 +85,6 @@
return join "\n", sort(@badmailfrom);
}
-sub get_rrfh
-{
- return 'yes';
- # always yes for SME8
- #return ($db->get_prop('qpsmtpd', 'RequireResolvableFromHost') || 'no');
-}
-
sub get_whitelisthosts
{
my %list = $wdb->get('whitelisthosts')->props;
@@ -163,12 +170,6 @@
my $fm = shift;
my $q = $fm->{'cgi'};
- my $dnsbl = $q->param('dnsbl');
- $db->set_prop('qpsmtpd', 'DNSBL', "$dnsbl");
-
- my $rhsbl = $q->param('rhsbl');
- $db->set_prop('qpsmtpd', 'RHSBL', "$rhsbl");
-
# qmail badhelo
my %list = $wdb->get('badhelo')->props;
my $parameter = "";
@@ -240,10 +241,6 @@
my $fm = shift;
my $q = $fm->{'cgi'};
- my $rrfh = $q->param("rrfh");
- # SME8 no longer use this key, always on
- #$db->set_prop('qpsmtpd', 'RequireResolvableFromHost', "$rrfh");
-
# qpsmtpd whitelisthosts
my %list = $wdb->get('whitelisthosts')->props;
my $parameter = "";
@@ -366,5 +363,53 @@
return join "\n", sort(@blacklistfrom);
}
+sub create_modify_rbl
+{
+ my $fm = shift;
+ my $q = $fm->{'cgi'};
+ my $dnsbl = $q->param('dnsbl');
+ $db->set_prop('qpsmtpd', 'DNSBL', "$dnsbl");
+
+ my $rhsbl = $q->param('rhsbl');
+ $db->set_prop('qpsmtpd', 'RHSBL', "$rhsbl");
+
+
+ my $sbllistcgi = $q->param('sbllist');
+ my @sbllistcgi = split /\s+/, $sbllistcgi;
+ my $sbllistdb = '';
+ foreach (@sbllistcgi) { $sbllistdb = $sbllistdb . ':' . $_; }
+ $sbllistdb =~ s/^://;
+
+ $db->set_prop('qpsmtpd', 'SBLList', "$sbllistdb");
+
+
+ my $rbllistcgi = $q->param('rbllist');
+ my @rbllistcgi = split /\s+/, $rbllistcgi;
+ my $rbllistdb = '';
+ foreach (@rbllistcgi) { $rbllistdb = $rbllistdb . ':' . $_; }
+ $rbllistdb =~ s/^://;
+
+ $db->set_prop('qpsmtpd', 'RBLList', "$rbllistdb");
+
+ ##Update email settings
+
+ unless ( system ("/sbin/e-smith/signal-event", "email-update") == 0 ){
+ $fm->error('ERROR_UPDATING');
+ return undef;
+ }
+
+ $fm->success('SUCCESS');
+}
+
+#Subroutine to display buttons
+sub print_custom_button{
+ my ($fm,$desc,$url) = @_;
+ my $q = $fm->{cgi};
+ $url="wbl?page=0&page_stack=&Next=Next&wherenext=".$url;
+ print "