PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Wie realisiere ich einen Mail Viren Scan?



plaetzchen
07.02.06, 10:43
Hallo!

Wir nutzen einen Debian Linux unter anderem als Mail Server mit Exim.
Heute kam die Idee auf die einkommenden Mails nicht nur auf Spam, per Filter, zu durchsuchen sondern auch darauf, ob im Anhang Viren oä. sind.
Gibt es ein Freeware Tool das die Mails die mit Exim reinkommen auf Viren durchsucht und diese löscht und das sich automatisch up-to-date hält?

MfG

Philip

Tomek
07.02.06, 10:47
Ich kenne mich mit Exim überhaupt nicht aus, aber ich habe etwas dazu gefunden:
http://www.webhostgear.com/149.html

Clamav lässt sich also auch an Exim anbinden. Bei Postfix macht man das üblicherweise über Amavis, bei Exim wohl über Exiscan.

Sargnagel
07.02.06, 11:16
Exim schien mir als Postfixanwender irgendwie "anders" :). Von daher verwende ich auch unter Debian Postfix, und diesen dann mit AMaViS (ClamAV und SpamAssassin).

ClamAV empfinde ich als recht akzeptable Lösung, seit ich ihn betreibe kommen keine Viren mehr durch (bei über 250 Mails pro Tag). Nur mit den Updates gibt es bisweilen die Meldung "Mirrors not fully synchronized", was die Performance bisher jedoch nicht beeinträchtigt hat.

Grüße
Marc

plaetzchen
07.02.06, 11:24
Danke für euren schnellen Antworten! Habe es grade einkompliert und es läuft bisher ganz gut... Sitze noch etwas an der Konfig... Danke! Super Forum...

plaetzchen
07.02.06, 18:22
So ich habe dann mal den ganzen tag rumexperimentiert und gemacht und getan...
Ich habe mich schlussendlich für exim und clamAV entschieden...
Nur leider kriege ich es nicht zum laufen!
Hat jemand Erfahrungen mit der Kombie unter Debian... Alle Daemons laufen korrekt aber jder Test Virus kommt durch...

Danke

Tomek
07.02.06, 19:15
Wie wäre es mit etwas mehr Informationen? Wie z.B. Konfigurationsdateien und Logdateien?

plaetzchen
08.02.06, 10:44
Gut kein Problem! Also die Konfig von clamd.conf (/etc/clamav/clamd.conf)

#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
User clamav
AllowSupplementaryGroups
ScanMail
ScanArchive
ArchiveMaxRecursion 5
ArchiveMaxFiles 1000
ArchiveMaxFileSize 10M
ArchiveMaxCompressionRatio 250
ReadTimeout 180
MaxThreads 12
MaxConnectionQueueLength 15
LogFile /var/log/clamav/clamav.log
LogTime
LogFileMaxSize 0
PidFile /var/run/clamav/clamd.pid
DatabaseDirectory /var/lib/clamav
SelfCheck 3600
ScanOLE2
ScanPE
DetectBrokenExecutables
ScanHTML
ArchiveBlockMax


Die Konfig von Exim4 (/etc/exim4/exim4.conf.template)


################################################## ####################
# Runtime configuration file for Exim 4 (Debian Packaging) #
################################################## ####################

################################################## ####################
# Depending on where you find this file, this might be a template or
# an actual configuration file. Documentation about the Debian exim4
# configuration scheme can be found in
# /usr/share/doc/exim4-base/README.Debian.gz.
#
# Strings like DEBCONFsomethingDEBCONF are replaced by installation
# dependent values by update-exim4.conf, the script which builds the
# actual configuration from the templates.
################################################## ####################

################################################## ####################
# MAIN CONFIGURATION SETTINGS #
################################################## ####################
# Viren Scanner
av_scanner = clamd:/var/run/clamav/clamd.ctl

# Just for reference and scripts.
# On Debian systems, the main binary is installed as exim4 to avoid
# conflicts with the exim 3 packages.
exim_path = /usr/sbin/exim4

# Macro defining the main configuration directory.
# We do not use absolute paths.
.ifndef CONFDIR
CONFDIR = /etc/exim4
.endif

