Probleme mit Spamassassin einbindung über Maildrop

Mordor

Registered User
Hallo erst mal
Ich habe heute versucht nach folgendem Howto Spamassassin mit Postfix anzbinden.

Postfix funktioniert auch super, und bearbeitet die Mails wie es soll. Nur nachdem Spamassassin wie im Howto beschrieben, eingebunden wurde, werden die Mails nichtmehr im Mailverzeichnis abgelegt, und die mail.log ist voll von Fehlermeldungen. Hier mal der Komplette auszug von einer mail:

Code:
Sep 14 16:15:57 s15227493 postfix/smtpd[23622]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 14 16:15:57 s15227493 postfix/smtpd[23622]: connect from mailout05.sul.t-online.de[194.25.134.82]
Sep 14 16:15:58 s15227493 postfix/smtpd[23622]: 095324F215A0: client=mailout05.sul.t-online.de[194.25.134.82]
Sep 14 16:15:58 s15227493 postfix/cleanup[23627]: 095324F215A0: message-id=<C31063D9.310E%meineemail@T-Online.de>
Sep 14 16:15:58 s15227493 postfix/qmgr[13969]: 095324F215A0: from=<MeineEmail@T-Online.de>, size=1188, nrcpt=1 (queue active)
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: connection from s15227493.onlinehome-server.info [127.0.0.1] at port 59194
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: setuid to vmail succeeded
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: creating default_prefs: /home/vmail/.spamassassin/user_prefs
Sep 14 16:15:58 s15227493 spamd[13992]: config: created user preferences file: /home/vmail/.spamassassin/user_prefs
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: processing message <C31063D9.310E%xxxxx@xxx.xx> for vmail:5000
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 357, <GEN4> line 35.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 358, <GEN4> line 35.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 357, <GEN4> line 35.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 358, <GEN4> line 35.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 240, <GEN4> line 35.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 242, <GEN4> line 35.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 243, <GEN4> line 35.
Sep 14 16:15:58 s15227493 postfix/smtpd[23622]: disconnect from mailout05.sul.t-online.de[194.25.134.82]
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: clean message (0.0/3.0) for vmail:5000 in 0.2 seconds, 1156 bytes.
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: result: . 0 - UNPARSEABLE_RELAY scantime=0.2,size=1156,user=vmail,uid=5000,required_score=3.0,rhost=s15227493.onlinehome-server.info,raddr=127.0.0.1,rport=59194,$
Sep 14 16:15:58 s15227493 spamd[13991]: prefork: child states: II
Sep 14 16:15:58 s15227493 postfix/pickup[13968]: 535294F215A6: uid=5000 from=<MeineEmail@T-Online.de>
Sep 14 16:15:58 s15227493 postfix/pipe[23628]: 095324F215A0: to=<webmaster@mucons.com>, relay=spamassassin, delay=0.33, delays=0.04/0.03/0/0.27, dsn=2.0.0, status=sent (delivered via spamassassin service)
Sep 14 16:15:58 s15227493 postfix/qmgr[13969]: 095324F215A0: removed
Sep 14 16:15:58 s15227493 postfix/cleanup[23627]: 535294F215A6: message-id=<C31063D9.310E%MeineEmail@T-Online.de>
Sep 14 16:15:58 s15227493 postfix/qmgr[13969]: 535294F215A6: from=<MeineEmail@T-Online.de>, size=1517, nrcpt=1 (queue active)
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: connection from s15227493.onlinehome-server.info [127.0.0.1] at port 59196
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: handle_user unable to find user: '@'
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: still running as root: user not specified with -u, not found, or set to root, falling back to nobody at /usr/sbin/spamd line 1147, <GEN5> line 4.
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: processing message <C31063D9.310E%MeineEmail@T-Online.de> for @:65534
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 357, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 358, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 357, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 358, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 240, <GEN4> line 35.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 242, <GEN4> line 35.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 243, <GEN4> line 35.
Sep 14 16:15:58 s15227493 postfix/smtpd[23622]: disconnect from mailout05.sul.t-online.de[194.25.134.82]
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: clean message (0.0/3.0) for vmail:5000 in 0.2 seconds, 1156 bytes.
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: result: . 0 - UNPARSEABLE_RELAY scantime=0.2,size=1156,user=vmail,uid=5000,required_score=3.0,rhost=s15227493.onlinehome-server.info,raddr=127.0.0.1,rport=59194,$
Sep 14 16:15:58 s15227493 spamd[13991]: prefork: child states: II
Sep 14 16:15:58 s15227493 postfix/pickup[13968]: 535294F215A6: uid=5000 from=<MeineEmail@T-Online.de>
Sep 14 16:15:58 s15227493 postfix/pipe[23628]: 095324F215A0: to=<webmaster@mucons.com>, relay=spamassassin, delay=0.33, delays=0.04/0.03/0/0.27, dsn=2.0.0, status=sent (delivered via spamassassin service)
Sep 14 16:15:58 s15227493 postfix/qmgr[13969]: 095324F215A0: removed
Sep 14 16:15:58 s15227493 postfix/cleanup[23627]: 535294F215A6: message-id=<C31063D9.310E%xxxx@T-Online.de>
Sep 14 16:15:58 s15227493 postfix/qmgr[13969]: 535294F215A6: from=<xxxx@T-Online.de>, size=1517, nrcpt=1 (queue active)
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: connection from s15227493.onlinehome-server.info [127.0.0.1] at port 59196
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: handle_user unable to find user: '@'
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: still running as root: user not specified with -u, not found, or set to root, falling back to nobody at /usr/sbin/spamd line 1147, <GEN5> line 4.
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: processing message <C31063D9.310E%MeineEmail@T-Online.de> for @:65534
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 357, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 358, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 357, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in hash element at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 358, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 240, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 242, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Mail/SpamAssassin/Message/Metadata/Received.pm line 243, <GEN5> line 44.
Sep 14 16:15:58 s15227493 spamd[13992]: locker: safe_lock: cannot create tmp lockfile /home/vmail/.spamassassin/auto-whitelist.lock.s15227493.onlinehome-server.info.13992 for /home/vmail/.spamassassin/auto-wh$
Sep 14 16:15:58 s15227493 spamd[13992]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /home/vmail/.spamassassin/auto-whitelist.lock.s15227493.onlinehome-ser$
Sep 14 16:15:58 s15227493 spamd[13992]: bayes: locker: safe_lock: cannot create tmp lockfile /home/vmail/.spamassassin/bayes.lock.s15227493.onlinehome-server.info.13992 for /home/vmail/.spamassassin/bayes.loc$
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: clean message (0.0/3.0) for @:65534 in 0.1 seconds, 1556 bytes.
Sep 14 16:15:58 s15227493 spamd[13992]: spamd: result: . 0 - UNPARSEABLE_RELAY scantime=0.1,size=1556,user=@,uid=65534,required_score=3.0,rhost=s15227493.onlinehome-server.info,raddr=127.0.0.1,rport=59196,mid$
Sep 14 16:15:58 s15227493 maildrop[23633]: Unable to open mailbox.
Sep 14 16:15:58 s15227493 spamd[13991]: prefork: child states: II
Sep 14 16:15:58 s15227493 postfix/pipe[23632]: 535294F215A6: to=<webmaster@mucons.com>, relay=maildrop, delay=0.22, delays=0.02/0.01/0/0.19, dsn=4.3.0, status=deferred (temporary failure. Command output: Inva$
Sep 14 16:16:38 s15227493 courierpop3login: Connection, ip=[::ffff:84.154.105.62]
Sep 14 16:16:38 s15227493 courierpop3login: LOGIN, user=webmaster@mucons.com, ip=[::ffff:84.154.105.62]
Sep 14 16:16:38 s15227493 courierpop3login: LOGOUT, user=webmaster@mucons.com, ip=[::ffff:84.154.105.62], top=0, retr=0, rcvd=12, sent=38, time=0

Alle Pakete wurden via apt-get installiert. Das System ist ein Debian Etch mit den aktuellen Paketen von Debian.

Hat jemand eine Idee, wie ich das Problem lösen kann?

Gruß Mordor
 
Last edited by a moderator:
So, diese Probleme wären jetzt mal gelöst. Ich binde SpamAssassin nicht mher über Maildrop ein, und die Datenbankverbindung funktioniert jetzt auch.

Ich habe allerdings ein neues Problem:
Die Regeln für Spamassassin liegen jetzt in einer Datenbank. Die Tabelle dafür sieht so aus:
Code:
CREATE TABLE userpref (
  	username varchar(100) NOT NULL default '',
  	preference varchar(50) NOT NULL default '',
  	value varchar(200) NOT NULL default '',
  	prefid int(11) NOT NULL auto_increment,
  	PRIMARY KEY  (prefid),
  	KEY username (username)
	) TYPE=MyISAM;
In dieser Tabelle gibt es eine Zeile welche lautet:
Code:
add_header all TEST Datenbankregeln IO
Wenn SpamAssassin die Datenbank Regel richtig verarbeiten würde, müsste ich doch eigentlich diesen add_header in jeder E-Mail sehen. Das passiert jedoch nicht.
Ausserdem gibt Spamassassin in der Mail.log immer ein unparsable_relay aus.
Die einträge in der mail.log sehen wie folgt aus:
Code:
n-40-etch-32-minimal postfix/qmgr[3537]: DFF304B01: from=<meinmail@T-Online.de>, size=1181, nrcpt=1 (queue active)
Sep 22 18:21:31 Debian-40-etch-32-minimal spamd[4293]: spamd: connection from localhost [127.0.0.1] at port 46996 
Sep 22 18:21:31 Debian-40-etch-32-minimal spamd[4293]: spamd: processing message <C31B0D75.32EC%meinemail@T-Online.de> for vmail:5000 
Sep 22 18:21:31 Debian-40-etch-32-minimal postfix/smtpd[4295]: disconnect from mailout04.sul.t-online.de[194.25.134.18]
Sep 22 18:21:35 Debian-40-etch-32-minimal spamd[4293]: spamd: clean message (0.0/5.0) for vmail:5000 in 3.3 seconds, 1149 bytes. 
Sep 22 18:21:35 Debian-40-etch-32-minimal spamd[4293]: spamd: result: . 0 - UNPARSEABLE_RELAY scantime=3.3,size=1149,user=vmail,uid=5000,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=46996,mid=<C31B0D75.32EC%meinemail@T-Online.de>,autolearn=ham 
Sep 22 18:21:35 Debian-40-etch-32-minimal spamd[4292]: prefork: child states: II 
Sep 22 18:21:35 Debian-40-etch-32-minimal postfix/pickup[4130]: 3D2F85536: uid=5000 from=<meinemail@T-Online.de>
Sep 22 18:21:35 Debian-40-etch-32-minimal postfix/cleanup[4299]: 3D2F85536: message-id=<C31B0D75.32EC%meinemail@T-Online.de>
Sep 22 18:21:35 Debian-40-etch-32-minimal postfix/pipe[4300]: DFF304B01: to=<webmaster@domain.tld>, relay=spamassassin, delay=3.3, delays=0.03/0/0/3.3, dsn=2.0.0, status=sent (delivered via spamassassin service)
Sep 22 18:21:35 Debian-40-etch-32-minimal postfix/qmgr[3537]: DFF304B01: removed
Sep 22 18:21:35 Debian-40-etch-32-minimal postfix/qmgr[3537]: 3D2F85536: from=<meinemail@T-Online.de>, size=1501, nrcpt=1 (queue active)
Sep 22 18:21:35 Debian-40-etch-32-minimal postfix/virtual[4304]: 3D2F85536: to=<webmaster@domain.tld>, relay=virtual, delay=0.05, delays=0.04/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Zur Vollständigkeit halber, hier noch die local.cf aus /etc/spamassassin
Code:
# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
# Only a small subset of options are listed below
#
###########################################################################

#   Add *****SPAM***** to the Subject header of spam e-mails
#
#rewrite_header Subject *****SPAM*****
#required_hits 3
#add_header all Ficken
#add_header all Level _STARS(X)_
#rewrite_header Subject Spam [_HITS_]
#dns_available yes
#auto_learn 1
user_scores_dsn DBI:mysql:mailserver:localhost
user_scores_sql_username mailadmin
user_scores_sql_password mainpasswort
user_scores_sql_custom_query SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_ OR username = '$GLOBALS' OR username = CONCAT('%',_DOMAIN_) ORDER BY username ASC 
#   Save spam messages as a message/rfc822 MIME attachment instead of
#   modifying the original message (0: off, 2: use text/plain instead)
#
# report_safe 1


#   Set which networks or hosts are considered 'trusted' by your mail
#   server (i.e. not spammers)
#
# trusted_networks 212.17.35.


#   Set file-locking method (flock is not safe over NFS, but is faster)
#
# lock_method flock


#   Set the threshold at which a message is considered spam (default: 5.0)
#
# required_score 5.0


#   Use Bayesian classifier (default: 1)
#
# use_bayes 1


#   Bayesian classifier auto-learning (default: 1)
#
# bayes_auto_learn 1


#   Set headers which may provide inappropriate cues to the Bayesian
#   classifier
#
# bayes_ignore_header X-Bogosity
# bayes_ignore_header X-Spam-Flag
# bayes_ignore_header X-Spam-Status

Und hier noch /etc/default/spamassassin
Code:
# /etc/default/spamassassin
# Duncan Findlay

# WARNING: please read README.spamd before using.
# There may be security risks.

# Change to one to enable spamd
ENABLED=1

# Options
# See man spamd for possible options. The -d option is automatically added.

# SpamAssassin uses a preforking model, so be careful! You need to
# make sure --max-children is not set to anything higher than 5,
# unless you know what you're doing.

OPTIONS="-u vmail --create-prefs --max-children 5 --sql-config --helper-home-dir=/var/vmail --virtual-config-dir=/var/vmail/spamassassin"

# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Otherwise, the init script will not be able to shut spamd down.
PIDFILE="/var/run/spamd.pid"

# Set nice level of spamd
#NICE="--nicelevel 15"
So, wenn ihr noch etwas braucht, einfach bescheid sagen. Ansonsten bin ich für jede Hilfe dankbar.

Gruß Mordor
 
Back
Top