Проблема с postfix + sasl

EXIM, sendmail, postfix, Dovecot и прочие. Решение проблем связанных с работой электронной почты

Модератор: xM

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Аватара пользователя
helloworld
ст. сержант
Сообщения: 368
Зарегистрирован: 2007-10-03 8:06:37
Откуда: Northern Colorado

Проблема с postfix + sasl

Непрочитанное сообщение helloworld » 2008-10-03 22:35:12

Какие то грабли непойму.

То, что добавил с стандартный конфиг /usr/local/etc/postfix/mail.cf

Код: Выделить всё

virtual_alias_maps = hash:/usr/local/etc/postfix/virtual
virtual_alias_domains = realbitches.ru, bigtits.ru

# SASL suppot
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous

smtpd_helo_required = yes
disable_vrfy_command = yes

smtpd_recipient_restrictions =
        permit_sasl_authenticated,
        permit_mynetworks,
        reject_unknown_recipient_domain,
        reject_unauth_destination,
        reject_rbl_client      bl.spamcop.net

# tls config
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /usr/local/etc/postfix/ssl/smtpd.pem
smtpd_tls_cert_file = /usr/local/etc/postfix/ssl/smtpd.pem
smtpd_tls_CAfile = /usr/local/etc/postfix/ssl/smtpd.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
/var/log/maillog

Код: Выделить всё

postfix/master[58460]: daemon started -- version 2.5.5, configuration /usr/local/etc/postfix
postfix/smtpd[58466]: warning: SASL: Connect to smtpd failed: No such file or directory
postfix/smtpd[58466]: fatal: no SASL authentication mechanisms
postfix/master[58460]: warning: process /usr/local/libexec/postfix/smtpd pid 58466 exit status 1
postfix/master[58460]: warning: /usr/local/libexec/postfix/smtpd: bad command startup -- throttling

ps axu | grep saslauthd

Код: Выделить всё

root    58695  0.0  0.5  2876  1340  ??  Is   12:20AM   0:00.01 /usr/local/sbin/saslauthd -a pam
root    58696  0.0  0.5  2876  1336  ??  I    12:20AM   0:00.00 /usr/local/sbin/saslauthd -a pam
root    58697  0.0  0.5  2876  1336  ??  I    12:20AM   0:00.00 /usr/local/sbin/saslauthd -a pam
root    58698  0.0  0.5  2876  1336  ??  I    12:20AM   0:00.00 /usr/local/sbin/saslauthd -a pam
root    58699  0.0  0.5  2876  1336  ??  I    12:20AM   0:00.00 /usr/local/sbin/saslauthd -a pam
# cat /usr/local/lib/sasl2/smtpd.conf

Код: Выделить всё

pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
# pkg_info

Код: Выделить всё

cyrus-sasl-2.1.22_1 RFC 2222 SASL (Simple Authentication and Security Layer)
cyrus-sasl-saslauthd-2.1.22
postfix-2.5.5,1
/etc/rc.conf

Код: Выделить всё

postfix_enable="YES"
saslauthd_enable="YES"
saslauthd_flags="-a pam"
Сертификаты для tls, естественно, создал.
Настраивал такую же конфигурацию месяца 2 назад, все работает до сих пор.
Кто в курсе что сделатть то ?

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

Аватара пользователя
helloworld
ст. сержант
Сообщения: 368
Зарегистрирован: 2007-10-03 8:06:37
Откуда: Northern Colorado

Re: Проблема с postfix + sasl

Непрочитанное сообщение helloworld » 2008-10-03 22:40:07

postfix собран с

Код: Выделить всё

                                            ? ?[X] PCRE      Perl Compatible Regular Expressions               ? ?
                                            ? ?[X] SASL2     Cyrus SASLv2 (Simple Auth. and Sec. Layer)        ? ?
                                            ? ?[X] DOVECOT   Dovecot SASL authentication method                ? ?
                                            ? ?[ ] SASLKRB   If your SASL req. Kerberos select this option     ? ?
                                            ? ?[ ] SASLKRB5  If your SASL req. Kerberos5 select this option    ? ?
                                            ? ?[ ] SASLKMIT  If your SASL req. MIT Kerberos5 select this option? ?
                                            ? ?[X] TLS       Enable SSL and TLS support                        ? ?
                                            ? ?[ ] BDB       Berkeley DB (choose version with WITH_BDB_VER)    ? ?
                                            ? ?[ ] MYSQL     MySQL maps (choose version with WITH_MYSQL_VER)   ? ?
                                            ? ?[ ] PGSQL     PostgreSQL maps (choose with DEFAULT_PGSQL_VER)   ? ?
                                            ? ?[ ] OPENLDAP  OpenLDAP maps (choose ver. with WITH_OPENLDAP_VER)? ?
                                            ? ?[ ] CDB       CDB maps lookups                                  ? ?
                                            ? ?[ ] NIS       NIS maps lookups                                  ? ?
                                            ? ?[ ] VDA       VDA (Virtual Delivery Agent)                      ? ?
                                            ? ?[ ] TEST      SMTP/LMTP test server and generator               ? ?
                                          

Аватара пользователя
wnd
сержант
Сообщения: 261
Зарегистрирован: 2008-02-28 4:42:10
Откуда: Донецк -> Киев -> Chicago

Re: Проблема с postfix + sasl

Непрочитанное сообщение wnd » 2008-10-04 0:37:11

helloworld писал(а):Какие то грабли непойму.
та мы тут уже боролись

Код: Выделить всё

http://forum.lissyara.su/viewtopic.php?f=20&t=11315
пока результата нет.
Собственно говоря у меня работает с dovecot :roll:

Вроде по доку с postfix в main.cf должна быть строчка smtpd_sasl_path = smtpd

может поможет :cf:
If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.

Аватара пользователя
helloworld
ст. сержант
Сообщения: 368
Зарегистрирован: 2007-10-03 8:06:37
Откуда: Northern Colorado

Re: Проблема с postfix + sasl

Непрочитанное сообщение helloworld » 2008-10-04 9:42:56

Проблема решилась путем внимательного чтения документации на официальном сайте. http://www.postfix.com/postconf.5.html#smtpd_sasl_type

Код: Выделить всё

# SASL support
smtpd_sasl_type = cyrus
smtpd_sasl_path = smtpd
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous

Аватара пользователя
wnd
сержант
Сообщения: 261
Зарегистрирован: 2008-02-28 4:42:10
Откуда: Донецк -> Киев -> Chicago

Re: Проблема с postfix + sasl

Непрочитанное сообщение wnd » 2008-10-05 9:13:33

Спасибо, похоже не дочитал http://www.postfix.com/SASL_README.html
Как-то оно там немножко размазано написано.
If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.