Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1591 connectés 

  FORUM HardWare.fr
  Linux et OS Alternatifs
  réseaux et sécurité

  Exim + Spamassassin : problème d'identification des mails

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Exim + Spamassassin : problème d'identification des mails

n°1117789
skeltux
Posté le 01-03-2009 à 11:30:53  profilanswer
 

Bonjour à tous,
 
Après de longues recherches sur google et avoir essayé beaucoup de tuto, essuyé beaucoup de forum, j'ai toujours un problème avec Exim4 et spamassassin sur une Debian Etch.
 
Le serveur de messagerie, fonctionne très bien (envois, réceptions de mail + contrôle anti-virus avec rejet du message en cas de détection par clamav) mais j'ai un problème avec spamassassin.
 
Quand je fais en sorte de l'activer, il détecte TOUS les mails comme spam quelques soit le score (en faite il détecte pas tous les mails comme spam en soit, vue que la détection de spam se fait par rapport au score, mais il rajoute le spam status à YES et *****spam***** dans le sujet de tous les mails)
exemple avec deux mails (le premier avec un contenu de test de détection de spam, le second un mail normal)
 
Le premier :

Spoiler :

Subject: *****SPAM*****  
X-Spam-Score: 1001.3 (+++++++++++++++++++++++++++++++++++++++++++++++++++)
X-Spam-Report: ------------------ Début de Rapport SpamAssassin ---------------------
 Ce message est probablement du SPAM (message non sollicité envoyé en
 masse, publicité, escroquerie...).
 Cette notice a été ajoutée par le système d'analyse "SpamAssassin" sur
 votre serveur de courrier "Bart", pour vous
 aider à identifier ce type de messages.
 Le système SpamAssassin ajoute un en-tête "X-Spam-Flag: YES" aux
 messages qu'il considère comme étant probablement du Spam.
 Vous pouvez si vous le souhaitez utiliser cette caractéristique
 pour régler un filtre dans votre logiciel de lecture de courrier,
 afin de détruire ou de classer à part ce type de message.
 Si ce robot a classifié incorrectement un message qui vous était
 destiné, ou pour toute question, veuillez contacter l'administrateur
 du système par e-mail à the administrator of that system .
 Voir http://spamassassin.apache.org/tag/ pour plus de détails (en anglais).
 Détails de l'analyse du message:   (1001.3 points, 5.0 requis)
 1000 GTUBE                  BODY: Test générique de courrier non sollicté en masse
 0.0 HTML_MESSAGE           BODY: HTML inclus dans le message
 1.3 MISSING_SUBJECT        Missing Subject: header
 -------------------- Fin de Rapport SpamAssassin ---------------------
