qmail spamversand

speedytm

New Member
Hallo,
ich bin leider kein Linux Profi und habe da ein Problem mit einem bei Server4You laufendem Root Server unter Debian (Plesk 9.0).
Ich bin bereits dabei seit mehreren Tagen diverse verschiedene Foreneinträge zu studieren und zu testen, leider bisher ohne Erfolg.
Der Server wird amssiv zum Versand von Spam Mails mißbraucht. Auf dem Server liegen keinerlei Webseiten oder Scripte. Er winrd nur als Datenspeicher und Mailserver gebraucht, und die Standardkonfiguration wurde bisher eigentlich nicht abgeändert.

Die Mails sehen ungefähr so aus:
Code:
MESSAGE NUMBER 21963763
 --------------
Received: (qmail 19879 invoked from network); 6 Mar 2009 14:44:06 +0000
Received-SPF: pass (xxxxx.server4you.de: localhost is always allowed.) client-ip=127.0.0.1; [email protected]; helo=xxxxx.server4you.de;
Received: from localhost (HELO xxxxxx.server4you.de) (127.0.0.1)
  by localhost with SMTP; 6 Mar 2009 14:44:06 +0000
To: <[email protected]>
Subject: We do not promise wealth but we can improve your health!
Reply-To: <[email protected]>
Date: Fri, 6 Mar 2009 14:44:06 +0400
X-Priority: 3 (Normal)
From: <[email protected]>
X-Mailer: Sendmail 3.84/3.84
Message-ID: <[email protected]>
Content-Type: multipart/alternative;
 boundary="----01C99E8B43585269"

------01C99E8B43585269
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit

mdrklnynx xpguydf
Power up your manlyness with these outstanding male products, and you ll become her #1.
jwdqzytbzt khedli

------01C99E8B43585269
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 8bit

<center><style>mdrklnynx xpguydf</style>
<a href="http://luilly.com/boretjdonr4klfv0.html?znyhafashh"><b style="color:#66A403; font-size:12;" id=dzamyqcbn>Power up your manlyness with these outstanding male products, and you ll become her #1.</b></a><br>
<style>.jwdqzytbzt khedli</style>
</center>
------01C99E8B43585269--


Kleiner Auszug aus der Maillog:
Code:
Mar  6 14:36:48 ibiza046 relaylock: /var/qmail/bin/relaylock: mail from xx.xx.xx.xxx:3607 (xxxxxxxxxxx.xxxxx.net)
Mar  6 14:36:57 ibiza046 relaylock: /var/qmail/bin/relaylock: mail from xx.xx.xxx.xx:1829 (xx-xx-xxx-xx.daomain.com)
Mar  6 14:37:23 ibiza046 relaylock: /var/qmail/bin/relaylock: Unable to query white list: not an error
Mar  6 14:37:23 ibiza046 relaylock: /var/qmail/bin/relaylock: mail from 127.0.0.1:60856 (localhost)
Mar  6 14:37:23 ibiza046 qmail-queue-handlers[18437]: Handlers Filter before-queue for qmail started ...
Mar  6 14:37:23 ibiza046 qmail-queue-handlers[18437]: [email protected]
Mar  6 14:37:23 ibiza046 qmail-queue-handlers[18437]: [email protected]
Mar  6 14:37:23 ibiza046 qmail-queue-handlers[18437]: hook_dir = '/opt/psa/handlers/before-queue'
Mar  6 14:37:23 ibiza046 qmail-queue-handlers[18437]: recipient[3] = '[email protected]'
Mar  6 14:37:23 ibiza046 qmail-queue-handlers[18437]: handlers dir = '/opt/psa/handlers/before-queue/recipient/[email protected]'
Mar  6 14:37:23 ibiza046 qmail-queue-handlers[18437]: found handlers entry = '/opt/psa/handlers/before-queue/global/10-spf-EAmqvj'
Mar  6 14:37:23 ibiza046 qmail-queue-handlers[18437]: call_handlers: call executable = '/opt/psa/handlers/info/10-spf-EAmqvj/executable'
Mar  6 14:37:23 ibiza046 spf filter[18438]: Starting spf filter... 
Mar  6 14:37:23 ibiza046 spf filter[18438]: SPF result: pass 
Mar  6 14:37:23 ibiza046 spf filter[18438]: SPF status: PASS 
Mar  6 14:37:23 ibiza046 qmail-queue-handlers[18437]: handlers_stderr: PASS
Mar  6 14:37:23 ibiza046 qmail-queue-handlers[18437]: starter: submitter[18439] exited normally
Mar  6 14:37:30 ibiza046 relaylock: /var/qmail/bin/relaylock: Unable to query white list: not an error
Mar  6 14:37:30 ibiza046 relaylock: /var/qmail/bin/relaylock: mail from 127.0.0.1:32907 (localhost)
Mar  6 14:37:30 ibiza046 qmail-queue-handlers[18444]: Handlers Filter before-queue for qmail started ...
Mar  6 14:37:30 ibiza046 qmail-queue-handlers[18444]: [email protected]
Mar  6 14:37:30 ibiza046 qmail-queue-handlers[18444]: [email protected]
Mar  6 14:37:30 ibiza046 qmail-queue-handlers[18444]: hook_dir = '/opt/psa/handlers/before-queue'
Mar  6 14:37:30 ibiza046 qmail-queue-handlers[18444]: recipient[3] = '[email protected]'
Mar  6 14:37:30 ibiza046 qmail-queue-handlers[18444]: handlers dir = '/opt/psa/handlers/before-queue/recipient/[email protected]'
Mar  6 14:37:30 ibiza046 qmail-queue-handlers[18444]: found handlers entry = '/opt/psa/handlers/before-queue/global/10-spf-EAmqvj'
Mar  6 14:37:30 ibiza046 qmail-queue-handlers[18444]: call_handlers: call executable = '/opt/psa/handlers/info/10-spf-EAmqvj/executable'
Mar  6 14:37:30 ibiza046 spf filter[18445]: Starting spf filter... 
Mar  6 14:37:30 ibiza046 spf filter[18445]: SPF result: pass 
Mar  6 14:37:30 ibiza046 spf filter[18445]: SPF status: PASS 
Mar  6 14:37:30 ibiza046 qmail-queue-handlers[18444]: handlers_stderr: PASS
Mar  6 14:37:30 ibiza046 qmail-queue-handlers[18444]: starter: submitter[18446] exited normally
Mar  6 14:39:04 ibiza046 relaylock: /var/qmail/bin/relaylock: mail from xxx.xxx.xx.xx:46884 (xxxxxxxx.mail.mud.yahoo.com)
Mar  6 14:39:04 ibiza046 qmail-queue-handlers[18569]: Handlers Filter before-queue for qmail started ...
Mar  6 14:39:05 ibiza046 qmail-queue-handlers[18569]: [email protected]
Mar  6 14:39:05 ibiza046 qmail-queue-handlers[18569]: [email protected]
Mar  6 14:39:05 ibiza046 qmail-queue-handlers[18569]: hook_dir = '/opt/psa/handlers/before-queue'
Mar  6 14:39:05 ibiza046 qmail-queue-handlers[18569]: recipient[3] = '[email protected]'
Mar  6 14:39:05 ibiza046 qmail-queue-handlers[18569]: handlers dir = '/opt/psa/handlers/before-queue/recipient/[email protected]'
Mar  6 14:39:05 ibiza046 qmail-queue-handlers[18569]: found handlers entry = '/opt/psa/handlers/before-queue/global/10-spf-EAmqvj'
Mar  6 14:39:05 ibiza046 qmail-queue-handlers[18569]: call_handlers: call executable = '/opt/psa/handlers/info/10-spf-EAmqvj/executable'
Mar  6 14:39:05 ibiza046 spf filter[18570]: Starting spf filter... 
Mar  6 14:39:05 ibiza046 spf filter[18570]: Error code: (2) Could not find a valid SPF record 
Mar  6 14:39:05 ibiza046 spf filter[18570]: Failed to query MAIL-FROM: No DNS data for 'yahoo.com'. 
Mar  6 14:39:05 ibiza046 spf filter[18570]: SPF result: none 
Mar  6 14:39:05 ibiza046 spf filter[18570]: SPF status: PASS 
Mar  6 14:39:05 ibiza046 qmail-queue-handlers[18569]: handlers_stderr: PASS
Mar  6 14:39:05 ibiza046 qmail-queue-handlers[18569]: starter: submitter[18571] exited normally

Hat jemand eine Idee oder einen Vorschlag was ich dagegen machen kann?

Desweiteren bleiben Mails an yahoo, web.de und t-online in der Mail-Queue hängen und werden nicht ausgeliefert.

Sehr viel Traffic entsteht ebenfalls durch Mails vom Mailer Daemon:
Code:
Received: (qmail 11513 invoked for bounce); 6 Mar 2009 15:56:19 +0000
Date: 6 Mar 2009 15:56:19 +0000
From: [email protected]
To: [email protected]
Subject: failure notice
 

Attachments

