diff -Nur smeserver-wbl-0.3.0.bz807.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl smeserver-wbl-0.3.0.bz807.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl
--- smeserver-wbl-0.3.0.bz807.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl 2015-09-05 21:29:45.441483049 +0200
+++ smeserver-wbl-0.3.0.bz807.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/wbl 2015-09-05 21:55:21.636350340 +0200
@@ -174,5 +174,15 @@
WHITELISTFROM_LABEL
spamassassin whitelist_from
-
+
+ BLACKLISTFROM_LABEL
+ spamassassin blacklist_from
+
+
+ BLACKLISTFROM_DESCRIPTION
+
+ Any envelope sender of a mail (*@host or user@host) matching an entry in blacklist_from
+ will be rejected by spamassassin.
+
+
diff -Nur smeserver-wbl-0.3.0.bz807.old/root/etc/e-smith/web/functions/wbl smeserver-wbl-0.3.0.bz807.new/root/etc/e-smith/web/functions/wbl
--- smeserver-wbl-0.3.0.bz807.old/root/etc/e-smith/web/functions/wbl 2015-09-05 21:29:47.816654521 +0200
+++ smeserver-wbl-0.3.0.bz807.new/root/etc/e-smith/web/functions/wbl 2015-09-05 21:54:26.081297872 +0200
@@ -73,6 +73,15 @@
BADMAILFROM_DESCRIPTION
+
+
+ BLACKLISTFROM_DESCRIPTION
+
+
diff -Nur smeserver-wbl-0.3.0.bz807.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wbl.pm smeserver-wbl-0.3.0.bz807.new/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/wbl.pm
--- smeserver-wbl-0.3.0.bz807.old/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm 2015-09-05 21:29:47.946663908 +0200
+++ smeserver-wbl-0.3.0.bz807.new/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/wbl.pm 2015-09-05 22:05:51.583825438 +0200
@@ -207,6 +207,24 @@
foreach $BadMailFrom (@BadMailFrom){
$wdb->set_prop('badmailfrom', "$BadMailFrom", 'Black');
}
+ # spamassassin blacklist_from
+ my %list_wblglobal = $sdb->get('wbl.global')->props;
+ my $parameter_wblglobal = "";
+ my $value_wblglobal = "";
+ while (($parameter_wblglobal,$value_wblglobal) = each(%list_wblglobal)) {
+ if ($parameter_wblglobal eq "type") {next;}
+
+ if ($value_wblglobal eq "Black") {
+ $sdb->get_prop_and_delete('wbl.global', "$parameter_wblglobal");
+ }
+ }
+
+ my $BlacklistFrom = $q->param("blacklistfrom");
+ $BlacklistFrom =~ s/\r\n/,/g;
+ my @BlacklistFrom = sort(split /,/, $BlacklistFrom);
+ foreach $BlacklistFrom (@BlacklistFrom){
+ $sdb->set_prop('wbl.global', "$BlacklistFrom", 'Black');
+ }
##Update email settings
unless ( system ("/sbin/e-smith/signal-event", "email-update") == 0 ){
@@ -329,4 +347,24 @@
}
+sub get_blacklistfrom
+{
+ my %list = $sdb->get('wbl.global')->props;
+
+ my @blacklistfrom = ();
+ my $parameter = "";
+ my $value = "";
+ while (($parameter,$value) = each(%list)) {
+ if ($parameter eq "type") {next;}
+
+ if ($value eq "Black") {
+ push @blacklistfrom, $parameter;
+ }
+ }
+
+ return "" unless (scalar @blacklistfrom);
+
+ return join "\n", sort(@blacklistfrom);
+}
+
1;