X-Spam-Flag: YES
X-ACL-Warn: condition = 1


 
On voit bien le score en spam bien détecter, sujet modifier (il était vide à l'origine) auquel est rajouter spam, jusque là tout va bien.
 
Le second :

Spoiler :

Subject: *****SPAM***** ok
X-Spam-Score: 0.0 (/)
X-Spam-Report: ------------------ Début de Rapport SpamAssassin ---------------------
 Ce message est probablement du SPAM (message non sollicité envoyé en
 masse, publicité, escroquerie...).
 Cette notice a été ajoutée par le système d'analyse "SpamAssassin" sur
 votre serveur de courrier "Bart", pour vous
 aider à identifier ce type de messages.
 Le système SpamAssassin ajoute un en-tête "X-Spam-Flag: YES" aux
 messages qu'il considère comme étant probablement du Spam.
 Vous pouvez si vous le souhaitez utiliser cette caractéristique
 pour régler un filtre dans votre logiciel de lecture de courrier,
 afin de détruire ou de classer à part ce type de message.
 Si ce robot a classifié incorrectement un message qui vous était
 destiné, ou pour toute question, veuillez contacter l'administrateur
 du système par e-mail à the administrator of that system .
 Voir http://spamassassin.apache.org/tag/ pour plus de détails (en anglais).
 Détails de l'analyse du message:   (0.0 points, 5.0 requis)
 0.0 HTML_MESSAGE           BODY: HTML inclus dans le message
 -------------------- Fin de Rapport SpamAssassin ---------------------
X-Spam-Flag: YES
X-ACL-Warn: condition = 0


 
Ici par contre le score est de 0, pourtant il a bien rajouter ****spam**** et pire le X-Spam-Flag à YES!
 
Voila ce que j'ai dans ma config d'exim :
 

Spoiler :

warn  spam = nobody:true
       add_header = Subject: *****SPAM***** $h_Subject:
       add_header = X-Spam-Score: $spam_score ($spam_bar)
       add_header = X-Spam-Report: $spam_report
       add_header = X-Spam-Flag: YES\n\
       condition = ${if >{$spam_score_int}{50}{1}{0}}


 
Sachant que j'ai essayé avec :
 

Spoiler :

 #warn
  #   spam = Debian-exim:true
  #   add_header = Subject: *******************************SPAM*******************************
  #   message = X-Spam-Flag: YES\n\
  #        X-Spam_score: $spam_score\n\
  #             X-Spam_score_int: $spam_score_int\n\
  #             X-Spam_bar: $spam_bar\n\
  #             X-Spam_report: $spam_report


 
Et que la règle suivante, rejete bien les mails dont le score dépasse 12

Spoiler :


deny  message = This message scored $spam_score spam points.
      spam = nobody:true
      condition = ${if >{$spam_score_int}{120}{1}{0}}


 
La config de spamassassin est identique à la config de base qui est souvent décrite sur internet, les règles décrites si dessus, sont tirées, après adaptation de la documentation en ligne d'exim.
 
Voila, en espérant que je vous ai donné les éléments qui vous permettrons de m'aiguiller vers une solution.
 
En vous remerciant,
 
Bon week end!

mood
Publicité
Posté le 01-03-2009 à 11:30:53  profilanswer
 

n°1117932
Trakx
Posté le 02-03-2009 à 07:52:39  profilanswer
 

Salut,
 
Il n'y a pas si longtemps, j'avais un serveur mail avec amavisd, spamassassin et postfix... et ce que je trouve étrange c'est que tu ne nous montres pas la conf de spamassassin mais celle d'exim. A noter que si tu n'utilises pas spamassassin directement mais via amavis il faut le configurer dans le fichier de conf d'amavis (car celui de spamassassin n'est pas pris en compte).

n°1118095
skeltux
Posté le 02-03-2009 à 21:11:18  profilanswer
 

Bonsoir,
Je n'utilise pas amavisd. Voila ma config de spamassassin en espérant que ca puisse vous en dire plus car ca devient vraiment problématique... :  
 
le fichier sa-exim:
# Options for spamassassin running in exim's local_scan (SA Exim)
# By Marc MERLIN <marc_soft@merlins.org> - Initial version: April 2002
# Sander Smeenk <ssmeenk@freshdot.net> - Improvements: March 2004
#
# Sample file version 1.16 for SA-Exim 4.1 - 2005/01/10  
#
# The parse routine is minimalistic. It expects "option: value" (exactly
# one space after the colon, and none before). You should put long lines
# on one line. The parser isn't capable of parsing multiline values.
#
# SA threshold values are parsed as floats and other numerical options
# are ints. String options have to be set. To unset them, comment out the
# variable, don't set it to nothing.
#
# READ THIS:
# ---------
# Watch your logs, you will get errors and your messages will get
# temporarily bounced if expansions fail. Watch your logs!
#
# If you are afraid that spammers might use a header that is used here
# as a default, have exim set it to another value than 'Yes' and check
# here for that other value.
#
# For every expansion, anything that doesn't expand to "" or "0"
# (without quotes) will be considered true. If you set the string to 1,
# it will be true without going through exim's condition evaluator (and
# if you leave it unset, it will default to 0)
#
# You should not put double quotes around expressions!
# --- snip ---
 
# Enable basic verbose output by default. Watch your logs!
SAEximDebug: 1
 
 
# Default path is /usr/bin/spamc, but you can change it here
SAspamcpath: /usr/bin/spamc
 
# Which characters are retained from a Message-Id header (for safety, we
# remove characters that might cause problems with shell parsing)
# Change the default at your own risk (you also have to change this in
# the SA greylisting patch if you use that)
#SAsafemesgidchars: !#%( )*+,-.0123456789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_abcdefghijklmnopqrstuvwxyz{|}~
 
# If SAspamcSockPath is set spamc uses socket to connect to spamd,
# use --socketpath pathname as argument to spamd (new in SA 2.60).
# Leave it unset if you want spamc to connect(AF_INET) to spamd at
# 127.0.0.1 (this is the default shown in the options below), but if
# you set it, it will override the two TCP connect options below
#SAspamcSockPath: /var/run/spamd.sock
 
# SAspamcHost / SAspamcPort: TCP socket where your spamd is listening
# Shown below are the defaults:
SAspamcHost: 127.0.0.1
SAspamcPort: 783
 
 
# Exim configuration string to run before running SA against the message
# This decides whether SA gets run against the message or not.  This
# default will not reject messages if the message had SA headers but
# they weren't added by us.
SAEximRunCond: ${if and {{def:sender_host_address} {!eq {$sender_host_address}{127.0.0.1}} {!eq {$sender_host_address}{::1}}}}
# If you want more detailed control over when to run SA, it's recommended
# that you set an ACL variable indicating this from the acl section of
# your Exim configuration file. The current maintainer sets acl_m0 to  
# "noscan" if the sending host is localhost or has authenticated.
#SAEximRunCond: ${if !eq{$acl_m0}{noscan}}
# (This means exactly the same as ${if !eq{$acl_m0}{noscan} {true}{}},  
# where the empty string is considered false.)
 
#----------------------------------------------------------------------
# Remove or comment out the following line to enable sa-exim
SAEximRunCond: 1
#----------------------------------------------------------------------
 
# If and only if SAEximRunCond was true, and we did run SA, this
# expression decides whether we actually consider acting upon SAdevnull,
# SApermreject, and SAtempreject if you have them set.
#
# Use this to tag messages that you shouldn't reject (messages sent to
# abuse or postmaster for instance).
#
# As an example, set acl_m0 to "canreject" if a recipient other than
# postmaster or abuse is encountered (and the sender isn't local). That
# way, spammers can't circumvent blocking by sending to postmaster and  
# 99 other recipients. (If acl_m0 is taken, you'll of course have to use
# a different variable.
#SAEximRejCond: ${if eq{$acl_m0}{canreject}}
 
 
# How much of the body we feed to spamassassin (in bytes)
# Default is 250KB
SAmaxbody: 256000
 
# Do you want to feed SAmaxbody's worth of the message body if it is too big?
# Either, you skip messages that are too big and not scan them, or you can
# truncate the body and feed that to SA.
# Note that SA will sometimes raise the spam score if it can't parse
# the message correctly (since the end is missing, decoding will fail)
# Default is 0: do not scan messages that are too big
# (note that this is parsed as a condition)
SATruncBodyCond: 0
 
# If you want SA to report_safe you need sa-exim to rewrite the body of
# the message since SA encapsulates the spam as a mime attachment.
# You probably want SATruncBodyCond to be 0 or else you'll end up with a
# partial message if it's larger than SAmaxbody and it's spam
#
# Also note that if you enable this option, any saved message will be saved
# after the body has been modified by SA.
# (this is not a condition as SA's report_safe is not conditional)
SARewriteBody: 0
 
# Prepend saved messages with an fake From-header to make the file look like a
# valid mbox file
SAPrependArchiveWithFrom: 1
 
# If you are archiving messages that are rejected, how much do you want
# to archive? Default is 20MB.
SAmaxarchivebody: 20971520
 
# On errors, if you are saving messages, you probably want the entire message
# Default size saved (if you are saving errors) is 1GB
SAerrmaxarchivebody: 1073741824
 
# You can have SA-Exim add a X-SA-Exim-Rcpt-To header, which will list all
# the recipients for the Email, unless the list gets bigger than  
# SAmaxrcptlistlength bytes.
# The default value of 0 disables the header for privacy reasons (the header
# exposes Bcced recipients)
# Any value bigger than 8000 will be ignored because there is a limit on the
# size of headers that you can have and exim's string_sprintf
# Note that if you are planning to use greylisting, you should set this
# value to 8000 since SA's greylisting code needs the recipients.
SAmaxrcptlistlength: 0
 
# Add X-SA-Exim-Rcpt-To and X-SA-Exim-Mail-From headers before SA scans
# the message.
# If this option is enabled, SARewiteBody is true, and safe_mode is
# enabled in SA, you end up with the X-SA-Exim-Rcpt-To/X-SA-Exim-Mail-From in
# the attatched message as well without the ability to remove them later in an
# exim transport (think privacy).  
# In real life this is usually not a problem because the message is spam anyway,
# and if you turn this off, you lose the option to use those headers to score
# the message with SA.
SAaddSAEheaderBeforeSA: 1
 
# How many seconds you want to allow spamc to run. Exim 4.04 and better will
# kill us after a default of 5 minutes. This however is not great, because the
# mail gets temporarily rejected
# You should set this and have SA Exim handle the timeout itself and accept the
# message if spamc takes too long (instead of timing out)
# A value of 0 means no timeout, and we run until exim stops us.  
# I know of at least one mail server (nanog's merit.edu) that will not
# wait a full 5mn (which causes tempreject and resends), so the default is 4mn
#SAtimeout: 240
 
# Do you want to save mails that were accepted because spamc timed out?
# Specify a directory to enable the feature.
# SA-Exim will try to create the directory if it has the permissions to do so,
# check your maillog for failures (or create the directory yourself and make it
# writeable by exim)
SAtimeoutsave: /var/spool/sa-exim/SAtimeoutsave
 
# You can optionally save or not save messages that matched the above rule
SAtimeoutSavCond: 1
 
 
# You should really create this directory for local_scan to save messages that
# created an error. If you don't want this, comment out this variable
# Make sure all these directories are owned by the exim user
# SA-Exim will try to  create the directory if it has  the permissions to do
# so, check your maillog for failures  (or create the directory yourself and
# make it writeable by exim)
SAerrorsave: /var/spool/sa-exim/SAerrorsave
 
# You can optionally save or not save messages that matched the above rule
# You should not put double quotes around the expression
SAerrorSavCond: 1
 
# If you set to 1, SA will temporarily reject messages that generated an error
# while they were processed (they'll still be saved if SAerrorsave is set).
# Otherwise (0 = false), the messages are just accepted, which seems like a
# more sensible default
SAtemprejectonerror: 0
 
 
###############################################################################
# NOTE: Spamd needs to tell sa-exim that the message SA-Exim gave spamd
# is spam before sa-exim will consider the SA tresholds.
# In other words, you cannot reject mails on SA scores if you set that
# threshold to a lower threshold than SA's required_hits value.
# The one exception to this rule is SAtempreject (in order to let you
# temporarily reject mail when you are doing greylisting, see
# README.greylisting in the documentation for details)
###############################################################################
 
# SA score when you start stalling the sender by sending many continuation
# lines for up to SAteergrubetime
# This is now a string (without quotes) that gets evaluated at runtime by exim
# but you can still assign a simple float value to it
# Note that this is an obvious abuse of SMTP, but eh, they started it :-)
# Of course, this means that each incoming spam with the right score threshold
# will keep an exim process busy on your machine. Make sure you can afford it.
# Default value is 2^20, which should disable the behavior
 
# Please, don't teergrube people who relay for you or your own MXes :-)
# This option is left behind for backward compatibility, but you can now
# get the same result by putting a condition string in SAteergrube
# The trick is to list your score if the condition succeeds, and a really  
# high score otherwise.
#SAteergrube: ${if and { {!eq {$sender_host_address}{127.0.0.1}} {!eq {$sender_host_address}{127.0.0.2}} } {25}{1048576}}
 
# SAteergrubecond is deprecated (replaced by SAteergrube)
# You used to be say whether you would apply the teergrubing score with this
# condition, but now that scores are conditions, it is obsolete
#SAteergrubecond: ${if and { {!eq {$sender_host_address}{127.0.0.1}} {!eq {$sender_host_address}{127.0.0.2}} } {1}{0}}
 
# How long do you want to stall the sender (in seconds)
# If you set the value too high, you might get too many exim processes running
# and run out of process slots
# Remember, don't come crying if playing with this "feature" causes your mail
# server to catch fire :-)
SAteergrubetime: 900
 
# You can optionally save or not save messages that matched the above rule
SAteergrubeSavCond: 1
 
# Do you want to save mails that you stalled for later analysis?
# Specify a directory to enable the feature.
# SA-Exim will try to create the directory if it has the permissions to do so,
# check your maillog for failures (or create the directory yourself and make it
# writeable by exim)
SAteergrubesave: /var/spool/sa-exim/SAteergrube
 
# When you stall the sender, you will probably get the mail again.
# By default, we'll  only save messages by message ID so  that we don't save
# multiple copies every time the sender tries again.
# Of course, this means someone could fake someone else's message ID to
# overwrite the saved copy of another spam. Such is life :-)
SAteergrubeoverwrite: 1
 
 
 
# If you reach this score, the mail is accepted and tossed (/dev/nulled).
# The default value is 2^20 which should ensure this never happens.
# This is now a string (without quotes) that gets evaluated at runtime by exim
# but you can still assign a simple float value to it
# You should be really sure that the message is spam because the sender will
# get no notification
#SAdevnull: 20.0
 
# You can optionally save or not save messages that matched the above rule
SAdevnullSavCond: 1
 
# Do you want to save mails that are tossed?
# Specify a directory to enable the feature.
# This is just in case you do want to keep a copy of the alledge spams somewhere
# Messages are saved by unixdate_Message-Id or just unix date if there is no
# Message-Id.
# SA-Exim will try to create the directory if it has the permissions to do so,
# check your maillog for failures (or create the directory yourself and make it
# writeable by exim)
SAdevnullsave: /var/spool/sa-exim/SAdevnull
 
 
 
# SA score when you start rejecting Emails (this is better than the above as
# it can notify the sender in case you reject non-spam by mistake)
# This is now a string (without quotes) that gets evaluated at runtime by exim
# but you can still assign a simple float value to it
# Default value is 2^20, which should disable the behavior if you comment out
# the line below
SApermreject: 12.0
 
# You can optionally save or not save messages that matched the above rule
SApermrejectSavCond: 1
 
# Do you want to save mails that are rejected?
# Specify a directory to enable the feature.
# SA-Exim will try to create the directory if it has the permissions to do so,
# check your maillog for failures (or create the directory yourself and make it
# writeable by exim)
SApermrejectsave: /var/spool/sa-exim/SApermreject
 
 
 
# SA score when you start returning a temporary reject.
# There are few reasons to use this, except if you're reading your tempreject
# save folder (see below) and ajusting scores on the fly, or if you are using
# greylisting
# This is now a string (without quotes) that gets evaluated at runtime by exim
# but you can still assign a simple float value to it
# Default value is 2^20, which should disable the behavior
SAtempreject: 4.0
 
# You can optionally save or not save messages that matched the above rule
SAtemprejectSavCond: 1
 
# Do you want to save mails that are temporarily rejected?
# Specify a directory to enable the feature.
# You could use this to analyse what SA is bouncing and adding an allow rule
# to accept the mail next time it is sent back to you
# SA-Exim will try to create the directory if it has the permissions to do so,
# check your maillog for failures (or create the directory yourself and make it
# writeable by exim)
SAtemprejectsave: /var/spool/sa-exim/SAtempreject
 
# When you send back a temp reject code, you will get the mail again.
# By default, we'll only save messages by message ID so that we don't save
# multiple copies every time the sender tries again.
# Of course, this means someone could fake someone else's message ID to
# overwrite the saved copy of another spam. Such is life :-)
SAtemprejectoverwrite: 1
 
# See README.greylisting in the documentation for the following options
# This is the string that SpamAssassin adds if the message is whitelisted
# We use this to optionally increase the score needed for a tempreject
# (in order to let a message through when it would otherwise have been
# temprejected)
# Default value is "GREYLIST_ISWHITE" (as used in the patch provided by SA-Exim)
SAgreylistiswhitestr: GREYLIST_ISWHITE
 
# By how much do we temporarly raise tempreject to allow a mail in when it
# would otherwise have been temp rejected (because SA flagged it was whitelisted
# by the greylisting code provided as a patch to SA in the SA-Exim distro)
# Note that greylisting will not work in until you patch SA with the greylist
# function
# Note that you most likely want  
# SAtempreject + SAgreylistraisetempreject <= SApermreject
# Default value is 3.0 but you'd probably to lower the tempreject score and
# increase this one (see README.greylisting)
SAgreylistraisetempreject: 3.0
 
 
# Do you want to save mails that are flagged as spam by SA, but not rejected by
# any of the above thresholds?  Specify a directory to enable the feature.
# That's one way to track mails thare are going through even though they were
# flagged by SA (note that you could also save them in exim's system_filter,
# although copies saved here happen before exim makes modification to the
# message like rewriting)
# SA-Exim will try to create the directory if it has the permissions to do so,
# check your maillog for failures (or create the directory yourself and make it
# writeable by exim)
SAspamacceptsave: /var/spool/sa-exim/SAspamaccept
 
# You can control which messages you want saved if you only want a subset
SAspamacceptSavCond: 0
 
 
# Do you want to save mails that are not flagged as spam by SA
# Specify a directory to enable the feature.
# This is only here for completeness, if you want to save all messages not
# flagged as spam by SA (you could also do this in system_filter)
# SA-Exim will try to create the directory if it has the permissions to do so,
# check your maillog for failures (or create the directory yourself and make it
# writeable by exim)
SAnotspamsave: /var/spool/sa-exim/SAnotspam
 
# You can control which messages you want saved if you only want a subset
SAnotspamSavCond: 0
 
# All the following strings can take one '%s' which will be replaced by
# spamstatus: "SA score, trigger score"
SAmsgteergrubewait: Wait for more output
SAmsgteergruberej: Please try again later
SAmsgpermrej: Rejected
SAmsgtemprej: Please try again later
# This string is a static string, do not include "%s"
SAmsgerror: Temporary local error while processing message, please contact postmaster.
 
mon local.cf :
 
# 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*****
 
 
#   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

n°1118246
shurik84
Posté le 03-03-2009 à 13:41:35  profilanswer
 

Autre question : Pour tester sur un réseau local l'envoi et la reception de mail d'un poste a un autre ! Exim suffit il comme serveur de messagerie ? et sur l'autre poste, que faut il mettre comme autre logiciel qui permet l'envoie de mail avec le serveur ?
 
Car je ne voit pas trop sous linux, quel package avoir sur le poste client  ( 2ieme ordinateurs ) ?
pour le serveur je vais essayer d'utiliser exim qui est installé par default sur la distrib debian.
 
J'ai tester sous windows xp avec le serveur de messagerie smtp de windows et sur un autre poste j'avais thunderbird pour envoyer les mails maintenant sous linux si c'est pareil !
 
Moi je pense que c'est le meme principe mais le doute s'installe d'où cette question bete et mechante !


Message édité par shurik84 le 03-03-2009 à 13:57:16
n°1118398
Trakx
Posté le 03-03-2009 à 19:47:46  profilanswer
 

En fait ce n'est pas spamassassin qui te met *****SPAM***** dans le sujet, ni lui qui te met le X-Spam-Flag à YES, c'est ta conf exim
 

Citation :

warn  spam = nobody:true
       add_header = Subject: *****SPAM***** $h_Subject:
       add_header = X-Spam-Score: $spam_score ($spam_bar)
       add_header = X-Spam-Report: $spam_report
       add_header = X-Spam-Flag: YES\n\
       condition = ${if >{$spam_score_int}{50}{1}{0}}


 
Je ne sais pas comment ça marche donc je ne peux pas te dire ce qui ne va pas dedans, mais je peux te dire que tu n'en a pas besoin car Spamassassin change lui-même le sujet du mail quand il détecte un spam, (il ajoute aussi un header X-Spam-Status à Yes) conformément à ton local.cf
 

Citation :

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


 
Donc supprime tes filtres exim et refais un essai

n°1118401
Trakx
Posté le 03-03-2009 à 20:01:55  profilanswer
 

Exim est un Mail Transfer Agent (MTA ou serveur SMTP), il envoie donc tes mails à d'autres MTAs et peut aussi réceptionner les mails provenant d'autres MTA (si tu as ton propre nom de domaine par exemple).
Si tu envoies un mail à Exim qui n'est pas destiné à l'extérieur mais à un utilisateur local, Exim va stocker le mail sur le disque dur de ton serveur. Pour y accéder il faudra installer un Mail Delivery Agent (MDA, un serveur IMAP ou POP) sur ton serveur.
Sur ton autre poste, pour envoyer des mails à Exim (ou les réceptionner du MDA) il te faut un Mail User Agent (MUA, par exemple Thunderbird)

 

http://www.commentcamarche.net/con [...] a-mua.php3

 

EDIT: et au fait Debian Lenny est passée stable le mois dernier, donc tu peux mettre à jour ta Etch


Message édité par Trakx le 03-03-2009 à 20:03:40
n°1118497
shurik84
Posté le 04-03-2009 à 09:12:44  profilanswer
 

Ok donc exim stocke les mails, un serveur imap ou pop permet de consulter les mails ! donc je m'oriente sur une solution Postfix+Imap et thunderbird pour le client !
Peut on utiliser imap et pop3 ensemble sur un meme serveur ?
 
en revanche non je ne dispose pas de nom de domaine propre, je suis sous virtualisation vmware , pour tester l'envoi de message est ce gênant ? J'ai deja tester sous windows avec un dns bidon et ca marche en revanche, je sais pas si sous linux ca va marcher, en théorie je pense mais je ne suis pas sure !!! ( de plus la machine hote est configurer sur le dns de l'entreprise )

Message cité 1 fois
Message édité par shurik84 le 04-03-2009 à 10:12:28
n°1119080
Trakx
Posté le 05-03-2009 à 19:39:14  profilanswer
 

shurik84 a écrit :

Ok donc exim stocke les mails, un serveur imap ou pop permet de consulter les mails ! donc je m'oriente sur une solution Postfix+Imap et thunderbird pour le client !
Peut on utiliser imap et pop3 ensemble sur un meme serveur ?
 
en revanche non je ne dispose pas de nom de domaine propre, je suis sous virtualisation vmware , pour tester l'envoi de message est ce gênant ? J'ai deja tester sous windows avec un dns bidon et ca marche en revanche, je sais pas si sous linux ca va marcher, en théorie je pense mais je ne suis pas sure !!! ( de plus la machine hote est configurer sur le dns de l'entreprise )


 
Oui c'est ça
Finalement tu vas essayer Postfix plutôt que de garder Exim ?
Oui on peut avoir IMAP et POP en même temps, en général c'est le même soft qui fait les deux (Dovecot, Courier)
Non ça n'est pas génant de pas avoir de domaine, ça simplifie même grandement la configuration.
Ça marchera sous linux si c'est correctement configuré.
 
A noter que si ce serveur doit récupérer les mails des users de ton entreprise pour les mettre à leur disposition, il te faudra un logiciel pour que le serveur les rapatrie (Fetchmail par exemple)

n°1119157
shurik84
Posté le 06-03-2009 à 09:04:01  profilanswer
 

ben en faite voila ce que je veut faire , pour faire simple j'ai 3 reseaux reliés a un serveur proxy / firewall ( le proxy n'a pas etait mit en place pour le moment ) et j'ai installé en faite sur une machine Linux le serveur smtp postfix sur un reseau et je veut qu'un client d'un autre reseau envoi un message ( thunderbird, outlook etc..) qui va etre reliés par un agent de relais du serveur FW et que celui ci va retransmettre apres verification ( Antivirus, Antispam ...) la requete sur le serveur de messagerie du dernier réseau !

 

Le soucis c'est que je ne sais pas quoi mettre comme agent de relais sur le serveur FW ? Postfix a lui seul peut il le faire ? Si non, de quoi ai je besoin juste pour faire transiter, des message d'un reseau a un autre ? Je pense qu'il peut le faire étant donné que dans le fichier configuration de postfix il y a une ligne : relayhost
donc ca doit être faisable a mon avis

 

Ci ca peut t'aider : ma config
Serveur FW : Linux debian
Serveur de messagerie : Linux + postfix
Poste client : Windows XP ( thunderbird ) etc..

 

Merci !  :hello:


Message édité par shurik84 le 09-03-2009 à 16:26:45
n°1119453
Trakx
Posté le 06-03-2009 à 23:01:03  profilanswer
 

Va falloir expliquer un peu mieux, tu as 3 réseaux ça veut dire 3 plages d'adresses ip différentes pour chaque réseau ? des réseaux indépendants quoi ? ou bien 3 salles réseaux qui forment 1 seul réseau ip... ton serveur proxy/firewall fait dhcp aussi ?


Message édité par Trakx le 06-03-2009 à 23:01:22
mood
Publicité
Posté le 06-03-2009 à 23:01:03  profilanswer
 

n°1120060
shurik84
Posté le 09-03-2009 à 16:22:01  profilanswer
 

Oui, sorry
En efffet oui, j'ai 3 réseau donc 3 plages d'adresses ip différentes avec en passerelle l'adresse ip du serveur et de chaque interface  
Mon serveur ne fait pas dhcp étant sous virtualisation je n'en ai pas besoin pour ce que je veut faire mais j'ai  le package dhcp3-server d'installé au cas ou je veut le mettre en place..
 
Je me documente sur la configuration de postfix mais je veut juste savoir en gros si c'est possible de faire un relais de messagerie ( Clients , Serveur agent de relais SMTP, Serveur de messagerie ) seulement en local et avec un ou plusieurs noms de domaines virtuels ? Apparement tout ce fait dans le fichier de configuration de postfix.
 
Principe : faire de la redirection de mail a travers l'agent de relais et aprés verification ( antivirus + antispam )
le tout vers un autre serveur qui recevra le mail filtré ! Le tout réguler dans un second temps par le firewall !
 
- Un courrier reçu sur le serveur(relais) en provenance d'un poste client !  
- Serveur (relais): Je connait cette adresse ip et le nom de domaine ! Hop je redirige vers le serveur de messagerie
- Serveur(messagerie): j'ai bien recu le mail, je le stocke :)
 
 :hello:

Message cité 1 fois
Message édité par shurik84 le 09-03-2009 à 16:55:15
n°1120206
Trakx
Posté le 10-03-2009 à 00:04:47  profilanswer
 

shurik84 a écrit :

Oui, sorry
En efffet oui, j'ai 3 réseau donc 3 plages d'adresses ip différentes avec en passerelle l'adresse ip du serveur et de chaque interface  
Mon serveur ne fait pas dhcp étant sous virtualisation je n'en ai pas besoin pour ce que je veut faire mais j'ai  le package dhcp3-server d'installé au cas ou je veut le mettre en place..
 
Je me documente sur la configuration de postfix mais je veut juste savoir en gros si c'est possible de faire un relais de messagerie ( Clients , Serveur agent de relais SMTP, Serveur de messagerie ) seulement en local et avec un ou plusieurs noms de domaines virtuels ? Apparement tout ce fait dans le fichier de configuration de postfix.
 
Principe : faire de la redirection de mail a travers l'agent de relais et aprés verification ( antivirus + antispam )
le tout vers un autre serveur qui recevra le mail filtré ! Le tout réguler dans un second temps par le firewall !
 
- Un courrier reçu sur le serveur(relais) en provenance d'un poste client !  
- Serveur (relais): Je connait cette adresse ip et le nom de domaine ! Hop je redirige vers le serveur de messagerie
- Serveur(messagerie): j'ai bien recu le mail, je le stocke :)
 
 :hello:


 
OK, si j'ai bien compris je dirais oui  :)  
En fait les PCs de 2 des 3 réseaux ne pouvant pas communiquer directement avec ton serveur SMTP, il faut juste que ton serveur firewall/proxy lui transfère le boulot. Pour ça tu peux installer Postfix (ou Exim ou un autre) sur ton firewall/proxy et tu le configures pour qu'il relaie les mails sur l'autre serveur SMTP  :lol:  


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Linux et OS Alternatifs
  réseaux et sécurité

  Exim + Spamassassin : problème d'identification des mails

 

Sujets relatifs
Probleme d'affichage avec eeeBox Asus 160G LINUX et écran Asus VK191SProblème de redirection de log
[Mandriva] Problème connection wifiProblème de Grub
Problème de connexion à un serveur SMTP MS ExchangeProblème de boot sur iMac G3
Debian Sid 64 bits : Problème alsa-ossProblème de configuration DNS
Bind9 logging "category security" = probleme. 
Plus de sujets relatifs à : Exim + Spamassassin : problème d'identification des mails


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR