Advertisement
Guest User

Untitled

a guest
Aug 5th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.50 KB | None | 0 0
  1. ######################################################################
  2. # Runtime configuration file for Exim #
  3. ######################################################################
  4.  
  5.  
  6. # This is a default configuration file which will operate correctly in
  7. # uncomplicated installations. Please see the manual for a complete list
  8. # of all the runtime configuration options that can be included in a
  9. # configuration file. There are many more than are mentioned here. The
  10. # manual is in the file doc/spec.txt in the Exim distribution as a plain
  11. # ASCII file. Other formats (PostScript, Texinfo, HTML, PDF) are available
  12. # from the Exim ftp sites. The manual is also online at the Exim web sites.
  13.  
  14.  
  15. # This file is divided into several parts, all but the first of which are
  16. # headed by a line starting with the word "begin". Only those parts that
  17. # are required need to be present. Blank lines, and lines starting with #
  18. # are ignored.
  19.  
  20.  
  21. ########### IMPORTANT ########## IMPORTANT ########### IMPORTANT ###########
  22. # #
  23. # Whenever you change Exim's configuration file, you *must* remember to #
  24. # HUP the Exim daemon, because it will not pick up the new configuration #
  25. # until you do. However, any other Exim processes that are started, for #
  26. # example, a process started by an MUA in order to send a message, will #
  27. # see the new configuration as soon as it is in place. #
  28. # #
  29. # You do not need to HUP the daemon for changes in auxiliary files that #
  30. # are referenced from this file. They are read every time they are used. #
  31. # #
  32. # It is usually a good idea to test a new configuration for syntactic #
  33. # correctness before installing it (for example, by running the command #
  34. # "exim -C /config/file.new -bV"). #
  35. # #
  36. ########### IMPORTANT ########## IMPORTANT ########### IMPORTANT ###########
  37.  
  38.  
  39.  
  40. ######################################################################
  41. # MAIN CONFIGURATION SETTINGS #
  42. ######################################################################
  43.  
  44. # Specify your host's canonical name here. This should normally be the fully
  45. # qualified "official" name of your host. If this option is not set, the
  46. # uname() function is called to obtain the name. In many cases this does
  47. # the right thing and you need not set anything explicitly.
  48.  
  49. # primary_hostname =
  50.  
  51.  
  52. # The next three settings create two lists of domains and one list of hosts.
  53. # These lists are referred to later in this configuration using the syntax
  54. # +local_domains, +relay_to_domains, and +relay_from_hosts, respectively. They
  55. # are all colon-separated lists:
  56.  
  57. domainlist local_domains = @ : localhost : localhost.localdomain
  58. domainlist relay_to_domains = example.com
  59. hostlist relay_from_hosts = localhost
  60. # (We rely upon hostname resolution working for localhost, because the default
  61. # uncommented configuration needs to work in IPv4-only environments.)
  62.  
  63. # Most straightforward access control requirements can be obtained by
  64. # appropriate settings of the above options. In more complicated situations,
  65. # you may need to modify the Access Control Lists (ACLs) which appear later in
  66. # this file.
  67.  
  68. # The first setting specifies your local domains, for example:
  69. #
  70. # domainlist local_domains = my.first.domain : my.second.domain
  71. #
  72. # You can use "@" to mean "the name of the local host", as in the default
  73. # setting above. This is the name that is specified by primary_hostname,
  74. # as specified above (or defaulted). If you do not want to do any local
  75. # deliveries, remove the "@" from the setting above. If you want to accept mail
  76. # addressed to your host's literal IP address, for example, mail addressed to
  77. # "user@[192.168.23.44]", you can add "@[]" as an item in the local domains
  78. # list. You also need to uncomment "allow_domain_literals" below. This is not
  79. # recommended for today's Internet.
  80.  
  81. # The second setting specifies domains for which your host is an incoming relay.
  82. # If you are not doing any relaying, you should leave the list empty. However,
  83. # if your host is an MX backup or gateway of some kind for some domains, you
  84. # must set relay_to_domains to match those domains. For example:
  85. #
  86. # domainlist relay_to_domains = *.myco.com : my.friend.org
  87. #
  88. # This will allow any host to relay through your host to those domains.
  89. # See the section of the manual entitled "Control of relaying" for more
  90. # information.
  91.  
  92. # The third setting specifies hosts that can use your host as an outgoing relay
  93. # to any other host on the Internet. Such a setting commonly refers to a
  94. # complete local network as well as the localhost. For example:
  95. #
  96. # hostlist relay_from_hosts = <; 127.0.0.1 ; ::1 ; 192.168.0.0/16
  97. #
  98. # The "/16" is a bit mask (CIDR notation), not a number of hosts. Note that you
  99. # have to include 127.0.0.1 if you want to allow processes on your host to send
  100. # SMTP mail by using the loopback address. A number of MUAs use this method of
  101. # sending mail. Often, connections are made to "localhost", which might be ::1
  102. # on IPv6-enabled hosts. Do not forget CIDR for your IPv6 networks.
  103.  
  104. # All three of these lists may contain many different kinds of item, including
  105. # wildcarded names, regular expressions, and file lookups. See the reference
  106. # manual for details. The lists above are used in the access control lists for
  107. # checking incoming messages. The names of these ACLs are defined here:
  108.  
  109. acl_smtp_mail = acl_check_mail
  110. acl_smtp_rcpt = acl_check_rcpt
  111. acl_smtp_data = acl_check_data
  112. acl_smtp_mime = acl_check_mime
  113.  
  114. # You should not change those settings until you understand how ACLs work.
  115.  
  116.  
  117. # If you are running a version of Exim that was compiled with the content-
  118. # scanning extension, you can cause incoming messages to be automatically
  119. # scanned for viruses. You have to modify the configuration in two places to
  120. # set this up. The first of them is here, where you define the interface to
  121. # your scanner. This example is typical for ClamAV; see the manual for details
  122. # of what to set for other virus scanners. The second modification is in the
  123. # acl_check_data access control list (see below).
  124.  
  125. av_scanner = clamd:/var/run/clamd.exim/clamd.sock
  126.  
  127.  
  128. # For spam scanning, there is a similar option that defines the interface to
  129. # SpamAssassin. You do not need to set this if you are using the default, which
  130. # is shown in this commented example. As for virus scanning, you must also
  131. # modify the acl_check_data access control list to enable spam scanning.
  132.  
  133. # spamd_address = 127.0.0.1 783
  134.  
  135.  
  136. # If Exim is compiled with support for TLS, you may want to enable the
  137. # following options so that Exim allows clients to make encrypted
  138. # connections. In the authenticators section below, there are template
  139. # configurations for plaintext username/password authentication. This kind
  140. # of authentication is only safe when used within a TLS connection, so the
  141. # authenticators will only work if the following TLS settings are turned on
  142. # as well.
  143.  
  144. # Allow any client to use TLS.
  145.  
  146. tls_advertise_hosts = *
  147.  
  148. # Specify the location of the Exim server's TLS certificate and private key.
  149. # The private key must not be encrypted (password protected). You can put
  150. # the certificate and private key in the same file, in which case you only
  151. # need the first setting, or in separate files, in which case you need both
  152. # options.
  153.  
  154. tls_certificate = /etc/pki/tls/certs/exim.pem
  155. tls_privatekey = /etc/pki/tls/private/exim.pem
  156.  
  157. # In order to support roaming users who wish to send email from anywhere,
  158. # you may want to make Exim listen on other ports as well as port 25, in
  159. # case these users need to send email from a network that blocks port 25.
  160. # The standard port for this purpose is port 587, the "message submission"
  161. # port. See RFC 4409 for details. Microsoft MUAs cannot be configured to
  162. # talk the message submission protocol correctly, so if you need to support
  163. # them you should also allow TLS-on-connect on the traditional but
  164. # non-standard port 465.
  165.  
  166. daemon_smtp_ports = 25 : 465 : 587
  167. tls_on_connect_ports = 465
  168.  
  169.  
  170. # Specify the domain you want to be added to all unqualified addresses
  171. # here. An unqualified address is one that does not contain an "@" character
  172. # followed by a domain. For example, "caesar@rome.example" is a fully qualified
  173. # address, but the string "caesar" (i.e. just a login name) is an unqualified
  174. # email address. Unqualified addresses are accepted only from local callers by
  175. # default. See the recipient_unqualified_hosts option if you want to permit
  176. # unqualified addresses from remote sources. If this option is not set, the
  177. # primary_hostname value is used for qualification.
  178.  
  179. # qualify_domain =
  180.  
  181.  
  182. # If you want unqualified recipient addresses to be qualified with a different
  183. # domain to unqualified sender addresses, specify the recipient domain here.
  184. # If this option is not set, the qualify_domain value is used.
  185.  
  186. # qualify_recipient =
  187.  
  188.  
  189. # The following line must be uncommented if you want Exim to recognize
  190. # addresses of the form "user@[10.11.12.13]" that is, with a "domain literal"
  191. # (an IP address) instead of a named domain. The RFCs still require this form,
  192. # but it makes little sense to permit mail to be sent to specific hosts by
  193. # their IP address in the modern Internet. This ancient format has been used
  194. # by those seeking to abuse hosts by using them for unwanted relaying. If you
  195. # really do want to support domain literals, uncomment the following line, and
  196. # see also the "domain_literal" router below.
  197.  
  198. # allow_domain_literals
  199.  
  200.  
  201. # No deliveries will ever be run under the uids of users specified by
  202. # never_users (a colon-separated list). An attempt to do so causes a panic
  203. # error to be logged, and the delivery to be deferred. This is a paranoic
  204. # safety catch. There is an even stronger safety catch in the form of the
  205. # FIXED_NEVER_USERS setting in the configuration for building Exim. The list of
  206. # users that it specifies is built into the binary, and cannot be changed. The
  207. # option below just adds additional users to the list. The default for
  208. # FIXED_NEVER_USERS is "root", but just to be absolutely sure, the default here
  209. # is also "root".
  210.  
  211. # Note that the default setting means you cannot deliver mail addressed to root
  212. # as if it were a normal user. This isn't usually a problem, as most sites have
  213. # an alias for root that redirects such mail to a human administrator.
  214.  
  215. never_users = root
  216.  
  217.  
  218. # The setting below causes Exim to do a reverse DNS lookup on all incoming
  219. # IP calls, in order to get the true host name. If you feel this is too
  220. # expensive, you can specify the networks for which a lookup is done, or
  221. # remove the setting entirely.
  222.  
  223. host_lookup = *
  224.  
  225. # This setting, if uncommented, allows users to authenticate using
  226. # their system passwords against saslauthd if they connect over a
  227. # secure connection. If you have network logins such as NIS or
  228. # Kerberos rather than only local users, then you possibly also want
  229. # to configure /etc/sysconfig/saslauthd to use the 'pam' mechanism
  230. # too. Once a user is authenticated, the acl_check_rcpt ACL then
  231. # allows them to relay through the system.
  232. #
  233. # auth_advertise_hosts = ${if eq {$tls_cipher}{}{}{*}}
  234. #
  235. # By default, we set this option to allow SMTP AUTH from nowhere
  236. # (Exim's default would be to allow it from anywhere, even on an
  237. # unencrypted connection).
  238. #
  239. # Comment this one out if you uncomment the above. Did you make sure
  240. # saslauthd is actually running first?
  241. #
  242. auth_advertise_hosts =
  243.  
  244. # The settings below, which are actually the same as the defaults in the
  245. # code, cause Exim to make RFC 1413 (ident) callbacks for all incoming SMTP
  246. # calls. You can limit the hosts to which these calls are made, and/or change
  247. # the timeout that is used. If you set the timeout to zero, all RFC 1413 calls
  248. # are disabled. RFC 1413 calls are cheap and can provide useful information
  249. # for tracing problem messages, but some hosts and firewalls have problems
  250. # with them. This can result in a timeout instead of an immediate refused
  251. # connection, leading to delays on starting up SMTP sessions. (The default was
  252. # reduced from 30s to 5s for release 4.61.)
  253.  
  254. rfc1413_hosts = *
  255. rfc1413_query_timeout = 5s
  256.  
  257.  
  258. # By default, Exim expects all envelope addresses to be fully qualified, that
  259. # is, they must contain both a local part and a domain. If you want to accept
  260. # unqualified addresses (just a local part) from certain hosts, you can specify
  261. # these hosts by setting one or both of
  262. #
  263. # sender_unqualified_hosts =
  264. # recipient_unqualified_hosts =
  265. #
  266. # to control sender and recipient addresses, respectively. When this is done,
  267. # unqualified addresses are qualified using the settings of qualify_domain
  268. # and/or qualify_recipient (see above).
  269.  
  270.  
  271. # If you want Exim to support the "percent hack" for certain domains,
  272. # uncomment the following line and provide a list of domains. The "percent
  273. # hack" is the feature by which mail addressed to x%y@z (where z is one of
  274. # the domains listed) is locally rerouted to x@y and sent on. If z is not one
  275. # of the "percent hack" domains, x%y is treated as an ordinary local part. This
  276. # hack is rarely needed nowadays; you should not enable it unless you are sure
  277. # that you really need it.
  278. #
  279. # percent_hack_domains =
  280. #
  281. # As well as setting this option you will also need to remove the test
  282. # for local parts containing % in the ACL definition below.
  283.  
  284.  
  285. # When Exim can neither deliver a message nor return it to sender, it "freezes"
  286. # the delivery error message (aka "bounce message"). There are also other
  287. # circumstances in which messages get frozen. They will stay on the queue for
  288. # ever unless one of the following options is set.
  289.  
  290. # This option unfreezes frozen bounce messages after two days, tries
  291. # once more to deliver them, and ignores any delivery failures.
  292.  
  293. ignore_bounce_errors_after = 2d
  294.  
  295. # This option cancels (removes) frozen messages that are older than a week.
  296.  
  297. timeout_frozen_after = 7d
  298.  
  299.  
  300. # By default, messages that are waiting on Exim's queue are all held in a
  301. # single directory called "input" which it itself within Exim's spool
  302. # directory. (The default spool directory is specified when Exim is built, and
  303. # is often /var/spool/exim/.) Exim works best when its queue is kept short, but
  304. # there are circumstances where this is not always possible. If you uncomment
  305. # the setting below, messages on the queue are held in 62 subdirectories of
  306. # "input" instead of all in the same directory. The subdirectories are called
  307. # 0, 1, ... A, B, ... a, b, ... z. This has two benefits: (1) If your file
  308. # system degrades with many files in one directory, this is less likely to
  309. # happen; (2) Exim can process the queue one subdirectory at a time instead of
  310. # all at once, which can give better performance with large queues.
  311.  
  312. # split_spool_directory = true
  313.  
  314.  
  315. # If you're in a part of the world where ASCII is not sufficient for most
  316. # text, then you're probably familiar with RFC2047 message header extensions.
  317. # By default, Exim adheres to the specification, including a limit of 76
  318. # characters to a line, with encoded words fitting within a line.
  319. # If you wish to use decoded headers in message filters in such a way
  320. # that successful decoding of malformed messages matters, you may wish to
  321. # configure Exim to be more lenient.
  322. #
  323. # check_rfc2047_length = false
  324. #
  325. # In particular, the Exim maintainers have had multiple reports of problems
  326. # from Russian administrators of issues until they disable this check,
  327. # because of some popular, yet buggy, mail composition software.
  328.  
  329.  
  330. # If you wish to be strictly RFC compliant, or if you know you'll be
  331. # exchanging email with systems that are not 8-bit clean, then you may
  332. # wish to disable advertising 8BITMIME. Uncomment this option to do so.
  333.  
  334. # accept_8bitmime = false
  335.  
  336.  
  337. # Exim does not make use of environment variables itself. However,
  338. # libraries that Exim uses (e.g. LDAP) depend on specific environment settings.
  339. # There are two lists: keep_environment for the variables we trust, and
  340. # add_environment for variables we want to set to a specific value.
  341. # Note that TZ is handled separateley by the timezone runtime option
  342. # and TIMEZONE_DEFAULT buildtime option.
  343.  
  344. keep_environment = ^LDAP
  345. add_environment = PATH=/usr/bin::/bin
  346.  
  347. bounce_return_message = true
  348. bounce_return_body = false
  349.  
  350. delay_warning = 12h:24h
  351.  
  352. ######################################################################
  353. # ACL CONFIGURATION #
  354. # Specifies access control lists for incoming SMTP mail #
  355. ######################################################################
  356.  
  357. begin acl
  358.  
  359.  
  360. # This access control list is used for the MAIL command in an incoming
  361. # SMTP message.
  362.  
  363. acl_check_mail:
  364.  
  365. # Hosts are required to say HELO (or EHLO) before sending mail.
  366. # So don't allow them to use the MAIL command if they haven't
  367. # done so.
  368.  
  369. deny condition = ${if eq{$sender_helo_name}{} {1}}
  370. message = Nice boys say HELO first
  371.  
  372. # Use the lack of reverse DNS to trigger greylisting. Some people
  373. # even reject for it but that would be a little excessive.
  374.  
  375. warn condition = ${if eq{$sender_host_name}{} {1}}
  376. set acl_m_greylistreasons = Host $sender_host_address lacks reverse DNS\n$acl_m_greylistreasons
  377.  
  378. accept
  379.  
  380.  
  381.  
  382. # This access control list is used for every RCPT command in an incoming
  383. # SMTP message. The tests are run in order until the address is either
  384. # accepted or denied.
  385.  
  386. acl_check_rcpt:
  387.  
  388. # Accept if the source is local SMTP (i.e. not over TCP/IP). We do this by
  389. # testing for an empty sending host field.
  390.  
  391. accept hosts = :
  392. control = dkim_disable_verify
  393.  
  394. #############################################################################
  395. # The following section of the ACL is concerned with local parts that contain
  396. # @ or % or ! or / or | or dots in unusual places.
  397. #
  398. # The characters other than dots are rarely found in genuine local parts, but
  399. # are often tried by people looking to circumvent relaying restrictions.
  400. # Therefore, although they are valid in local parts, these rules lock them
  401. # out, as a precaution.
  402. #
  403. # Empty components (two dots in a row) are not valid in RFC 2822, but Exim
  404. # allows them because they have been encountered. (Consider local parts
  405. # constructed as "firstinitial.secondinitial.familyname" when applied to
  406. # someone like me, who has no second initial.) However, a local part starting
  407. # with a dot or containing /../ can cause trouble if it is used as part of a
  408. # file name (e.g. for a mailing list). This is also true for local parts that
  409. # contain slashes. A pipe symbol can also be troublesome if the local part is
  410. # incorporated unthinkingly into a shell command line.
  411. #
  412. # Two different rules are used. The first one is stricter, and is applied to
  413. # messages that are addressed to one of the local domains handled by this
  414. # host. The line "domains = +local_domains" restricts it to domains that are
  415. # defined by the "domainlist local_domains" setting above. The rule blocks
  416. # local parts that begin with a dot or contain @ % ! / or |. If you have
  417. # local accounts that include these characters, you will have to modify this
  418. # rule.
  419.  
  420. deny message = Restricted characters in address
  421. domains = +local_domains
  422. local_parts = ^[.] : ^.*[@%!/|]
  423.  
  424. # The second rule applies to all other domains, and is less strict. The line
  425. # "domains = !+local_domains" restricts it to domains that are NOT defined by
  426. # the "domainlist local_domains" setting above. The exclamation mark is a
  427. # negating operator. This rule allows your own users to send outgoing
  428. # messages to sites that use slashes and vertical bars in their local parts.
  429. # It blocks local parts that begin with a dot, slash, or vertical bar, but
  430. # allows these characters within the local part. However, the sequence /../
  431. # is barred. The use of @ % and ! is blocked, as before. The motivation here
  432. # is to prevent your users (or your users' viruses) from mounting certain
  433. # kinds of attack on remote sites.
  434.  
  435. deny message = Restricted characters in address
  436. domains = !+local_domains
  437. local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
  438. #############################################################################
  439.  
  440. # Accept mail to postmaster in any local domain, regardless of the source,
  441. # and without verifying the sender.
  442.  
  443. accept local_parts = postmaster
  444. domains = +local_domains
  445.  
  446. # Deny unless the sender address can be routed. For proper verification of the
  447. # address, read the documentation on callouts and add the /callout modifier.
  448.  
  449. require verify = sender
  450.  
  451. # Accept if the message comes from one of the hosts for which we are an
  452. # outgoing relay. It is assumed that such hosts are most likely to be MUAs,
  453. # so we set control=submission to make Exim treat the message as a
  454. # submission. It will fix up various errors in the message, for example, the
  455. # lack of a Date: header line. If you are actually relaying out out from
  456. # MTAs, you may want to disable this. If you are handling both relaying from
  457. # MTAs and submissions from MUAs you should probably split them into two
  458. # lists, and handle them differently.
  459.  
  460. # Recipient verification is omitted here, because in many cases the clients
  461. # are dumb MUAs that don't cope well with SMTP error responses. If you are
  462. # actually relaying out from MTAs, you should probably add recipient
  463. # verification here.
  464.  
  465. # Note that, by putting this test before any DNS black list checks, you will
  466. # always accept from these hosts, even if they end up on a black list. The
  467. # assumption is that they are your friends, and if they get onto a black
  468. # list, it is a mistake.
  469.  
  470. accept hosts = +relay_from_hosts
  471. control = submission
  472. control = dkim_disable_verify
  473.  
  474. # Accept if the message arrived over an authenticated connection, from
  475. # any host. Again, these messages are usually from MUAs, so recipient
  476. # verification is omitted, and submission mode is set. And again, we do this
  477. # check before any black list tests.
  478.  
  479. accept authenticated = *
  480. control = submission
  481. control = dkim_disable_verify
  482.  
  483. # Insist that any other recipient address that we accept is either in one of
  484. # our local domains, or is in a domain for which we explicitly allow
  485. # relaying. Any other domain is rejected as being unacceptable for relaying.
  486.  
  487. require message = relay not permitted
  488. domains = +local_domains : +relay_to_domains
  489.  
  490. # We also require all accepted addresses to be verifiable. This check will
  491. # do local part verification for local domains, but only check the domain
  492. # for remote domains. The only way to check local parts for the remote
  493. # relay domains is to use a callout (add /callout), but please read the
  494. # documentation about callouts before doing this.
  495.  
  496. require verify = recipient
  497.  
  498. #############################################################################
  499. # There are no default checks on DNS black lists because the domains that
  500. # contain these lists are changing all the time. However, here are two
  501. # examples of how you can get Exim to perform a DNS black list lookup at this
  502. # point. The first one denies, whereas the second just warns. The third
  503. # triggers greylisting for any host in the blacklist.
  504. #
  505. # deny message = rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
  506. # dnslists = black.list.example
  507. #
  508. # warn dnslists = black.list.example
  509. # add_header = X-Warning: $sender_host_address is in a black list at $dnslist_domain
  510. # log_message = found in $dnslist_domain
  511. #
  512. # warn dnslists = black.list.example
  513. # set acl_m_greylistreasons = Host found in $dnslist_domain\n$acl_m_greylistreasons
  514. #
  515. #############################################################################
  516.  
  517. #############################################################################
  518. # This check is commented out because it is recognized that not every
  519. # sysadmin will want to do it. If you enable it, the check performs
  520. # Client SMTP Authorization (csa) checks on the sending host. These checks
  521. # do DNS lookups for SRV records. The CSA proposal is currently (May 2005)
  522. # an Internet draft. You can, of course, add additional conditions to this
  523. # ACL statement to restrict the CSA checks to certain hosts only.
  524. #
  525. # require verify = csa
  526. #############################################################################
  527.  
  528. # Alternatively, greylist for it:
  529. # warn !verify = csa
  530. # set acl_m_greylistreasons = Host failed CSA check\n$acl_m_greylistreasons
  531.  
  532. # At this point, the address has passed all the checks that have been
  533. # configured, so we accept it unconditionally.
  534.  
  535. accept
  536.  
  537.  
  538. # This ACL is used after the contents of a message have been received. This
  539. # is the ACL in which you can test a message's headers or body, and in
  540. # particular, this is where you can invoke external virus or spam scanners.
  541. # Some suggested ways of configuring these tests are shown below, commented
  542. # out. Without any tests, this ACL accepts all messages. If you want to use
  543. # such tests, you must ensure that Exim is compiled with the content-scanning
  544. # extension (WITH_CONTENT_SCAN=yes in Local/Makefile).
  545.  
  546. acl_check_data:
  547.  
  548. # Put simple tests first. A good one is to check for the presence of a
  549. # Message-Id: header, which RFC2822 says SHOULD be present. Some broken
  550. # or misconfigured mailer software occasionally omits this from genuine
  551. # messages too, though -- although it's not hard for the offender to fix
  552. # after they receive a bounce because of it.
  553. #
  554. # deny condition = ${if !def:h_Message-ID: {1}}
  555. # message = RFC2822 says that all mail SHOULD have a Message-ID header.\n\
  556. # Most messages without it are spam, so your mail has been rejected.
  557. #
  558. # Alternatively if we're feeling more lenient we could just use it to
  559. # trigger greylisting instead:
  560.  
  561. warn condition = ${if !def:h_Message-ID: {1}}
  562. set acl_m_greylistreasons = Message lacks Message-Id: header. Consult RFC2822.\n$acl_m_greylistreasons
  563.  
  564. # Deny if the message contains a virus. Before enabling this check, you
  565. # must install a virus scanner and set the av_scanner option above.
  566. #
  567. # deny malware = *
  568. # message = This message contains a virus ($malware_name).
  569.  
  570. # Bypass SpamAssassin checks if the message is too large.
  571. #
  572. # accept condition = ${if >={$message_size}{100000} {1}}
  573. # add_header = X-Spam-Note: SpamAssassin run bypassed due to message size
  574.  
  575. # Run SpamAssassin, but allow for it to fail or time out. Add a warning message
  576. # and accept the mail if that happens. Add an X-Spam-Flag: header if the SA
  577. # score exceeds the SA system threshold.
  578. #
  579. # warn spam = nobody/defer_ok
  580. # add_header = X-Spam-Flag: YES
  581. #
  582. # accept condition = ${if !def:spam_score_int {1}}
  583. # add_header = X-Spam-Note: SpamAssassin invocation failed
  584. #
  585.  
  586. # Unconditionally add score and report headers
  587. #
  588. # warn add_header = X-Spam-Score: $spam_score ($spam_bar)\n\
  589. # X-Spam-Report: $spam_report
  590.  
  591. # And reject if the SpamAssassin score is greater than ten
  592. #
  593. # deny condition = ${if >{$spam_score_int}{100} {1}}
  594. # message = Your message scored $spam_score SpamAssassin point. Report follows:\n\
  595. # $spam_report
  596.  
  597. # Trigger greylisting (if enabled) if the SpamAssassin score is greater than 0.5
  598. #
  599. # warn condition = ${if >{$spam_score_int}{5} {1}}
  600. # set acl_m_greylistreasons = Message has $spam_score SpamAssassin points\n$acl_m_greylistreasons
  601.  
  602.  
  603. # If you want to greylist _all_ mail rather than only mail which looks like there
  604. # might be something wrong with it, then you can do this...
  605. #
  606. # warn set acl_m_greylistreasons = We greylist all mail\n$acl_m_greylistreasons
  607.  
  608. # Now, invoke the greylisting. For this you need to have installed the exim-greylist
  609. # package which contains this subroutine, and you need to uncomment the bit below
  610. # which includes it too. Whenever the $acl_m_greylistreasons variable is non-empty,
  611. # greylisting will kick in and will defer the mail to check if the sender is a
  612. # proper mail which which retries, or whether it's a zombie. For more details, see
  613. # the exim-greylist.conf.inc file itself.
  614. #
  615. # require acl = greylist_mail
  616.  
  617. accept
  618.  
  619. # To enable the greylisting, also uncomment this line:
  620. # .include /etc/exim/exim-greylist.conf.inc
  621.  
  622. acl_check_mime:
  623.  
  624. # File extension filtering.
  625. deny message = Blacklisted file extension detected
  626. condition = ${if match \
  627. {${lc:$mime_filename}} \
  628. {\N(\.exe|\.pif|\.bat|\.scr|\.lnk|\.com)$\N} \
  629. {1}{0}}
  630.  
  631. accept
  632.  
  633.  
  634. ######################################################################
  635. # ROUTERS CONFIGURATION #
  636. # Specifies how addresses are handled #
  637. ######################################################################
  638. # THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT! #
  639. # An address is passed to each router in turn until it is accepted. #
  640. ######################################################################
  641.  
  642. begin routers
  643.  
  644. # This router routes to remote hosts over SMTP by explicit IP address,
  645. # when an email address is given in "domain literal" form, for example,
  646. # <user@[192.168.35.64]>. The RFCs require this facility. However, it is
  647. # little-known these days, and has been exploited by evil people seeking
  648. # to abuse SMTP relays. Consequently it is commented out in the default
  649. # configuration. If you uncomment this router, you also need to uncomment
  650. # allow_domain_literals above, so that Exim can recognize the syntax of
  651. # domain literal addresses.
  652.  
  653. # domain_literal:
  654. # driver = ipliteral
  655. # domains = ! +local_domains
  656. # transport = remote_smtp
  657.  
  658.  
  659. # This router routes addresses that are not in local domains by doing a DNS
  660. # lookup on the domain name. The exclamation mark that appears in "domains = !
  661. # +local_domains" is a negating operator, that is, it can be read as "not". The
  662. # recipient's domain must not be one of those defined by "domainlist
  663. # local_domains" above for this router to be used.
  664. #
  665. # If the router is used, any domain that resolves to 0.0.0.0 or to a loopback
  666. # interface address (127.0.0.0/8) is treated as if it had no DNS entry. Note
  667. # that 0.0.0.0 is the same as 0.0.0.0/32, which is commonly treated as the
  668. # local host inside the network stack. It is not 0.0.0.0/0, the default route.
  669. # If the DNS lookup fails, no further routers are tried because of the no_more
  670. # setting, and consequently the address is unrouteable.
  671.  
  672. dnslookup:
  673. driver = dnslookup
  674. domains = ! +local_domains
  675. transport = remote_smtp
  676. ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  677. # if ipv6-enabled then instead use:
  678. # ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
  679. no_more
  680.  
  681.  
  682. # This alternative router can be used when you want to send all mail to a
  683. # server which handles DNS lookups for you; an ISP will typically run such
  684. # a server for their customers. If you uncomment "smarthost" then you
  685. # should comment out "dnslookup" above. Setting a real hostname in route_data
  686. # wouldn't hurt either.
  687.  
  688. # smarthost:
  689. # driver = manualroute
  690. # domains = ! +local_domains
  691. # transport = remote_smtp
  692. # route_data = MAIL.HOSTNAME.FOR.CENTRAL.SERVER.EXAMPLE
  693. # ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
  694. # no_more
  695.  
  696.  
  697. # The remaining routers handle addresses in the local domain(s), that is those
  698. # domains that are defined by "domainlist local_domains" above.
  699.  
  700.  
  701. # This router handles aliasing using a linearly searched alias file with the
  702. # name SYSTEM_ALIASES_FILE. When this configuration is installed automatically,
  703. # the name gets inserted into this file from whatever is set in Exim's
  704. # build-time configuration. The default path is the traditional /etc/aliases.
  705. # If you install this configuration by hand, you need to specify the correct
  706. # path in the "data" setting below.
  707. #
  708. ##### NB You must ensure that the alias file exists. It used to be the case
  709. ##### NB that every Unix had that file, because it was the Sendmail default.
  710. ##### NB These days, there are systems that don't have it. Your aliases
  711. ##### NB file should at least contain an alias for "postmaster".
  712. #
  713. # If any of your aliases expand to pipes or files, you will need to set
  714. # up a user and a group for these deliveries to run under. You can do
  715. # this by uncommenting the "user" option below (changing the user name
  716. # as appropriate) and adding a "group" option if necessary. Alternatively, you
  717. # can specify "user" on the transports that are used. Note that the transports
  718. # listed below are the same as are used for .forward files; you might want
  719. # to set up different ones for pipe and file deliveries from aliases.
  720.  
  721. system_aliases:
  722. driver = redirect
  723. allow_fail
  724. allow_defer
  725. data = ${lookup{$local_part}lsearch{/etc/aliases}}
  726. # user = exim
  727. file_transport = address_file
  728. pipe_transport = address_pipe
  729.  
  730.  
  731. # This router handles forwarding using traditional .forward files in users'
  732. # home directories. If you want it also to allow mail filtering when a forward
  733. # file starts with the string "# Exim filter" or "# Sieve filter", uncomment
  734. # the "allow_filter" option.
  735.  
  736. # The no_verify setting means that this router is skipped when Exim is
  737. # verifying addresses. Similarly, no_expn means that this router is skipped if
  738. # Exim is processing an EXPN command.
  739.  
  740. # If you want this router to treat local parts with suffixes introduced by "-"
  741. # or "+" characters as if the suffixes did not exist, uncomment the two local_
  742. # part_suffix options. Then, for example, xxxx-foo@your.domain will be treated
  743. # in the same way as xxxx@your.domain by this router. Because this router is
  744. # not used for verification, if you choose to uncomment those options, then you
  745. # will *need* to make the same change to the localuser router. (There are
  746. # other approaches, if this is undesirable, but they add complexity).
  747.  
  748. # The check_ancestor option means that if the forward file generates an
  749. # address that is an ancestor of the current one, the current one gets
  750. # passed on instead. This covers the case where A is aliased to B and B
  751. # has a .forward file pointing to A.
  752.  
  753. # The three transports specified at the end are those that are used when
  754. # forwarding generates a direct delivery to a file, or to a pipe, or sets
  755. # up an auto-reply, respectively.
  756.  
  757. userforward:
  758. driver = redirect
  759. check_local_user
  760. # local_part_suffix = +* : -*
  761. # local_part_suffix_optional
  762. file = $home/.forward
  763. allow_filter
  764. no_verify
  765. no_expn
  766. check_ancestor
  767. file_transport = address_file
  768. pipe_transport = address_pipe
  769. reply_transport = address_reply
  770.  
  771. procmail:
  772. driver = accept
  773. check_local_user
  774. require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
  775. transport = procmail
  776. no_verify
  777.  
  778. # This router matches local user mailboxes. If the router fails, the error
  779. # message is "Unknown user".
  780.  
  781. # If you want this router to treat local parts with suffixes introduced by "-"
  782. # or "+" characters as if the suffixes did not exist, uncomment the two local_
  783. # part_suffix options. Then, for example, xxxx-foo@your.domain will be treated
  784. # in the same way as xxxx@your.domain by this router.
  785.  
  786. localuser:
  787. driver = accept
  788. check_local_user
  789. # local_part_suffix = +* : -*
  790. # local_part_suffix_optional
  791. transport = local_delivery
  792. cannot_route_message = Unknown user
  793.  
  794.  
  795.  
  796. ######################################################################
  797. # TRANSPORTS CONFIGURATION #
  798. ######################################################################
  799. # ORDER DOES NOT MATTER #
  800. # Only one appropriate transport is called for each delivery. #
  801. ######################################################################
  802.  
  803. # A transport is used only when referenced from a router that successfully
  804. # handles an address.
  805.  
  806. begin transports
  807.  
  808.  
  809. # This transport is used for delivering messages over SMTP connections.
  810.  
  811. remote_smtp:
  812. driver = smtp
  813.  
  814. # This transport is used for delivering messages over SMTP using the
  815. # "message submission" port (RFC4409).
  816.  
  817. remote_msa:
  818. driver = smtp
  819. port = 587
  820. hosts_require_auth = *
  821.  
  822.  
  823. # This transport invokes procmail to deliver mail
  824. procmail:
  825. driver = pipe
  826. command = "/usr/bin/procmail -d $local_part"
  827. return_path_add
  828. delivery_date_add
  829. envelope_to_add
  830. user = $local_part
  831. initgroups
  832. return_output
  833.  
  834. # This transport is used for local delivery to user mailboxes in traditional
  835. # BSD mailbox format. By default it will be run under the uid and gid of the
  836. # local user, and requires the sticky bit to be set on the /var/mail directory.
  837. # Some systems use the alternative approach of running mail deliveries under a
  838. # particular group instead of using the sticky bit. The commented options below
  839. # show how this can be done.
  840.  
  841. local_delivery:
  842. driver = appendfile
  843. file = /var/mail/$local_part
  844. delivery_date_add
  845. envelope_to_add
  846. return_path_add
  847. group = mail
  848. mode = 0660
  849.  
  850.  
  851. # This transport is used for handling pipe deliveries generated by alias or
  852. # .forward files. If the pipe generates any standard output, it is returned
  853. # to the sender of the message as a delivery error. Set return_fail_output
  854. # instead of return_output if you want this to happen only when the pipe fails
  855. # to complete normally. You can set different transports for aliases and
  856. # forwards if you want to - see the references to address_pipe in the routers
  857. # section above.
  858.  
  859. address_pipe:
  860. driver = pipe
  861. return_output
  862.  
  863.  
  864. # This transport is used for handling deliveries directly to files that are
  865. # generated by aliasing or forwarding.
  866.  
  867. address_file:
  868. driver = appendfile
  869. delivery_date_add
  870. envelope_to_add
  871. return_path_add
  872.  
  873.  
  874. # This transport is used for handling autoreplies generated by the filtering
  875. # option of the userforward router.
  876.  
  877. address_reply:
  878. driver = autoreply
  879.  
  880.  
  881. # This transport is used to deliver local mail to cyrus IMAP server via UNIX
  882. # socket. You'll need to configure the 'localuser' router above to use it.
  883. #
  884. #lmtp_delivery:
  885. # home_directory = /var/spool/imap
  886. # driver = lmtp
  887. # command = "/usr/lib/cyrus-imapd/deliver -l"
  888. # batch_max = 20
  889. # user = cyrus
  890.  
  891.  
  892. ######################################################################
  893. # RETRY CONFIGURATION #
  894. ######################################################################
  895.  
  896. begin retry
  897.  
  898. # This single retry rule applies to all domains and all errors. It specifies
  899. # retries every 15 minutes for 2 hours, then increasing retry intervals,
  900. # starting at 1 hour and increasing each time by a factor of 1.5, up to 16
  901. # hours, then retries every 6 hours until 4 days have passed since the first
  902. # failed delivery.
  903.  
  904. # WARNING: If you do not have any retry rules at all (this section of the
  905. # configuration is non-existent or empty), Exim will not do any retries of
  906. # messages that fail to get delivered at the first attempt. The effect will
  907. # be to treat temporary errors as permanent. Therefore, DO NOT remove this
  908. # retry rule unless you really don't want any retries.
  909.  
  910. # Address or Domain Error Retries
  911. # ----------------- ----- -------
  912.  
  913. * * F,1d,15m; F,7d,1h
  914.  
  915.  
  916. ######################################################################
  917. # REWRITE CONFIGURATION #
  918. ######################################################################
  919.  
  920. # There are no rewriting specifications in this default configuration file.
  921.  
  922. begin rewrite
  923.  
  924.  
  925.  
  926. ######################################################################
  927. # AUTHENTICATION CONFIGURATION #
  928. ######################################################################
  929.  
  930. begin authenticators
  931.  
  932. # This authenticator supports CRAM-MD5 username/password authentication
  933. # with Exim acting as a _client_, as it might when sending its outgoing
  934. # mail to a smarthost rather than directly to the final recipient.
  935. # Replace SMTPAUTH_USERNAME and SMTPAUTH_PASSWORD as appropriate.
  936.  
  937. #client_auth:
  938. # driver = cram_md5
  939. # public_name = CRAM-MD5
  940. # client_name = SMTPAUTH_USERNAME
  941. # client_secret = SMTPAUTH_PASSWORD
  942.  
  943. #
  944.  
  945. # The following authenticators support plaintext username/password
  946. # authentication using the standard PLAIN mechanism and the traditional
  947. # but non-standard LOGIN mechanism, with Exim acting as the server.
  948. # PLAIN and LOGIN are enough to support most MUA software.
  949. #
  950. # These authenticators are not complete: you need to change the
  951. # server_condition settings to specify how passwords are verified.
  952. # They are set up to offer authentication to the client only if the
  953. # connection is encrypted with TLS, so you also need to add support
  954. # for TLS. See the global configuration options section at the start
  955. # of this file for more about TLS.
  956. #
  957. # The default RCPT ACL checks for successful authentication, and will accept
  958. # messages from authenticated users from anywhere on the Internet.
  959.  
  960. #
  961.  
  962. # PLAIN authentication has no server prompts. The client sends its
  963. # credentials in one lump, containing an authorization ID (which we do not
  964. # use), an authentication ID, and a password. The latter two appear as
  965. # $auth2 and $auth3 in the configuration and should be checked against a
  966. # valid username and password. In a real configuration you would typically
  967. # use $auth2 as a lookup key, and compare $auth3 against the result of the
  968. # lookup, perhaps using the crypteq{}{} condition.
  969.  
  970. #PLAIN:
  971. # driver = plaintext
  972. # server_set_id = $auth2
  973. # server_prompts = :
  974. # server_condition = ${if saslauthd{{$2}{$3}{smtp}} {1}}
  975. # server_advertise_condition = ${if def:tls_in_cipher }
  976.  
  977. # LOGIN authentication has traditional prompts and responses. There is no
  978. # authorization ID in this mechanism, so unlike PLAIN the username and
  979. # password are $auth1 and $auth2. Apart from that you can use the same
  980. # server_condition setting for both authenticators.
  981.  
  982. #LOGIN:
  983. # driver = plaintext
  984. # server_set_id = $auth1
  985. # server_prompts = <| Username: | Password:
  986. # server_condition = ${if saslauthd{{$1}{$2}{smtp}} {1}}
  987. # server_advertise_condition = ${if def:tls_in_cipher }
  988.  
  989.  
  990. ######################################################################
  991. # CONFIGURATION FOR local_scan() #
  992. ######################################################################
  993.  
  994. # If you have built Exim to include a local_scan() function that contains
  995. # tables for private options, you can define those options here. Remember to
  996. # uncomment the "begin" line. It is commented by default because it provokes
  997. # an error with Exim binaries that are not built with LOCAL_SCAN_HAS_OPTIONS
  998. # set in the Local/Makefile.
  999.  
  1000. # begin local_scan
  1001.  
  1002.  
  1003. # End of Exim configuration file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement