Amavisd.conf

De wikilivois
Aller à la navigationAller à la recherche

<licode file=/etc/amavisd.conf> $mydomain = 'livois.com'; # (no useful default) $myhostname = 'gw.livois.com'; # fqdn of this host, default by uname(3) </licode>

LDAP

<licode file=/etc/amavisd.conf> $enable_ldap = 1; $default_ldap = {

 hostname => 'localhost',
 tls => 0,
 base => 'o=hebergement,dc=livois,dc=com',
 query_filter => '(&(objectClass=amavisAccount)(mail=%m))'

}; </licode>

<licode file=/etc/amavisd.conf>

  1. The $max_servers should match the width of your MTA pipe
  2. feeding amavisd, e.g. with Postfix the 'Max procs' field in the
  3. master.cf file, like the '2' in the: smtp-amavis unix - - n - 2 smtp

$max_servers = 2; # number of pre-forked children (default 2) $max_requests = 10; # retire a child after that many accepts (default 10) </licode>

<licode file=/etc/amavisd.conf> $virus_admin = "virusalert\@$mydomain"; $spam_admin = "spamalert\@$mydomain"; $mailfrom_notify_spamadmin = "spamalert\@$mydomain";

$virus_quarantine_to = "virustrap\@$mydomain"; $spam_quarantine_to = "spamtrap\@$mydomain"; </licode>

<licode file=/etc/amavisd.conf>

  new_RE(  # regexp-type lookup table, just happens to be all soft-blacklist
   [qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou)@'i         => 5.0],
   [qr'^(greatcasino|investments|lose_weight_today|market\.alert)@'i=> 5.0],
   [qr'^(money2you|MyGreenCard|new\.tld\.registry|opt-out|opt-in)@'i=> 5.0],
   [qr'^(optin|saveonlsmoking2002k|specialoffer|specialoffers)@'i   => 5.0],
   [qr'^(stockalert|stopsnoring|wantsome|workathome|yesitsfree)@'i  => 5.0],
   [qr'^(your_friend|greatoffers)@'i                                => 5.0],
   [qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i                    => 5.0],
  ),
 read_hash("/var/amavis/sender_scores_sitewide"),

</licode>

virus scanners

<licode file=/etc/amavisd.conf> @av_scanners = (

['ClamAV-clamd',
  \&ask_daemon, ["CONTSCAN {}\n", "/var/amavis/clamd"],
  qr/\bOK$/, qr/\bFOUND$/,
  qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],

</licode>

Copyright

© 2006 Christophe de Livois

Tête de GNU Vous avez l'autorisation de copier, distribuer et/ou modifier ce document suivant les termes de la GNU Free Documentation License, Version 1.2 ou n'importe quelle version ultérieure publiée par la Free Software Foundation; sans section invariante, sans page de garde, sans entête et sans page finale. Pour plus d'informations consulter le site de l'APRIL.