LinuxForum.Fans
Тема

Установка и настройка почтового сервера Postfix на CentOS 6.6(CentOS7)

Автор: AlfaStriker 822 сообщений 269284 просмотров В конец обсуждения ↓ 📌 закреплена
#375324

Почтовик настраивался по статье... Все работает исправно, но в логах периодически
вываливается Warning'и.

Я так понимаю что это спам боты пытаются залогиниться и отправить письмо.
Как бороться с этой байдой...

#grep -E -e 'warning|critical|error' /var/log/maillog

text
Apr  4 00:08:14 dionis postfix/smtpd[18019]: warning: 91.183.213.37: hostname 37
.213-183-91.adsl-static.isp.belgacom.be verification failed: Name or service not
 known
Apr  4 01:20:16 dionis postfix/smtpd[18808]: warning: 94.153.139.44: hostname 94
-153-139-44-gprs.kyivstar.net verification failed: Name or service not known
Apr  4 04:34:35 dionis postfix/smtpd[20648]: warning: 37.57.9.27: hostname 27.9.
57.37.triolan.net verification failed: Name or service not known
Apr  4 04:35:00 dionis postfix/smtpd[20648]: warning: 37.57.9.27: hostname 27.9.
57.37.triolan.net verification failed: Name or service not known
Apr  4 04:35:23 dionis postfix/smtpd[20642]: warning: 37.57.9.27: hostname 27.9.
57.37.triolan.net verification failed: Name or service not known
Apr  4 04:36:33 dionis postfix/smtpd[20642]: warning: 37.57.9.27: hostname 27.9.
57.37.triolan.net verification failed: Name or service not known
Apr  4 04:36:45 dionis postfix/smtpd[20648]: warning: 37.57.9.27: hostname 27.9.
57.37.triolan.net verification failed: Name or service not known
Apr  4 04:36:54 dionis postfix/smtpd[20642]: warning: 37.57.9.27: hostname 27.9.
57.37.triolan.net verification failed: Name or service not known
Apr  4 04:37:28 dionis postfix/smtpd[20642]: warning: 37.57.9.27: hostname 27.9.
57.37.triolan.net verification failed: Name or service not known
Apr  4 04:37:37 dionis postfix/smtpd[20648]: warning: 37.57.9.27: hostname 27.9.
57.37.triolan.net verification failed: Name or service not known
Apr  4 04:37:45 dionis postfix/smtpd[20648]: warning: 37.57.9.27: hostname 27.9.
57.37.triolan.net verification failed: Name or service not known
Apr  4 06:42:02 dionis postfix/smtpd[21634]: warning: 188.187.157.44: hostname d
ynamicip-188-187-157-44.pppoe.yola.ertelecom.ru verification failed: Name or ser
vice not known
Apr  4 08:19:33 dionis postfix/smtpd[22513]: warning: 125.227.1.149: hostname 12
5-227-1-149.HINET-IP.hinet.net verification failed: Name or service not known
Apr  4 08:19:36 dionis postfix/smtpd[22513]: warning: unknown[125.227.1.149]: SA
SL LOGIN authentication failed: UGFzc3dvcmQ6
Apr  4 08:19:43 dionis postfix/smtpd[22513]: warning: unknown[125.227.1.149]: SA
SL LOGIN authentication failed: UGFzc3dvcmQ6
Apr  4 08:19:54 dionis postfix/smtpd[22513]: warning: unknown[125.227.1.149]: SA
SL LOGIN authentication failed: UGFzc3dvcmQ6
Apr  4 08:20:04 dionis postfix/smtpd[22513]: warning: unknown[125.227.1.149]: SA
SL LOGIN authentication failed: Connection lost to authentication server
Apr  4 08:20:05 dionis postfix/smtpd[22513]: warning: 125.227.1.149: hostname 12
5-227-1-149.HINET-IP.hinet.net verification failed: Name or service not known
Apr  4 08:20:16 dionis postfix/smtpd[22513]: warning: unknown[125.227.1.149]: SA
SL LOGIN authentication failed: Connection lost to authentication server
#375342
alex25region написал:

Я так понимаю что это спам боты пытаются залогиниться и отправить письмо.
Как бороться с этой байдой...

Поинимание совершенно правильное. Метода борьбы одна - тщательно и вдумчиво настраивать "антиспамерские" настройки постфикса. Например, так:

Показать
## Проверки в Postfix идут в следующей последовательности:
## 1. smtpd_client_restrictions (DNS)
## 2. smtpd_helo_restrictions (HELO)
## 3. smtpd_sender_restrictions (MAIL FROM)
## 4. smtpd_relay_restrictions
## 5. smtpd_recipient_restrictions
## 6. smtpd_data_restrictions
## 7. smtpd_end_of_data_restrictions

## Если какое-либо правило в любой из проверок выдает разрешение на письмо,
## то внутри этой проверки правила далее не проверяются.
## Но другие проверки всё равно идут. Но если письмо отклоняешь,
## то далее уже ничего не проверяется.

#########################
smtpd_client_restrictions =
# - разрешить при соединении из моей подсети
permit_mynetworks,
# permit_sasl_authenticated,
# белый список кривых отправителей
check_client_access hash:/etc/postfix/client_white_list,
# белый список кривых отправителей
check_sender_access hash:/etc/postfix/sender_white_list,
# Проверить на динамические хосты, которые есть спамеры
check_client_access regexp:/etc/postfix/client_access_regexp,
# - пауза на 1 секунду для отсекания совсем нетерпеливых спам-хостов (обычно они просто сразу же рвут соединение
# - им нужно разослать как можно больше спама, поэтому ждать им - как серпом...)
sleep 1,
# - отказать в случае, если 1) не удалось сопоставить IP адрес имени хоста (по PTR-записи в DNS),
# 2) не удалось сопоставить имя IP-адресу хоста (прямой запрос DNS),
# 3) адрес, полученный из DNS по имени не совпадает с IP-адресом , с которого идет соединение.
# Отсекается ОЧЕНЬ много спам-хостов (в моем случае - процентов 80)
reject_unknown_client_hostname,
# reject_unknown_reverse_client_hostname,
# Проверить BlackList на spamhaus.org
reject_rbl_client sbl.spamhaus.org,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client bl.spamcop.net,
# - отсечь хосты, которые пытаются слать команды в конвейере, даже не проверив, поддерживает ли это наш сервер.
# Это часто делают именно спам-хосты для увеличения скорости передачи
reject_unauth_pipelining,
# - в другом случае продолжать прием
permit

#Проверки на этапе HELO/EHLO
smtpd_helo_restrictions = permit_mynetworks,
# Проверяем SPF.
check_policy_service unix:private/spf,
# - разрешить при аутентификации (пользователи)
#### permit_sasl_authenticated,
# "Белый Список" должен быть впереди остальных проверок
# белый список кривых отправителей
check_client_access hash:/etc/postfix/client_white_list,
check_sender_access hash:/etc/postfix/sender_white_list,
# отсекаем приветствия отправителя от моего имени
# а также прописываем разрешения для "продвинутых"
check_helo_access hash:/etc/postfix/helo_checks,
# отсекаем тех, кто представляется ИП-адресом.
# это явное нарушение RFC, но практика показала, что это один из явных
# признаков спама.
check_helo_access regexp:/etc/postfix/helo_regexp,
# - отказать при нарушении синтаксиса имени хоста в HELO
#(случается очень редко, тем не менее...)
reject_invalid_hostname,
# - отказать, если имя хоста в HELO не в полной форме
#(не должно быть просто server, а должно быть типа server.domain.ltd)
reject_non_fqdn_hostname,
# - отказать, если у хоста, указанного в команде HELO,
# в DNS нет записи типа MX или A (множество зобми-хостов)
reject_unknown_hostname,
# - в другом случае продолжать прием
permit

#Проверки на этапе MAIL FROM
smtpd_sender_restrictions =
# включаем проверки для отправителей из @alma.ru (Только из mynetwork)
check_sender_access hash:/etc/postfix/access_sender,
# белый список кривых отправителей
check_sender_access hash:/etc/postfix/sender_white_list,
# белый список кривых отправителей
check_client_access hash:/etc/postfix/client_white_list,
# - разрешить при аутентификации (пользователи)
### permit_sasl_authenticated,
# - отказать, если имя отправителя не в полной форме
# (должно быть не name или name@domain а name@domain.ltd)
reject_non_fqdn_sender,
reject_authenticated_sender_login_mismatch,
reject_unauthenticated_sender_login_mismatch,
# - отказать, если наш сервер не является "родным" для отправителя
# и домен отправителя не имеет в DNS записи MX или A, или если он
# имеет неверную запись MX (например, пустую)
reject_unknown_sender_domain,
# Проверка завязана на команде VRFY, которая может быть запрещена
## reject_unverified_sender,
permit

smtpd_relay_restrictions = permit_mynetworks,
# permit_sasl_authenticated,
defer_unauth_destination
permit

# ограничения, проверяемые на этапе RCPT TO:
smtpd_recipient_restrictions =
# - отказать, если имя получателя не в полной форме (должно быть не name или name@domain а name@domain.ltd)
reject_non_fqdn_recipient,
# - отказать, если мы не являемся "родным" сервером для получателя и домен получателя не имеет
# в DNS записи MX или A, или если он имеет неверную запись MX (например, пустую)
reject_unknown_recipient_domain,
# Направляем исходящую почту на DKIM-подписание
check_client_access cidr:/etc/postfix/originating.cidr,
# мы можем посылать куда угодно
permit_mynetworks,
# permit_sasl_authenticated,
# - отказать, если домен-адресат: 1) не перечислен в списке доменов, для которых мы форвардим почту
# ($relay_domains) и не содержит команд переадресации (типа user@another@domain);
# 2) не является "нашим" (т.е. не перечислен в списках $mydestination,
# $inet_interfaces, $proxy_interfaces, $virtual_alias_domains, или
# $virtual_mailbox_domains ) и не содержит команд переадресации
# (типа user@another@domain).
# Это - традиционные правила, чтобы наш сервер не служил т.н. Open Relay, через который спамеры
# рассылают почту третьим лицам.
reject_unauth_destination,
# Получать почту на postmaster и abuse
check_recipient_access hash:/etc/mail/postfix/roleaccount_exceptions
# Greylist:
check_policy_service inet:127.0.0.1:10030,
permit

smtpd_data_restrictions =
permit_mynetworks,
# permit_sasl_authenticated,
check_client_access regexp:/etc/postfix/add_auth_header.regexp,
# Если письмо для многих получателей, но нет хотя бы одного в нашнй базе, то отказать
# Получать почту на postmaster и abuse
check_recipient_access hash:/etc/mail/postfix/roleaccount_exceptions
reject_unlisted_recipient,
permit

smtpd_end_of_data_restrictions =
permit_mynetworks,
# permit_sasl_authenticated,
# Получать почту на postmaster и abuse
check_recipient_access hash:/etc/mail/postfix/roleaccount_exceptions
reject_unlisted_recipient,
# Отклоняем письма с нулевым отправителем (Bounce), у которых более одного получателя
reject_multi_recipient_bounce,
permit

Это кусок моего конфига (без файлов, которые в нём поименованы). Все это дело легко нагугливается. В результате в день режектится 2-3 тысячи спамерских коннектов. И сотни 2 спамерских писем в spamassassin'е режется. Хотя, десятка 2-3 в день спамерских писем все равно пролезает через фильтры.

#375858

AlfaStriker, Смотри, я так понимаю fail2ban не блочит гада

text
Apr 10 12:32:09 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:32:16 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:32:22 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:32:32 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:32:42 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:32:49 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:32:55 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:33:05 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:33:15 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:33:22 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:33:28 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:33:38 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:33:48 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:33:55 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:34:01 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:34:11 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:34:21 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:34:28 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:34:34 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:34:44 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:34:54 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:35:01 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:35:07 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:35:17 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:35:27 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:35:34 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:35:40 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:35:50 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:36:00 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:36:07 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:36:13 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:36:23 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:36:33 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:36:40 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:36:46 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:36:56 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:37:06 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:37:13 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:37:19 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:37:29 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:37:39 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:37:46 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6

А вот fail2ban сыпет в логи

text
Apr 10 07:14:35 npugypok postfix/smtp[26729]: 7FB2D200935: to=<fail2ban@example.com>, relay=none, delay=181118, delays=181088/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 07:34:35 npugypok postfix/smtp[27037]: ABC49200948: to=<fail2ban@example.com>, relay=none, delay=181347, delays=181317/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 08:19:36 npugypok postfix/smtp[27461]: 41EEE200928: to=<fail2ban@example.com>, relay=none, delay=198154, delays=198123/0.03/31/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 08:24:35 npugypok postfix/smtp[27476]: 7FB2D200935: to=<fail2ban@example.com>, relay=none, delay=185318, delays=185288/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 08:44:35 npugypok postfix/smtp[27518]: ABC49200948: to=<fail2ban@example.com>, relay=none, delay=185547, delays=185517/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 09:29:35 npugypok postfix/smtp[27966]: 41EEE200928: to=<fail2ban@example.com>, relay=none, delay=202353, delays=202323/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 09:34:35 npugypok postfix/smtp[27985]: 7FB2D200935: to=<fail2ban@example.com>, relay=none, delay=189518, delays=189488/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 09:54:35 npugypok postfix/smtp[28032]: ABC49200948: to=<fail2ban@example.com>, relay=none, delay=189747, delays=189717/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 10:39:35 npugypok postfix/smtp[28476]: 41EEE200928: to=<fail2ban@example.com>, relay=none, delay=206553, delays=206523/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 10:44:35 npugypok postfix/smtp[28491]: 7FB2D200935: to=<fail2ban@example.com>, relay=none, delay=193718, delays=193688/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 11:04:35 npugypok postfix/smtp[28601]: ABC49200948: to=<fail2ban@example.com>, relay=none, delay=193947, delays=193917/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 11:49:35 npugypok postfix/smtp[28976]: 41EEE200928: to=<fail2ban@example.com>, relay=none, delay=210753, delays=210723/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 11:54:35 npugypok postfix/smtp[28991]: 7FB2D200935: to=<fail2ban@example.com>, relay=none, delay=197918, delays=197888/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 12:14:35 npugypok postfix/smtp[29373]: ABC49200948: to=<fail2ban@example.com>, relay=none, delay=198147, delays=198117/0.04/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
#375890
Fireball написал:
text
Apr 10 11:04:35 npugypok postfix/smtp[28601]: ABC49200948: to=<fail2ban@example.com>, relay=none, delay=193947, delays=193917/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 11:49:35 npugypok postfix/smtp[28976]: 41EEE200928: to=<fail2ban@example.com>, relay=none, delay=210753, delays=210723/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 11:54:35 npugypok postfix/smtp[28991]: 7FB2D200935: to=<fail2ban@example.com>, relay=none, delay=197918, delays=197888/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)
Apr 10 12:14:35 npugypok postfix/smtp[29373]: ABC49200948: to=<fail2ban@example.com>, relay=none, delay=198147, delays=198117/0.04/30/0, dsn=4.4.1, status=deferred (connect to example.com[93.184.216.119]:25: Connection timed out)

лечится комментарием в /etc/fail2ban/jail.conf или указанием существующего мыла

например

text

[ssh-iptables]
enabled  = true
filter   = sshd
action   = iptables[name=SSH, port=ssh, protocol=tcp]
#           sendmail-whois[name=SSH, dest=root, sender=fail2ban@example.com, sendername="Fail2Ban"]
logpath  = /var/log/secure
maxretry = 5
#375894
Fireball написал:
text
Apr 10 12:32:09 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:32:16 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:32:22 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:32:32 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:32:42 npugypok postfix/smtpd[29526]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: Connection lost to authentication server
Apr 10 12:32:49 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Apr 10 12:32:55 npugypok postfix/smtpd[28970]: warning: unknown[31.192.111.178]: SASL LOGIN authentication failed: UGFzc3dvcmQ6

проверь работают ли правила, например

text
# fail2ban-regex /var/log/maillog /etc/fail2ban/filter.d/postfix-sasl.conf

Running tests =============

Use failregex file : /etc/fail2ban/filter.d/postfix-sasl.conf Use log file : /var/log/maillog

Results =======

Failregex: 41 total |- #) [# of hits] regular expression | 1) [41] ^\s*(<[^.]+\.[^.]+>)?\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?postfix/smtpd(?:\(\S+\))?[\]\)]?:?|[\[\(]?postfix/smtpd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)?\s(?:\[ID \d+ \S+\])?\s*warning: [-._\w]+\[<HOST>\]: SASL (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed(: [ A-Za-z0-9+/]*={0,2})?\s*$ `-

Ignoreregex: 0 total

Date template hits: |- [# of hits] date format | [40419] MONTH Day Hour:Minute:Second `-

Lines: 40419 lines, 0 ignored, 41 matched, 40378 missed Missed line(s):: too many to print. Use --print-all-missed to print all 40378 lines

в этом примере со стандартными регекспами в postfix-sasl.conf совпала 41 строка из лога

так можно потестить, какое правило подходит для твоего случая, либо переписать регекспы на ошибку из логов

#375898

По первому посту исправил, спасибо!

Вроде работают, вот посмотри

text
fail2ban-regex /var/log/maillog /etc/fail2ban/filter.d/postfix-sasl.conf

Running tests =============

Use failregex file : /etc/fail2ban/filter.d/postfix-sasl.conf Use log file : /var/log/maillog

Results =======

Failregex: 9658 total |- #) [# of hits] regular expression | 1) [9658] ^\s*(<[^.]+\.[^.]+>)?\s*(?:\S+ )?(?:kernel: \[\d+\.\d+\] )?(?:@vserver_\S+ )?(?:(?:\[\d+\])?:\s+[\[\(]?postfix/smtpd(?:\(\S+\))?[\]\)]?:?|[\[\(]?postfix/smtpd(?:\(\S+\))?[\]\)]?:?(?:\[\d+\])?:?)?\s(?:\[ID \d+ \S+\])?\s*warning: [-._\w]+\[<HOST>\]: SASL (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed(: [ A-Za-z0-9+/]*={0,2})?\s*$ `-

Ignoreregex: 0 total

Date template hits: |- [# of hits] date format | [29465] MONTH Day Hour:Minute:Second `-

Lines: 29465 lines, 0 ignored, 9658 matched, 19807 missed Missed line(s):: too many to print. Use --print-all-missed to print all 19807 lines

#375900

А у меня вот такой вопрос:

правильно ли я понимаю?

text
Apr  9 17:22:43 capricornus postfix/smtpd[16487]: connect from mxs.beeline.ru[37.9.244.1]
Apr  9 17:22:43 capricornus dovecot: auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Apr  9 17:22:43 capricornus dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Apr  9 17:22:43 capricornus dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
Apr  9 17:22:43 capricornus dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Apr  9 17:22:43 capricornus dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Apr  9 17:22:43 capricornus dovecot: auth: Debug: auth client connected (pid=16487)
Apr  9 17:22:43 capricornus postgrey[2058]: action=pass, reason=triplet found, client_name=mxs.beeline.ru, client_address=37.9.244.1, sender=internet@beeline.ru, recipient=aleksey@mydomain.su
Apr  9 17:22:43 capricornus postgrey[2058]: cleaning up old logs...
Apr  9 17:22:44 capricornus postfix/smtpd[16487]: 8FCFCB00064: client=mxs.beeline.ru[37.9.244.1]
Apr  9 17:27:44 capricornus postfix/smtpd[16487]: timeout after DATA (0 bytes) from mxs.beeline.ru[37.9.244.1]
Apr  9 17:27:44 capricornus postfix/smtpd[16487]: disconnect from mxs.beeline.ru[37.9.244.1]
Apr  9 17:31:04 capricornus postfix/anvil[16489]: statistics: max connection rate 1/60s for (smtp:37.9.244.1) at Apr  9 17:22:43
Apr  9 17:31:04 capricornus postfix/anvil[16489]: statistics: max connection count 1 for (smtp:37.9.244.1) at Apr  9 17:22:43
Apr  9 17:31:04 capricornus postfix/anvil[16489]: statistics: max cache size 1 at Apr  9 17:22:43

билайн конектится, пишет кому и от кого, postgrey его пускает, тк уже не 1й раз, потом тупит и отваливается по таймауту...
такое происходит уже неделю с частотой 4-5 раз в день...

если так, то какой в этом смысл?

письма приходят и уходят,
grep -E -e 'warning|critical|error' /var/log/maillog - кроме ботов ничего нет

#375904
Fireball написал:

Вроде работают, вот посмотри
text

.
.
Failregex: 9658 total
.
.

9658 записей от ботов - правильно
теперь смотри в /etc/fail2ban/jail.conf раздел запуска этого правила

у меня так

text
[sasl-iptables]
enabled  = true
filter   = postfix-sasl
backend  = polling
action   = iptables[name=sasl, port=smtp, protocol=tcp]
#           sendmail-whois[name=sasl, dest=you@example.com]
logpath  = /var/log/maillog
#375909

XpoH, Ага, нужно было включить. Однако после включения такое

text
service fail2ban restart
Останавливается fail2ban:                                  [  OK  ]
Запускается fail2ban: WARNING 'ignoreregex' not defined in 'Definition'. Using default one: ''
                                                           [  OK  ]

Разобрался, в конфе нужно было прописать ignoreregex =

#376958

Приветствую форумчан! Отдельное спасибо автору за статью, даже такой нубяра, как я, смог более менее поднять сервак. Единственно ребят появился вопрос не хочет тестовую почту бросать даже локально. Посмотрел maillog там такая странность,якобы он не может к себе даже локально подрубиться :( подскажите начинающему линуксоиду) в чем проблема, создавал 2 ящика test1 и test и из одного сообщения посылал другому почтовый клиент пишет что ошибок нет однако почта не приходит:
maillog

Показать

Apr 18 09:03:30 mail dovecot: auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Apr 18 09:03:30 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Apr 18 09:03:30 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
Apr 18 09:03:30 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Apr 18 09:03:30 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Apr 18 09:03:30 mail dovecot: auth: mysql: Connected to localhost (mail)
Apr 18 09:03:30 mail dovecot: auth: Debug: sql(test1@fondkr62.ru,192.168.62.11): query: SELECT username as user, password, '/var/vmail/fondkr62.ru/test1' as userdb_home, 'maildir:/var/vmail/fondkr62.ru/test1' as userdb_mail, 1150 as userdb_uid, 12 asuserdb_gid FROM mailbox WHERE username = 'test1@fondkr62.ru' AND active = '1'
Apr 18 09:03:30 mail dovecot: auth: Debug: password(test1@fondkr62.ru,192.168.62.11): Credentials: 365ea5b640cf5bc3d3c7ebeeb3194c4f46a2c30fd8a7b017b5cecb0c3501459c
Apr 18 09:03:30 mail dovecot: auth: Debug: client out: OK#0111#011user=test1@fondkr62.ru#011asuserdb_gid=12
Apr 18 09:03:30 mail dovecot: auth: Debug: master in: REQUEST#0111698168833#0115714#0111#0111964e56ead053f131a655fa83dd7cda6
Apr 18 09:03:30 mail dovecot: auth: Debug: sql(test1@fondkr62.ru,192.168.62.11): SELECT '/var/vmail/fondkr62.ru/test1' as home, 'maildir:/var/vmail/fondkr62.ru/test1'as mail, 1150 AS uid, 12 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = 'test1@fondkr62.ru' AND active = '1'
Apr 18 09:03:30 mail dovecot: auth: Debug: master out: USER#0111698168833#011test1@fondkr62.ru#011home=/var/vmail/fondkr62.ru/test1#011mail=maildir:/var/vmail/fondkr62.ru/test1#011uid=1150#011gid=12#011quota=dirsize:storage=0
Apr 18 09:03:30 mail dovecot: pop3-login: Login: user=<test1@fondkr62.ru>, method=CRAM-MD5, rip=192.168.62.11, lip=192.168.62.2, mpid=5719
Apr 18 09:03:30 mail dovecot: pop3: Debug: Added userdb setting: mail=maildir:/var/vmail/fondkr62.ru/test1
Apr 18 09:03:30 mail dovecot: pop3: Debug: Unknown userdb setting: plugin/quota=dirsize:storage=0
Apr 18 09:03:30 mail dovecot: pop3(test1@fondkr62.ru): Debug: Effective uid=1150, gid=12, home=/var/vmail/fondkr62.ru/test1
Apr 18 09:03:30 mail dovecot: pop3(test1@fondkr62.ru): Debug: maildir++: root=/var/vmail/fondkr62.ru/test1, index=, control=, inbox=/var/vmail/fondkr62.ru/test1
Apr 18 09:03:30 mail dovecot: pop3(test1@fondkr62.ru): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Apr 18 09:03:32 mail dovecot: auth: Debug: auth client connected (pid=5720)
Apr 18 09:03:32 mail dovecot: auth: Debug: client in: AUTH#0111#011CRAM-MD5#011service=pop3#011lip=192.168.62.2#011rip=192.168.62.11#011lport=110#011rport=48186
Apr 18 09:03:32 mail dovecot: auth: Debug: client out: CONT#0111#011PDI1NDQzNzU0ODg2MDEzMTcuMTM5Nzc5NzQxMkBtYWlsLmZvbmRrcjYyLnJ1Pg==
Apr 18 09:03:32 mail dovecot: auth: Debug: client in: CONT#0111#011dGVzdEBmb25ka3I2Mi5ydSA2OTMyZjI4OGZkYzhlYzVjYzQ3NDIwYTNhZmY0OTVlMg==
Apr 18 09:03:32 mail dovecot: auth: Debug: sql(test@fondkr62.ru,192.168.62.11): query: SELECT username as user, password, '/var/vmail/fondkr62.ru/test' as userdb_home, 'maildir:/var/vmail/fondkr62.ru/test' as userdb_mail, 1150 as userdb_uid, 12 asuserdb_gid FROM mailbox WHERE username = 'test@fondkr62.ru' AND active = '1'
Apr 18 09:03:32 mail dovecot: auth: Debug: password(test@fondkr62.ru,192.168.62.11): Credentials: fab7bd1b4b04fae0dcaacc5d57aa331864db11efe527e9f96ed6a0ce3e134302
Apr 18 09:03:32 mail dovecot: auth: Debug: client out: OK#0111#011user=test@fondkr62.ru#011asuserdb_gid=12
Apr 18 09:03:32 mail dovecot: auth: Debug: master in: REQUEST#0113791650817#0115720#0111#01188f83239f226591ba3cb2c845e8dc345
Apr 18 09:03:32 mail dovecot: auth: Debug: sql(test@fondkr62.ru,192.168.62.11): SELECT '/var/vmail/fondkr62.ru/test' as home, 'maildir:/var/vmail/fondkr62.ru/test'as mail, 1150 AS uid, 12 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = 'test@fondkr62.ru' AND active = '1'
Apr 18 09:03:32 mail dovecot: auth: Debug: master out: USER#0113791650817#011test@fondkr62.ru#011home=/var/vmail/fondkr62.ru/test#011mail=maildir:/var/vmail/fondkr62.ru/test#011uid=1150#011gid=12#011quota=dirsize:storage=0
Apr 18 09:03:32 mail dovecot: pop3-login: Login: user=<test@fondkr62.ru>, method=CRAM-MD5, rip=192.168.62.11, lip=192.168.62.2, mpid=5721
Apr 18 09:03:32 mail dovecot: pop3: Debug: Added userdb setting: mail=maildir:/var/vmail/fondkr62.ru/test
Apr 18 09:03:32 mail dovecot: pop3: Debug: Unknown userdb setting: plugin/quota=dirsize:storage=0
Apr 18 09:03:32 mail dovecot: pop3(test@fondkr62.ru): Debug: Effective uid=1150, gid=12, home=/var/vmail/fondkr62.ru/test
Apr 18 09:03:32 mail dovecot: pop3(test@fondkr62.ru): Debug: maildir++: root=/var/vmail/fondkr62.ru/test, index=, control=, inbox=/var/vmail/fondkr62.ru/test
Apr 18 09:03:32 mail dovecot: pop3(test@fondkr62.ru): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Apr 18 09:12:43 mail postfix/qmgr[2931]: 2E9D12408E1: from=<test1@fondkr62.ru>, size=895, nrcpt=1 (queue active)
Apr 18 09:12:43 mail postfix/qmgr[2931]: 9872F2408DD: from=<administrator@fondkr62.ru>, size=486, nrcpt=1 (queue active)
Apr 18 09:12:43 mail postfix/qmgr[2931]: D5E5F2408E0: from=<administrator@fondkr62.ru>, size=486, nrcpt=1 (queue active)
Apr 18 09:12:43 mail postfix/smtp[5761]: connect to 127.0.0.1[127.0.0.1]:10025: Connection refused
Apr 18 09:12:43 mail postfix/smtp[5762]: connect to 127.0.0.1[127.0.0.1]:10025: Connection refused
Apr 18 09:12:43 mail postfix/smtp[5764]: connect to 127.0.0.1[127.0.0.1]:10025: Connection refused
Apr 18 09:12:43 mail postfix/smtp[5761]: 2E9D12408E1: to=<test@fondkr62.ru>, relay=none, delay=54950, delays=54950/0.01/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10025: Connection refused)
Apr 18 09:12:43 mail postfix/smtp[5762]: 9872F2408DD: to=<test1@fondkr62.ru>, relay=none, delay=55077, delays=55077/0.03/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10025: Connection refused)
Apr 18 09:12:43 mail postfix/smtp[5764]: D5E5F2408E0: to=<test1@fondkr62.ru>, relay=none, delay=54987, delays=54987/0.04/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10025: Connection refused)
Apr 18 09:17:43 mail postfix/qmgr[2931]: E12AE2408E2: from=<test@fondkr62.ru>, size=840, nrcpt=1 (queue active)
Apr 18 09:17:43 mail postfix/smtp[5811]: connect to 127.0.0.1[127.0.0.1]:10025: Connection refused
Apr 18 09:17:43 mail postfix/smtp[5811]: E12AE2408E2: to=<Test1@fondkr62.ru>, relay=none, delay=55096, delays=55096/0.01/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10025: Connection refused)
#376964

noktis
Судя по твоим логам, у тебя проблема с демоном clamsmtpd:

text
Apr 18 09:12:43 mail postfix/smtp[5764]: connect to 127.0.0.1[127.0.0.1]:10025: Connection refused

В файле /etc/clamsmtpd.conf
Указывается строчка, в которой написано на каком порту должен работать clamsmtpd:

text
Listen: 127.0.0.1:10025

Проверь, запущен ли он:

service clamsmtpd status
#376968
"AlfaStriker" написал:
В файле /etc/clamsmtpd.conf
Указывается строчка, в которой написано на каком порту должен работать clamsmtpd:
Listen: 127.0.0.1:10025
Проверь, запущен ли он:
service clamsmtpd status

Благодарю за быстрый ответ, да проблема была именно в этом. Теперь осталось сервак перенести во внешку, чтобы из инета почту получать.

#376975

У меня стоит Fedora 20 x64. Попытался по приведенной туту инструкции установить почтовый сервер. Установил все компоненты (за исключением RoundCube и Fail2ban). У меня ip-адрес внешнего интерфейса: 10.0.0.254. Пытаюсь проверить работу сервера:

text

[root@localhost admin]# telnet 10.0.0.254 110
Trying 10.0.0.254...
Connected to 10.0.0.254.
Escape character is '^]'.
+OK Dovecot ready.
user andrystepa@mydomain.org
+OK
pass 1234
+OK Logged in.
quit
+OK Logging out.
Connection closed by foreign host.
[root@localhost admin]# telnet 10.0.0.254 25
Trying 10.0.0.254...
telnet: connect to address 10.0.0.254: Connection refused
[root@localhost admin]# 

