Advertisement
fakessh

amavisd.conf

Dec 27th, 2011
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.71 KB | None | 0 0
  1. ks37777 ~]# cat /etc/amavisd
  2. amavisd/ amavisd-custom-geoip-client.conf
  3. amavisd.conf amavisd-custom-geoip-client.conf~
  4. amavisd.conf~
  5. [root@ks37777 ~]# cat /etc/amavisd.conf
  6. use strict;
  7.  
  8. # a minimalistic configuration file for amavisd-new with all necessary settings
  9. #
  10. # see amavisd.conf-default for a list of all variables with their defaults;
  11. # see amavisd.conf-sample for a traditional-style commented file;
  12. # for more details see documentation in INSTALL, README_FILES/*
  13. # and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
  14.  
  15.  
  16. # COMMONLY ADJUSTED SETTINGS:
  17.  
  18. # @bypass_virus_checks_maps = (1); # controls running of anti-virus code
  19. # @bypass_spam_checks_maps = (1); # controls running of anti-spam code
  20. # $bypass_decode_parts = 1; # controls running of decoders&dearchivers
  21.  
  22.  
  23. # config perso file
  24. include_config_files('/etc/amavisd-custom-geoip-client.conf');
  25. $enable_dkim_verification = 1;
  26. ##$enable_dkim_signing = 1; # you need this one
  27. ##dkim_key('nicolaspichot.fr', 'dk', '/var/db/dkim/nicolaspichot.fr.pem');
  28. ##dkim_key('renelacroute.fr', 'dk', '/var/db/dkim/renelacroute.fr.pem');
  29. ##dkim_key('fakessh.eu', 'dk', '/var/db/dkim/fakessh.eu.pem');
  30.  
  31.  
  32.  
  33.  
  34.  
  35. $max_servers = 5; # num of pre-forked children (2..30 is common), -m
  36. $daemon_user = "amavis"; # (no default; customary: vscan or amavis), -u
  37. $daemon_group = "amavis"; # (no default; customary: vscan or amavis), -g
  38.  
  39. $mydomain = 'ks37777.kimsufi.com'; # a convenient default for other settings
  40.  
  41. $MYHOME = '/var/amavis'; # a convenient default for other settings, -H
  42. $TEMPBASE = "$MYHOME/tmp"; # working directory, needs to exist, -T
  43. $ENV{TMPDIR} = $TEMPBASE; # environment variable TMPDIR, used by SA, etc.
  44. $QUARANTINEDIR = "/var/virusmails";
  45. # $quarantine_subdir_levels = 1; # add level of subdirs to disperse quarantine
  46.  
  47. # $daemon_chroot_dir = $MYHOME; # chroot directory or undef, -R
  48.  
  49. $db_home = "$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D
  50. $helpers_home = "$MYHOME/var"; # working directory for SpamAssassin, -S
  51. $lock_file = "$MYHOME/var/amavisd.lock"; # -L
  52. $pid_file = "$MYHOME/var/amavisd.pid"; # -P
  53. #NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually
  54.  
  55. $log_level = 0; # verbosity 0..5, -d
  56. $log_recip_templ = undef; # disable by-recipient level-0 log entries
  57. $DO_SYSLOG = 1; # log via syslogd (preferred)
  58. $syslog_facility = 'mail'; # Syslog facility as a string
  59. # e.g.: mail, daemon, user, local0, ... local7
  60. $syslog_priority = 'debug'; # Syslog base (minimal) priority as a string,
  61. # choose from: emerg, alert, crit, err, warning, notice, info, debug
  62.  
  63. $enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny)
  64. $enable_global_cache = 1; # enable use of libdb-based cache if $enable_db=1
  65. $nanny_details_level = 2; # nanny verbosity: 1: traditional, 2: detailed
  66.  
  67. @local_domains_maps = ( [".$mydomain","renelacroute.fr","smtp.renelacroute.fr","roundcube.renelacroute.fr","mail.renelacroute.fr","fakessh.eu","smtp.fakessh.eu","roundcube.fakessh.eu","mail.fakessh.eu","nicolaspichot.fr","smtp.nicolaspichot.fr","roundcube.fakessh.eu","mail.fakessh.eu"] ); # list of all local domains
  68.  
  69. @mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
  70. 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 91.121.7.86 );
  71.  
  72. $unix_socketname = "$MYHOME/amavisd.sock"; # amavisd-release or amavis-milter
  73. # option(s) -p overrides $inet_socket_port and $unix_socketname
  74.  
  75. $inet_socket_port = 10024; # listen on this local TCP port(s)
  76. ##$inet_socket_port = [10024,10025]; # listen on multiple TCP ports
  77.  
  78. $policy_bank{'MYNETS'} = { # mail originating from @mynetworks
  79. originating => 1, # is true in MYNETS by default, but let's make it explicit
  80. os_fingerprint_method => undef, # don't query p0f for internal clieny
  81.  
  82. };
  83.  
  84.  
  85. # it is up to MTA to re-route mail from authenticated roaming users or
  86. # from internal hosts to a dedicated TCP port (such as 10026) for filtering
  87. $interface_policy{'10025'} = 'ORIGINATING';
  88.  
  89. $policy_bank{'ORIGINATING'} = { # mail supposedly originating from our users
  90. originating => 1, # declare that mail was submitted by our smtp client
  91. allow_disclaimers => 1, # enables disclaimer insertion if available
  92. # notify administrator of locally originating malware
  93. virus_admin_maps => ["virusalert\@$mydomain"],
  94. spam_admin_maps => ["virusalert\@$mydomain"],
  95. warnbadhsender => 1,
  96. # forward to a smtpd service providing DKIM signing service
  97. forward_method => 'smtp:[127.0.0.1]:10026',
  98. # force MTA conversion to 7-bit (e.g. before DKIM signing)
  99. smtpd_discard_ehlo_keywords => ['8BITMIME'],
  100. bypass_banned_checks_maps => [1], # allow sending any file names and types
  101. terminate_dsn_on_notify_success => 0, # don't remove NOTIFY=SUCCESS option
  102. };
  103.  
  104. $interface_policy{'SOCK'} = 'AM.PDP-SOCK'; # only applies with $unix_socketname
  105.  
  106. # Use with amavis-release over a socket or with Petr Rehor's amavis-milter.c
  107. # (with amavis-milter.c from this package or old amavis.c client use 'AM.CL'):
  108. $policy_bank{'AM.PDP-SOCK'} = {
  109. protocol => 'AM.PDP',
  110. auth_required_release => 0, # do not require secret_id for amavisd-release
  111. };
  112.  
  113. $sa_tag_level_deflt = -999; # add spam info headers if at, or above that level
  114. $sa_tag2_level_deflt = 5; # add 'spam detected' headers at that level
  115. $sa_kill_level_deflt = 10; # triggers spam evasive actions (e.g. blocks mail)
  116. $sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent
  117. # $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off
  118. $penpals_bonus_score = 8; # (no effect without a @storage_sql_dsn database)
  119. $penpals_threshold_high = $sa_kill_level_deflt; # don't waste time on hi spam
  120.  
  121. $sa_mail_body_size_limit = 400*10024; # don't waste time on SA if mail is larger
  122. $sa_local_tests_only = 0; # only tests which do not require internet access?
  123.  
  124. # @lookup_sql_dsn =
  125. # ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
  126. # ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
  127. # ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
  128. # @storage_sql_dsn = @lookup_sql_dsn; # none, same, or separate database
  129.  
  130. # $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP;
  131. # defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16)
  132.  
  133. $virus_admin = "virusalert\@$mydomain"; # notifications recip.
  134.  
  135. $mailfrom_notify_admin = "virusalert\@$mydomain"; # notifications sender
  136. $mailfrom_notify_recip = "virusalert\@$mydomain"; # notifications sender
  137. $mailfrom_notify_spamadmin = "spam.police\@$mydomain"; # notifications sender
  138. $mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
  139.  
  140. @addr_extension_virus_maps = ('virus');
  141. @addr_extension_banned_maps = ('banned');
  142. @addr_extension_spam_maps = ('spam');
  143. @addr_extension_bad_header_maps = ('badh');
  144. $recipient_delimiter = '+';
  145. # $recipient_delimiter = '+'; # undef disables address extensions altogether
  146. # when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+
  147.  
  148. $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
  149. # $dspam = 'dspam';
  150.  
  151. $MAXLEVELS = 14;
  152. $MAXFILES = 1500;
  153. $MIN_EXPANSION_QUOTA = 100*1024; # bytes (default undef, not enforced)
  154. $MAX_EXPANSION_QUOTA = 300*1024*1024; # bytes (default undef, not enforced)
  155.  
  156. $sa_spam_subject_tag = '[SPAM]';
  157. $defang_virus = 1; # MIME-wrap passed infected mail
  158. $defang_banned = 1; # MIME-wrap passed mail containing banned name
  159. # for defanging bad headers only turn on certain minor contents categories:
  160. $defang_by_ccat{+CC_BADH.",3"} = 1; # NUL or CR character in header
  161. $defang_by_ccat{+CC_BADH.",5"} = 1; # header line longer than 998 characters
  162. $defang_by_ccat{+CC_BADH.",6"} = 1; # header field syntax error
  163.  
  164.  
  165. # OTHER MORE COMMON SETTINGS (defaults may suffice):
  166.  
  167. # $myhostname = 'host.example.com'; # must be a fully-qualified domain name!
  168.  
  169. # $notify_method = 'smtp:[127.0.0.1]:10025';
  170. # $forward_method = 'smtp:[127.0.0.1]:10025'; # set to undef with milter!
  171.  
  172. $final_virus_destiny = D_REJECT;
  173. $final_banned_destiny = D_PASS;
  174. $final_spam_destiny = D_PASS;
  175. $final_bad_header_destiny = D_PASS;
  176. # $bad_header_quarantine_method = undef;
  177.  
  178. # $os_fingerprint_method = 'p0f:*:2345'; # to query p0f-analyzer.pl
  179.  
  180. ## hierarchy by which a final setting is chosen:
  181. ## policy bank (based on port or IP address) -> *_by_ccat
  182. ## *_by_ccat (based on mail contents) -> *_maps
  183. ## *_maps (based on recipient address) -> final configuration value
  184.  
  185.  
  186. # SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)
  187.  
  188. # $warnbadhsender,
  189. # $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps)
  190. #
  191. # @bypass_virus_checks_maps, @bypass_spam_checks_maps,
  192. # @bypass_banned_checks_maps, @bypass_header_checks_maps,
  193. #
  194. # @virus_lovers_maps, @spam_lovers_maps,
  195. # @banned_files_lovers_maps, @bad_header_lovers_maps,
  196. #
  197. # @blacklist_sender_maps, @score_sender_maps,
  198. #
  199. # $clean_quarantine_method, $virus_quarantine_to, $banned_quarantine_to,
  200. # $bad_header_quarantine_to, $spam_quarantine_to,
  201. #
  202. # $defang_bad_header, $defang_undecipherable, $defang_spam
  203.  
  204. $bypass_decode_parts = 1;
  205. # REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS
  206.  
  207. @keep_decoded_original_maps = (new_RE(
  208. qr'^MAIL$', # retain full original message for virus checking (can be slow)
  209. qr'^MAIL-UNDECIPHERABLE$', # recheck full mail if it contains undecipherables
  210. qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
  211. # qr'^Zip archive data', # don't trust Archive::Zip
  212. ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement