Re: Обсуждение статьи Exim&Dovecot + fetchmail
Добавлено: 2011-05-31 19:40:15
ёптать! ваш сервер просит вас автроризоваться
Добрым словом и кулаком, добьёшься больше чем одним добрым словом.
https://forum.lissyara.su/
в целом, у меня как бы все работает без ошибок.. письма отправляются другим пользователям, но только тем кого я создам на своем серваке. я не могу отправить их в "мир", другим почтовым системам и они меня тоже не принимают как почту. домен есть, мх запись в нем тоже, на машинке инет есть.. в чем еще я мог ошибиться?напишите чё у вас как в целом сейчас
предположим, где именно в какой файл их надо вписать?ну я думаю в почтовом клиенте вашем
Код: Выделить всё
[03-Mar-2012 15:38:27 +0200]: IMAP Error: Login failed for kuhar@vkuhar.pp.ua from 77.222.133.130. AUTHENTICATE PLAIN: Authentication failed. in /usr/local/www/roundcube/program/include/rcube_imap.php on line 205 (POST /wmail/?_task=login&_action=login)
Код: Выделить всё
Mar 03 15:38:20 auth(default): Info: client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=143 rport=21356 resp=<hidden>
Mar 03 15:38:20 auth-worker(default): Info: sql(kuhar@vkuhar.pp.ua,127.0.0.1): query: SELECT `username` as `user`, `password` FROM `mailbox` WHERE `username` = 'kuhar@vkuhar.pp.ua' AND `active`='1'
Mar 03 15:38:20 auth-worker(default): Info: sql(kuhar@vkuhar.pp.ua,127.0.0.1): Password mismatch
Mar 03 15:38:21 auth(default): Info: new auth connection: pid=11780
Mar 03 15:38:22 auth(default): Info: client out: FAIL 1 user=kuhar@vkuhar.pp.ua
Mar 03 15:38:27 imap-login: Info: Aborted login (auth failed, 1 attempts): user=<kuhar@vkuhar.pp.ua>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Код: Выделить всё
default_pass_scheme = MD5-CRYPT
Код: Выделить всё
auth_mechanisms = PLAIN LOGIN CRAM-MD5 DIGEST-MD5
Код: Выделить всё
$CONF['encrypt'] = 'md5crypt';
Код: Выделить всё
// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['imap_auth_type'] = MD5-CRYPT;
Код: Выделить всё
Jun 28 15:43:13 auth-worker(54739): Debug: sql(test4@dom.ru,192.168.0.3): query: SELECT `username` as `user`, `password` FROM `mailbox` WHERE `username` = 'test4@dom.ru' AND `active`='1'
Jun 28 15:43:13 auth-worker(54739): Info: password(test4@dom.ru,192.168.0.3): Requested DIGEST-MD5 scheme, but we have only MD5-CRYPT (input: $1$cb7831dc$dtmqS3HX/dZ.nZFrbGVEd.)
Jun 28 15:43:15 auth: Debug: client out: FAIL 1 user=test4@dom.ru
Jun 28 15:43:15 imap-login: Info: Aborted login (auth failed, 1 attempts in 6 secs): user=<test4@dom.ru>, method=DIGEST-MD5, rip=192.168.0.3, lip=192.168.0.3, TLS
Код: Выделить всё
PORTNAME= roundcube
DISTVERSION= 0.7.2
Код: Выделить всё
$rcmail_config['auto_create_user'] = true;
Код: Выделить всё
$rcmail_config['smtp_server'] = 'mailserv.domain.local';
Код: Выделить всё
2012-07-02 12:59:31 auth_plain authenticator failed for (mailserv.domain.local) [192.168.0.3] I=[192.168.0.3]:25: 435 Unable to authenticate at present: authentication socket connection error
Код: Выделить всё
2012-07-02 15:24:59 auth_plain authenticator failed for (localhost) [127.0.0.1] I=[127.0.0.1]:25: 435 Unable to authenticate at present: authentication socket connection error
Код: Выделить всё
2012-07-02 15:48:47 1Slf7X-000I50-PK <= www@mydomain.ru U=www P=local S=631 id=e0b1a053483022f051814959960c356d@mydomain.ru from <www@mydomain.ru> for test4@mydomain.ru
2012-07-02 15:48:47 1Slf7X-000I50-PK => test4 <test4@mydomain.ru> R=dovecot_user T=dovecot_delivery
2012-07-02 15:48:47 1Slf7X-000I50-PK Completed
Код: Выделить всё
World Wide Web Owner <www@mydomain.ru>; от имени; test4@mydomain.ru
Код: Выделить всё
Jul 5 15:02:30 ns exim[53398]: SMTP syntax error in "XXXX имя_компьютера_на котором_аутлук" H=[тут_внешний_ip] I=[тут_ip_сервера]:25 unrecognized command
Код: Выделить всё
#!/bin/sh
primary_hostname = DNS_имя_почтового_сервера
hide mysql_servers = localhost/exim/exim/exim
domainlist local_domains = ${lookup mysql{SELECT `domain` \
FROM `domain` WHERE \
`domain`='${domain}' AND \
`active`='1'}}
domainlist relay_to_domains = ${lookup mysql{SELECT `domain` \
FROM `domain` WHERE \
`domain`='${domain}' AND \
`active`='1'}}
hostlist relay_from_hosts = localhost:127.0.0.0/8
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
daemon_smtp_ports = 25 : 9025
qualify_domain = DNS_имя_почтового_сервера
qualify_recipient = DNS_имя_почтового_сервера
allow_domain_literals = false
exim_user = mailnull
exim_group = mail
never_users = root
rfc1413_query_timeout = 0s
sender_unqualified_hosts = +relay_from_hosts
recipient_unqualified_hosts = +relay_from_hosts
ignore_bounce_errors_after = 45m
timeout_frozen_after = 15d
auto_thaw = 1h
smtp_banner = "$primary_hostname, ESMTP EXIM $version_number"
smtp_accept_max = 50
smtp_accept_max_per_connection = 25
smtp_connect_backlog = 30
smtp_accept_max_per_host = 20
split_spool_directory = true
remote_max_parallel = 15
return_size_limit = 70k
message_size_limit = 64M
helo_allow_chars = _
smtp_enforce_sync = false
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 = :
deny message = "incorrect symbol in address"
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]
deny message = "incorrect symbol in address"
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
accept local_parts = postmaster
domains = +local_domains
deny message = "HELO/EHLO require by SMTP RFC"
condition = ${if eq{$sender_helo_name}{}{yes}{no}}
accept authenticated = *
deny condition = ${if eq{$sender_helo_name}\
{$interface_address}{yes}{no}}
hosts = !127.0.0.1 : !localhost : *
message = "main IP in your HELO! Access denied!"
deny condition = ${if match{$sender_helo_name}\
{\N^\d+$\N}{yes}{no}}
hosts = !127.0.0.1 : !localhost : *
message = "can not be only number in HELO!"
deny message = "your hostname is bad (adsl, poll, ppp & etc)."
condition = ${if match{$sender_host_name} \
{adsl|dialup|pool|peer|dhcp} \
{yes}{no}}
warn
set acl_m0 = 30s
warn
set acl_m0 = 0s
warn
logwrite = Delay $acl_m0 for $sender_host_name \
[$sender_host_address] with HELO=$sender_helo_name. Mail \
from $sender_address to $local_part@$domain.
delay = $acl_m0
accept domains = +local_domains
endpass
message = "In my mailserver not stored this user"
verify = recipient
accept domains = +relay_to_domains
endpass
message = "main server not know how relay to this address"
verify = recipient
deny message = you in blacklist: $dnslist_domain \n $dnslist_text
dnslists = opm.blitzed.org : \
cbl.abuseat.org : \
bl.csma.biz : \
dynablock.njabl.org
accept hosts = +relay_from_hosts
deny message = "Homo hominus lupus est"
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 mysql{SELECT `goto` FROM `alias` WHERE \
`address`='${quote_mysql:$local_part@$domain}' OR \
`address`='${quote_mysql:@$domain}'}}
dovecot_user:
driver = accept
condition = ${lookup mysql{SELECT `goto` FROM \
`alias` WHERE \
`address`='${quote_mysql:$local_part@$domain}' OR \
`address`='${quote_mysql:@$domain}'}{yes}{no}}
transport = dovecot_delivery
begin transports
remote_smtp:
driver = smtp
hosts_avoid_esmtp = on
dovecot_delivery:
driver = pipe
command = /usr/local/libexec/dovecot/deliver -d $local_part@$domain
message_prefix =
message_suffix =
delivery_date_add
envelope_to_add
return_path_add
log_output
user = mailnull
address_pipe:
driver = pipe
return_output
address_reply:
driver = autoreply
begin retry
# Address or Domain Error Retries
# ----------------- ----- -------
* * 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 mysql{SELECT id FROM users \
WHERE id = '${quote_mysql:$1}' \
AND passwd = '${quote_mysql:$3}' \
AND active = 'Y'}{yes}{no}}
server_prompts = :
server_set_id = $2
auth_login:
driver = plaintext
public_name = LOGIN
server_condition = ${lookup mysql{SELECT id FROM users \
WHERE id = '${quote_mysql:$1}' \
AND passwd = '${quote_mysql:$3}' \
AND active = 'Y'}{yes}{no}}
server_prompts = Username:: : Password::
server_set_id = $1
auth_cram_md5:
driver = cram_md5
public_name = CRAM-MD5
server_secret = ${lookup mysql{SELECT passwd FROM users \
WHERE id = '${quote_mysql:$1}' \
AND active = 'Y'}{$value}fail}
server_set_id = $1
Код: Выделить всё
auth_plain:
driver = plaintext
public_name = PLAIN
server_condition = ${lookup mysql{SELECT `username` FROM \
`mailbox` WHERE `username` = \
'${quote_mysql:$auth2}' AND `password` = \
'${quote_mysql:$auth3}'}{yes}{no}}
server_prompts = :
server_set_id = $auth2
auth_login:
driver = plaintext
public_name = LOGIN
server_condition = ${lookup mysql{SELECT `username` FROM \
`mailbox` WHERE `username` = \
'${quote_mysql:$auth1}' AND `password` = \
'${quote_mysql:$auth2}'}{yes}{no}}
server_prompts = Username:: : Password::
server_set_id = $auth1
auth_cram_md5:
driver = cram_md5
public_name = CRAM-MD5
server_secret = ${lookup mysql{SELECT `password` FROM \
`mailbox` WHERE `username` \
= '${quote_mysql:$auth1}'}{$value}fail}
server_set_id = $auth2
Код: Выделить всё
ns# telnet DNS_имя_сервера 25
Trying IP_адрес_сервера...
Connected to DNS_имя_сервера.
Escape character is '^]'.
220 DNS_имя_сервера, ESMTP EXIM 4.77
EHLO dtec01
250-DNS_имя_сервера Hello dtec01 [IP_адрес_сервера]
250-SIZE 67108864
250-PIPELINING
250-AUTH PLAIN LOGIN CRAM-MD5
250 HELP
AUTH LOGIN
334 белеберда
base64 Login
334 белеберда
base64 Password
235 Authentication succeeded
MAIL FROM:egor@DNS_имя_сервера
250 OK
RCPT TO:внешняя@почта.ru
250 Accepted
DATA
354 Enter message, ending with "." on a line by itself
From:egor@DNS_имя_сервера
To:внешняя@почта.ru
Subject: Test 123
123 Test
Test
.
250 OK id=тут_ID
QUIT
221 DNS_имя_сервера closing connection
Connection closed by foreign host.
Код: Выделить всё
220 DNS_имя_сервера, ESMTP EXIM 4.77
EHLO dtec01
500 unrecognized command