Uberspace

Aus Markus Steinhoff
Zur Navigation springen Zur Suche springen

Mailkonfiguration

log der Einrichung

login as: run8 
Using keyboard-interactive authentication. 
Password: 
Last login: Fri Mar 25 12:29:33 2016 from 92.205.23.12 
[run8@sirius ~]$ ls -l 
total 32 
drwxr-xr-x 2 run8 run8 4096 Mar 14  2014 bin 
lrwxrwxrwx 1 root root   29 Mar 27  2014 cgi-bin -> /var/www/virtual/run8/cgi-bin 
drwx------ 2 run8 run8 4096 Apr  9  2015 etc 
lrwxrwxrwx 1 root root   30 Mar 27  2014 fcgi-bin -> /var/www/virtual/run8/fcgi-bin 
lrwxrwxrwx 1 root root   26 Mar 27  2014 html -> /var/www/virtual/run8/html 
drwxr-xr-x 5 run8 run8 4096 Mar 14  2014 lib 
lrwxrwxrwx 1 root root   26 Mar 27  2014 logs -> /var/www/virtual/run8/logs 
drwxr-xr-x 5 run8 run8 4096 Jan 24  2015 Maildir 
-rw------- 1 run8 run8 2803 Apr  9  2015 passwd.cdb 
drwxr-xr-x 8 run8 run8 4096 Apr  9  2015 pear 
-rw------- 1 run8 run8 2009 Apr 17  2015 sent 
drwxr-xr-x 9 run8 run8 4096 Apr  9  2015 users 
[run8@sirius ~]$ ls 
bin      etc       html  logs     passwd.cdb  sent 
cgi-bin  fcgi-bin  lib   Maildir  pear        users 
[run8@sirius ~]$ ls -l 
total 32 
drwxr-xr-x 2 run8 run8 4096 Mar 14  2014 bin 
lrwxrwxrwx 1 root root   29 Mar 27  2014 cgi-bin -> /var/www/virtual/run8/cgi-bin 
drwx------ 2 run8 run8 4096 Apr  9  2015 etc 
lrwxrwxrwx 1 root root   30 Mar 27  2014 fcgi-bin -> /var/www/virtual/run8/fcgi-bin 
lrwxrwxrwx 1 root root   26 Mar 27  2014 html -> /var/www/virtual/run8/html 
drwxr-xr-x 5 run8 run8 4096 Mar 14  2014 lib 
lrwxrwxrwx 1 root root   26 Mar 27  2014 logs -> /var/www/virtual/run8/logs 
drwxr-xr-x 5 run8 run8 4096 Jan 24  2015 Maildir 
-rw------- 1 run8 run8 2803 Apr  9  2015 passwd.cdb 
drwxr-xr-x 8 run8 run8 4096 Apr  9  2015 pear 
-rw------- 1 run8 run8 2009 Apr 17  2015 sent 
drwxr-xr-x 9 run8 run8 4096 Apr  9  2015 users 
[run8@sirius ~]$ cd html 
[run8@sirius html]$ ls 
b            google1bb30caf1ad7ec22.html  m       piwik       salz.zip     w 
ebay         index.html                   m2      robots.txt  sitemap.xml  w2 
favicon.ico  js                           medien  salz        stummi 
[run8@sirius html]$ cd .. 
[run8@sirius ~]$ ls 
bin      etc       html  logs     passwd.cdb  sent 
cgi-bin  fcgi-bin  lib   Maildir  pear        users 
[run8@sirius ~]$ nano .mailfilter 
[run8@sirius ~]$ chmod 600 ~/.mailfilter 
[run8@sirius ~]$ uberspace-setup-spamd 
You need to have a working ~/service directory first! 
This needs to be set up only once; you can use ~/service for a couple of things, not only spamd. 
To set up ~/service read https://uberspace.de/dokuwiki/system:daemontools or just use our setup-script 
 "uberspace-setup-svscan" before you run this script again. 
[run8@sirius ~]$ ^C 
[run8@sirius ~]$ uberspace-setup-svscan 
Creating the /etc/run-svscan-run8/run script 
Symlinking /etc/run-svscan-run8 to /service/svscan-run8 to start the service 
Waiting for the service to start ... 1 2 3 4 started! 
 
Congratulations - your personal ~/service directory is now ready to use! 
 
[run8@sirius ~]$ uberspace-setup-spamd 
Create ~/tmp directory for the spamd socket 
Create config directory ~/.spamassassin 
Create default spamd config ~/.spamassassin/user_prefs 
Creating the ~/etc/run-spamd/run service run script 
Creating the ~/etc/run-spamd/log/run logging run script 
Symlinking ~/etc/run-spamd to ~/service/spamd to start the service 
Waiting for the service to start ... 1 2 3 4 5 started! 
 
Congratulations - You can now reach your dedicated spamd! 
To connect to your own spamd you can use spamc with the option "--socket=/home/run8/tmp/spamd.sock" 
 
