Eu não sou especialista em Exim, mas seu transporte local_delivery está extraindo o campo 4 do arquivo de senha, e parece que o nome do arquivo é o quinto campo.
Eu tenho o Cenos 6 instalado na instância do Amazon EC2. Também instalo o exim + dovecot para enviar e receber emails. Eu tenho dois domínios e duas interfaces de rede com IPs elásticos conectados. No exemplo, os IPs internos são:
172.31.108.135
172.31.110.53
e dois domínios:
domain1.com
domain2.com
Eu configuro o exim com manuais e exemplos (+ DKIM, PTR etc). E o envio funciona bem. Mas eu não posso receber e-mails para minhas caixas de correio.
Meus arquivos / etc / exim / folder:
aliases arquivo vazio
lista negra arquivo vazio
dnsblists arquivo vazio
domainips
domain1.com:172.31.108.135
domain2.com:172.31.110.53
domínios
domain1.com:domain1.com::no
domain2.com:domain2.com::no
passwd
[email protected]:93:93:100:/var/mailboxes/domain1.com/noreply:no:
[email protected]:93:93:100:/var/mailboxes/domain2.com/info:no:
lista de autorizações arquivo vazio
pipe-aliases arquivo vazio
Configuração principal: exim.conf
log_selector = \
+all_parents \
+lost_incoming_connection \
+received_sender \
+received_recipients \
+tls_cipher +tls_peerdn \
+smtp_confirmation \
+smtp_syntax_error \
+smtp_protocol_error
trusted_users = apache
domainlist local_domains = lsearch;/etc/exim/domains
domainlist dummy_domains =
hostlist relay_from_hosts = 127.0.0.1
domainlist relay_to_domains = lsearch;/etc/exim/domains
exim_user = exim
exim_group = exim
never_users = root
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 0s
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
tls_advertise_hosts =
disable_ipv6 = true
begin acl
acl_check_rcpt:
accept hosts = net-lsearch;/etc/exim/whitelist
deny hosts = net-lsearch;/etc/exim/blacklist
message = $host_data
deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]
deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\.\./
accept local_parts = postmaster
verify = recipient
domains = +local_domains
require verify = sender
accept hosts = +relay_from_hosts
control = submission
accept authenticated = *
condition = ${if eq{${extract{5}{:}{${lookup{$authenticated_id}lsearch{/etc/exim/passwd}}}}}{no} {yes}{no}}
condition = ${if eq{${extract{3}{:}{${lookup{${domain:$authenticated_id}}lsearch{/etc/exim/domains}}}}}{no} {yes}{no}}
control = submission/domain=
deny message = rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
dnslists = ${readfile {/etc/exim/dnsblists}{:}}
require message = relay not permitted
domains = +local_domains : +relay_to_domains
require verify = recipient
accept
acl_check_data:
accept
begin routers
dnslookup:
driver = dnslookup
domains = !+dummy_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
self = pass
no_more
disabled_domains:
driver = redirect
condition = ${extract{3}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
allow_fail = yes
data = :fail: Domain disabled
no_more
disabled_users:
driver = redirect
condition = ${extract{5}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}
allow_fail = yes
data = :fail: User disabled
no_more
local_domains:
driver = redirect
data = ${quote_local_part:$local_part}@${extract{1}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
cannot_route_message = Unknown user
no_more
group_aliases:
driver = redirect
data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/aliases}}}}
condition = ${if and{\
{exists{/etc/exim/aliases}}\
{eq {${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/aliases}}}}} {group} }\
} {yes} {no} }
redirect_router = a_dnslookup
aliases:
driver = redirect
data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/aliases}}}}
condition = ${if exists{/etc/exim/aliases} {yes} {no} }
aliases_pipe:
driver = redirect
pipe_transport = address_pipe
data = ${lookup {$local_part@$domain} lsearch{/etc/exim/pipe-aliases}}
condition =${lookup {$local_part@$domain} lsearch{/etc/exim/pipe-aliases} {yes} {no} }
local_users:
driver = redirect
condition = ${lookup {$local_part@$domain} lsearch {/etc/exim/passwd} {yes} {no} }
data = $local_part@$domain
redirect_router = autoreplay
catchall_for_domains:
driver = redirect
headers_add = X-redirected: yes
data = ${extract{2}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
file_transport = local_delivery
unknown_users:
driver = redirect
allow_fail = yes
data = :fail: Unknown user
no_more
autoreplay:
driver = accept
condition = ${if exists{${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}/message.txt} {yes} {no}}
retry_use_local_part
transport = address_reply
unseen
localuser:
driver = accept
transport = local_delivery
# Same routers without autoreplay
a_dnslookup:
driver = dnslookup
domains = !+dummy_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
self = pass
no_more
a_disabled_domains:
driver = redirect
condition = ${extract{3}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
allow_fail = yes
data = :fail: Domain disabled
no_more
a_disabled_users:
driver = redirect
condition = ${extract{5}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}
allow_fail = yes
data = :fail: User disabled
no_more
a_local_domains:
driver = redirect
data = ${quote_local_part:$local_part}@${extract{1}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
cannot_route_message = Unknown user
redirect_router = a_dnslookup
no_more
a_aliases:
driver = redirect
data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/aliases}}}}
condition = ${if exists{/etc/exim/aliases} {yes} {no} }
redirect_router = a_dnslookup
a_aliases_pipe:
driver = accept
transport = aliases_pipe
condition = ${lookup {$local_part@$domain} lsearch {/etc/exim/pipe-aliases} {yes} {no} }
a_local_users:
driver = accept
transport = local_delivery
condition = ${lookup {$local_part@$domain} lsearch {/etc/exim/passwd} {yes} {no} }
a_catchall_for_domains:
driver = redirect
headers_add = X-redirected: yes
data = ${extract{2}{:}{${lookup{$domain}lsearch{/etc/exim/domains}}}}
file_transport = local_delivery
redirect_router = a_dnslookup
begin transports
DKIM_DOMAIN = ${lc:${domain:$h_from:}}
DKIM_FILE = /etc/exim/${lc:${domain:$h_from:}}.key
DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}
remote_smtp:
driver = smtp
dkim_domain = DKIM_DOMAIN
dkim_selector = mail
dkim_private_key = DKIM_PRIVATE_KEY
interface = ${extract{1}{:}{${lookup{$sender_address_domain}lsearch{/etc/exim/domainips}}}}
helo_data = $sender_address_domain
local_delivery:
driver = appendfile
file = ${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}/inbox
delivery_date_add
envelope_to_add
return_path_add
mode = 0660
quota = ${extract{3}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}M
quota_warn_threshold = 75%
use_lockfile = no
no_mode_fail_narrower
user = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}
group = ${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}
address_pipe:
driver = pipe
return_output
aliases_pipe:
driver = pipe
command = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/pipe-aliases}}}}
use_shell
address_reply:
driver = autoreply
headers = ${readfile{${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim/passwd}}}}/message.txt}}
to = $sender_address
begin retry
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
begin rewrite
begin authenticators
login:
driver = dovecot
public_name = LOGIN
server_socket = /var/run/dovecot/auth-client
server_set_id = $1
plain:
driver = dovecot
public_name = PLAIN
server_socket = /var/run/dovecot/auth-client
server_set_id = $1
O envio funciona bem. Mas se eu enviar e-mail para qualquer caixa de correio, recebo esse erro nos logs: (muitas cordas) [email protected] é caixa de correio de teste
2018-01-10 19:25:20 1eZM00-0007qZ-FJ DKIM: d=test.com s=mail2 c=relaxed/relaxed a=rsa-sha256 b=1024 [verification succeeded]
2018-01-10 19:25:20 1eZM00-0007qZ-FJ <= [email protected] H=smtp32.i.test.com [94.100.177.92] P=esmtp S=1801 [email protected] from <[email protected]> for [email protected]
2018-01-10 19:25:21 1eZM01-0007qc-9j DKIM: d=test.com s=mail2 c=relaxed/relaxed a=rsa-sha256 b=1024 [verification succeeded]
2018-01-10 19:25:21 1eZM01-0007qc-9j <= [email protected] H=mail.domain1.com (test.com) [52.88.16.47] P=esmtp K S=2045 [email protected] from <[email protected]> for [email protected]
2018-01-10 19:25:21 1eZM00-0007qZ-FJ => [email protected] R=dnslookup T=remote_smtp H=domain1.com [52.88.16.47] K C="250- 1831 byte chunk, total 1831\n250 OK id=1eZM01-0007qc-9j"
2018-01-10 19:25:21 1eZM00-0007qZ-FJ Completed
E a caixa de correio está vazia.
Por favor, ajude a resolver este problema. Se você precisar de algum log adicional, por favor me avise.
Eu não sou especialista em Exim, mas seu transporte local_delivery está extraindo o campo 4 do arquivo de senha, e parece que o nome do arquivo é o quinto campo.
Tags exim