Advertisement
Guest User

Untitled

a guest
May 14th, 2016
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.75 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 =
  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.  
  348.  
  349. ######################################################################
  350. # ACL CONFIGURATION #
  351. # Specifies access control lists for incoming SMTP mail #
  352. ######################################################################
  353.  
  354. begin acl
  355.  
  356.  
  357. # This access control list is used for the MAIL command in an incoming
  358. # SMTP message.
  359.  
  360. acl_check_mail:
  361.  
  362. # Hosts are required to say HELO (or EHLO) before sending mail.
  363. # So don't allow them to use the MAIL command if they haven't
  364. # done so.
  365.  
  366. deny condition = ${if eq{$sender_helo_name}{} {1}}
  367. message = Nice boys say HELO first
  368.  
  369. # Use the lack of reverse DNS to trigger greylisting. Some people
  370. # even reject for it but that would be a little excessive.
  371.  
  372. warn condition = ${if eq{$sender_host_name}{} {1}}
  373. set acl_m_greylistreasons = Host $sender_host_address lacks reverse DNS\n$acl_m_greylistreasons
  374.  
  375. accept
  376.  
  377.  
  378.  
  379. # This access control list is used for every RCPT command in an incoming
  380. # SMTP message. The tests are run in order until the address is either
  381. # accepted or denied.
  382.  
  383. acl_check_rcpt:
  384.  
  385. # Accept if the source is local SMTP (i.e. not over TCP/IP). We do this by
  386. # testing for an empty sending host field.
  387.  
  388. accept hosts = :
  389. control = dkim_disable_verify
  390.  
  391. #############################################################################
  392. # The following section of the ACL is concerned with local parts that contain
  393. # @ or % or ! or / or | or dots in unusual places.
  394. #
  395. # The characters other than dots are rarely found in genuine local parts, but
  396. # are often tried by people looking to circumvent relaying restrictions.
  397. # Therefore, although they are valid in local parts, these rules lock them
  398. # out, as a precaution.
  399. #
  400. # Empty components (two dots in a row) are not valid in RFC 2822, but Exim
  401. # allows them because they have been encountered. (Consider local parts
  402. # constructed as "firstinitial.secondinitial.familyname" when applied to
  403. # someone like me, who has no second initial.) However, a local part starting
  404. # with a dot or containing /../ can cause trouble if it is used as part of a
  405. # file name (e.g. for a mailing list). This is also true for local parts that
  406. # contain slashes. A pipe symbol can also be troublesome if the local part is
  407. # incorporated unthinkingly into a shell command line.
  408. #
  409. # Two different rules are used. The first one is stricter, and is applied to
  410. # messages that are addressed to one of the local domains handled by this
  411. # host. The line "domains = +local_domains" restricts it to domains that are
  412. # defined by the "domainlist local_domains" setting above. The rule blocks
  413. # local parts that begin with a dot or contain @ % ! / or |. If you have
  414. # local accounts that include these characters, you will have to modify this
  415. # rule.
  416.  
  417. deny message = Restricted characters in address
  418. domains = +local_domains
  419. local_parts = ^[.] : ^.*[@%!/|]
  420.  
  421. # The second rule applies to all other domains, and is less strict. The line
  422. # "domains = !+local_domains" restricts it to domains that are NOT defined by
  423. # the "domainlist local_domains" setting above. The exclamation mark is a
  424. # negating operator. This rule allows your own users to send outgoing
  425. # messages to sites that use slashes and vertical bars in their local parts.
  426. # It blocks local parts that begin with a dot, slash, or vertical bar, but
  427. # allows these characters within the local part. However, the sequence /../
  428. # is barred. The use of @ % and ! is blocked, as before. The motivation here
  429. # is to prevent your users (or your users' viruses) from mounting certain
  430. # kinds of attack on remote sites.
  431.  
  432. deny message = Restricted characters in address
  433. domains = !+local_domains
  434. local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
  435. #############################################################################
  436.  
  437. # Accept mail to postmaster in any local domain, regardless of the source,
  438. # and without verifying the sender.
  439.  
  440. accept local_parts = postmaster
  441. domains = +local_domains
  442.  
  443. # Deny unless the sender address can be routed. For proper verification of the
  444. # address, read the documentation on callouts and add the /callout modifier.
  445.  
  446. require verify = sender
  447.  
  448. # Accept if the message comes from one of the hosts for which we are an
  449. # outgoing relay. It is assumed that such hosts are most likely to be MUAs,
  450. # so we set control=submission to make Exim treat the message as a
  451. # submission. It will fix up various errors in the message, for example, the
  452. # lack of a Date: header line. If you are actually relaying out out from
  453. # MTAs, you may want to disable this. If you are handling both relaying from
  454. # MTAs and submissions from MUAs you should probably split them into two
  455. # lists, and handle them differently.
  456.  
  457. # Recipient verification is omitted here, because in many cases the clients
  458. # are dumb MUAs that don't cope well with SMTP error responses. If you are
  459. # actually relaying out from MTAs, you should probably add recipient
  460. # verification here.
  461.  
  462. # Note that, by putting this test before any DNS black list checks, you will
  463. # always accept from these hosts, even if they end up on a black list. The
  464. # assumption is that they are your friends, and if they get onto a black
  465. # list, it is a mistake.
  466.  
  467. accept hosts = +relay_from_hosts
  468. control = submission
  469. control = dkim_disable_verify
  470.  
  471. # Accept if the message arrived over an authenticated connection, from
  472. # any host. Again, these messages are usually from MUAs, so recipient
  473. # verification is omitted, and submission mode is set. And again, we do this
  474. # check before any black list tests.
  475.  
  476. accept authenticated = *
  477. control = submission
  478. control = dkim_disable_verify
  479.  
  480. # Insist that any other recipient address that we accept is either in one of
  481. # our local domains, or is in a domain for which we explicitly allow
  482. # relaying. Any other domain is rejected as being unacceptable for relaying.
  483.  
  484. require message = relay not permitted
  485. domains = +local_domains : +relay_to_domains
  486.  
  487. # We also require all accepted addresses to be verifiable. This check will
  488. # do local part verification for local domains, but only check the domain
  489. # for remote domains. The only way to check local parts for the remote
  490. # relay domains is to use a callout (add /callout), but please read the
  491. # documentation about callouts before doing this.
  492.  
  493. require verify = recipient
  494.  
  495. #############################################################################
  496. # There are no default checks on DNS black lists because the domains that
  497. # contain these lists are changing all the time. However, here are two
  498. # examples of how you can get Exim to perform a DNS black list lookup at this
  499. # point. The first one denies, whereas the second just warns. The third
  500. # triggers greylisting for any host in the blacklist.
  501. #
  502. # deny message = rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
  503. # dnslists = black.list.example
  504. #
  505. # warn dnslists = black.list.example
  506. # add_header = X-Warning: $sender_host_address is in a black list at $dnslist_domain
  507. # log_message = found in $dnslist_domain
  508. #
  509. # warn dnslists = black.list.example
  510. # set acl_m_greylistreasons = Host found in $dnslist_domain\n$acl_m_greylistreasons
  511. #
  512. #############################################################################
  513.  
  514. #############################################################################
  515. # This check is commented out because it is recognized that not every
  516. # sysadmin will want to do it. If you enable it, the check performs
  517. # Client SMTP Authorization (csa) checks on the sending host. These checks
  518. # do DNS lookups for SRV records. The CSA proposal is currently (May 2005)
  519. # an Internet draft. You can, of course, add additional conditions to this
  520. # ACL statement to restrict the CSA checks to certain hosts only.
  521. #
  522. # require verify = csa
  523. #############################################################################
  524.  
  525. # Alternatively, greylist for it:
  526. # warn !verify = csa
  527. # set acl_m_greylistreasons = Host failed CSA check\n$acl_m_greylistreasons
  528.  
  529. # At this point, the address has passed all the checks that have been
  530. # configured, so we accept it unconditionally.
  531.  
  532. accept
  533.  
  534.  
  535. # This ACL is used after the contents of a message have been received. This
  536. # is the ACL in which you can test a message's headers or body, and in
  537. # particular, this is where you can invoke external virus or spam scanners.
  538. # Some suggested ways of configuring these tests are shown below, commented
  539. # out. Without any tests, this ACL accepts all messages. If you want to use
  540. # such tests, you must ensure that Exim is compiled with the content-scanning
  541. # extension (WITH_CONTENT_SCAN=yes in Local/Makefile).
  542.  
  543. acl_check_data:
  544.  
  545. # Put simple tests first. A good one is to check for the presence of a
  546. # Message-Id: header, which RFC2822 says SHOULD be present. Some broken
  547. # or misconfigured mailer software occasionally omits this from genuine
  548. # messages too, though -- although it's not hard for the offender to fix
  549. # after they receive a bounce because of it.
  550. #
  551. # deny condition = ${if !def:h_Message-ID: {1}}
  552. # message = RFC2822 says that all mail SHOULD have a Message-ID header.\n\
  553. # Most messages without it are spam, so your mail has been rejected.
  554. #
  555. # Alternatively if we're feeling more lenient we could just use it to
  556. # trigger greylisting instead:
  557.  
  558. warn condition = ${if !def:h_Message-ID: {1}}
  559. set acl_m_greylistreasons = Message lacks Message-Id: header. Consult RFC2822.\n$acl_m_greylistreasons
  560.  
  561. # Deny if the message contains a virus. Before enabling this check, you
  562. # must install a virus scanner and set the av_scanner option above.
  563. #
  564. # deny malware = *
  565. # message = This message contains a virus ($malware_name).
  566.  
  567. # Bypass SpamAssassin checks if the message is too large.
  568. #
  569. # accept condition = ${if >={$message_size}{100000} {1}}
  570. # add_header = X-Spam-Note: SpamAssassin run bypassed due to message size
  571.  
  572. # Run SpamAssassin, but allow for it to fail or time out. Add a warning message
  573. # and accept the mail if that happens. Add an X-Spam-Flag: header if the SA
  574. # score exceeds the SA system threshold.
  575. #
  576. # warn spam = nobody/defer_ok
  577. # add_header = X-Spam-Flag: YES
  578. #
  579. # accept condition = ${if !def:spam_score_int {1}}
  580. # add_header = X-Spam-Note: SpamAssassin invocation failed
  581. #
  582.  
  583. # Unconditionally add score and report headers
  584. #
  585. # warn add_header = X-Spam-Score: $spam_score ($spam_bar)\n\
  586. # X-Spam-Report: $spam_report
  587.  
  588. # And reject if the SpamAssassin score is greater than ten
  589. #
  590. # deny condition = ${if >{$spam_score_int}{100} {1}}
  591. # message = Your message scored $spam_score SpamAssassin point. Report follows:\n\
  592. # $spam_report
  593.  
  594. # Trigger greylisting (if enabled) if the SpamAssassin score is greater than 0.5
  595. #
  596. # warn condition = ${if >{$spam_score_int}{5} {1}}
  597. # set acl_m_greylistreasons = Message has $spam_score SpamAssassin points\n$acl_m_greylistreasons
  598.  
  599.  
  600. # If you want to greylist _all_ mail rather than only mail which looks like there
  601. # might be something wrong with it, then you can do this...
  602. #
  603. # warn set acl_m_greylistreasons = We greylist all mail\n$acl_m_greylistreasons
  604.  
  605. # Now, invoke the greylisting. For this you need to have installed the exim-greylist
  606. # package which contains this subroutine, and you need to uncomment the bit below
  607. # which includes it too. Whenever the $acl_m_greylistreasons variable is non-empty,
  608. # greylisting will kick in and will defer the mail to check if the sender is a
  609. # proper mail which which retries, or whether it's a zombie. For more details, see
  610. # the exim-greylist.conf.inc file itself.
  611. #
  612. # require acl = greylist_mail
  613.  
  614. accept
  615.  
  616. # To enable the greylisting, also uncomment this line:
  617. # .include /etc/exim/exim-greylist.conf.inc
  618.  
  619. acl_check_mime:
  620.  
  621. # File extension filtering.
  622. deny message = Blacklisted file extension detected
  623. condition = ${if match \
  624. {${lc:$mime_filename}} \
  625. {\N(\.exe|\.pif|\.bat|\.scr|\.lnk|\.com)$\N} \
  626. {1}{0}}
  627.  
  628. accept
  629.  
  630.  
  631. ######################################################################
  632. # ROUTERS CONFIGURATION #
  633. # Specifies how addresses are handled #
  634. ######################################################################
  635. # THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT! #
  636. # An address is passed to each router in turn until it is accepted. #
  637. ######################################################################
  638.  
  639. begin routers
  640.  
  641. send_via_gmail:
  642. driver = manualroute
  643. domains = ! +local_domains
  644. transport = gmail_smtp
  645. route_list = * smtp.gmail.com
  646.  
  647.  
  648. # This router routes to remote hosts over SMTP by explicit IP address,
  649. # when an email address is given in "domain literal" form, for example,
  650. # <user@[192.168.35.64]>. The RFCs require this facility. However, it is
  651. # little-known these days, and has been exploited by evil people seeking
  652. # to abuse SMTP relays. Consequently it is commented out in the default
  653. # configuration. If you uncomment this router, you also need to uncomment
  654. # allow_domain_literals above, so that Exim can recognize the syntax of
  655. # domain literal addresses.
  656.  
  657. # domain_literal:
  658. # driver = ipliteral
  659. # domains = ! +local_domains
  660. # transport = remote_smtp
  661.  
  662.  
  663. # This router routes addresses that are not in local domains by doing a DNS
  664. # lookup on the domain name. The exclamation mark that appears in "domains = !
  665. # +local_domains" is a negating operator, that is, it can be read as "not". The
  666. # recipient's domain must not be one of those defined by "domainlist
  667. # local_domains" above for this router to be used.
  668. #
  669. # If the router is used, any domain that resolves to 0.0.0.0 or to a loopback
  670. # interface address (127.0.0.0/8) is treated as if it had no DNS entry. Note
  671. # that 0.0.0.0 is the same as 0.0.0.0/32, which is commonly treated as the
  672. # local host inside the network stack. It is not 0.0.0.0/0, the default route.
  673. # If the DNS lookup fails, no further routers are tried because of the no_more
  674. # setting, and consequently the address is unrouteable.
  675.  
  676. dnslookup:
  677. driver = dnslookup
  678. domains = ! +local_domains
  679. transport = remote_smtp
  680. ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  681. # if ipv6-enabled then instead use:
  682. # ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
  683. no_more
  684.  
  685.  
  686. # This alternative router can be used when you want to send all mail to a
  687. # server which handles DNS lookups for you; an ISP will typically run such
  688. # a server for their customers. If you uncomment "smarthost" then you
  689. # should comment out "dnslookup" above. Setting a real hostname in route_data
  690. # wouldn't hurt either.
  691.  
  692. # smarthost:
  693. # driver = manualroute
  694. # domains = ! +local_domains
  695. # transport = remote_smtp
  696. # route_data = MAIL.HOSTNAME.FOR.CENTRAL.SERVER.EXAMPLE
  697. # ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
  698. # no_more
  699.  
  700.  
  701. # The remaining routers handle addresses in the local domain(s), that is those
  702. # domains that are defined by "domainlist local_domains" above.
  703.  
  704.  
  705. # This router handles aliasing using a linearly searched alias file with the
  706. # name SYSTEM_ALIASES_FILE. When this configuration is installed automatically,
  707. # the name gets inserted into this file from whatever is set in Exim's
  708. # build-time configuration. The default path is the traditional /etc/aliases.
  709. # If you install this configuration by hand, you need to specify the correct
  710. # path in the "data" setting below.
  711. #
  712. ##### NB You must ensure that the alias file exists. It used to be the case
  713. ##### NB that every Unix had that file, because it was the Sendmail default.
  714. ##### NB These days, there are systems that don't have it. Your aliases
  715. ##### NB file should at least contain an alias for "postmaster".
  716. #
  717. # If any of your aliases expand to pipes or files, you will need to set
  718. # up a user and a group for these deliveries to run under. You can do
  719. # this by uncommenting the "user" option below (changing the user name
  720. # as appropriate) and adding a "group" option if necessary. Alternatively, you
  721. # can specify "user" on the transports that are used. Note that the transports
  722. # listed below are the same as are used for .forward files; you might want
  723. # to set up different ones for pipe and file deliveries from aliases.
  724.  
  725. system_aliases:
  726. driver = redirect
  727. allow_fail
  728. allow_defer
  729. data = ${lookup{$local_part}lsearch{/etc/aliases}}
  730. # user = exim
  731. file_transport = address_file
  732. pipe_transport = address_pipe
  733.  
  734.  
  735. # This router handles forwarding using traditional .forward files in users'
  736. # home directories. If you want it also to allow mail filtering when a forward
  737. # file starts with the string "# Exim filter" or "# Sieve filter", uncomment
  738. # the "allow_filter" option.
  739.  
  740. # The no_verify setting means that this router is skipped when Exim is
  741. # verifying addresses. Similarly, no_expn means that this router is skipped if
  742. # Exim is processing an EXPN command.
  743.  
  744. # If you want this router to treat local parts with suffixes introduced by "-"
  745. # or "+" characters as if the suffixes did not exist, uncomment the two local_
  746. # part_suffix options. Then, for example, xxxx-foo@your.domain will be treated
  747. # in the same way as xxxx@your.domain by this router. Because this router is
  748. # not used for verification, if you choose to uncomment those options, then you
  749. # will *need* to make the same change to the localuser router. (There are
  750. # other approaches, if this is undesirable, but they add complexity).
  751.  
  752. # The check_ancestor option means that if the forward file generates an
  753. # address that is an ancestor of the current one, the current one gets
  754. # passed on instead. This covers the case where A is aliased to B and B
  755. # has a .forward file pointing to A.
  756.  
  757. # The three transports specified at the end are those that are used when
  758. # forwarding generates a direct delivery to a file, or to a pipe, or sets
  759. # up an auto-reply, respectively.
  760.  
  761. userforward:
  762. driver = redirect
  763. check_local_user
  764. # local_part_suffix = +* : -*
  765. # local_part_suffix_optional
  766. file = $home/.forward
  767. allow_filter
  768. no_verify
  769. no_expn
  770. check_ancestor
  771. file_transport = address_file
  772. pipe_transport = address_pipe
  773. reply_transport = address_reply
  774.  
  775. procmail:
  776. driver = accept
  777. check_local_user
  778. require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
  779. transport = procmail
  780. no_verify
  781.  
  782. # This router matches local user mailboxes. If the router fails, the error
  783. # message is "Unknown user".
  784.  
  785. # If you want this router to treat local parts with suffixes introduced by "-"
  786. # or "+" characters as if the suffixes did not exist, uncomment the two local_
  787. # part_suffix options. Then, for example, xxxx-foo@your.domain will be treated
  788. # in the same way as xxxx@your.domain by this router.
  789.  
  790. localuser:
  791. driver = accept
  792. check_local_user
  793. # local_part_suffix = +* : -*
  794. # local_part_suffix_optional
  795. transport = local_delivery
  796. cannot_route_message = Unknown user
  797.  
  798.  
  799.  
  800. ######################################################################
  801. # TRANSPORTS CONFIGURATION #
  802. ######################################################################
  803. # ORDER DOES NOT MATTER #
  804. # Only one appropriate transport is called for each delivery. #
  805. ######################################################################
  806.  
  807. # A transport is used only when referenced from a router that successfully
  808. # handles an address.
  809.  
  810. begin transports
  811.  
  812. gmail_smtp:
  813. driver = smtp
  814. port = 587
  815. hosts_require_auth = *
  816. hosts_require_tls = *
  817.  
  818.  
  819. # This transport is used for delivering messages over SMTP connections.
  820.  
  821. remote_smtp:
  822. driver = smtp
  823.  
  824. # This transport is used for delivering messages over SMTP using the
  825. # "message submission" port (RFC4409).
  826.  
  827. remote_msa:
  828. driver = smtp
  829. port = 587
  830. hosts_require_auth = *
  831.  
  832.  
  833. # This transport invokes procmail to deliver mail
  834. procmail:
  835. driver = pipe
  836. command = "/usr/bin/procmail -d $local_part"
  837. return_path_add
  838. delivery_date_add
  839. envelope_to_add
  840. user = $local_part
  841. initgroups
  842. return_output
  843.  
  844. # This transport is used for local delivery to user mailboxes in traditional
  845. # BSD mailbox format. By default it will be run under the uid and gid of the
  846. # local user, and requires the sticky bit to be set on the /var/mail directory.
  847. # Some systems use the alternative approach of running mail deliveries under a
  848. # particular group instead of using the sticky bit. The commented options below
  849. # show how this can be done.
  850.  
  851. local_delivery:
  852. driver = appendfile
  853. file = /var/mail/$local_part
  854. delivery_date_add
  855. envelope_to_add
  856. return_path_add
  857. group = mail
  858. mode = 0660
  859.  
  860.  
  861. # This transport is used for handling pipe deliveries generated by alias or
  862. # .forward files. If the pipe generates any standard output, it is returned
  863. # to the sender of the message as a delivery error. Set return_fail_output
  864. # instead of return_output if you want this to happen only when the pipe fails
  865. # to complete normally. You can set different transports for aliases and
  866. # forwards if you want to - see the references to address_pipe in the routers
  867. # section above.
  868.  
  869. address_pipe:
  870. driver = pipe
  871. return_output
  872.  
  873.  
  874. # This transport is used for handling deliveries directly to files that are
  875. # generated by aliasing or forwarding.
  876.  
  877. address_file:
  878. driver = appendfile
  879. delivery_date_add
  880. envelope_to_add
  881. return_path_add
  882.  
  883.  
  884. # This transport is used for handling autoreplies generated by the filtering
  885. # option of the userforward router.
  886.  
  887. address_reply:
  888. driver = autoreply
  889.  
  890.  
  891. # This transport is used to deliver local mail to cyrus IMAP server via UNIX
  892. # socket. You'll need to configure the 'localuser' router above to use it.
  893. #
  894. #lmtp_delivery:
  895. # home_directory = /var/spool/imap
  896. # driver = lmtp
  897. # command = "/usr/lib/cyrus-imapd/deliver -l"
  898. # batch_max = 20
  899. # user = cyrus
  900.  
  901.  
  902. ######################################################################
  903. # RETRY CONFIGURATION #
  904. ######################################################################
  905.  
  906. begin retry
  907.  
  908. # This single retry rule applies to all domains and all errors. It specifies
  909. # retries every 15 minutes for 2 hours, then increasing retry intervals,
  910. # starting at 1 hour and increasing each time by a factor of 1.5, up to 16
  911. # hours, then retries every 6 hours until 4 days have passed since the first
  912. # failed delivery.
  913.  
  914. # WARNING: If you do not have any retry rules at all (this section of the
  915. # configuration is non-existent or empty), Exim will not do any retries of
  916. # messages that fail to get delivered at the first attempt. The effect will
  917. # be to treat temporary errors as permanent. Therefore, DO NOT remove this
  918. # retry rule unless you really don't want any retries.
  919.  
  920. # Address or Domain Error Retries
  921. # ----------------- ----- -------
  922.  
  923. * * F,2h,15m; G,16h,1h,1.5; F,4d,6h
  924.  
  925.  
  926.  
  927. ######################################################################
  928. # REWRITE CONFIGURATION #
  929. ######################################################################
  930.  
  931. # There are no rewriting specifications in this default configuration file.
  932.  
  933. begin rewrite
  934.  
  935.  
  936.  
  937. ######################################################################
  938. # AUTHENTICATION CONFIGURATION #
  939. ######################################################################
  940.  
  941. begin authenticators
  942.  
  943. gmail_login:
  944. driver = plaintext
  945. public_name = LOGIN
  946. client_send = : user@gmail.com : myPassw0rd
  947.  
  948. # This authenticator supports CRAM-MD5 username/password authentication
  949. # with Exim acting as a _client_, as it might when sending its outgoing
  950. # mail to a smarthost rather than directly to the final recipient.
  951. # Replace SMTPAUTH_USERNAME and SMTPAUTH_PASSWORD as appropriate.
  952.  
  953. #client_auth:
  954. # driver = cram_md5
  955. # public_name = CRAM-MD5
  956. # client_name = SMTPAUTH_USERNAME
  957. # client_secret = SMTPAUTH_PASSWORD
  958.  
  959. #
  960.  
  961. # The following authenticators support plaintext username/password
  962. # authentication using the standard PLAIN mechanism and the traditional
  963. # but non-standard LOGIN mechanism, with Exim acting as the server.
  964. # PLAIN and LOGIN are enough to support most MUA software.
  965. #
  966. # These authenticators are not complete: you need to change the
  967. # server_condition settings to specify how passwords are verified.
  968. # They are set up to offer authentication to the client only if the
  969. # connection is encrypted with TLS, so you also need to add support
  970. # for TLS. See the global configuration options section at the start
  971. # of this file for more about TLS.
  972. #
  973. # The default RCPT ACL checks for successful authentication, and will accept
  974. # messages from authenticated users from anywhere on the Internet.
  975.  
  976. #
  977.  
  978. # PLAIN authentication has no server prompts. The client sends its
  979. # credentials in one lump, containing an authorization ID (which we do not
  980. # use), an authentication ID, and a password. The latter two appear as
  981. # $auth2 and $auth3 in the configuration and should be checked against a
  982. # valid username and password. In a real configuration you would typically
  983. # use $auth2 as a lookup key, and compare $auth3 against the result of the
  984. # lookup, perhaps using the crypteq{}{} condition.
  985.  
  986. #PLAIN:
  987. # driver = plaintext
  988. # server_set_id = $auth2
  989. # server_prompts = :
  990. # server_condition = ${if saslauthd{{$2}{$3}{smtp}} {1}}
  991. # server_advertise_condition = ${if def:tls_in_cipher }
  992.  
  993. # LOGIN authentication has traditional prompts and responses. There is no
  994. # authorization ID in this mechanism, so unlike PLAIN the username and
  995. # password are $auth1 and $auth2. Apart from that you can use the same
  996. # server_condition setting for both authenticators.
  997.  
  998. #LOGIN:
  999. # driver = plaintext
  1000. # server_set_id = $auth1
  1001. # server_prompts = <| Username: | Password:
  1002. # server_condition = ${if saslauthd{{$1}{$2}{smtp}} {1}}
  1003. # server_advertise_condition = ${if def:tls_in_cipher }
  1004.  
  1005.  
  1006. ######################################################################
  1007. # CONFIGURATION FOR local_scan() #
  1008. ######################################################################
  1009.  
  1010. # If you have built Exim to include a local_scan() function that contains
  1011. # tables for private options, you can define those options here. Remember to
  1012. # uncomment the "begin" line. It is commented by default because it provokes
  1013. # an error with Exim binaries that are not built with LOCAL_SCAN_HAS_OPTIONS
  1014. # set in the Local/Makefile.
  1015.  
  1016. # begin local_scan
  1017.  
  1018.  
  1019. # End of Exim configuration file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement