Прошу помощи
Развернул Exim+LDAP на виртуальном выделенном сервере. Делал по статье http://www.lissyara.su/articles/freebsd/mail/exim+ldap/
Небольшие изменения, которые внес - отказался от сертификатов, (соответственно закоментил соответствующие строки в конфиге ексима)
Столкнулся с проблемой авторизации:
При попытке получения почты TheBat пишет:
Код: Выделить всё
25.12.2009, 22:59:56: FETCH - Получение новой почты
!25.12.2009, 22:59:57: FETCH - Невозможно соединиться с сервером
При отправке:
Код: Выделить всё
25.12.2009, 23:55:03: SEND - Отправка почты - писем в очереди: 1
25.12.2009, 23:55:03: SEND - Соединение с SMTP сервером прошло удачно
25.12.2009, 23:55:03: SEND - Отправка письма для user@mail.ru
25.12.2009, 23:55:03: SEND - Последний переданный адрес получателя был <user@mail.ru>
!25.12.2009, 23:55:03: SEND - Письмо не отправлено. Сервер сообщает: Sender verify failed
25.12.2009, 23:55:03: SEND - Соединение завершено - отправлено писем: 0
25.12.2009, 23:55:03: SEND - Не удалось отправить некоторые письма - подробности смотрите в Журнале работы
Код: Выделить всё
domain exim[859]: H=(HOST) [xxx.xxx.xxx.xxx] I=[yyy.yyy.yyy.yyy]:587 sender verify fail for <admin@domain.ru>: Unrouteable address
domain exim[859]: H=(HOST) [xxx.xxx.xxx.xxx] I=[yyy.yyy.yyy.yyy]:587 sender verify fail for <admin@domain.ru>: Unrouteable address
domain exim[859]: H=(HOST) [xxx.xxx.xxx.xxx] I=[yyy.yyy.yyy.yyy]:587 F=<admin@domain.ru> rejected RCPT <user@mail.ru>: Sender verify failed
domain exim[859]: H=(HOST) [xxx.xxx.xxx.xxx] I=[yyy.yyy.yyy.yyy]:587 F=<admin@domain.ru> rejected RCPT <user@mail.ru>: Sender verify failed
Код: Выделить всё
domain exim[714]: auth_login authenticator failed for (host) [xxx.xxx.xxx.xxx] I=[yyy.yyy.yyy.yyy]:25: 435 Unable to authenticate at present (set_id=admin@domain.ru): lookup of "user="cn=exim,ou=system,dc=domain,dc=ru" pass="secret" ldap:///ou=exim,dc=domain,dc=ru??sub? (&(accountStatus=active)(mail=admin%40domain.ru) (clearPassword=password))" gave DEFER: ldap_search failed: -7, Bad search filter
Код: Выделить всё
domain exim[707]: rejected EHLO from [xxx.xxx.xxx.xxx] I=[yyy.yyy.yyy.yyy]:587: syntactically invalid argument(s): (no argument given)
Код: Выделить всё
dn: ou=exim,dc=domain,dc=ru
objectClass: top
objectClass: organizationalUnit
ou: exim
dn: mail=admin@domain.ru,ou=exim,dc=domain,dc=ru
objectClass: top
objectClass: MailAccount
mail: admin@domain.ru
accountStatus: active
mailMessageStore: Maildir/
clearPassword: secret
gecos: Administrator
homeDirectory: exim/admin
mailQuotaSize: 1024
Код: Выделить всё
primary_hostname = mail.domain.ru
ldap_default_servers = yyy.yyy.yyy.yyy::389
LDAP_AUTH = user="cn=exim,ou=system,dc=domain,dc=ru" pass="secret"
domainlist local_domains = domain.ru
domainlist relay_to_domains = domain.ru
hostlist relay_from_hosts = localhost:127.0.0.1
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
av_scanner = clamd:/var/run/clamav/clamd
daemon_smtp_ports = 25 : 587
#tls_advertise_hosts = *
#tls_certificate = /usr/local/etc/ssl/mail.pem
#tls_privatekey = /usr/local/etc/ssl/mail.pem
qualify_domain = domain.ru
qualify_recipient = domain.ru
allow_domain_literals = false
exim_user = mailnull
exim_group = mail
never_users = root
#rfc1413_hosts = *
rfc1413_query_timeout = 0s
ignore_bounce_errors_after = 45m
timeout_frozen_after = 7d
# freeze_tell = root@domain.ru
# auto_thaw = 1h
# helo_accept_junk_hosts = 192.168.1.0/24
# smtp_banner = "$primary_hostname, ESMTP EXIM $version_number"
smtp_accept_max = 20
smtp_accept_max_per_connection = 4
smtp_connect_backlog = 30
smtp_accept_max_per_host = 4
split_spool_directory = true
remote_max_parallel = 5
# return_size_limit = 70k
message_size_limit = 2M
helo_allow_chars = _
smtp_enforce_sync = true
log_selector = \
+all_parents \
+connection_reject \
+incoming_interface \
+lost_incoming_connection \
+received_sender \
+received_recipients \
+smtp_confirmation \
+smtp_syntax_error \
+smtp_protocol_error \
-queue_run
syslog_timestamp = no
begin acl
acl_check_rcpt:
accept hosts = :
# control = dkim_disable_verify
deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]
deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
require verify = sender
deny message = "HELO/EHLO ПВСЪБОП ВЩФШ РП SMTP RFC"
condition = ${if eq{$sender_helo_name}{}{yes}{no}}
deny message = "оЕ ОБДП РЙИБФШ УЧПК IP Ч ЛБЮЕУФЧЕ HELO!"
hosts = *:!+relay_from_hosts
condition = ${if eq{$sender_helo_name}\
{$sender_host_address}{true}{false}}
deny condition = ${if eq{$sender_helo_name}\
{$interface_address}{yes}{no}}
hosts = !127.0.0.1 : !localhost : *
message = "ьФП НПК IP-БДТЕУ! рЫЕМ ЧПО!"
deny condition = ${if match{$sender_helo_name}\
{\N^\d+$\N}{yes}{no}}
hosts = !127.0.0.1:!localhost:*
message = "ч HELO ОЕ НПЗХФ ВЩФШ ФПМШЛП ГЩЖТЩ!"
deny message = "оЕ ОТБЧЙФУС НОЕ чБЫ ИПУФ..."
condition = ${if match{$sender_host_name} \
{adsl|dialup|pool|peer|dhcp} \
{yes}{no}}
accept authenticated = *
warn
set acl_m0 = 25s
warn
hosts = +relay_from_hosts
set acl_m0 = 0s
accept domains = +local_domains
endpass
message = "ч ЬФПН ДПНЕОЕ ОЕФ ФБЛПЗП РПМШЪПЧБФЕМС"
verify = recipient
accept domains = +relay_to_domains
endpass
message = "оЕ ЪОБА С ДПТПЗЙ ОБ ЬФПФ ИПУФ..."
verify = recipient
accept hosts = +relay_from_hosts
deny message = "рПЙЭЙ УЧПВПДОЩК ТЕМЕК Ч ДТХЗПН НЕУФЕ."
acl_check_data:
accept
begin routers
dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup ldapm{LDAP_AUTH \
ldap:///ou=exim,dc=domain,dc=ru?mail?sub?(&(accountStatus=active) \
(mailAlternateAddress=${quote_ldap:$local_part} \
${quote_ldap:@}${quote_ldap:$domain}))}}
ldapuser:
driver = accept
condition = ${if eq{}{${lookup ldapdn{LDAP_AUTH \
ldap:///ou=exim,dc=domain,dc=ru??sub?(&(accountStatus=active) \
(mail=${quote_ldap:$local_part}${quote_ldap:@} \
${quote_ldap:$domain}))}}}{no}{yes}}
transport = ldap_delivery
begin transports
remote_smtp:
driver = smtp
ldap_delivery:
driver = appendfile
check_string = ""
create_directory
delivery_date_add
directory = ${lookup ldap{LDAP_AUTH \
ldap:///ou=exim,dc=domain,dc=ru?homeDirectory?sub? \
(&(accountStatus=active) \
(mail=${quote_ldap:$local_part}${quote_ldap:@} \
${quote_ldap:$domain}))}{/var/spool/mail/$value/Maildir/} }
directory_mode = 770
envelope_to_add
maildir_use_size_file
group = mail
maildir_format
maildir_tag = ,S=$message_size
message_prefix = ""
message_suffix = ""
mode = 0600
quota = ${lookup ldap{LDAP_AUTH \
ldap:///ou=exim,dc=domain,dc=ru?mailQuotaSize? \
sub?(&(accountStatus=active) \
(mail=${quote_ldap:$local_part} \
${quote_ldap:@}${quote_ldap:$domain}))}{$value}fail}
quota_warn_message = "\
To: $local_part@$domain\n\
From: postmaster@$domain\n\
Subject: Your maildir is going full\n\
This message is automaticaly gnerated by your mail server.\n\
This means, that your mailbox is 80% full. If you would \n\
override this limit new mail would not be delivered to you!\n\n\
Please, clean your mailbox."
quota_warn_threshold = 80%
return_path_add
address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
address_pipe:
driver = pipe
return_output
address_reply:
driver = autoreply
begin retry
# Address or Domain Error Retries
# ----------------- ----- -------
* quota
* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
begin rewrite
begin authenticators
auth_plain:
driver = plaintext
public_name = PLAIN
server_condition = ${lookup ldapdn{LDAP_AUTH \
ldap:///ou=exim,dc=domain,dc=ru??sub?(& \
(accountStatus=active)(mail=${quote_ldap:$2}) \
(clearPassword=${quote_ldap:$3}))}{yes}{no}}
server_prompts = :
server_set_id = $2
auth_login:
driver = plaintext
public_name = LOGIN
server_condition = ${lookup ldapdn{LDAP_AUTH \
ldap:///ou=exim,dc=domain,dc=ru??sub? \
(&(accountStatus=active)(mail=${quote_ldap:$1}) \
(clearPassword=${quote_ldap:$2}))}{yes}{no}}
server_prompts = Username:: : Password::
server_set_id = $1
auth_cram_md5:
driver = cram_md5
public_name = CRAM-MD5
server_secret = ${lookup ldap{LDAP_AUTH \
ldap:///ou=exim,dc=domain,dc=ru?clearPassword?sub? \
(&(accountStatus=active)(mail=${quote_ldap:$1}) \
)}{$value}fail}
server_set_id = $1
P.S. Очень прошу сильно мну не бить, т.к. начальство поставило условие - 31-го серв должен работать, а то начнутся проблемы ((((
Заранее БОЛЬШОЕ спасибо.