Changes

Jump to navigation Jump to search
1,507 bytes added ,  04:03, 2 August 2022
Line 1: Line 1: −
[[Category:Mail]][[Category:Contrib]]
+
==Maintainer==
 +
This contrib has been developed by [[User:Knuddi|Jesper Knudsen]] from [http://smeoptimizer.swerts-knudsen.dk SME Optimizer]
 +
 
 +
==Details==
 +
We have now added it to the contribs repo and are updating it for v10.
 +
 
 +
It needs the smeserver-dovecot-extras rpm
   −
==Maintainer==
+
https://wiki.contribs.org/Dovecot-extras
This contrib has been developed by [[User:Knuddi|Jesper Knudsen]]
+
 
 +
==Version==
 +
{{ #smeversion: smeserver-unjunkmgr }}
    
==Description==
 
==Description==
Line 17: Line 25:  
==Installation==
 
==Installation==
   −
The package needs the Perl-MIME-Lite package to be able to send out HTML formatted emails and MRTG to create the statistics graphs.
+
You can install this contribs by yum with the following command. You should use this method as you will have always the newest version.
   −
  yum install perl-MIME-Lite --enablerepo=smecontribs
+
<tabs container>
  yum install mrtg --enablerepo=base
+
<tab name="For sme10">
{{Note box|Make sure you have the [base] repository enabled for yum or it cannot find the MRTG package!}}
+
  yum install --enablerepo=smecontribs smeserver-unjunkmgr
 +
</tab>
 +
<tab name="For sme9">
 +
  yum install --enablerepo=smecontribs smeserver-unjunkmg
 +
and then
 +
expand-template /etc/crontab
 +
expand-template /etc/httpd/conf/httpd.conf
 +
/etc/rc.d/init.d/httpd-e-smith restart
   −
Then install the sme-unjunkmgr RPM from (I will get around and release to contribs later):
+
or
 +
signal-event post-upgrade; signal-event reboot
 +
</tab>
 +
</tabs>
 +
====Upgrading====
   −
rpm –Uvh http://sme.swerts-knudsen.com/downloads/unjunkmgr/sme-unjunkmgr-1.0.1-1.noarch.rpm
+
  yum upgrade --enablerepo=smecontribs smeserver-unjunkmgr
 +
====Uninstall====
 +
You can simply remove the package again with the usual yum command.  
   −
====De-installation or de-activation====
+
yum remove smeserver-unjunkmgr
You can simply remove the package again with the usual rpm command.
     −
rpm –e sme-unjunkmgr-1.0.1-1
+
==Configuration==
   −
If you are uninstalling version 1.0.0-1 you also need to also expand templates.
+
====Email Notifications====
expand-template /etc/crontab
+
The UnJunk Manager sends out the summary email every Friday at 1PM to all users with emails stored in their junkmail folder. If you wish the admin account to get copied on all these user emails then this can be enabled/disabled with (default: no):
expand-template /etc/httpd/conf/httpd.conf
  −
/etc/rc.d/init.d/httpd-e-smith restart
     −
or disable the functionality with:
+
/sbin/e-smith/db configuration setprop unjunkmgr adminemails <no|yes>
   −
/sbin/e-smith/db configuration set unjunkmgr service enabled <no|yes>
+
If you just want to use the UnJunk Manager to gather statistics and not send out any summary emails to the users you can disable this functionality with (default: yes):
 
  −
==Configuration==
     −
The SpamAssassin learning does require that the SpamAssassin bayes filters have been enabled though. How this is done can be read at http://wiki.contribs.org/Email#Setup_Blacklists_.26_Bayesian_Autolearning or through these few shell commands.
+
/sbin/e-smith/db configuration setprop unjunkmgr useremails <no|yes>
   −
config setprop spamassassin UseBayes 1
+
How do I configure the UnJunkMgr to use an IP address or a different hostname rather than the primary domain name when it sends out the weekly overview (default: domainname)?
config setprop spamassassin BayesAutoLearnThresholdSpam 4.00
  −
config setprop spamassassin BayesAutoLearnThresholdNonspam 0.10
  −
expand-template /etc/mail/spamassassin/local.cf
  −
sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd
  −
chown spamd.spamd /var/spool/spamd/.spamassassin/bayes_*
  −
chown spamd.spamd /var/spool/spamd/.spamassassin/bayes.mutex
  −
chmod 640 /var/spool/spamd/.spamassassin/bayes_*
  −
config setprop spamassassin status enabled
  −
signal-event email-update
      +
/sbin/e-smith/db configuration setprop unjunkmgr unjunkhost <hostname|IP address>
   −
Personally I also think that the default 90 days of retention for emails in the junkmail folder is way to long - who bothers to look at 90 days old emails anyways? I run with 15 days of retention on all my installations.
+
The summary emails contain a link to an web page where emails can be unjunked (released to he inbox). These URLs cann, by default, only be seen from the local network (IP ranges defined in Local Network in the server-manager) but if you want this to be accessible from remote networks (public access) this can be done via (default: yes):
   −
  db configuration setprop spamassassin MessageRetentionTime 15  
+
  /sbin/e-smith/db configuration setprop unjunkmgr LocalOnly <no|yes>
  signal-event email-update
+
  expand-template /etc/httpd/conf/httpd.conf
 +
  systemctl restart httpd-e-smith
    +
====Statistics====
    
The UnJunk Manager also collects statistics on the emails passing through the mail server. This is accessible from:
 
The UnJunk Manager also collects statistics on the emails passing through the mail server. This is accessible from:
Line 67: Line 77:  
http://your.domain.com/unjunkmgr
 
http://your.domain.com/unjunkmgr
   −
This web page and the unjunk functionality can, by default, only be seen from the local network (IP ranges defined in Local Network in the server-manager) but if you want this to be accessible from remote networks (public access) this can be done via:
+
This web page and the unjunk functionality as described above can, by default, only be seen from the local network (IP ranges defined in Local Network in the server-manager) but if you want this to be accessible from remote networks (public access) this can be done via (default: yes):
    
  /sbin/e-smith/db configuration setprop unjunkmgr LocalOnly <no|yes>
 
  /sbin/e-smith/db configuration setprop unjunkmgr LocalOnly <no|yes>
 
  expand-template /etc/httpd/conf/httpd.conf
 
  expand-template /etc/httpd/conf/httpd.conf
  /etc/rc.d/init.d/httpd-e-smith restart
+
  systemctl restart httpd-e-smith
   −
[[Image:Unjunkweb.jpg]]
+
[[Image:Unjunkwebstat.jpg]]
    
An additional feature of the UnJunk Manager is to send the collected statistics to a central statistics central at http://central.swerts-knudsen.dk. The gathering of data is not stressful for the server and the data sent is not sensitive (well in my opinion) and consists of:
 
An additional feature of the UnJunk Manager is to send the collected statistics to a central statistics central at http://central.swerts-knudsen.dk. The gathering of data is not stressful for the server and the data sent is not sensitive (well in my opinion) and consists of:
-  amount of emails scanned
+
 
-  number of spam infected or virus infected emails
+
* Amount of emails scanned
if virus infected the name of the virus found
+
* Number of spam infected (tagged and rejected) or virus infected emails (if virus found the ClamAV name)
-  the version of SME server used
+
* The version of SME server used  
 +
* Public IP address of server (used to plot in Google Maps on central.swerts-knudsen.com)
    
Should you want to disable this functionality then this can obviously be done:
 
Should you want to disable this functionality then this can obviously be done:
Line 85: Line 96:  
  /sbin/e-smith/db configuration setprop unjunkmgr statsclient <disabled|enabled>
 
  /sbin/e-smith/db configuration setprop unjunkmgr statsclient <disabled|enabled>
   −
Today around ~850 servers still active with my sme-spamfilter contrib and ~450 servers using my sme-antivirus for SME 6x send in data for this “worldwide overview”.
+
====SpamAssassin bayes filters====
 +
 
 +
The SpamAssassin learning requires that the SpamAssassin bayes filters have been enabled though. How this is done can be read at http://wiki.contribs.org/Email#Setup_Blacklists_.26_Bayesian_Autolearning or through these few shell commands.
 +
 
 +
config setprop spamassassin UseBayes 1
 +
config setprop spamassassin BayesAutoLearnThresholdSpam 4.00
 +
config setprop spamassassin BayesAutoLearnThresholdNonspam 0.10
 +
expand-template /etc/mail/spamassassin/local.cf
 +
sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd
 +
chown spamd.spamd /var/spool/spamd/.spamassassin/bayes_*
 +
chown spamd.spamd /var/spool/spamd/.spamassassin/bayes.mutex
 +
chmod 640 /var/spool/spamd/.spamassassin/bayes_*
 +
config setprop spamassassin status enabled
 +
signal-event email-update
 +
 
 +
 
 +
Personally I also think that the default 90 days of retention for emails in the junkmail folder is way to long - who bothers to look at 90 days old emails anyways? I run with 15 days of retention on all my installations.
 +
 
 +
db configuration setprop spamassassin MessageRetentionTime 15 
 +
signal-event email-update
 +
 
 +
====Unofficial ClamAV signatures====
 +
I would also recommend to install the script that downloads all the unofficial ClamAV signatures as these detects not only virus but equally importantly various kinds of malware and spam.
   −
[[Image:Centralweb.jpg]]
+
Follow the guide for [[Virus:Additional_Signatures|Additional Virus Signatures]] to do that.
    
==FAQ==
 
==FAQ==
    
===How do I see what this Summary of Junkmail looks like without sending to all my users?===
 
===How do I see what this Summary of Junkmail looks like without sending to all my users?===
You will need to change the “$debug = 0;” to “$debug = 1;” in the configuration section of the /usr/local/unjunkmgr/spamreminder.pl file. Then launch the reminder manually with:  
+
You will need to change config via:
 +
/sbin/e-smith/db configuration setprop unjunkmgr useremails no
 +
/sbin/e-smith/db configuration setprop unjunkmgr adminemails yes
 +
 
 +
Then launch the reminder manually with:  
 
  /usr/local/unjunkmgr/spamreminder.pl
 
  /usr/local/unjunkmgr/spamreminder.pl
 +
 
All the summary emails will now be sent to “admin”.
 
All the summary emails will now be sent to “admin”.
   Line 150: Line 188:  
  expand-template /etc/crontab
 
  expand-template /etc/crontab
   −
===How do I avoid the admin emails?===
+
===How do I report a problem or a suggestion?===
You unfortunately have to change a few lines of code to avoid these. Open a shell on the system you install the contrib on and open /usr/local/unjunkmgr/spamreminder.pl with your favorite editor.
+
This contrib has not yet been created in the bugtracker so just send an email to mailto:contribs@swerts-knudsen.dk
   −
Find the line (around line 35):
  −
my $admin_email_addr = 'admin';
  −
and change to
  −
my $admin_email_addr = '';
        −
===How do I report a problem or a suggestion?===
+
== Bugs ==
This contrib has not yet been created in the bugtracker so just send an email to mailto:contribs@swerts-knudsen.dk
+
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]
 +
Use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-unjunkmgr|title=this link}}.
 +
{{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-unjunkmgr|noresultsmessage="No open bugs found."}}
   −
==Revisions==
  −
{| border="1" style="background-color:#C0C0C0"
  −
|Release
  −
|Changes
  −
|- style="background-color:#FFFFFF"
  −
|1.0.0-1
  −
|First release
  −
|- style="background-color:#FFFFFF"
  −
|1.0.1-1
  −
|Updated web overview to have virus rigth and spam to the left.
     −
Fixed regex causing some warning messages during weekly spamreminder run if email subject were empty
+
== Changelogs ==
 +
Only released version in smecontrib are listed here.
   −
Improved uninstall to clean up properly
+
{{#smechangelog: smeserver-unjunkmgr }}
|}
+
----
 +
[[Category:Mail]]
 +
[[Category:Contrib]]
 +
[[Category:Administration:Content Spam Virus Blocking]]
 +
[[Category:Administration:Monitoring]]
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,250

edits

Navigation menu