<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Проблема с отправкой почты exim]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=31958&amp;type=atom" />
	<updated>2013-11-16T15:20:43Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=31958</id>
		<entry>
			<title type="html"><![CDATA[Re: Проблема с отправкой почты exim]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376385#p376385" />
			<content type="html"><![CDATA[<p>Вот и славно. К этому я и подводил <img src="https://linuxforum.ru/img/smilies/ab.gif" alt="ab" /> Самому решить вопрос лучше, чем прямая подсказка.</p>]]></content>
			<author>
				<name><![CDATA[alexfinn]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25867</uri>
			</author>
			<updated>2013-11-16T15:20:43Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376385#p376385</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Проблема с отправкой почты exim]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376384#p376384" />
			<content type="html"><![CDATA[<p>Но возможно настроить релей на внешний смтп, что я и сделал с помощью postfix. И наконец-то все заработало.</p>]]></content>
			<author>
				<name><![CDATA[4fun]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16085</uri>
			</author>
			<updated>2013-11-16T15:15:44Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376384#p376384</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Проблема с отправкой почты exim]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376383#p376383" />
			<content type="html"><![CDATA[<p>Так, повторю еще раз: php в Linux письма отправляет только через локалхост</p>]]></content>
			<author>
				<name><![CDATA[alexfinn]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25867</uri>
			</author>
			<updated>2013-11-16T15:09:22Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376383#p376383</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Проблема с отправкой почты exim]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376380#p376380" />
			<content type="html"><![CDATA[<p>Попробовал сейчас установить postfix. Все ранво шлет через локальный смтп, хотя настроен гугл</p>]]></content>
			<author>
				<name><![CDATA[4fun]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16085</uri>
			</author>
			<updated>2013-11-16T14:47:34Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376380#p376380</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Проблема с отправкой почты exim]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376369#p376369" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexfinn пишет:</cite><blockquote><p>Про связку - бред, они вместе работать не должны. Как минимум, они используюь один и тот же порт. Так что, если Вы настраиваете почтовый сервер по такой инструкции, то понятно, почему не работает.</p><p>Если вы отправляете почту через PHP, то сам PHP, если мне память не изменяет, в Linux умеет отправлять только на локалхост.</p></blockquote></div><p>Так вот на центе 5.9 просто поднимал апач с пхп и эксим. Настраивал там отправку на смтп гмеил и все. Все работало. Здесь же у меня письма отправляет, но только с локального смтп сервера<br />И пишу же, что даже если работает только эксим, письмо все равно идет только с локалхоста. Пробовал настроить ssmtp, через консоль письмо отправлялось через смтп гугла, но пыха отправляла через локалхост. То есть какая-то запара с пхп, судя по всему, но не знаю, в какую сторону копать.</p>]]></content>
			<author>
				<name><![CDATA[4fun]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16085</uri>
			</author>
			<updated>2013-11-16T13:17:51Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376369#p376369</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Проблема с отправкой почты exim]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376346#p376346" />
			<content type="html"><![CDATA[<p>Про связку - бред, они вместе работать не должны. Как минимум, они используюь один и тот же порт. Так что, если Вы настраиваете почтовый сервер по такой инструкции, то понятно, почему не работает.</p><p>Если вы отправляете почту через PHP, то сам PHP, если мне память не изменяет, в Linux умеет отправлять только на локалхост.</p>]]></content>
			<author>
				<name><![CDATA[alexfinn]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25867</uri>
			</author>
			<updated>2013-11-16T11:26:00Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376346#p376346</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Проблема с отправкой почты exim]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376324#p376324" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexfinn пишет:</cite><blockquote><div class="quotebox"><cite>4fun пишет:</cite><blockquote><p>поднял exim и sendmail</p></blockquote></div><p>Вы бы определились все-таки</p></blockquote></div><p>Читал, что нужна именно связка. Но, как я уже написал в первом сообщении, пробовал также отдельно и эксим, и сендмэил.</p>]]></content>
			<author>
				<name><![CDATA[4fun]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16085</uri>
			</author>
			<updated>2013-11-16T10:10:09Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376324#p376324</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Проблема с отправкой почты exim]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376322#p376322" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>4fun пишет:</cite><blockquote><p>поднял exim и sendmail</p></blockquote></div><p>Вы бы определились все-таки</p>]]></content>
			<author>
				<name><![CDATA[alexfinn]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25867</uri>
			</author>
			<updated>2013-11-16T09:57:34Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376322#p376322</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Проблема с отправкой почты exim]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=376316#p376316" />
			<content type="html"><![CDATA[<p>Здравствуйте. Имеется цент 6.4, на котором поднял exim и sendmail (хотя пробовал отдельно только эксим и только сендмэил). В эксим настроена отправка через смтп гугла (конфиг ниже). Но почта через пхп скрипт посредством mail() отправляется только с локального домена (apache@localhost). В php.ini уже пробовал ставить и sendmail_path = /usr/sbin/sendmail -t , и sendmail_path = /usr/sbin/sendmail -t -i , и sendmail_path = /usr/sbin/exim -t . Результат не менялся. Раньше была цента 5.9, где настройка эксима производилась только в его конфиге, после чего все работало. Здесь уже не знаю, в какую сторону копать. Как можно решить эту проблему? Заранее благодарен за помощь.</p><p>PS В конфиге эксим прописал роутер, транспорт и аутентификацию.</p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;exim.conf</div><div class="fancy_spoiler"><p># $Cambridge: exim/exim-src/src/configure.default,v 1.14 2009/10/16 07:46:13 tom Exp $</p><p>######################################################################<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Runtime configuration file for Exim&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#<br />######################################################################</p><br /><p># This is a default configuration file which will operate correctly in<br /># uncomplicated installations. Please see the manual for a complete list<br /># of all the runtime configuration options that can be included in a<br /># configuration file. There are many more than are mentioned here. The<br /># manual is in the file doc/spec.txt in the Exim distribution as a plain<br /># ASCII file. Other formats (PostScript, Texinfo, HTML, PDF) are available<br /># from the Exim ftp sites. The manual is also online at the Exim web sites.</p><br /><p># This file is divided into several parts, all but the first of which are<br /># headed by a line starting with the word &quot;begin&quot;. Only those parts that<br /># are required need to be present. Blank lines, and lines starting with #<br /># are ignored.</p><br /><p>########### IMPORTANT ########## IMPORTANT ########### IMPORTANT ###########<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #<br /># Whenever you change Exim&#039;s configuration file, you *must* remember to&nbsp; &nbsp; #<br /># HUP the Exim daemon, because it will not pick up the new configuration&nbsp; &nbsp;#<br /># until you do. However, any other Exim processes that are started, for&nbsp; &nbsp; #<br /># example, a process started by an MUA in order to send a message, will&nbsp; &nbsp; #<br /># see the new configuration as soon as it is in place.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #<br /># You do not need to HUP the daemon for changes in auxiliary files that&nbsp; &nbsp; #<br /># are referenced from this file. They are read every time they are used.&nbsp; &nbsp;#<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #<br /># It is usually a good idea to test a new configuration for syntactic&nbsp; &nbsp; &nbsp; #<br /># correctness before installing it (for example, by running the command&nbsp; &nbsp; #<br /># &quot;exim -C /config/file.new -bV&quot;).&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #<br />########### IMPORTANT ########## IMPORTANT ########### IMPORTANT ###########</p><br /><br /><p>######################################################################<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MAIN CONFIGURATION SETTINGS&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#<br />######################################################################</p><p># Specify your host&#039;s canonical name here. This should normally be the fully<br /># qualified &quot;official&quot; name of your host. If this option is not set, the<br /># uname() function is called to obtain the name. In many cases this does<br /># the right thing and you need not set anything explicitly.</p><p># primary_hostname = mservers.org.ua</p><br /><p># The next three settings create two lists of domains and one list of hosts.<br /># These lists are referred to later in this configuration using the syntax<br /># +local_domains, +relay_to_domains, and +relay_from_hosts, respectively. They<br /># are all colon-separated lists:</p><p>domainlist local_domains = @ : localhost : localhost.localdomain<br />domainlist relay_to_domains =<br />hostlist&nbsp; &nbsp;relay_from_hosts = 127.0.0.1<br />trusted_users = apache</p><p># Most straightforward access control requirements can be obtained by<br /># appropriate settings of the above options. In more complicated situations,<br /># you may need to modify the Access Control Lists (ACLs) which appear later in<br /># this file.</p><p># The first setting specifies your local domains, for example:<br />#<br />#&nbsp; &nbsp;domainlist local_domains = my.first.domain : my.second.domain<br />#<br /># You can use &quot;@&quot; to mean &quot;the name of the local host&quot;, as in the default<br /># setting above. This is the name that is specified by primary_hostname,<br /># as specified above (or defaulted). If you do not want to do any local<br /># deliveries, remove the &quot;@&quot; from the setting above. If you want to accept mail<br /># addressed to your host&#039;s literal IP address, for example, mail addressed to<br /># &quot;user@[192.168.23.44]&quot;, you can add &quot;@[]&quot; as an item in the local domains<br /># list. You also need to uncomment &quot;allow_domain_literals&quot; below. This is not<br /># recommended for today&#039;s Internet.</p><p># The second setting specifies domains for which your host is an incoming relay.<br /># If you are not doing any relaying, you should leave the list empty. However,<br /># if your host is an MX backup or gateway of some kind for some domains, you<br /># must set relay_to_domains to match those domains. For example:<br />#<br /># domainlist relay_to_domains = *.myco.com : my.friend.org<br />#<br /># This will allow any host to relay through your host to those domains.<br /># See the section of the manual entitled &quot;Control of relaying&quot; for more<br /># information.</p><p># The third setting specifies hosts that can use your host as an outgoing relay<br /># to any other host on the Internet. Such a setting commonly refers to a<br /># complete local network as well as the localhost. For example:<br />#<br /># hostlist relay_from_hosts = 127.0.0.1 : 192.168.0.0/16<br />#<br /># The &quot;/16&quot; is a bit mask (CIDR notation), not a number of hosts. Note that you<br /># have to include 127.0.0.1 if you want to allow processes on your host to send<br /># SMTP mail by using the loopback address. A number of MUAs use this method of<br /># sending mail.</p><p># All three of these lists may contain many different kinds of item, including<br /># wildcarded names, regular expressions, and file lookups. See the reference<br /># manual for details. The lists above are used in the access control lists for<br /># checking incoming messages. The names of these ACLs are defined here:</p><p>acl_smtp_mail = acl_check_mail<br />acl_smtp_rcpt = acl_check_rcpt<br />acl_smtp_data = acl_check_data<br />acl_smtp_mime = acl_check_mime</p><p># You should not change those settings until you understand how ACLs work.</p><br /><p># If you are running a version of Exim that was compiled with the content-<br /># scanning extension, you can cause incoming messages to be automatically<br /># scanned for viruses. You have to modify the configuration in two places to<br /># set this up. The first of them is here, where you define the interface to<br /># your scanner. This example is typical for ClamAV; see the manual for details<br /># of what to set for other virus scanners. The second modification is in the<br /># acl_check_data access control list (see below).</p><p>av_scanner = clamd:/var/run/clamd.exim/clamd.sock</p><br /><p># For spam scanning, there is a similar option that defines the interface to<br /># SpamAssassin. You do not need to set this if you are using the default, which<br /># is shown in this commented example. As for virus scanning, you must also<br /># modify the acl_check_data access control list to enable spam scanning.</p><p># spamd_address = 127.0.0.1 783</p><br /><p># If Exim is compiled with support for TLS, you may want to enable the<br /># following options so that Exim allows clients to make encrypted<br /># connections. In the authenticators section below, there are template<br /># configurations for plaintext username/password authentication. This kind<br /># of authentication is only safe when used within a TLS connection, so the<br /># authenticators will only work if the following TLS settings are turned on<br /># as well.</p><p># Allow any client to use TLS.</p><p>tls_advertise_hosts = *</p><p># Specify the location of the Exim server&#039;s TLS certificate and private key.<br /># The private key must not be encrypted (password protected). You can put<br /># the certificate and private key in the same file, in which case you only<br /># need the first setting, or in separate files, in which case you need both<br /># options.</p><p>tls_certificate = /etc/pki/tls/certs/exim.pem<br />tls_privatekey = /etc/pki/tls/private/exim.pem</p><p># In order to support roaming users who wish to send email from anywhere,<br /># you may want to make Exim listen on other ports as well as port 25, in<br /># case these users need to send email from a network that blocks port 25.<br /># The standard port for this purpose is port 587, the &quot;message submission&quot;<br /># port. See RFC 4409 for details. Microsoft MUAs cannot be configured to<br /># talk the message submission protocol correctly, so if you need to support<br /># them you should also allow TLS-on-connect on the traditional but<br /># non-standard port 465.</p><p>daemon_smtp_ports = 25 : 465 : 587<br />tls_on_connect_ports = 465</p><br /><p># Specify the domain you want to be added to all unqualified addresses<br /># here. An unqualified address is one that does not contain an &quot;@&quot; character<br /># followed by a domain. For example, &quot;caesar@rome.example&quot; is a fully qualified<br /># address, but the string &quot;caesar&quot; (i.e. just a login name) is an unqualified<br /># email address. Unqualified addresses are accepted only from local callers by<br /># default. See the recipient_unqualified_hosts option if you want to permit<br /># unqualified addresses from remote sources. If this option is not set, the<br /># primary_hostname value is used for qualification.</p><p># qualify_domain =</p><br /><p># If you want unqualified recipient addresses to be qualified with a different<br /># domain to unqualified sender addresses, specify the recipient domain here.<br /># If this option is not set, the qualify_domain value is used.</p><p># qualify_recipient =</p><br /><p># The following line must be uncommented if you want Exim to recognize<br /># addresses of the form &quot;user@[10.11.12.13]&quot; that is, with a &quot;domain literal&quot;<br /># (an IP address) instead of a named domain. The RFCs still require this form,<br /># but it makes little sense to permit mail to be sent to specific hosts by<br /># their IP address in the modern Internet. This ancient format has been used<br /># by those seeking to abuse hosts by using them for unwanted relaying. If you<br /># really do want to support domain literals, uncomment the following line, and<br /># see also the &quot;domain_literal&quot; router below.</p><p># allow_domain_literals</p><br /><p># No deliveries will ever be run under the uids of users specified by<br /># never_users (a colon-separated list). An attempt to do so causes a panic<br /># error to be logged, and the delivery to be deferred. This is a paranoic<br /># safety catch. There is an even stronger safety catch in the form of the<br /># FIXED_NEVER_USERS setting in the configuration for building Exim. The list of<br /># users that it specifies is built into the binary, and cannot be changed. The<br /># option below just adds additional users to the list. The default for<br /># FIXED_NEVER_USERS is &quot;root&quot;, but just to be absolutely sure, the default here<br /># is also &quot;root&quot;.</p><p># Note that the default setting means you cannot deliver mail addressed to root<br /># as if it were a normal user. This isn&#039;t usually a problem, as most sites have<br /># an alias for root that redirects such mail to a human administrator.</p><p>never_users = root</p><br /><p># The setting below causes Exim to do a reverse DNS lookup on all incoming<br /># IP calls, in order to get the true host name. If you feel this is too<br /># expensive, you can specify the networks for which a lookup is done, or<br /># remove the setting entirely.</p><p>host_lookup = *</p><p># This setting, if uncommented, allows users to authenticate using<br /># their system passwords against saslauthd if they connect over a<br /># secure connection. If you have network logins such as NIS or<br /># Kerberos rather than only local users, then you possibly also want<br /># to configure /etc/sysconfig/saslauthd to use the &#039;pam&#039; mechanism<br /># too. Once a user is authenticated, the acl_check_rcpt ACL then<br /># allows them to relay through the system. <br />#<br /># auth_advertise_hosts = ${if eq {$tls_cipher}{}{}{*}}<br />#<br /># By default, we set this option to allow SMTP AUTH from nowhere<br /># (Exim&#039;s default would be to allow it from anywhere, even on an<br /># unencrypted connection).<br />#<br /># Comment this one out if you uncomment the above. Did you make sure<br /># saslauthd is actually running first?<br />#<br />auth_advertise_hosts =</p><p># The settings below, which are actually the same as the defaults in the<br /># code, cause Exim to make RFC 1413 (ident) callbacks for all incoming SMTP<br /># calls. You can limit the hosts to which these calls are made, and/or change<br /># the timeout that is used. If you set the timeout to zero, all RFC 1413 calls<br /># are disabled. RFC 1413 calls are cheap and can provide useful information<br /># for tracing problem messages, but some hosts and firewalls have problems<br /># with them. This can result in a timeout instead of an immediate refused<br /># connection, leading to delays on starting up SMTP sessions. (The default was<br /># reduced from 30s to 5s for release 4.61.)</p><p>rfc1413_hosts = *<br />rfc1413_query_timeout = 5s</p><br /><p># By default, Exim expects all envelope addresses to be fully qualified, that<br /># is, they must contain both a local part and a domain. If you want to accept<br /># unqualified addresses (just a local part) from certain hosts, you can specify<br /># these hosts by setting one or both of<br />#<br /># sender_unqualified_hosts =<br /># recipient_unqualified_hosts =<br />#<br /># to control sender and recipient addresses, respectively. When this is done,<br /># unqualified addresses are qualified using the settings of qualify_domain<br /># and/or qualify_recipient (see above).</p><br /><p># If you want Exim to support the &quot;percent hack&quot; for certain domains,<br /># uncomment the following line and provide a list of domains. The &quot;percent<br /># hack&quot; is the feature by which mail addressed to x%y@z (where z is one of<br /># the domains listed) is locally rerouted to x@y and sent on. If z is not one<br /># of the &quot;percent hack&quot; domains, x%y is treated as an ordinary local part. This<br /># hack is rarely needed nowadays; you should not enable it unless you are sure<br /># that you really need it.<br />#<br /># percent_hack_domains =<br />#<br /># As well as setting this option you will also need to remove the test<br /># for local parts containing % in the ACL definition below.</p><br /><p># When Exim can neither deliver a message nor return it to sender, it &quot;freezes&quot;<br /># the delivery error message (aka &quot;bounce message&quot;). There are also other<br /># circumstances in which messages get frozen. They will stay on the queue for<br /># ever unless one of the following options is set.</p><p># This option unfreezes frozen bounce messages after two days, tries<br /># once more to deliver them, and ignores any delivery failures.</p><p>ignore_bounce_errors_after = 2d</p><p># This option cancels (removes) frozen messages that are older than a week.</p><p>timeout_frozen_after = 7d</p><br /><p># By default, messages that are waiting on Exim&#039;s queue are all held in a<br /># single directory called &quot;input&quot; which it itself within Exim&#039;s spool<br /># directory. (The default spool directory is specified when Exim is built, and<br /># is often /var/spool/exim/.) Exim works best when its queue is kept short, but<br /># there are circumstances where this is not always possible. If you uncomment<br /># the setting below, messages on the queue are held in 62 subdirectories of<br /># &quot;input&quot; instead of all in the same directory. The subdirectories are called<br /># 0, 1, ... A, B, ... a, b, ... z. This has two benefits: (1) If your file<br /># system degrades with many files in one directory, this is less likely to<br /># happen; (2) Exim can process the queue one subdirectory at a time instead of<br /># all at once, which can give better performance with large queues.</p><p># split_spool_directory = true</p><br /><br /><p>######################################################################<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ACL CONFIGURATION&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Specifies access control lists for incoming SMTP mail&nbsp; &nbsp; &nbsp; #<br />######################################################################</p><p>begin acl</p><br /><p># This access control list is used for the MAIL command in an incoming<br /># SMTP message.</p><p>acl_check_mail:</p><p>&nbsp; # Hosts are required to say HELO (or EHLO) before sending mail.<br />&nbsp; # So don&#039;t allow them to use the MAIL command if they haven&#039;t<br />&nbsp; # done so.</p><p>&nbsp; deny condition = ${if eq{$sender_helo_name}{} {1}}<br />&nbsp; &nbsp; &nbsp; &nbsp;message = Nice boys say HELO first</p><p>&nbsp; # Use the lack of reverse DNS to trigger greylisting. Some people<br />&nbsp; # even reject for it but that would be a little excessive.<br />&nbsp; <br />&nbsp; warn condition = ${if eq{$sender_host_name}{} {1}}<br />&nbsp; &nbsp; &nbsp; &nbsp;set acl_m_greylistreasons = Host $sender_host_address lacks reverse DNS\n$acl_m_greylistreasons<br />&nbsp; <br />&nbsp; accept</p><br /><br /><p># This access control list is used for every RCPT command in an incoming<br /># SMTP message. The tests are run in order until the address is either<br /># accepted or denied.</p><p>acl_check_rcpt:</p><p>&nbsp; # Accept if the source is local SMTP (i.e. not over TCP/IP). We do this by<br />&nbsp; # testing for an empty sending host field.</p><p>&nbsp; accept&nbsp; hosts = :<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control = dkim_disable_verify</p><p>&nbsp; #############################################################################<br />&nbsp; # The following section of the ACL is concerned with local parts that contain<br />&nbsp; # @ or % or ! or / or | or dots in unusual places.<br />&nbsp; #<br />&nbsp; # The characters other than dots are rarely found in genuine local parts, but<br />&nbsp; # are often tried by people looking to circumvent relaying restrictions.<br />&nbsp; # Therefore, although they are valid in local parts, these rules lock them<br />&nbsp; # out, as a precaution.<br />&nbsp; #<br />&nbsp; # Empty components (two dots in a row) are not valid in RFC 2822, but Exim<br />&nbsp; # allows them because they have been encountered. (Consider local parts<br />&nbsp; # constructed as &quot;firstinitial.secondinitial.familyname&quot; when applied to<br />&nbsp; # someone like me, who has no second initial.) However, a local part starting<br />&nbsp; # with a dot or containing /../ can cause trouble if it is used as part of a<br />&nbsp; # file name (e.g. for a mailing list). This is also true for local parts that<br />&nbsp; # contain slashes. A pipe symbol can also be troublesome if the local part is<br />&nbsp; # incorporated unthinkingly into a shell command line.<br />&nbsp; #<br />&nbsp; # Two different rules are used. The first one is stricter, and is applied to<br />&nbsp; # messages that are addressed to one of the local domains handled by this<br />&nbsp; # host. The line &quot;domains = +local_domains&quot; restricts it to domains that are<br />&nbsp; # defined by the &quot;domainlist local_domains&quot; setting above. The rule&nbsp; blocks<br />&nbsp; # local parts that begin with a dot or contain @ % ! / or |. If you have<br />&nbsp; # local accounts that include these characters, you will have to modify this<br />&nbsp; # rule.</p><p>&nbsp; deny&nbsp; &nbsp; message&nbsp; &nbsp; &nbsp; &nbsp;= Restricted characters in address<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; domains&nbsp; &nbsp; &nbsp; &nbsp;= +local_domains<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local_parts&nbsp; &nbsp;= ^[.] : ^.*[@%!/|]</p><p>&nbsp; # The second rule applies to all other domains, and is less strict. The line<br />&nbsp; # &quot;domains = !+local_domains&quot; restricts it to domains that are NOT defined by<br />&nbsp; # the &quot;domainlist local_domains&quot; setting above. The exclamation mark is a<br />&nbsp; # negating operator. This rule allows your own users to send outgoing<br />&nbsp; # messages to sites that use slashes and vertical bars in their local parts.<br />&nbsp; # It blocks local parts that begin with a dot, slash, or vertical bar, but<br />&nbsp; # allows these characters within the local part. However, the sequence /../<br />&nbsp; # is barred. The use of @ % and ! is blocked, as before. The motivation here<br />&nbsp; # is to prevent your users (or your users&#039; viruses) from mounting certain<br />&nbsp; # kinds of attack on remote sites.</p><p>&nbsp; deny&nbsp; &nbsp; message&nbsp; &nbsp; &nbsp; &nbsp;= Restricted characters in address<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; domains&nbsp; &nbsp; &nbsp; &nbsp;= !+local_domains<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local_parts&nbsp; &nbsp;= ^[./|] : ^.*[@%!] : ^.*/\\.\\./<br />&nbsp; #############################################################################</p><p>&nbsp; # Accept mail to postmaster in any local domain, regardless of the source,<br />&nbsp; # and without verifying the sender.</p><p>&nbsp; accept&nbsp; local_parts&nbsp; &nbsp;= postmaster<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; domains&nbsp; &nbsp; &nbsp; &nbsp;= +local_domains</p><p>&nbsp; # Deny unless the sender address can be routed. For proper verification of the<br />&nbsp; # address, read the documentation on callouts and add the /callout modifier.</p><p>&nbsp; require verify&nbsp; &nbsp; &nbsp; &nbsp; = sender</p><p>&nbsp; # Accept if the message comes from one of the hosts for which we are an<br />&nbsp; # outgoing relay. It is assumed that such hosts are most likely to be MUAs,<br />&nbsp; # so we set control=submission to make Exim treat the message as a<br />&nbsp; # submission. It will fix up various errors in the message, for example, the<br />&nbsp; # lack of a Date: header line. If you are actually relaying out out from<br />&nbsp; # MTAs, you may want to disable this. If you are handling both relaying from<br />&nbsp; # MTAs and submissions from MUAs you should probably split them into two<br />&nbsp; # lists, and handle them differently.</p><p>&nbsp; # Recipient verification is omitted here, because in many cases the clients<br />&nbsp; # are dumb MUAs that don&#039;t cope well with SMTP error responses. If you are<br />&nbsp; # actually relaying out from MTAs, you should probably add recipient<br />&nbsp; # verification here.</p><p>&nbsp; # Note that, by putting this test before any DNS black list checks, you will<br />&nbsp; # always accept from these hosts, even if they end up on a black list. The<br />&nbsp; # assumption is that they are your friends, and if they get onto a black<br />&nbsp; # list, it is a mistake.</p><p>&nbsp; accept&nbsp; hosts&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= +relay_from_hosts<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control&nbsp; &nbsp; &nbsp; &nbsp;= submission<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control&nbsp; &nbsp; &nbsp; &nbsp;= dkim_disable_verify</p><p>&nbsp; # Accept if the message arrived over an authenticated connection, from<br />&nbsp; # any host. Again, these messages are usually from MUAs, so recipient<br />&nbsp; # verification is omitted, and submission mode is set. And again, we do this<br />&nbsp; # check before any black list tests.</p><p>&nbsp; accept&nbsp; authenticated = *<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control&nbsp; &nbsp; &nbsp; &nbsp;= submission<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control&nbsp; &nbsp; &nbsp; &nbsp;= dkim_disable_verify</p><p>&nbsp; # Insist that any other recipient address that we accept is either in one of<br />&nbsp; # our local domains, or is in a domain for which we explicitly allow<br />&nbsp; # relaying. Any other domain is rejected as being unacceptable for relaying.</p><p>&nbsp; require message = relay not permitted<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; domains = +local_domains : +relay_to_domains</p><p>&nbsp; # We also require all accepted addresses to be verifiable. This check will<br />&nbsp; # do local part verification for local domains, but only check the domain<br />&nbsp; # for remote domains. The only way to check local parts for the remote<br />&nbsp; # relay domains is to use a callout (add /callout), but please read the<br />&nbsp; # documentation about callouts before doing this.</p><p>&nbsp; require verify = recipient</p><p>&nbsp; #############################################################################<br />&nbsp; # There are no default checks on DNS black lists because the domains that<br />&nbsp; # contain these lists are changing all the time. However, here are two<br />&nbsp; # examples of how you can get Exim to perform a DNS black list lookup at this<br />&nbsp; # point. The first one denies, whereas the second just warns. The third<br />&nbsp; # triggers greylisting for any host in the blacklist.<br />&nbsp; #<br />&nbsp; # deny&nbsp; &nbsp; message&nbsp; &nbsp; &nbsp; &nbsp;= rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnslists&nbsp; &nbsp; &nbsp; = black.list.example<br />&nbsp; #<br />&nbsp; # warn&nbsp; &nbsp; dnslists&nbsp; &nbsp; &nbsp; = black.list.example<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;add_header&nbsp; &nbsp; = X-Warning: $sender_host_address is in a black list at $dnslist_domain<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;log_message&nbsp; &nbsp;= found in $dnslist_domain<br />&nbsp; #<br />&nbsp; # warn&nbsp; &nbsp; dnslists&nbsp; &nbsp; &nbsp; = black.list.example<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;set acl_m_greylistreasons = Host found in $dnslist_domain\n$acl_m_greylistreasons<br />&nbsp; #<br />&nbsp; #############################################################################</p><p>&nbsp; #############################################################################<br />&nbsp; # This check is commented out because it is recognized that not every<br />&nbsp; # sysadmin will want to do it. If you enable it, the check performs<br />&nbsp; # Client SMTP Authorization (csa) checks on the sending host. These checks<br />&nbsp; # do DNS lookups for SRV records. The CSA proposal is currently (May 2005)<br />&nbsp; # an Internet draft. You can, of course, add additional conditions to this<br />&nbsp; # ACL statement to restrict the CSA checks to certain hosts only.<br />&nbsp; #<br />&nbsp; # require verify = csa<br />&nbsp; #############################################################################</p><p>&nbsp; # Alternatively, greylist for it:<br />&nbsp; # warn !verify = csa<br />&nbsp; #&nbsp; &nbsp; &nbsp; set acl_m_greylistreasons = Host failed CSA check\n$acl_m_greylistreasons</p><p>&nbsp; # At this point, the address has passed all the checks that have been<br />&nbsp; # configured, so we accept it unconditionally.</p><p>&nbsp; accept</p><br /><p># This ACL is used after the contents of a message have been received. This<br /># is the ACL in which you can test a message&#039;s headers or body, and in<br /># particular, this is where you can invoke external virus or spam scanners.<br /># Some suggested ways of configuring these tests are shown below, commented<br /># out. Without any tests, this ACL accepts all messages. If you want to use<br /># such tests, you must ensure that Exim is compiled with the content-scanning<br /># extension (WITH_CONTENT_SCAN=yes in Local/Makefile).</p><p>acl_check_data:</p><p>&nbsp; # Put simple tests first. A good one is to check for the presence of a<br />&nbsp; # Message-Id: header, which RFC2822 says SHOULD be present. Some broken<br />&nbsp; # or misconfigured mailer software occasionally omits this from genuine<br />&nbsp; # messages too, though -- although it&#039;s not hard for the offender to fix<br />&nbsp; # after they receive a bounce because of it.<br />&nbsp; #<br />&nbsp; # deny&nbsp; &nbsp; condition&nbsp; = ${if !def:h_Message-ID: {1}}<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;message&nbsp; &nbsp; = RFC2822 says that all mail SHOULD have a Message-ID header.\n\<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Most messages without it are spam, so your mail has been rejected.<br />&nbsp; #<br />&nbsp; # Alternatively if we&#039;re feeling more lenient we could just use it to <br />&nbsp; # trigger greylisting instead:</p><p>&nbsp; warn&nbsp; &nbsp; condition&nbsp; = ${if !def:h_Message-ID: {1}}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set acl_m_greylistreasons = Message lacks Message-Id: header. Consult RFC2822.\n$acl_m_greylistreasons</p><p>&nbsp; # Deny if the message contains a virus. Before enabling this check, you<br />&nbsp; # must install a virus scanner and set the av_scanner option above.<br />&nbsp; #<br />&nbsp; # deny&nbsp; &nbsp; malware&nbsp; &nbsp; = *<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;message&nbsp; &nbsp; = This message contains a virus ($malware_name).</p><p>&nbsp; # Bypass SpamAssassin checks if the message is too large.<br />&nbsp; #<br />&nbsp; # accept&nbsp; condition&nbsp; = ${if &gt;={$message_size}{100000} {1}}<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;add_header = X-Spam-Note: SpamAssassin run bypassed due to message size</p><p>&nbsp; # Run SpamAssassin, but allow for it to fail or time out. Add a warning message<br />&nbsp; # and accept the mail if that happens. Add an X-Spam-Flag: header if the SA<br />&nbsp; # score exceeds the SA system threshold.<br />&nbsp; #<br />&nbsp; # warn&nbsp; &nbsp; spam&nbsp; &nbsp; &nbsp; &nbsp;= nobody/defer_ok<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;add_header = X-Spam-Flag: YES<br />&nbsp; #<br />&nbsp; # accept&nbsp; condition&nbsp; = ${if !def:spam_score_int {1}}<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;add_header = X-Spam-Note: SpamAssassin invocation failed<br />&nbsp; #<br />&nbsp; <br />&nbsp; # Unconditionally add score and report headers<br />&nbsp; #<br />&nbsp; # warn&nbsp; &nbsp; add_header = X-Spam-Score: $spam_score ($spam_bar)\n\<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; X-Spam-Report: $spam_report</p><p>&nbsp; # And reject if the SpamAssassin score is greater than ten<br />&nbsp; #<br />&nbsp; # deny&nbsp; &nbsp; condition = ${if &gt;{$spam_score_int}{100} {1}}<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;message&nbsp; &nbsp;= Your message scored $spam_score SpamAssassin point. Report follows:\n\<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$spam_report</p><p>&nbsp; # Trigger greylisting (if enabled) if the SpamAssassin score is greater than 0.5<br />&nbsp; #<br />&nbsp; # warn&nbsp; &nbsp; condition = ${if &gt;{$spam_score_int}{5} {1}}<br />&nbsp; #&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;set acl_m_greylistreasons = Message has $spam_score SpamAssassin points\n$acl_m_greylistreasons</p><br /><p>&nbsp; # If you want to greylist _all_ mail rather than only mail which looks like there<br />&nbsp; # might be something wrong with it, then you can do this...<br />&nbsp; #<br />&nbsp; # warn set acl_m_greylistreasons = We greylist all mail\n$acl_m_greylistreasons</p><p>&nbsp; # Now, invoke the greylisting. For this you need to have installed the exim-greylist<br />&nbsp; # package which contains this subroutine, and you need to uncomment the bit below<br />&nbsp; # which includes it too. Whenever the $acl_m_greylistreasons variable is non-empty,<br />&nbsp; # greylisting will kick in and will defer the mail to check if the sender is a<br />&nbsp; # proper mail which which retries, or whether it&#039;s a zombie. For more details, see<br />&nbsp; # the exim-greylist.conf.inc file itself.<br />&nbsp; #<br />&nbsp; # require acl = greylist_mail</p><p>&nbsp; accept</p><p># To enable the greylisting, also uncomment this line: <br /># .include /etc/exim/exim-greylist.conf.inc</p><p>acl_check_mime:</p><p>&nbsp; # File extension filtering.<br />&nbsp; deny message = Blacklisted file extension detected<br />&nbsp; &nbsp; &nbsp; &nbsp;condition = ${if match \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {${lc:$mime_filename}} \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {\N(\.exe|\.pif|\.bat|\.scr|\.lnk|\.com)$\N} \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{1}{0}}</p><p>&nbsp; accept</p><br /><p>######################################################################<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ROUTERS CONFIGURATION&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Specifies how addresses are handled&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #<br />######################################################################<br />#&nbsp; &nbsp; &nbsp;THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT!&nbsp; &nbsp; &nbsp; &nbsp;#<br /># An address is passed to each router in turn until it is accepted.&nbsp; #<br />######################################################################</p><p>begin routers</p><p># This router routes to remote hosts over SMTP by explicit IP address,<br /># when an email address is given in &quot;domain literal&quot; form, for example,<br /># &lt;user@[192.168.35.64]&gt;. The RFCs require this facility. However, it is<br /># little-known these days, and has been exploited by evil people seeking<br /># to abuse SMTP relays. Consequently it is commented out in the default<br /># configuration. If you uncomment this router, you also need to uncomment<br /># allow_domain_literals above, so that Exim can recognize the syntax of<br /># domain literal addresses.</p><p># domain_literal:<br />#&nbsp; &nbsp;driver = ipliteral<br />#&nbsp; &nbsp;domains = ! +local_domains<br />#&nbsp; &nbsp;transport = remote_smtp</p><br /><p># This router routes addresses that are not in local domains by doing a DNS<br /># lookup on the domain name. The exclamation mark that appears in &quot;domains = !<br /># +local_domains&quot; is a negating operator, that is, it can be read as &quot;not&quot;. The<br /># recipient&#039;s domain must not be one of those defined by &quot;domainlist<br /># local_domains&quot; above for this router to be used.<br />#<br /># If the router is used, any domain that resolves to 0.0.0.0 or to a loopback<br /># interface address (127.0.0.0/8) is treated as if it had no DNS entry. Note<br /># that 0.0.0.0 is the same as 0.0.0.0/32, which is commonly treated as the<br /># local host inside the network stack. It is not 0.0.0.0/0, the default route.<br /># If the DNS lookup fails, no further routers are tried because of the no_more<br /># setting, and consequently the address is unrouteable.</p><p>dnslookup:<br />&nbsp; driver = dnslookup<br />&nbsp; domains = ! +local_domains<br />&nbsp; transport = remote_smtp<br />&nbsp; ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8<br />&nbsp; no_more</p><p># Alternatively, comment out the above router and uncomment this one to<br /># route all mail to a smarthost instead of sending it directly to the<br /># intended recipients. If your smarthost requires authentication, change<br /># &#039;remote_smtp&#039; to &#039;remote_msa&#039; and set up the &#039;client_auth&#039; authenticator<br /># later in this file. You might need to change the port number in the<br /># remote_msa transport.<br />#<br />#smarthost:<br />#&nbsp; driver = manualroute<br />#&nbsp; domains = ! +local_domains<br />#&nbsp; transport = remote_smtp<br />#&nbsp; route_data = smarthost.myisp.net<br />#&nbsp; no_more</p><p>send_via_gmail:<br />driver = manualroute<br />domains = ! +local_domains<br />transport = gmail_smtp<br />route_list = * gmail-smtp.l.google.com</p><p># The remaining routers handle addresses in the local domain(s), that is those<br /># domains that are defined by &quot;domainlist local_domains&quot; above.</p><br /><p># This router handles aliasing using a linearly searched alias file with the<br /># name SYSTEM_ALIASES_FILE. When this configuration is installed automatically,<br /># the name gets inserted into this file from whatever is set in Exim&#039;s<br /># build-time configuration. The default path is the traditional /etc/aliases.<br /># If you install this configuration by hand, you need to specify the correct<br /># path in the &quot;data&quot; setting below.<br />#<br />##### NB&nbsp; You must ensure that the alias file exists. It used to be the case<br />##### NB&nbsp; that every Unix had that file, because it was the Sendmail default.<br />##### NB&nbsp; These days, there are systems that don&#039;t have it. Your aliases<br />##### NB&nbsp; file should at least contain an alias for &quot;postmaster&quot;.<br />#<br /># If any of your aliases expand to pipes or files, you will need to set<br /># up a user and a group for these deliveries to run under. You can do<br /># this by uncommenting the &quot;user&quot; option below (changing the user name<br /># as appropriate) and adding a &quot;group&quot; option if necessary. Alternatively, you<br /># can specify &quot;user&quot; on the transports that are used. Note that the transports<br /># listed below are the same as are used for .forward files; you might want<br /># to set up different ones for pipe and file deliveries from aliases.</p><p>system_aliases:<br />&nbsp; driver = redirect<br />&nbsp; allow_fail<br />&nbsp; allow_defer<br />&nbsp; data = ${lookup{$local_part}lsearch{/etc/aliases}}<br /># user = exim<br />&nbsp; file_transport = address_file<br />&nbsp; pipe_transport = address_pipe</p><br /><p># This router handles forwarding using traditional .forward files in users&#039;<br /># home directories. If you want it also to allow mail filtering when a forward<br /># file starts with the string &quot;# Exim filter&quot; or &quot;# Sieve filter&quot;, uncomment<br /># the &quot;allow_filter&quot; option.</p><p># If you want this router to treat local parts with suffixes introduced by &quot;-&quot;<br /># or &quot;+&quot; characters as if the suffixes did not exist, uncomment the two local_<br /># part_suffix options. Then, for example, xxxx-foo@your.domain will be treated<br /># in the same way as xxxx@your.domain by this router. You probably want to make<br /># the same change to the localuser router.</p><p># The no_verify setting means that this router is skipped when Exim is<br /># verifying addresses. Similarly, no_expn means that this router is skipped if<br /># Exim is processing an EXPN command.</p><p># The check_ancestor option means that if the forward file generates an<br /># address that is an ancestor of the current one, the current one gets<br /># passed on instead. This covers the case where A is aliased to B and B<br /># has a .forward file pointing to A.</p><p># The three transports specified at the end are those that are used when<br /># forwarding generates a direct delivery to a file, or to a pipe, or sets<br /># up an auto-reply, respectively.</p><p>userforward:<br />&nbsp; driver = redirect<br />&nbsp; check_local_user<br /># local_part_suffix = +* : -*<br /># local_part_suffix_optional<br />&nbsp; file = $home/.forward<br />&nbsp; allow_filter<br />&nbsp; no_verify<br />&nbsp; no_expn<br />&nbsp; check_ancestor<br />&nbsp; file_transport = address_file<br />&nbsp; pipe_transport = address_pipe<br />&nbsp; reply_transport = address_reply</p><p>procmail:<br />&nbsp; driver = accept<br />&nbsp; check_local_user<br />&nbsp; require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail<br />&nbsp; transport = procmail<br />&nbsp; no_verify</p><p># This router matches local user mailboxes. If the router fails, the error<br /># message is &quot;Unknown user&quot;.</p><p># If you want this router to treat local parts with suffixes introduced by &quot;-&quot;<br /># or &quot;+&quot; characters as if the suffixes did not exist, uncomment the two local_<br /># part_suffix options. Then, for example, xxxx-foo@your.domain will be treated<br /># in the same way as xxxx@your.domain by this router.</p><p>localuser:<br />&nbsp; driver = accept<br />&nbsp; check_local_user<br /># local_part_suffix = +* : -*<br /># local_part_suffix_optional<br />&nbsp; transport = local_delivery<br />&nbsp; cannot_route_message = Unknown user</p><br /><br /><p>######################################################################<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TRANSPORTS CONFIGURATION&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #<br />######################################################################<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ORDER DOES NOT MATTER&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #<br />#&nbsp; &nbsp; &nbsp;Only one appropriate transport is called for each delivery.&nbsp; &nbsp; #<br />######################################################################</p><p># A transport is used only when referenced from a router that successfully<br /># handles an address.</p><p>begin transports</p><br /><p># This transport is used for delivering messages over SMTP connections.</p><p>remote_smtp:<br />&nbsp; driver = smtp</p><p>gmail_smtp:<br />driver = smtp<br />port = 587<br />hosts_require_auth = gmail-smtp.l.google.com<br />hosts_require_tls = gmail-smtp.l.google.com</p><p># This transport is used for delivering messages over SMTP using the<br /># &quot;message submission&quot; port (RFC4409).</p><p>remote_msa:<br />&nbsp; driver = smtp<br />&nbsp; port = 587<br />&nbsp; hosts_require_auth = *</p><br /><p># This transport invokes procmail to deliver mail<br />procmail:<br />&nbsp; driver = pipe<br />&nbsp; command = &quot;/usr/bin/procmail -d $local_part&quot;<br />&nbsp; return_path_add<br />&nbsp; delivery_date_add<br />&nbsp; envelope_to_add<br />&nbsp; user = $local_part<br />&nbsp; initgroups<br />&nbsp; return_output</p><p># This transport is used for local delivery to user mailboxes in traditional<br /># BSD mailbox format. By default it will be run under the uid and gid of the<br /># local user, and requires the sticky bit to be set on the /var/mail directory.<br /># Some systems use the alternative approach of running mail deliveries under a<br /># particular group instead of using the sticky bit. The commented options below<br /># show how this can be done.</p><p>local_delivery:<br />&nbsp; driver = appendfile<br />&nbsp; file = /var/mail/$local_part<br />&nbsp; delivery_date_add<br />&nbsp; envelope_to_add<br />&nbsp; return_path_add<br />&nbsp; group = mail<br />&nbsp; mode = 0660</p><br /><p># This transport is used for handling pipe deliveries generated by alias or<br /># .forward files. If the pipe generates any standard output, it is returned<br /># to the sender of the message as a delivery error. Set return_fail_output<br /># instead of return_output if you want this to happen only when the pipe fails<br /># to complete normally. You can set different transports for aliases and<br /># forwards if you want to - see the references to address_pipe in the routers<br /># section above.</p><p>address_pipe:<br />&nbsp; driver = pipe<br />&nbsp; return_output</p><br /><p># This transport is used for handling deliveries directly to files that are<br /># generated by aliasing or forwarding.</p><p>address_file:<br />&nbsp; driver = appendfile<br />&nbsp; delivery_date_add<br />&nbsp; envelope_to_add<br />&nbsp; return_path_add</p><br /><p># This transport is used for handling autoreplies generated by the filtering<br /># option of the userforward router.</p><p>address_reply:<br />&nbsp; driver = autoreply</p><br /><p># This transport is used to deliver local mail to cyrus IMAP server via UNIX <br /># socket. You&#039;ll need to configure the &#039;localuser&#039; router above to use it.<br />#<br />#lmtp_delivery:<br />#&nbsp; home_directory = /var/spool/imap<br />#&nbsp; driver = lmtp<br />#&nbsp; command = &quot;/usr/lib/cyrus-imapd/deliver -l&quot;<br />#&nbsp; batch_max = 20<br />#&nbsp; user = cyrus</p><br /><p>######################################################################<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RETRY CONFIGURATION&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#<br />######################################################################</p><p>begin retry</p><p># This single retry rule applies to all domains and all errors. It specifies<br /># retries every 15 minutes for 2 hours, then increasing retry intervals,<br /># starting at 1 hour and increasing each time by a factor of 1.5, up to 16<br /># hours, then retries every 6 hours until 4 days have passed since the first<br /># failed delivery.</p><p># WARNING: If you do not have any retry rules at all (this section of the<br /># configuration is non-existent or empty), Exim will not do any retries of<br /># messages that fail to get delivered at the first attempt. The effect will<br /># be to treat temporary errors as permanent. Therefore, DO NOT remove this<br /># retry rule unless you really don&#039;t want any retries.</p><p># Address or Domain&nbsp; &nbsp; Error&nbsp; &nbsp; &nbsp; &nbsp;Retries<br /># -----------------&nbsp; &nbsp; -----&nbsp; &nbsp; &nbsp; &nbsp;-------</p><p>*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;F,2h,15m; G,16h,1h,1.5; F,4d,6h</p><br /><br /><p>######################################################################<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REWRITE CONFIGURATION&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#<br />######################################################################</p><p># There are no rewriting specifications in this default configuration file.</p><p>begin rewrite</p><br /><br /><p>######################################################################<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AUTHENTICATION CONFIGURATION&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#<br />######################################################################</p><p>begin authenticators</p><p># This authenticator supports CRAM-MD5 username/password authentication<br /># with Exim acting as a _client_, as it might when sending its outgoing<br /># mail to a smarthost rather than directly to the final recipient.<br /># Replace SMTPAUTH_USERNAME and SMTPAUTH_PASSWORD as appropriate.</p><p>gmail_login:<br />driver = plaintext<br />public_name = LOGIN<br />client_send = : мое_мыло@gmail.com : пасс</p><p>#client_auth:<br />#&nbsp; driver = cram_md5<br />#&nbsp; public_name = CRAM-MD5<br />#&nbsp; client_name = SMTPAUTH_USERNAME<br />#&nbsp; client_secret = SMTPAUTH_PASSWORD</p><p>#</p><p># The following authenticators support plaintext username/password<br /># authentication using the standard PLAIN mechanism and the traditional<br /># but non-standard LOGIN mechanism, with Exim acting as the server.<br /># PLAIN and LOGIN are enough to support most MUA software.<br />#<br /># These authenticators are not complete: you need to change the<br /># server_condition settings to specify how passwords are verified.<br /># They are set up to offer authentication to the client only if the<br /># connection is encrypted with TLS, so you also need to add support<br /># for TLS. See the global configuration options section at the start<br /># of this file for more about TLS.<br />#<br /># The default RCPT ACL checks for successful authentication, and will accept<br /># messages from authenticated users from anywhere on the Internet.</p><p># </p><p># PLAIN authentication has no server prompts. The client sends its<br /># credentials in one lump, containing an authorization ID (which we do not<br /># use), an authentication ID, and a password. The latter two appear as<br /># $auth2 and $auth3 in the configuration and should be checked against a<br /># valid username and password. In a real configuration you would typically<br /># use $auth2 as a lookup key, and compare $auth3 against the result of the<br /># lookup, perhaps using the crypteq{}{} condition.</p><p>#PLAIN:<br />#&nbsp; driver&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= plaintext<br />#&nbsp; server_set_id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = $auth2<br />#&nbsp; server_prompts&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= :<br />#&nbsp; server_condition&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= ${if saslauthd{{$2}{$3}{smtp}} {1}}<br />#&nbsp; server_advertise_condition = ${if def:tls_cipher }</p><p># LOGIN authentication has traditional prompts and responses. There is no<br /># authorization ID in this mechanism, so unlike PLAIN the username and<br /># password are $auth1 and $auth2. Apart from that you can use the same<br /># server_condition setting for both authenticators.</p><p>#LOGIN:<br />#&nbsp; driver&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= plaintext<br />#&nbsp; server_set_id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = $auth1<br />#&nbsp; server_prompts&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &lt;| Username: | Password:<br />#&nbsp; server_condition&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= ${if saslauthd{{$1}{$2}{smtp}} {1}}<br />#&nbsp; server_advertise_condition = ${if def:tls_cipher }</p><br /><p>######################################################################<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CONFIGURATION FOR local_scan()&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#<br />######################################################################</p><p># If you have built Exim to include a local_scan() function that contains<br /># tables for private options, you can define those options here. Remember to<br /># uncomment the &quot;begin&quot; line. It is commented by default because it provokes<br /># an error with Exim binaries that are not built with LOCAL_SCAN_HAS_OPTIONS<br /># set in the Local/Makefile.</p><p># begin local_scan</p><br /><p># End of Exim configuration file</p></div></div>]]></content>
			<author>
				<name><![CDATA[4fun]]></name>
				<uri>https://linuxforum.ru/profile.php?id=16085</uri>
			</author>
			<updated>2013-11-16T09:39:33Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=376316#p376316</id>
		</entry>
</feed>