[run8@sirius ~]$ ^C 
[run8@sirius ~]$ test -d ~/service || uberspace-setup-svscan 
[run8@sirius ~]$ runwhen-conf ~/etc/dspam-learn "use/local/bin/dspam-learn/ 
> sed -i -e "s/^RUNWHEN=.*/RUNWHEN=\",M=`awk 'BEGIN { srand(); printf("%d\n",rand()*60) }'`\"/" ~/etc/dspam-learn/run 
> ln -s ~/etc/dspam-learn ~/service 
> ^C 
[run8@sirius ~]$ test -d ~/service || uberspace-setup-svscan 
[run8@sirius ~]$ runwhen-conf ~/etc/dspam_clean_hashdb "/usr/local/bin/dspam_clean_hashdb" 
Creating the service directories... done 
Creating the run script... done 
Creating the log/run script... done 
Setting restrictive permissions on directories and scripts... done 
 
The service is now nearly set up, but two steps are missing: 
 
* Set the time when you want to run the job through setting the variable 
  RUNWHEN within /home/run8/etc/dspam_clean_hashdb/run 
 
* Put a symlink pointing to the service directory into a directory that is 
  monitored by svscan, for example: 
  ln -s /home/run8/etc/dspam_clean_hashdb ~/service 
 
[run8@sirius ~]$ 
[run8@sirius ~]$ 1 
-bash: 1: command not found 
[run8@sirius ~]$ sed -i -e "s/^RUNWHEN=.*/RUNWHEN=\",H=`awk 'BEGIN { srand(); printf("%d\n",rand()*24) }'`\"/" ~/etc/dspam_clean_hashdb/run 
[run8@sirius ~]$ 
[run8@sirius ~]$ 1 
-bash: 1: command not found 
[run8@sirius ~]$ ln -s ~/etc/dspam_clean_hashdb ~/service 
[run8@sirius ~]$ $ echo | EXT=info maildrop .mailfilter 
-bash: $: command not found 
dumpvuser: No such user 
dumpvuser: No such user 
maildrop: Unable to filter message.  
[run8@sirius ~]$ $ echo | EXT=markus maildrop .mailfilter 
-bash: $: command not found 
maildrop: Unable to filter message. 
[run8@sirius ~]$ /package/host/localhost/dspam/bin/dspam_stats $USER 
run8              TP:     0 TN:     1 FP:     0 FN:     0 SC:     0 NC:     0 
[run8@sirius ~]$ ^C 
[run8@sirius ~]$ ^C 
[run8@sirius ~]$ RUNWHEN within /home/run8/etc/dspam_clean_hashdb/run 
-bash: RUNWHEN: command not found 
[run8@sirius ~]$ ^C 
[run8@sirius ~]$ nano /home/run8/etc/dspam_clean_hashdb/run 
[run8@sirius ~]$ 1 

aktuelle Erkenntnisse

  • der Spam-Filter funktioniert grundsätzlich
  • die Lernfunktion greift nicht
  • damit kommen annähernd alle deutschsprachigen Spam-Mails durch, Englisch wird zuverlässig erkannt

Ein Blick in die Datei mailfilter.log (liegt in meinem Home-Verzeichnis) zeigt es beispielhaft:

[run8@sirius ~]$ tail mailfilter.log
Date: Sat Feb 11 13:48:49 2017
From: "Beulah Avery" <Avery49@gqicnoi.die.net>
Subj: Re: It's time to make your health stronger! Buy Lasix.
File: /home/run8/./users/markus/.0 Spamfilter.als Spam erkannt         (34317)

Date: Sat Feb 11 14:05:16 2017
From: Wolfgang Mina <wolfgang_mina@produtosfortaleza.com.br>
Subj: =?utf-8?Q?Suche_nach_einem_dunkelh=C3=A4utigen_Mann_mit_gro=C3=9Fem_Schw
File: /home/run8/./users/markus                                         (2940)

Also muss ich mich um den lernenden Filter kümmern.

  • Maildrop funktionert, ohne würde das Verschieben der Mails nicht funktionieren
  • so wie es aussieht, ist DSPAM nicht richtig fürs lernen konfiguriert, ich kann allerdings keine Fehler finden. Ich habe die Konfigurationsbefehle noch einmal ausgeführt, vielleicht hilft es ja. Ich versuche heraus zu finden, ob ich irgendwie feststellen kann, ob das anlernen der Mail regelmäßig gemacht wird.
    • OK, es ist so einfach, wenn man es weiss... ich hatte ja manuell das "Lernen" angestoßen, danach ist der "als Spam lernen"-Ordner leer :-)
    • das bedeutet, das nach der Einrichtung NIE gelernt wurde, sobald im Ordner "als Spam lernen" was liegen bleibt, muss ich handeln
  • habe um 17:20 eine Mail zum lernen verschoben, sie müsste um 18:30 spätestens weg sein... bin gespannt!
  • 12.02.2017: Es funktioiert, die Mails werden aus dem Ordner "als Spam lernen" weggeräumt. Am nächsten WE werde ich mal die Logs prüfen um ein Gefühl für die Erfolgsquote zu bekommen