# This sets a macro DC_minimaldns if dc_minimaldns=true. If
# dc_minimaldns=false, this expands to an empty line.
.ifndef DC_minimaldns
DEBCONFminimaldnsDEBCONF
.endif

# Create other macros from Debconf. Macros created here are used in
# other places in exim config.
.ifndef DC_visiblename
DC_visiblename=DEBCONFvisiblenameDEBCONF
.endif

# Create domain and host lists for relay control
# '@' refers to 'the name of the local host'

.ifndef MAIN_LOCAL_DOMAINS
MAIN_LOCAL_DOMAINS = DEBCONFlocal_domainsDEBCONF
.endif
domainlist local_domains = MAIN_LOCAL_DOMAINS

.ifndef MAIN_RELAY_TO_DOMAINS
MAIN_RELAY_TO_DOMAINS = DEBCONFrelay_domainsDEBCONF
.endif
domainlist relay_to_domains = MAIN_RELAY_TO_DOMAINS

.ifndef MAIN_RELAY_NETS
MAIN_RELAY_NETS = DEBCONFrelay_netsDEBCONF
.endif
hostlist relay_from_hosts = 127.0.0.1 : ::::1 : MAIN_RELAY_NETS


# Specify the domain you want to be added to all unqualified addresses
# here. Unqualified addresses are accepted only from local callers by
# default. The recipient_unqualified_hosts option can be used to permit
# unqualified addresses from remote sources.
# If qualify_domain is not set, the primary_hostname value is used for
# qualification.
# The ifdef bracket makes sure that an empty debconf value is correctly
# translated to "unset".
.ifdef DC_visiblename
qualify_domain = DC_visiblename
.endif

# only used for satellite-system
.ifndef DCreadhost
DCreadhost = DEBCONFreadhostDEBCONF
.endif

#for satellite and smarthost-systems
.ifndef DCsmarthost
DCsmarthost = DEBCONFsmarthostDEBCONF
.endif

# listen on all all interfaces?
.ifdef MAIN_LOCAL_INTERFACES
local_interfaces = MAIN_LOCAL_INTERFACES
.else
DEBCONFlistenonpublicDEBCONF
.endif

.ifndef LOCAL_DELIVERY
# The default transport, set in /etc/exim4/update-exim4.conf.conf,
# defaulting to mail_spool. See CONFDIR/conf.d/transport/ for possibilities
LOCAL_DELIVERY=DEBCONFlocaldeliveryDEBCONF
.endif

# The gecos field in /etc/passwd holds not only the name. see passwd(5).
gecos_pattern = ^([^,:]*)
gecos_name = $1


# define a macro DCconfig_smarthost, DCconfig_satellite, etc. we need this
# for .ifdef ... .endif
.ifndef DCconfig_satellite
.ifndef DCconfig_internet
.ifndef DCconfig_local
.ifndef DCconfig_smarthost
DCconfig_DEBCONFconfigtypeDEBCONF = 1
.endif
.endif
.endif
.endif


# define macros to be used in acl/30_exim4-config_check_rcpt to check
# recipient local parts for strange characters

# This macro is used to check local parts of recipients in local
# domains. It blocks local parts that begin with a dot or contain a
# quite broad range of non-alphanumeric characters.
.ifndef CHECK_RCPT_LOCAL_LOCALPARTS
CHECK_RCPT_LOCAL_LOCALPARTS = ^[.] : ^.*[@%!/|\'`#&?]
.endif

# This macro is used to check local parts of recipients in non-local
# domains. It thus allows your own users to send outgoing messages to
# sites that use slashes and vertical bars in their local parts. It blocks
# local parts that begin with a dot, slash, or vertical bar, but allows
# these characters within the local part. However, the sequence /../ is
# barred. The use of some other non-alphanumeric characters is blocked.
# The motivation here is to prevent your users (or your users' viruses)
# from mounting certain kinds of attack on remote sites.
.ifndef CHECK_RCPT_REMOTE_LOCALPARTS
CHECK_RCPT_REMOTE_LOCALPARTS = ^[./|] : ^.*[@%!\'`#&?] : ^.*/\\.\\./
.endif