"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "amavisd-new-2.6.1/README_FILES/README.exim_v3" of archive amavisd-new-2.6.1.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 +======================================================================+
    2 | (Please see instructions in README.exim_v4. The setup described here |
    3 | is not recommended with amavisd-new + Exim v4)                       |
    4 +======================================================================+
    5 
    6 
    7 
    8 See also:
    9   http://ente.limmat.ch/linux/exim_v3_-_amavisd-new.html
   10   http://bugs.debian.org/213422
   11 
   12 
   13 How To Use AMaViS With exim
   14 ***************************
   15 
   16 
   17 Exim 3.x
   18 ********
   19 
   20 Scanning incoming mail only
   21 ===========================
   22 
   23 First of all, create the group "amavis" and the user "amavis", which
   24 is in this group. Add the user amavis to your trusted users, so in the
   25 MAIN CONFIGURATION SETTINGS add the following line
   26 
   27 trusted_users = amavis
   28 
   29 (or, if this line already exists simply add amavis, separated with a
   30 colon).
   31 
   32 In the TRANSPORT CONFIGURATION, add the following:
   33 
   34 amavis:
   35    driver = smtp
   36    port = 10024
   37    hosts = 127.0.0.1
   38    allow_localhost
   39 
   40 Here below is an old variant of a transport which uses a pipe to a helper
   41 program amavis(.c). As feeding to amavisd-new with SMTP is easier and
   42 possibly faster, the pipe via helper setup is not recommended - it is
   43 included here for the curious:
   44 
   45 # amavis:
   46 #   driver = pipe
   47 #   command = "/usr/sbin/amavis <${sender_address}> ${pipe_addresses}"
   48 #   prefix =
   49 #   suffix =
   50 #   check_string =
   51 #   escape_string =
   52 # # for debugging change return_output to true
   53 #   return_output = false
   54 #   return_path_add = false
   55 #   user = amavis
   56 #   group = amavis
   57 #   path = "/bin:/sbin:/usr/bin:/usr/sbin"
   58 #   current_directory = "/var/amavis"
   59 
   60 At the *beginning* of the DIRECTORS CONFIGURATION, add the following:
   61 
   62 amavis_director:
   63   condition = "${if eq {$received_protocol}{scanned-ok} {0}{1}}"
   64   driver = smartuser
   65   transport = amavis
   66   # verify must be set to false, to avoid troubles with receiver and/or
   67   # sender verify
   68   verify = false
   69 
   70 
   71 NOTE: Please keep in mind that the ORDER matters!
   72 
   73 Scanning incoming/outgoing and relayed mail
   74 ===========================================
   75 
   76 Scanning of outgoing mail is also possible (based on a contribution
   77 by John Burnham).
   78 
   79 Additionally to the steps mentioned at the "Scanning incoming mail only"
   80 section, do the following:
   81 
   82 At the *beginning* of the ROUTERS CONFIGURATION, add the following
   83 
   84 amavis_router:
   85   condition = "${if eq {$received_protocol}{scanned-ok} {0}{1}}"
   86   driver = domainlist
   87   route_list = "*"
   88   transport = amavis
   89   # verify must be set to false, to avoid troubles with receiver and/or
   90   # sender verify
   91   verify = false
   92 
   93 
   94 
   95 The configure script should be called with the option
   96 --enable-exim. Well, it is enabled by default if the MTA qmail is not
   97 installed on the system.
   98 
   99 NOTE: if the MTA qmail is installed on your system, too, you *MUST*
  100 add --disable-qmail
  101 
  102 NOTE: do not forget to set up an (eMail) alias for "amavis" to a real
  103 user account. If you used --with-notifyreceivers, and a user sends a
  104 mail to an non-existent remote user, the bounce message from the
  105 remote MTA will be send to pseudo-user amavis.
  106 
  107 Note: If you want to add a "X-Virus-Scanned" header you can do this in
  108 your exim configuration, too. Use the headers_add option in the
  109 amavis TRANSPORT CONFIGURATION, i.e.  headers_add =
  110 "X-Virus-Scanned: by AMaViS (<a href="http://amavis.org/">http://amavis.org/</a>)"
  111 
  112 
  113 Exim 4.x
  114 ********
  115 
  116 +======================================================================+
  117 | (Please see instructions in README.exim_v4. The setup described here |
  118 | is not recommended with amavisd-new + Exim v4)                       |
  119 +======================================================================+
  120 
  121 
  122 The setup is very similar to the Exim 3.x one, so you should read
  123 this section first.
  124 
  125 
  126 # trusted users
  127 trusted_users = amavis
  128 
  129 
  130 Routers configuration:
  131 # in routers:
  132 
  133 amavis_router:
  134   condition = "${if eq {$received_protocol}{scanned-ok} {0}{1}}"
  135   driver = accept
  136   transport = amavis
  137   # verify must be set to false, to avoid troubles with receiver and/or
  138   # sender verify
  139   verify = false
  140 
  141 
  142 Transport configuration:
  143 
  144 After the
  145 
  146 remote_smtp:
  147   driver = smtp
  148 
  149 entry, add the following entry
  150 
  151 amavis:
  152    driver = smtp
  153    port = 10024
  154    hosts = 127.0.0.1
  155    allow_localhost
  156 
  157 Or the old variant via pipe to amavis(.c) helper program (not recommended):
  158 
  159 # amavis:
  160 #   driver = pipe
  161 #   command = "/usr/sbin/amavis <${sender_address}> ${pipe_addresses}"
  162 # # for debugging change return_output to true
  163 #   return_output = false
  164 #   return_path_add = false
  165 #   user = amavis
  166 #   group = amavis
  167 #   path = "/bin:/sbin:/usr/bin:/usr/sbin"
  168 #   current_directory = "/var/amavis"
  169 
  170 
  171 (based on a mail to exim-users by Niels Dettenbach)
  172 
  173 
  174 AMaViS via exim system filter
  175 *****************************
  176 
  177 This setup has not been tested by the AMaViS team yet. Feedback on this
  178 is very welcome! Based on a mail from Dariusz Sznajder to the amavis-
  179 user mailing list (<a href="http://marc.theaimsgroup.com/?l=amavis-user">http://marc.theaimsgroup.com/?l=amavis-user</a>&amp;m=102861263206738&amp;w=2)
  180 
  181 In exim/configure I have:
  182 	[...]
  183 	system_filter = /etc/exim.filter
  184 	system_filter_pipe_transport = amavis_pipe
  185 
  186 	[...]
  187 	amavis_pipe:
  188 	  driver = pipe
  189 	  user = amavis
  190 	  return_output
  191 	  headers_add = ${if def:authenticated_id {X-Authenticated-Sender: $authenticated_id}{}}
  192 
  193 	[...]
  194 
  195 /etc/exim.filter
  196 	# Exim filter
  197 
  198 	# drop out error messages here
  199 	if $received_protocol is "scanned-ok"
  200 	then
  201 	    finish
  202 	endif
  203 
  204 	pipe "/usr/sbin/amavis \"$sender_address\" \"$recipients\""
  205 
  206 
  207 AMaViS has to be configured as ./configure --enable-exim
  208 
  209 
  210 
  211 FAQ
  212 ---
  213 
  214 Q: Whenever I am receiving many mails in large batches (i.e. via
  215 UUCP or fetchmail), the system load on the machine on which AMaViS
  216 runs climbs to a level that renders the machine virtually unusable.
  217 How do I prevent such behaviour?
  218 
  219 A: The reason for the high load is that one AMaViS process (and in
  220 turn AMaViS' children processes) are started for every message that is
  221 received. The obvious solution is to limit the number of AMaViS
  222 processes that are started simultaniously.
  223 
  224 AMaViS does not currently support this itself, but every sensible MTA
  225 does. Moreover, it makes sense to limit the number of messages that an
  226 MTA can deliver at one time, to prevent mail server death by spamming.
  227 
  228 For Exim, the configuration keywords to look for are deliver_load_max,
  229 deliver_queue_load_max, and queue_only_load which control whether
  230 mails are delivered (read: passed to AMaViS) or queued only under high
  231 load. More detailed information can be found in the Exim
  232 Specification.
  233 
  234 
  235 Credits
  236 -------
  237 Philip Hazel, Marc Haber, John Burnham, Jeffrey C. Ollie, Hilko Bengen,
  238 Niels Dettenbach, Dariusz Sznajder
  239 
  240 
  241 TODO
  242 ----
  243 
  244 * whatever you whish to add here :-)
  245 
  246 Author
  247 ------
  248 Rainer Link
  249 eMail: <a href="mailto:Rainer.Link@suse.de">Rainer.Link@suse.de</a>
  250 WWW: <a href="http://rainer.w3.to">http://rainer.w3.to</a>
  251 
  252 Please send bug reports, questions, suggestions and more directly to
  253 the author. Thanks :-)
  254 
  255 Updated by Mark Martinec, based on suggestion
  256 in http://bugs.debian.org/213422 from Enrico