Mail mit Virus wurde nicht gescannt

Debian macht sich hervorragend als Web- und Mailserver. Schau auch in den " Tipps und Tricks"-Bereich.
Antworten
Benutzeravatar
weshalb
Beiträge: 1265
Registriert: 16.05.2012 14:19:49

Mail mit Virus wurde nicht gescannt

Beitrag von weshalb » 15.11.2012 19:40:19

Hallo, ich habe ein Problem mit meinem Mailserver. Es läuft Postfix mit Spamassassin und ClamAV, was eigentlich sehr gut funktioniert. Allerdings kam den Tag eine VirenMail durch, ohne gescannt zu werden.

Header:

Code: Alles auswählen

Return-Path: <anonymous@steiner.users.aboliton.at>
Reply-To: "Deutsche Post" <service-3600@deutschepost.de>
From: "Deutsche Post" <service-3600@deutschepost.de>
To: <meine@emailadresse.de>
Subject: Deutsche Post#Holen Sie ihre Postsendung ab.
Date: Sat, 10 Nov 2012 12:54:11 +0100
Message-ID: <20121110115411.6020.qmail@steiner.users.aboliton.at>
MIME-Version: 1.0
Content-Type: multipart/mixed;
                boundary="----=_NextPart_000_0049_01CDBF7D.574C5550"
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Ac2/OphufEki7lziT2u++LDuzYSIEA==
X-OlkEid: 84642F20151F3400DEB12741A951B601A5761492
Normalerweise stehen ja in jedem Header Einträge wie:

Code: Alles auswählen

.....................
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on meinserver.de
X-Spam-Level: *
X-Spam-Status: No, score=1.8 required=4.5 tests=FREEMAIL_FROM,MISSING_SUBJECT,
	RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1
Received: from tuxmux.fritz.box (localhost [127.0.0.1])
..............................................

X-AV-Checked: ClamAV using ClamSMTP
Meine Config:

master.cf

Code: Alles auswählen

# ClamSMTP
scan      unix  -       -       n       -       16      smtp
        -o smtp_send_xforward_command=yes
        -o smtp_enforce_tls=no
127.0.0.1:10026 inet  n -       n       -       16      smtpd
        -o content_filter=
        -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
        -o smtpd_helo_restrictions=
        -o smtpd_client_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks_style=host
        -o smtpd_authorized_xforward_hosts=127.0.0.0/8
# interface to spamassassin
spamassassin unix - n n - - pipe
     user=spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

main.cf

Code: Alles auswählen

# ClamSMTP
content_filter = scan:127.0.0.1:10025
receive_override_options = no_address_mappings

spamassassin local.cf

Code: Alles auswählen

# 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_SCORE_*****


#   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 4.5

#   Use Bayesian classifier (default: 1)
#
 use_bayes 1
 use_bayes_rules 1
 bayes_path /var/lib/spamassassin/.spamassassin/bayes
 bayes_file_mode 0770
#   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


#   Some shortcircuiting, if the plugin is enabled
#
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
#
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
#
#   default: strongly-whitelisted mails are *really* whitelisted now, if the
#   shortcircuiting plugin is active, causing early exit to save CPU load.
#   Uncomment to turn this on
#
# shortcircuit USER_IN_WHITELIST       on
# shortcircuit USER_IN_DEF_WHITELIST   on
# shortcircuit USER_IN_ALL_SPAM_TO     on
# shortcircuit SUBJECT_IN_WHITELIST    on

#   the opposite; blacklisted mails can also save CPU
#
# shortcircuit USER_IN_BLACKLIST       on
# shortcircuit USER_IN_BLACKLIST_TO    on
# shortcircuit SUBJECT_IN_BLACKLIST    on

#   if you have taken the time to correctly specify your "trusted_networks",
#   this is another good way to save CPU
#
# shortcircuit ALL_TRUSTED             on

#   and a well-trained bayes DB can save running rules, too
#
# shortcircuit BAYES_99                spam
# shortcircuit BAYES_00                ham

endif # Mail::SpamAssassin::Plugin::Shortcircuit
clamav clamd.conf

Code: Alles auswählen

#Automatically Generated by clamav-base postinst
#To reconfigure clamd run #dpkg-reconfigure clamav-base
#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
LocalSocket /var/run/clamav/clamd.ctl
FixStaleSocket true
LocalSocketGroup clamav
LocalSocketMode 666
# TemporaryDirectory is not set to its default /tmp here to make overriding
# the default with environment variables TMPDIR/TMP/TEMP possible
User clamav
AllowSupplementaryGroups true
ScanMail true
ScanArchive true
ArchiveBlockEncrypted false
MaxDirectoryRecursion 15
FollowDirectorySymlinks false
FollowFileSymlinks false
ReadTimeout 180
MaxThreads 12
MaxConnectionQueueLength 15
LogSyslog false
LogFacility LOG_LOCAL6
LogClean false
LogVerbose false
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /var/lib/clamav
SelfCheck 3600
Foreground false
Debug false
ScanPE true
ScanOLE2 true
ScanHTML true
DetectBrokenExecutables false
ExitOnOOM false
LeaveTemporaryFiles false
AlgorithmicDetection true
ScanELF true
IdleTimeout 30
PhishingSignatures true
PhishingScanURLs true
PhishingAlwaysBlockSSLMismatch false
PhishingAlwaysBlockCloak false
DetectPUA true
ScanPartialMessages false
HeuristicScanPrecedence false
StructuredDataDetection false
CommandReadTimeout 5
SendBufTimeout 200
MaxQueue 100
ExtendedDetectionInfo true
OLE2BlockMacros false
StreamMaxLength 30M
LogFile /var/log/clamav/clamav.log
LogTime true
LogFileUnlock false
LogFileMaxSize 0
Bytecode true
BytecodeSecurity TrustSigned
BytecodeTimeout 60000
OfficialDatabaseOnly false
CrossFilesystems true
Irgendetwas muss die Mail an sich haben, dass sie von meinen Scannern ignoriert wird. Weis jemand Rat?

Für Antworten wäre ich sehr dankbar.

syssi
Beiträge: 2951
Registriert: 24.12.2010 16:50:59
Lizenz eigener Beiträge: MIT Lizenz
Wohnort: Rheinland

Re: Mail mit Virus wurde nicht gescannt

Beitrag von syssi » 15.11.2012 19:46:41

Moeglicherweise lohnt es sich den Virus zu analysieren. Vor vielen Jahren kam mal jemand auf die glorreiche Idee ein paar Gigabyte aus /dev/null zu zippen. Das Ergebnis war ein ZIP-Archiv aus einigen wenigen Bytes + Header. Diese Datei wurde quer durchs Netz getrieben und so mancher Virenscanner/Spamfilter, der in der Lage ist ZIP-Archive zu entpacken hat dabei schwer gelitten. Seitdem kennen Virenscanner eine "maximale Größe" und brechen dann ggf. einfach ab, um Arbeitsspeicher und Festplatte zu schonen.

Ich wuerde aber vermuten, dass Spamassassin einen solchen Abbruch sorgsam in Mail-Header vermerkt. Dein Fall spricht eher dafuer, dass Spamassassin kurzzeitig ausser Puste war und die Mail deshalb einfach durchgekommen ist. Der content_filter ist jedenfalls im Default so konfiguriert, dass wenn Spamassassin mal nicht laeuft, die Mails einfach ungefiltert durchkommen.

Benutzeravatar
weshalb
Beiträge: 1265
Registriert: 16.05.2012 14:19:49

Re: Mail mit Virus wurde nicht gescannt

Beitrag von weshalb » 15.11.2012 20:24:52

Vielen Dank für die schnelle Antwort

Ich denke, dass Spamassassin die Mail im Griffel hatte und falls da etwas schief ging, sollte dann nicht wenigstens ClamAV seinen Dienst verrichten?

Im Log steht dazu

Code: Alles auswählen

Nov 10 12:57:42 meinserver postfix/smtpd[32670]: connect from localhost[127.0.0.1]
Nov 10 12:57:42 meinserver postfix/smtpd[32670]: C7C6B1943BD: client=localhost[127.0.0.1]
Nov 10 12:57:42 meinserver postfix/cleanup[32674]: C7C6B1943BD: message-id=<20121110115411.6020.qmail@steiner.users.aboliton.at>
Nov 10 12:57:43 meinserver postfix/qmgr[1843]: C7C6B1943BD: from=<anonymous@steiner.users.aboliton.at>, size=60148, nrcpt=1 (queue active)
Nov 10 12:57:43 meinserver postfix/smtpd[32670]: disconnect from localhost[127.0.0.1]
Nov 10 12:57:45 meinserver postfix/pickup[32646]: C9FBF1943C4: uid=5001 from=<anonymous@steiner.users.aboliton.at>
[Nov 10 12:57:45 meinserver postfix/pipe[32675]: C7C6B1943BD: to=<benutzer@meinserver.de>, relay=spamassassin, delay=3, delays=0.33/0.01/0/2.7, dsn=2.0.0, status=sent (delivered via spamassassin service)
Nov 10 12:57:45 meinserver postfix/qmgr[1843]: C7C6B1943BD: removed
Nov 10 12:57:45 meinserver postfix/cleanup[32674]: C9FBF1943C4: message-id=<20121110115411.6020.qmail@steiner.users.aboliton.at>
Nov 10 12:57:45 meinserver postfix/qmgr[1843]: C9FBF1943C4: from=<anonymous@steiner.users.aboliton.at>, size=60542, nrcpt=1 (queue active)
Nov 10 12:57:45 meinserver clamsmtpd: 100572: accepted connection from: 127.0.0.1
Nov 10 12:57:45 meinserver postfix/smtpd[32681]: connect from localhost[127.0.0.1]
Nov 10 12:57:45 meinserver postfix/smtpd[32681]: F1CEC1943AD: client=localhost[127.0.0.1]
Nov 10 12:57:46 meinserver postfix/cleanup[32674]: F1CEC1943AD: message-id=<20121110115411.6020.qmail@steiner.users.aboliton.at>
Nov 10 12:57:46 meinserver postfix/qmgr[1843]: F1CEC1943AD: from=<anonymous@steiner.users.aboliton.at>, size=60778, nrcpt=1 (queue active)
Nov 10 12:57:46 meinserver clamsmtpd: 100572: from=anonymous@steiner.users.aboliton.at, to=benutzer@meinserver.de, status=CLEAN
Nov 10 12:57:46 meinserver postfix/smtp[32679]: C9FBF1943C4: to=<benutzer@meinserver.de>, relay=127.0.0.1[127.0.0.1]:10025, delay=0.6, delays=0.27/0.03/0.05/0.24, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as F1CEC1943AD)
Nov 10 12:57:46 meinserver postfix/smtpd[32681]: disconnect from localhost[127.0.0.1]
Nov 10 12:57:46 meinserver postfix/qmgr[1843]: C9FBF1943C4: removed
Nov 10 12:57:46 meinserver dovecot: deliver(info): sieve: msgid=<20121110115411.6020.qmail@steiner.users.aboliton.at>: stored mail into mailbox 'INBOX'
Nov 10 12:57:46 meinserver postfix/local[32683]: F1CEC1943AD: to=<benutzer@meinserver.de>, relay=local, delay=0.38, delays=0.24/0.01/0/0.13, dsn=2.0.0, status=sent (delivered to command: /usr/lib/dovecot/deliver)
Nov 10 12:57:46 meinserver postfix/qmgr[1843]: F1CEC1943AD: removed
Wie ich den Anhang analysieren kann, weis ich leider nicht.

Er ist 40,5 kb groß und es befinden sich mehrere Dateien darin.
Jeweils 1 Exceltabelle, Dokument, BMP,EXE,TXT Datei.

Kann man den hier irgendwo hochladen?

Antworten