Всем привет. Народ помогите разобраться с почтовым серваком exim4.Стоит он на дебиане.
Есть сервак с IP допустим 213.93.85.36 на нем вертятся апачи и т.д и он же является почтовым. Почта с него уходит и приходит непонятно как.
Если допустим в зоне указать МХ от гугла, почта начинает отправлятся отлично,все доходит до адресатов. Но если я например отсылаю с почту с внешнего домена mail.ru то почта не приходит.
Настройки зоны:
* A 213.93.85.36
@ A 213.93.85.36
@ MX 40 213.93.85.36.
@ MX 30 213.93.85.36.При такой настройке зоны, в режиме отладки exim даже не риагирует на то что я отправляю почту с mail.ru
Екзим прослушивает: daemon: -q30m, listening for SMTP on [127.0.0.1]:25 [213.93.85.36 ]:25
Не могу понять в чем дело, что не так указал,заранее благодарю.
Забыл сказать... На серваке стоит ISP Manager и в свойствах домена там такие настройки:
MX mail
NS ns1.nameself.com.
NS ns2.nameself.com.
A 213.93.85.36Ну еще там несколько записей есть для ftp и т.д
Реальные данные давай
вот мой конфиг полностью.
SA_ENABLE = yeslog_selector = \
+all_parents \
+lost_incoming_connection \
+received_sender \
+received_recipients \
+tls_cipher +tls_peerdn \
+smtp_confirmation \
+smtp_syntax_error \
+smtp_protocol_error
.ifdef MAILMAN_ENABLE
MAILMAN_HOME=__MAILMAN_HOME__
MAILMAN_WRAP=__MAILMAN_WRAP__
MAILMAN_USER=__MAILMAN_USER__
MAILMAN_GROUP=__MAILMAN_GROUP__
.endiflocal_interfaces = 127.0.0.1 : 213.93.85.36
domainlist local_domains = lsearch;/etc/exim4/domains
domainlist dummy_domains =
hostlist relay_from_hosts = 127.0.0.1 : 213.93.85.36domainlist relay_to_domains = lsearch;/etc/exim4/domains
exim_user = Debian-exim
exim_group = Debian-eximnever_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_databegin acl
acl_check_rcpt:
accept hosts = net-lsearch;/etc/exim4/whitelist
deny hosts = net-lsearch;/etc/exim4/blacklist
message = $host_datadeny 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_domainsrequire verify = sender
accept hosts = +relay_from_hosts
control = submissionaccept authenticated = *
condition = ${if eq{${extract{5}{:}{${lookup{$authenticated_id}lsearch{/etc/exim4/passwd}}}}}{no} {yes}{no}}
condition = ${if eq{${extract{3}{:}{${lookup{${domain:$authenticated_id}}lsearch{/etc/exim4/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/exim4/dnsblists}{:}}require message = relay not permitted
domains = +local_domains : +relay_to_domainsrequire verify = recipient
.ifdef POSTGREY_SOCKET
defer log_message = greylisted host $sender_host_address
set acl_m0 = request=smtpd_access_policy\nprotocol_state=RCPT\nprotocol_name=${uc:$received_protocol}\nhelo_name=$sender_helo_name\nclient_address=$sender_host_address\nclient_name=$sender_host_name\nsender=$sender_address\nrecipient=$local_part@$domain\ninstance=$sender_host_address/$sender_address/$local_part@$domain\n\n
set acl_m0 = ${sg{${readsocket{POSTGREY_SOCKET}{$acl_m0}{5s}{}{action=DUNNO}}}{action=}{}}
message = ${sg{$acl_m0}{^\\w+\\s*}{}}
condition = ${if eq{${uc:${substr{0}{5}{$acl_m0}}}}{DEFER}{true}{false}}
.endifaccept
acl_check_data:
acceptbegin 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_moredisabled_domains:
driver = redirect
condition = ${extract{3}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
allow_fail = yes
data = :fail: Domain disabled
no_moredisabled_users:
driver = redirect
condition = ${extract{5}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}
allow_fail = yes
data = :fail: User disabled
no_morelocal_domains:
driver = redirect
data = ${quote_local_part:$local_part}@${extract{1}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
cannot_route_message = Unknown user
no_more.ifdef SA_ENABLE
spamcheck_router:
no_verify
condition = "${if and { {!def:h_X-Spam-Flag:} {!eq {$received_protocol}{spam-scanned}}} {1}{0}}"
driver = accept
transport = spamcheck
.endifgroup_aliases:
driver = redirect
data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/aliases}}}}
condition = ${if and{\
{exists{/etc/exim4/aliases}}\
{eq {${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/aliases}}}}} {group} }\
} {yes} {no} }
redirect_router = a_dnslookupaliases:
driver = redirect
data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/aliases}}}}
condition = ${if exists{/etc/exim4/aliases} {yes} {no} }aliases_pipe:
driver = accept
transport = aliases_pipe
condition = ${lookup {$local_part@$domain} lsearch {/etc/exim4/pipe-aliases} {yes} {no} }local_users:
driver = redirect
condition = ${lookup {$local_part@$domain} lsearch {/etc/exim4/passwd} {yes} {no} }
data = $local_part@$domain
redirect_router = autoreplay.ifdef MAILMAN_ENABLE
mailman:
driver = accept
require_files = MAILMAN_HOME/lists/$local_part/config.pck
local_part_suffix_optional
local_part_suffix = -bounces : -bounces+* : -confirm+* : -join : -leave : -owner : -request : -admin : -subscribe : -unsubscribe
transport = mailmanmailman_isp:
driver = accept
require_files = MAILMAN_HOME/lists/$local_part-$domain/config.pck
local_part_suffix_optional
local_part_suffix = -bounces : -bounces+* : -confirm+* : -join : -leave : -owner : -request : -admin : -subscribe : -unsubscribe
transport = mailman_isp
.endifcatchall_for_domains:
driver = redirect
headers_add = X-redirected: yes
data = ${extract{2}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
file_transport = local_deliveryunknown_users:
driver = redirect
allow_fail = yes
data = :fail: Unknown user
no_moreautoreplay:
driver = accept
condition = ${if exists{${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}/message.txt} {yes} {no}}
retry_use_local_part
transport = address_reply
unseenlocaluser:
driver = accept
transport = local_deliverya_dnslookup:
driver = dnslookup
domains = !+dummy_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
self = pass
no_morea_disabled_domains:
driver = redirect
condition = ${extract{3}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
allow_fail = yes
data = :fail: Domain disabled
no_morea_disabled_users:
driver = redirect
condition = ${extract{5}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}
allow_fail = yes
data = :fail: User disabled
no_morea_local_domains:
driver = redirect
data = ${quote_local_part:$local_part}@${extract{1}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
cannot_route_message = Unknown user
redirect_router = a_dnslookup
no_morea_aliases:
driver = redirect
data = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/aliases}}}}
condition = ${if exists{/etc/exim4/aliases} {yes} {no} }
redirect_router = a_dnslookupa_aliases_pipe:
driver = accept
transport = aliases_pipe
condition = ${lookup {$local_part@$domain} lsearch {/etc/exim4/pipe-aliases} {yes} {no} }a_local_users:
driver = accept
transport = local_delivery
condition = ${lookup {$local_part@$domain} lsearch {/etc/exim4/passwd} {yes} {no} }.ifdef MAILMAN_ENABLE
a_mailman:
driver = accept
require_files = MAILMAN_HOME/lists/$local_part/config.pck
local_part_suffix_optional
local_part_suffix = -bounces : -bounces+* : -confirm+* : -join : -leave : -owner : -request : -admin : -subscribe : -unsubscribe
transport = mailmana_mailman_isp:
driver = accept
require_files = MAILMAN_HOME/lists/$local_part-$domain/config.pck
local_part_suffix_optional
local_part_suffix = -bounces : -bounces+* : -confirm+* : -join : -leave : -owner : -request : -admin : -subscribe : -unsubscribe
transport = mailman_isp
.endifa_catchall_for_domains:
driver = redirect
headers_add = X-redirected: yes
data = ${extract{2}{:}{${lookup{$domain}lsearch{/etc/exim4/domains}}}}
file_transport = local_delivery
redirect_router = a_dnslookupbegin transports
remote_smtp:
driver = smtp
local_delivery:
driver = appendfile
file = ${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}/mbox
delivery_date_add
envelope_to_add
return_path_add
mode = 0660
quota = ${extract{3}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}M
quota_warn_threshold = 75%
use_lockfile = no
no_mode_fail_narrower
user = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}
group = ${extract{2}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}
address_pipe:
driver = pipe
return_output
aliases_pipe:
driver = pipe
command = ${extract{1}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/pipe-aliases}}}}
use_shell
address_reply:
driver = autoreply
headers = ${readfile{${extract{4}{:}{${lookup{$local_part@$domain}lsearch{/etc/exim4/passwd}}}}/message.txt}}
to = $sender_address.ifdef MAILMAN_ENABLE
mailman_isp:
driver = pipe
command = MAILMAN_WRAP '${if def:local_part_suffix {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} {post}}' $local_part-$domain
current_directory = MAILMAN_HOME
home_directory = MAILMAN_HOME
user = MAILMAN_USER
group = MAILMAN_GROUPmailman:
driver = pipe
command = MAILMAN_WRAP '${if def:local_part_suffix {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} {post}}' $local_part
current_directory = MAILMAN_HOME
home_directory = MAILMAN_HOME
user = MAILMAN_USER
group = MAILMAN_GROUP
.endif.ifdef SA_ENABLE
spamcheck:
debug_print = "T: spamassassin_pipe for $local_part@$domain"
driver = pipe
command = /usr/sbin/exim4 -oMr spam-scanned -bS
use_bsmtp
transport_filter = /usr/bin/spamc
home_directory = "/tmp"
current_directory = "/tmp"
user = Debian-exim
group = Debian-exim
return_fail_output
message_prefix =
message_suffix =
.endifbegin retry
* * F,2h,15m; G,16h,1h,1.5; F,4d,6hbegin rewrite
.ifdef MAILMAN_ENABLE
\N^(.*<)?([^<]*)@([^>]*).*$\N "${if exists{MAILMAN_HOME/lists/${sg{$2}{-$3.*}{-$3}}/config.pck} {${sg{$0} {-$3} {}}} {$0} }" S
\N^(.*<)?([^<]*)@([^>]*).*$\N "${if exists{MAILMAN_HOME/lists/${sg{$2}{-$3.*}{-$3}}/config.pck} {${sg{$0} {-$3} {}}} {$0} }"
.endifbegin authenticators
cram:
driver = cram_md5
public_name = CRAM-MD5
server_secret = ${extract {6} {:} {${lookup{$1}lsearch{/etc/exim4/passwd}}}}
server_set_id = $1plain:
driver = plaintext
public_name = PLAIN
server_prompts = :
server_condition = ${if and{{!eq{$3}{}} {eq {$3} {${extract {6} {:} {${lookup{$2}lsearch{/etc/exim4/passwd}}}}}}} {yes} {no} }
server_set_id = $2login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${if and{{!eq{$2}{}} {eq {$2} {${extract {6} {:} {${lookup{$1}lsearch{/etc/exim4/passwd}}}}}}} {yes} {no} }
server_set_id = $1
похоже что письма доходят только если везде писать по анлийски 0_о
Письма с кирилицей не доходят, как так ?
Вообще то я имел ввиду данные домена, а не конфиг
Я вроде разобрался с этим. У меня теперь,если отправить почту,идет проверка спамассасином и русский текст преобразуется в фигню типа "хай" подскажи пожалуйста как это лечится ?
"хай" было в письме а уxim его преобразовал в !#1087;#1088;#10!80;k!4; типо того.