То есть smtp-сервер не отвечает. Но если попытаться подключиться через localhost:

text

[root@localhost admin]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.mydomain.org ESMTP
ehlo localhost
250-mail.ecocentr.org
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.

То оказывается на нем все работает. Я грешил на clamsmtpd. Проверил, работает ли он:

text

[root@localhost admin]# service clamsmtpd status
Redirecting to /bin/systemctl status  clamsmtpd.service
clamsmtpd.service - Clamav Smtpd Antivirus Daemon
   Loaded: loaded (/usr/lib/systemd/system/clamsmtpd.service; disabled)
   Active: active (running) since Пт 2014-04-18 12:51:23 MSK; 17min ago
  Process: 4132 ExecStart=/usr/sbin/clamsmtpd -f /etc/clamsmtpd.conf -p /run/clamsmtpd/clamsmtpd.pid (code=exited, status=0/SUCCESS)
 Main PID: 4133 (clamsmtpd)
   CGroup: /system.slice/clamsmtpd.service
           └─4133 /usr/sbin/clamsmtpd -f /etc/clamsmtpd.conf -p /run/clamsmtpd/clamsmtpd.pid

апр 18 12:51:23 localhost.localdomain systemd[1]: Starting Clamav Smtpd Antivirus Daemon... апр 18 12:51:23 localhost.localdomain systemd[1]: Started Clamav Smtpd Antivirus Daemon.

Оказывается работает. Порт 25 в iptables я открыл. Почему же Postfix не отвечает на интерфейсе 10.0.0.254? Помогите,пожалуйста, разобраться.

#376981
"andrystepa" написал:
telnet: connect to address 10.0.0.254: Connection refused
[root@localhost admin]#

Если пишется так, значит у тебя проблемы с конфигурационным файлов postfix или у тебя работает фаервол.

Проверь логи /var/log/maillog, там детальное сообщение должно быть.

#376990
AlfaStriker написал:
[quote="andrystepa"]telnet: connect to address 10.0.0.254: Connection refused
[root@localhost admin]#

Если пишется так, значит у тебя проблемы с конфигурационным файлов postfix или у тебя работает фаервол.

Проверь логи /var/log/maillog, там детальное сообщение должно быть.[/quote]
А их там нету. Нет почему-то файла mailllog. Возможно потому, что в Fedora 20 по умолчанию не устанавливается Syslogd. Во всяком случае я посмотрел jornalctl, но разобраться, что же там не так, не могу. Вот например лог того момента, когда я пытался подключиться к серверу с telnet, а потом пытался отправить сообщение с помощью evolution:

text

апр 18 14:09:41 localhost.localdomain dovecot[949]: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=10.0.0.254, lip=10.0.0.254, secured, session=<RFobWU73YQAKAAD+>
апр 18 14:09:41 localhost.localdomain dovecot[949]: imap(andrystepa@mydomain.org): Connection closed in=316 out=1886
апр 18 14:09:49 localhost.localdomain dovecot[949]: auth: Debug: auth client connected (pid=2279)
апр 18 14:09:49 localhost.localdomain gnome-session[1246]: (evolution:2266): camel-WARNING **: EMailUISession::get_password() reported failure without setting its GError
апр 18 14:09:54 localhost.localdomain gnome-session[1246]: (evolution:2266): camel-WARNING **: EMailUISession::get_password() reported failure without setting its GError
апр 18 14:12:49 localhost.localdomain dovecot[949]: pop3-login: Disconnected: Inactivity (no auth attempts in 180 secs): user=<>, rip=10.0.0.254, lip=10.0.0.254, secured, session=<FUdZZE73YgAKAAD+>
апр 18 14:12:49 localhost.localdomain gnome-session[1246]: (evolution:2266): evolution-mail-WARNING **: (mail-send-recv.c:1145):receive_update_got_folderinfo: runtime check failed: (info != NULL)
апр 18 14:12:49 localhost.localdomain gnome-session[1246]: (evolution:2266): evolution-mail-WARNING **: receive_update_got_folderinfo: Поток не вернул данные
апр 18 14:14:05 localhost.localdomain clamd[1224]: SelfCheck: Database status OK.
апр 18 14:14:37 localhost.localdomain gnome-session[1246]: (evolution:2309): camel-WARNING **: EMailUISession::get_password() reported failure without setting its GError
апр 18 14:14:37 localhost.localdomain dovecot[949]: auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
апр 18 14:14:37 localhost.localdomain dovecot[949]: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
апр 18 14:14:37 localhost.localdomain dovecot[949]: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
апр 18 14:14:37 localhost.localdomain dovecot[949]: auth: Debug: Read auth token secret from /var/run/dovecot//auth-token-secret.dat
апр 18 14:14:37 localhost.localdomain dovecot[949]: auth: Debug: auth client connected (pid=2322)
апр 18 14:14:44 localhost.localdomain gnome-session[1246]: (evolution:2309): camel-WARNING **: EMailUISession::get_password() reported failure without setting its GError
апр 18 14:15:05 localhost.localdomain gnome-session[1246]: (evolution:2309): Gtk-CRITICAL **: gtk_entry_set_text: assertion 'text != NULL' failed
апр 18 14:15:05 localhost.localdomain gnome-session[1246]: (evolution:2309): Gtk-CRITICAL **: gtk_entry_set_text: assertion 'text != NULL' failed
апр 18 14:15:05 localhost.localdomain gnome-session[1246]: (evolution:2309): Gtk-CRITICAL **: gtk_entry_set_text: assertion 'text != NULL' failed
апр 18 14:15:05 localhost.localdomain gnome-session[1246]: (evolution:2309): Gtk-CRITICAL **: gtk_entry_set_text: assertion 'text != NULL' failed
апр 18 14:16:10 localhost.localdomain dovecot[949]: auth: Debug: auth client connected (pid=2347)
апр 18 14:17:32 localhost.localdomain gnome-session[1246]: (evolution:2309): evolution-mail-WARNING **: (mail-send-recv.c:1140):receive_update_got_folderinfo: runtime check failed: (info != NULL)
апр 18 14:17:32 localhost.localdomain dovecot[949]: pop3-login: Disconnected (no auth attempts in 175 secs): user=<>, rip=10.0.0.254, lip=10.0.0.254, secured, session=<XhMzdU73YwAKAAD+>
апр 18 14:17:45 localhost.localdomain dovecot[949]: pop3-login: Disconnected (no auth attempts in 95 secs): user=<>, rip=10.0.0.254, lip=10.0.0.254, secured, session=<9YzxdU73ZQAKAAD+>
апр 18 14:17:52 localhost.localdomain dovecot[949]: auth: Debug: auth client connected (pid=2371)
апр 18 14:17:52 localhost.localdomain dovecot[949]: auth: Debug: client in: AUTH        1        PLAIN        service=imap        secured        session=tBBldk73KAAKAAD+        lip=10.0.0.254        rip=10.0.
апр 18 14:17:52 localhost.localdomain dovecot[949]: auth-worker(2383): Debug: Loading modules from directory: /usr/lib64/dovecot/auth
апр 18 14:17:52 localhost.localdomain dovecot[949]: auth-worker(2383): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
апр 18 14:17:52 localhost.localdomain dovecot[949]: auth-worker(2383): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
апр 18 14:17:52 localhost.localdomain dovecot[949]: auth-worker(2383): Debug: sql(andrystepa@mydomain.org,10.0.0.254): query: SELECT username as user, password, '/var/vmail/mydomain.org/andrystepa' as userdb_
апр 18 14:17:52 localhost.localdomain dovecot[949]: auth: Debug: client passdb out: OK        1        user=andrystepa@mydomain.org        asuserdb_gid=12
апр 18 14:17:52 localhost.localdomain dovecot[949]: auth: Debug: master in: REQUEST        2394292225        2371        1        29f80fd725a54a23fd900afb5083db96        session_pid=2385        request_auth_t
апр 18 14:17:52 localhost.localdomain dovecot[949]: auth-worker(2383): Debug: sql(andrystepa@mydomain.org,10.0.0.254): SELECT '/var/vmail/mydomain.org/andrystepa' as home, 'maildir:/var/vmail/mydomain.org/and
апр 18 14:17:52 localhost.localdomain dovecot[949]: auth: Debug: master userdb out: USER        2394292225        andrystepa@mydomain.org        home=/var/vmail/mydomain.org/andrystepa        mail=maildir:/va
апр 18 14:17:52 localhost.localdomain dovecot[949]: imap-login: Login: user=<andrystepa@mydomain.org>, method=PLAIN, rip=10.0.0.254, lip=10.0.0.254, mpid=2385, secured, session=<tBBldk73KAAKAAD+>
апр 18 14:17:52 localhost.localdomain dovecot[949]: imap: Debug: Added userdb setting: mail=maildir:/var/vmail/mydomain.org/andrystepa
апр 18 14:17:52 localhost.localdomain dovecot[949]: imap: Debug: Added userdb setting: plugin/quota=dirsize:storage=0
апр 18 14:17:52 localhost.localdomain dovecot[949]: imap(andrystepa@mydomain.org): Debug: Effective uid=1150, gid=12, home=/var/vmail/mydomain.org/andrystepa
апр 18 14:17:52 localhost.localdomain dovecot[949]: imap(andrystepa@mydomain.org): Debug: maildir++: root=/var/vmail/mydomain.org/andrystepa, index=, indexpvt=, control=, inbox=/var/vmail/mydomain.org/andryst
lines 20-51/51 (END)

Ошибки в этом листинге только такие: EMailUISession::get_password() reported failure without setting its GError. Но что они означают - я не понимаю.

#377002

А если тупо проверить статус сервиса (демона) postfix ?

text
systemctl status postfix.service
#377013

Вот что получилось:

text

[root@localhost admin]# systemctl status postfix.service
postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled)
   Active: active (running) since Пт 2014-04-18 13:53:51 MSK; 2h 4min ago
  Process: 2949 ExecReload=/usr/sbin/postfix reload (code=exited, status=0/SUCCESS)
  Process: 886 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
  Process: 884 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
  Process: 844 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
 Main PID: 1010 (master)
   CGroup: /system.slice/postfix.service
           ├─1010 /usr/libexec/postfix/master -w
           ├─2964 pickup -l -t unix -u
           └─2965 qmgr -l -t unix -u

апр 18 15:30:35 localhost.localdomain postfix/postfix-script[2955]: refreshing the Postfix mail system апр 18 15:30:35 localhost.localdomain postfix/master[1010]: reload -- version 2.10.3, configuration /etc/postfix апр 18 15:30:35 localhost.localdomain postfix/master[1010]: warning: service smtp: ignoring inet_interfaces change апр 18 15:30:35 localhost.localdomain postfix/master[1010]: warning: to change inet_interfaces, stop and start Postfix апр 18 15:30:35 localhost.localdomain postfix/master[1010]: warning: service 127.0.0.1:10026: ignoring inet_interfaces change апр 18 15:30:35 localhost.localdomain postfix/master[1010]: warning: to change inet_interfaces, stop and start Postfix апр 18 15:30:35 localhost.localdomain systemd[1]: Reloaded Postfix Mail Transport Agent. апр 18 15:40:35 localhost.localdomain postfix/qmgr[2965]: A1984100978: from=<root@mydomain.org>, size=901, nrcpt=1 (queue active) апр 18 15:40:35 localhost.localdomain postfix/qmgr[2965]: warning: connect to transport private/scan: Connection refused апр 18 15:40:35 localhost.localdomain postfix/error[3129]: A1984100978: to=<root@mydomain.org>, orig_to=<root>, relay=none, delay=2434, delays=2434/0.01/0/0.05, dsn=4.3.0, status=deferred (mail tra... unavailable) Hint: Some lines were ellipsized, use -l to show in full. [root@localhost admin]#

Из этого меня смущает: warning: connect to transport private/scan: Connection refused
Я попробовал сканировать порты на интерфейсе 10.0.0.254:

text

[root@localhost admin]# nmap 10.0.0.254

Starting Nmap 6.40 ( http://nmap.org ) at 2014-04-18 15:42 MSK Nmap scan report for 10.0.0.254 Host is up (0.0000060s latency). Not shown: 995 closed ports PORT STATE SERVICE 80/tcp open http 110/tcp open pop3 143/tcp open imap 443/tcp open https 3306/tcp open mysql

Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds

[root@localhost admin]# nmap -p25 10.0.0.254

Starting Nmap 6.40 ( http://nmap.org ) at 2014-04-18 15:44 MSK Nmap scan report for 10.0.0.254 Host is up (0.000067s latency). PORT STATE SERVICE 25/tcp closed smtp

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds

Подумал, может iptables блокирует порт. Посмотрел правила:

text

# Generated by iptables-save v1.4.19.1 on Fri Apr 18 16:07:59 2014
*filter
:INPUT DROP [6:2311]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i em1 -p icmp -j ACCEPT
-A INPUT -p tcp -m tcp --dport 1234 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 25,110,143 -j ACCEPT
-A INPUT -p udp -m udp --dport 53 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 53 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p udp -m udp --dport 53 -m hashlimit --hashlimit-above 20/sec --hashlimit-burst 100 --hashlimit-mode srcip --hashlimit-name DNS --hashlimit-srcmask 28 -j DROP
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -o em1 -p icmp -j ACCEPT
-A OUTPUT -p tcp -m tcp --sport 1234 -j ACCEPT
-A OUTPUT -p tcp -m tcp --sport 80 -j ACCEPT
-A OUTPUT -p tcp -m multiport --sports 25,110,143 -j ACCEPT
-A OUTPUT -p udp -m udp --dport 53 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 53 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Fri Apr 18 16:07:59 2014

dport 25 -j ACCEPT - вроде все должно быть открыто, однако postfix не отвечает! Ну в чем же дело?

#377023

Все таки у вас проблема с конфигом Postfix.
У вас есть строчка в /etc/postfix/main.cf?

text
inet_interfaces = all
#377028

Да есть. Вообще вот весь main.cf:

text

soft_bounce = no
queue_directory = /var/spool/postfix
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
default_privs = nobody
inet_interfaces = all
myhostname = mail.mydomain.org
mydomain = mydomain.org
myorigin = $mydomain
mydestination = $myhostname,localhost.$myhostname,localhost
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8 10.0.0.0/8
relay_domains =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mail_spool_directory = /var/mail
smtpd_banner = $myhostname ESMTP
debug_peer_level = 2
debug_peer_list = 127.0.0.1
debugger_command = 
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    xxgdb $daemon_directory/$process_name $process_id & sleep 5 
sendmail_path = /usr/sbin/sendmail
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/local/man
config_directory = /etc/postfix
debug_peer_level = 2
debug_peer_list =  yandex.ru, mail.ru pochta.ru 10.10.10.23/32 10.10.10.0/24
virtual_mailbox_domains = mysql:$config_directory/sql/vdomains.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = mysql:$config_directory/sql/vmailbox.cf
virtual_alias_maps = mysql:$config_directory/sql/valias.cf
virtual_minimum_uid = 1150
virtual_uid_maps = static:1150
virtual_gid_maps = static:12
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/spool/postfix/private/dovecot-auth
smtpd_recipient_restrictions = permit_mynetworks,
    permit_sasl_authenticated,
    reject_unauth_destination,
    check_policy_service unix:/var/spool/postfix/postgrey/socket,
    reject_non_fqdn_recipient,
    reject_unverified_recipient,
    reject_rbl_client cbl.abuseat.org,
    reject_rbl_client dialups.mail-abuse.org,
    permit
content_filter = scan:127.0.0.1:10025
receive_override_options = no_address_mappings
#377029

А если вырубить iptables:

text
sysctl stop iptables.service

И потом сделать telnet:

text
telnet mail.mydomain.org smtp

Работает?

Войдите или зарегистрируйтесь, чтобы ответить.