Last edited by a moderator:
Ich habe (fast) das gleich Problem.

Jedoch nur dann, wenn ich SPF-Spamschutz aktiviert habe.

Apr 16 19:22:53 s15327872 spf filter[30522]: Error code: (2) Could not find a valid SPF record
Apr 16 19:22:53 s15327872 spf filter[30522]: Failed to query MAIL-FROM: No DNS data for 'cable.comcast.com'.

Gibt es Lösungsvorschläge und Ja ich habe Google gefragt.
Nur ob ich nach dem Richtigen gesucht habe weiß ich nicht!
 
Was zeigen zu diesen Zeitpunkten (z.B. Mar 6 14:37:23) die Webserver-Logs?

Irgendjemand benutzt den lokalen Sendmail - mit hoher Wahrscheinlichkeit ein unsicheres CGI-Script.
 
Hier mal die Logfiles:

access_log:
[16/Apr/2009:19:10:53 +0200] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 302 "-" "-"
::1 - - [16/Apr/2009:19:20:39 +0200] "GET / HTTP/1.0" 200 262 "-" "Apache/2.2.4 (Linux/SUSE) (internal dummy connection)"
::1 - - [16/Apr/2009:19:20:40 +0200] "GET / HTTP/1.0" 200 262 "-" "Apache/2.2.4 (Linux/SUSE) (internal dummy connection)"
::1 - - [16/Apr/2009:19:20:41 +0200] "GET / HTTP/1.0" 200 262 "-" "Apache/2.2.4 (Linux/SUSE) (internal dummy connection)"
::1 - - [16/Apr/2009:19:20:51 +0200] "GET / HTTP/1.0" 200 262 "-" "Apache/2.2.4 (Linux/SUSE) (internal dummy connection)"
::1 - - [16/Apr/2009:19:21:16 +0200] "GET / HTTP/1.0" 200 262 "-" "Apache/2.2.4 (Linux/SUSE) (internal dummy connection)"
::1 - - [16/Apr/2009:19:21:46 +0200] "GET / HTTP/1.0" 200 262 "-" "Apache/2.2.4 (Linux/SUSE) (internal dummy connection)"
::1 - - [16/Apr/2009:19:24:29 +0200] "GET / HTTP/1.0" 200 262 "-" "Apache/2.2.4 (Linux/SUSE) (internal dummy connection)"
::1 - - [16/Apr/2009:19:34:07 +0200] "GET / HTTP/1.0" 200 262 "-" "Apache/2.2.4 (Linux/SUSE) (internal dummy connection)"

error_log
[Thu Apr 16 19:10:53 2009] [error] [client 87.106.65.228] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Thu Apr 16 19:45:27 2009] [error] [client 87.106.206.169] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)


mod_jk
[Thu Apr 16 19:20:23 2009] [30309:26352] [error] jk_child_init::mod_jk.c (2594): Attaching shm:/srv/www/logs/jk-runtime-status errno=2
[Thu Apr 16 19:20:23 2009] [30310:26352] [error] jk_child_init::mod_jk.c (2594): Attaching shm:/srv/www/logs/jk-runtime-status errno=2
[Thu Apr 16 19:29:09 2009] [30906:26352] [error] jk_child_init::mod_jk.c (2594): Attaching shm:/srv/www/logs/jk-runtime-status errno=2
[Thu Apr 16 19:44:50 2009] [31585:26352] [error] jk_child_init::mod_jk.c (2594): Attaching shm:/srv/www/logs/jk-runtime-status errno=2

Mehr finde ich nicht. Oder hab ich noch Logfiles vergessen?
 
Was zeigen zu diesen Zeitpunkten (z.B. Mar 6 14:37:23) die Webserver-Logs?

Irgendjemand benutzt den lokalen Sendmail - mit hoher Wahrscheinlichkeit ein unsicheres CGI-Script.

Kann es sein, dass es in der Domain liegt?

Apr 17 12:58:21 s15327872 qmail-local-handlers[28270]: mailbox: /var/qmail/mailnames/domainname.de/info
Apr 17 12:59:17 s15327872 spf filter[28282]: Error code: (2) Could not find a valid SPF record
Apr 17 12:59:17 s15327872 spf filter[28282]: Failed to query MAIL-FROM: No DNS data for 'orthovita.com'.

Da sind aber keine CGI´s am laufen.
Alles PHP Dateien.
Bin da echt Ratlos :confused:
 
Das ist jetzt ein Witz - oder?
PHP-Dateien sind ausführbare Programme.

