Bonsoir à toutes et tous,

je me bats depuis quelques jours avec la mise en place dans exim4 de bogofilter.
J'ai une config qui tourne pour le moment, elle est composée de 
exim4+cyrus+filtrage par sieve.
mais l'implantation de bogofilter dans le exim4.conf ne semble rien changer.
J'espérais retrouver un X-Flag dans mutt, mais rien de probant pour le
moment.
donc si il se trouve parmi vous des personnes avec la même config, ce
serait sympa de m'aiguiller.

je joins mon exim4.conf en PJ

Merci d'avance.

A+
jo

######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################

domainlist local_domains =      /etc/exim4/local_domains
domainlist relay_to_domains =   /etc/exim4/relay_to_domains
hostlist   relay_from_hosts =   /etc/exim4/relay_from_hosts  

acl_smtp_rcpt = acl_check_rcpt

qualify_domain = mondomaine.org

 allow_domain_literals

never_users = root

host_lookup = *


rfc1413_hosts = *
rfc1413_query_timeout = 30s


 recipient_unqualified_hosts = *.mondomaine.org

ignore_bounce_errors_after = 2d


timeout_frozen_after = 7d


######################################################################
#                       ACL CONFIGURATION                            #
#         Specifies access control lists for incoming SMTP mail      #
######################################################################

begin acl

acl_check_rcpt:

  accept  hosts = :

  deny    local_parts   = [EMAIL PROTECTED]/|] : ^\\.

  accept  local_parts   = postmaster
          domains       = +local_domains

  require verify        = sender


  accept  domains       = +local_domains
          endpass
          verify        = recipient

  accept  domains       = +relay_to_domains
          endpass
          verify        = recipient

  accept  hosts         = +relay_from_hosts

  accept  authenticated = *

  deny    message       = relay not permitted


######################################################################
#                      ROUTERS CONFIGURATION                         #
#               Specifies how addresses are handled                  #
######################################################################
#     THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT!       #
# An address is passed to each router in turn until it is accepted.  #
######################################################################

begin routers

smarthost:
  driver = manualroute
  domains = ! +local_domains
  transport = remote_smtp
  route_list = * leo.mondomaine.org
  host_find_failed = defer
  same_domain_copy_routing = yes
  no_more
              
 domain_literal:
   driver = ipliteral
   domains = ! +local_domains
   transport = remote_smtp


dnslookup:
  driver = dnslookup
  domains = ! +local_domains
  transport = remote_smtp
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  no_more


system_aliases:
  driver = redirect
  allow_fail
  allow_defer
  data = ${lookup{$local_part}lsearch{/etc/aliases}}
  user = mail
  file_transport = address_file
  pipe_transport = address_pipe

# Prise en charge des mails par bogofilter pour enlever les spams

bogofilter_router:
#       domains = +local_domains 
        no_verify
#       check_local_user
        condition = $ {if !def:h_X-Flag: {true}}
        driver = accept
        transport = bogofilter_transport

        
localuser_cyrus:
  driver = accept 
  check_local_user
  transport = local_delivery_cyrus

######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################

begin transports


remote_smtp:
  driver = smtp
                  

# Bogofilter will add X-Bogosity header to all incoming mail.
# This can go anywhere in the transport section, usually at
# the very end after address_reply
bogofilter_transport:
        driver                  = pipe
        command                 = /usr/sbin/exim4 -oMr bogofiltered -bS
        use_bsmtp               = true
        headers_add             = X-Flag: true
        transport_filter        = /usr/bin/bogofilter -l -p -e -u -d 
/var/spool/bogofilter
        return_fail_output      = true
        group                   = mail
        user                    = mail
        home_directory          = "/tmp"
        current_directory       = "/tmp"
        log_output              = true
#       ignore_status           = true
        return_output           = false
        return_path_add         = false
#       use_shell               = true
#       message_prefix          =
#       message_suffix          =
                                 

local_delivery_cyrus:
  driver = pipe
  command = "/usr/sbin/cyrdeliver -m ${substr_1:${local_part_suffix}} -- 
${local_part}"
  user = cyrus
  group = mail
#  delivery_date_add
#  return_path_add
  envelope_to_add = true
  return_output
  log_output
  message_prefix =
  message_suffix =
                  

address_pipe:
  driver = pipe
  return_output

address_file:
  driver = appendfile
  delivery_date_add
  envelope_to_add
  return_path_add


address_reply:
  driver = autoreply

######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################

begin retry

# Domain               Error       Retries
# ------               -----       -------

*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h



######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################

begin rewrite
[EMAIL PROTECTED]    ${lookup{$1}lsearch{/etc/email-addresses}\
                                               {$value}fail} frFs


######################################################################
#                   AUTHENTICATION CONFIGURATION                     #
######################################################################

begin authenticators


# End of Exim configuration file

Répondre à