Forum Linux.debian/ubuntu Pas de scan des comptes exterieurs (amavis-new + fetchmail + spamassassin)

Posté par  (site web personnel) .
Étiquettes : aucune
0
15
mar.
2006
Bonjour,

j'ai un serveur courrier pour mon nom de domaine avec postfix + amavis + clamav + spamassassin, et je recupere mes courrier de l'exterieur avec fetchmail.
Mon problème est le suivant :
tout mes mails de mon nom de domaine sont scannés par amavis+clamav+spamassassin, mais mes mails recupérés par fetchmail (donc de l'extérieur, club-internet.fr ...) passent bien par amavis et sont scannes par clamav mais pas par spamassassin (verifié dans les entetes courrier).

Pour tester, je me suis envoyé un mail de l'exterieur vers mon adresse reseau local et sur une autre adresse récupérée par fetchmail, voici les entetes:
Mon nom de domaine

X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at toto.org
X-Spam-Status: Yes, hits=1000.0 tagged_above=-900.0 required=4.0 tests=AWL,
GTUBE
X-Spam-Level: ****************************************************************
X-Spam-Flag: YES

compte exterieur

X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at toto.org


Par contre dans les 2 cas postmaster recoit un avis de spam depuis l'adresse d'envoi.

Je souhaiterai que tous mes mails exterieurs soient aussi scanné par spamassassin, mais je ne sais pas si c'est amavis ou fetchmail qui sont mal configurés.

Voici mes fichiers de config:

/etc/postfix/master.cf

smtp-amavis unix - - y - 2 smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes

127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes


/etc/postfix/main.cf

command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
myhostname = mail.toto.org
mydomain = toto.org
alias_maps = hash:/etc/aliases,hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
relayhost = smtp.XXX.fr
mynetworks = 192.168.1.0/255, 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
content_filter = smtp-amavis:[127.0.0.1]:10024


/etc/amavis/amavisd.conf

use strict;
$MYHOME = '/var/lib/amavis';
$mydomain = 'toto.org';
$daemon_user = 'amavis';
$daemon_group = 'amavis';
$TEMPBASE = $MYHOME;
$pid_file = "/var/run/amavis/amavisd.pid";
$lock_file = "/var/run/amavis/amavisd.lock";
$ENV{TMPDIR} = $TEMPBASE;
$forward_method = 'smtp:127.0.0.1:10025';
$notify_method = $forward_method;
$max_servers = 2;
$max_requests = 10;
$child_timeout=5*60;
@local_domains_acl = ( ".$mydomain" );
$relayhost_is_client = 0;
$insert_received_line = 1;
$unix_socketname = undef;
$inet_socket_port = 10024;
$inet_socket_bind = '127.0.0.1';
@inet_acl = qw( 127.0.0.1 );
$DO_SYSLOG = 1;
$SYSLOG_LEVEL = 'mail.info';
$LOGFILE = "/var/log/amavis.log";
$log_level = 2;
$log_templ = '[? %#V |[? %#F |[?%#D|Not-Delivered|Passed]|BANNED name/type (%F)]|INFECTED (%V)], #[?%o|(?)|<%o>] -> [<%R>|,][? %i ||, quarantine %i], Message-ID: %m, Hits: %c';
read_l10n_templates('en_US', '/etc/amavis');
$final_virus_destiny = D_BOUNCE;
$final_banned_destiny = D_BOUNCE;
$final_spam_destiny = D_PASS;
$final_bad_header_destiny = D_PASS;
$viruses_that_fake_sender_re = new_RE(
qr'nimda|hybris|klez|bugbear|yaha|braid|sobig|fizzer|palyh|peido|holar'i,
qr'tanatos|lentin|bridex|mimail|trojan\.dropper|dumaru|parite|spaces'i,
qr'dloader|galil|gibe|swen|netwatch|bics|sbrowse|sober|rox|val(hal)?la'i,
qr'frethem|sircam|be?agle|tanx|mydoom|novarg|shimg|netsky|somefool|moodown'i,
qr'@mm|@MM',
qr'Worm'i,
[qr'^(EICAR|Joke\.|Junk\.)'i => 0],
[qr'^(WM97|OF97|W95/CIH-|JS/Fort)'i => 0],
[qr/.*/ => 1],
);
$virus_admin = "postmaster\@$mydomain";
$spam_admin = "postmaster\@$mydomain";
$mailfrom_to_quarantine = '';
$QUARANTINEDIR = '/var/lib/amavis/virusmails';
$virus_quarantine_to = 'virus-quarantine';
$spam_quarantine_to = 'spam-quarantine';
$X_HEADER_TAG = 'X-Virus-Scanned';
$X_HEADER_LINE = "by $myversion (Debian) at $mydomain";
$undecipherable_subject_tag = '***UNCHECKED*** ';
$remove_existing_x_scanned_headers = 0;
$remove_existing_spam_headers = 0;
$keep_decoded_original_re = new_RE(
qr'^MAIL-UNDECIPHERABLE$',
qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
);
$banned_filename_re = new_RE(
qr'\.[^.]*\.(exe|vbs|pif|scr|bat|cmd|com|dll)$'i,
qr'[{}]',
qr'^message/partial$'i,
);
$sql_select_white_black_list = undef;
$recipient_delimiter = '+';
$replace_existing_extension = 1;
$localpart_is_case_sensitive = 0;
$blacklist_sender_re = new_RE(
qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou|greatcasino)@'i,
qr'^(investments|lose_weight_today|market\.alert|money2you|MyGreenCard)@'i,
qr'^(new\.tld\.registry|opt-out|opt-in|optin|saveonl|smoking2002k)@'i,
qr'^(specialoffer|specialoffers|stockalert|stopsnoring|wantsome)@'i,
qr'^(workathome|yesitsfree|your_friend|greatoffers)@'i,
qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i,
);
map { $whitelist_sender{lc($_)}=1 } (qw(
nobody@cert.org
owner-alert@iss.net
slashdot@slashdot.org
bugtraq@securityfocus.com
NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM
security-alerts@linuxsecurity.com
amavis-user-admin@lists.sourceforge.net
razor-users-admin@lists.sourceforge.net
notification-return@lists.sophos.com
mailman-announce-admin@python.org
zope-announce-admin@zope.org
owner-postfix-users@postfix.org
owner-postfix-announce@postfix.org
owner-sendmail-announce@lists.sendmail.org
sendmail-announce-request@lists.sendmail.org
ca+envelope@sendmail.org
owner-technews@postel.ACM.ORG
lvs-users-admin@LinuxVirtualServer.org
ietf-123-owner@loki.ietf.org
cvs-commits-list-admin@gnome.org
rt-users-admin@lists.fsck.com
owner-announce@mnogosearch.org
owner-hackers@ntp.org
owner-bugs@ntp.org
clp-request@comp.nus.edu.sg
surveys-errors@lists.nua.ie
emailNews@genomeweb.com
owner-textbreakingnews@CNNIMAIL12.CNN.COM
yahoo-dev-null@yahoo-inc.com
));
$MAXLEVELS = 14;
$MAXFILES = 1500;
$MIN_EXPANSION_QUOTA = 100*1024;
$MAX_EXPANSION_QUOTA = 300*1024*1024;
$MIN_EXPANSION_FACTOR = 5;
$MAX_EXPANSION_FACTOR = 500;
$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
$file = 'file';
$gzip = 'gzip';
$bzip2 = 'bzip2';
$lzop = 'lzop';
$uncompress = ['uncompress', 'gzip -d', 'zcat'];
$unfreeze = ['unfreeze', 'freeze -d', 'melt', 'fcat'];
$arc = ['nomarch', 'arc'];
$unarj = ['arj', 'unarj'];
$unrar = ['rar', 'unrar'];
$zoo = 'zoo';
$lha = 'lha';
$cpio = 'cpio';
$sa_local_tests_only = 0;
$sa_timeout = 30;
$sa_mail_body_size_limit = 150*1024;
$sa_tag_level_deflt = -900.0;
$sa_tag2_level_deflt = 4.0;
$sa_kill_level_deflt = 900.0;
$sa_dsn_cutoff_level = 10;
$sa_spam_subject_tag = ' [ SPAM ] ';
$sa_spam_modifies_subj = 1;
$first_infected_stops_scan = 1;
@av_scanners = (
['Clam Antivirus-clamd',
\&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
qr/\bOK$/, qr/\bFOUND$/,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
[...]
);

@av_scanners_backup = (
['Clam Antivirus - clamscan', 'clamscan',
"--stdout --no-summary -r --tempdir=$TEMPBASE {}", [0], [1],
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
[...]
);

1;


/etc/fetchmailrc

set syslog
set daemon 180
set bouncemail
set no spambounce
set properties ""
defaults protocol POP3,
timeout 300,
nokeep,
fetchall,
stripcr
pool ... mes comptes POP

Suivre le flux des commentaires

Note : les commentaires appartiennent à celles et ceux qui les ont postés. Nous n’en sommes pas responsables.