Such' in den Webserverlogs den Zugriff, der in der gleichen Sekunde wie die Injektion der Mail in die Queue war.
Dann schau' Dir die PHP-Datei (und ggf inkludierte) genau an, ob da irgendwelche mail-, exec- oder system-Aufrufe sind - die möglicherweise ihre Aufrufparameter nicht gründlich genug prüfen.
 
Nö.

War zumindest nicht als Witz gedacht, weil ich legentlich nur auf

mit hoher Wahrscheinlichkeit ein unsicheres CGI-Script.

geantwortet hatte.

Das PHP Scripte ausführbar sind und mit der .EXE unter Windoof zu
vergleichen sind, ist mir schon klar.

Da ich aber sonst nichts mit dem Mailservern zu tun habe ist es auch nicht einfach für mich.

Kennt man doch.
Sonst läuft alles wie Geschmiert. Macht man mal Vertretung geht´s los!
 
Dann mal weiter.
Hier die Auszüge.

mail.err
Apr 20 14:29:47 src@s15327872 spf filter[2401]: Error code: (2) Could not find a valid SPF record
Apr 20 14:29:47 src@s15327872 spf filter[2401]: Failed to query MAIL-FROM: No DNS data for 'masenv.co.uk'.
Apr 20 14:29:48 src@s15327872 qmail-local-handlers[2403]: mailbox: /var/qmail/mailnames/xxxxxxx.de/info
Apr 20 14:30:00 src@s15327872 qmail-local-handlers[2420]: mailbox: /var/qmail/mailnames/xxxxxxx.de/info
Apr 20 14:30:05 src@s15327872 spf filter[2463]: Error code: (2) Could not find a valid SPF record
Apr 20 14:30:05 src@s15327872 spf filter[2463]: Failed to query MAIL-FROM: No DNS data for 'guggenheimrealestate.com'.
Apr 20 14:30:06 src@s15327872 qmail-local-handlers[2465]: mailbox: /var/qmail/mailnames/xxxxxxx.de/info
Apr 20 14:30:07 src@s15327872 qmail-local-handlers[2465]: call_handlers: stop call handlers from dir '/usr/local/psa/handlers/before-local/recipient/[email protected]'
Apr 20 14:30:12 src@s15327872 qmail-local-handlers[2479]: mailbox: /var/qmail/mailnames/xxxxxxx.de/bewerbung

httpsd_access_log
127.0.0.1 localhost:8443 - [20/Apr/2009:14:26:48 +0200] "GET / HTTP/1.1" 200 1034 "-" "monit/4.6"
127.0.0.1 localhost:8443 - [20/Apr/2009:14:31:49 +0200] "GET / HTTP/1.1" 200 1034 "-" "monit/4.6"

Ich kann da als Windoof Admin nichts drin erkennen.
 
Für mich sieht das nicht nach "Spamversand", sondern eher nach Spamempfang (klassisch via SMTP) an [email protected] aus.
Die (vorgeblichen) Absender haben halt keinen SPF-Record.

Dagegen kannst Du vermutlich wenig machen.

Bist Du sicher, daß Dein Server wirklich Spam versendet?

Eventuell kannst Du zu den genannten Prozeß-IDs nochmal die mail.info posten.
 
Ich denke es liegt, wie Du auch schon Vermutest, am Empfang.

Wenn ich Plesk
1:"SPF-Spamschutz deaktiv" stelle
2: E-Mail an nicht existierenden Benutzer zurückweisen lasse

sind die Einträge zwar nicht mehr da, dafür läuft dann aber unter
/usr/local/psa/handlers/spool/
alles voll.

Dann wäre meine nächste Frage:"Was mache ich da?"

Bei Mail´s mit Anhang kommen da schon einige MB/GB zusammen.
 
Wünsch' Dir was:
/var/qmail/control/spfbehavior: said:
Set to a value between 1 and 6 to enable SPF checks; 0 to disable.

1 selects 'annotate-only' mode, where qmail-smtpd will annotate incoming email with Received-SPF fields, but will not reject any messages.
2 will produce temporary failures on DNS lookup problems so you can make sure you always have meaningful Received-SPF headers.
3 selects 'reject' mode, where incoming mail will be rejected if the SPF record says 'fail'.
4 selects a more stricter rejection mode, which is like 'reject' mode, except that incoming mail will also be rejected when the SPF record says 'softfail'.
5 will also reject when the SPF record says 'neutral',
and 6 if no SPF records are available at all (or a syntax error was encountered).

The contents of this file are overridden by the value of the SPFBEHAVIOR environment variable, if set. Default: 0.
 
Back
Top