[sisyphus] [OT] postfix+cyrus+sasl+ALT

Salavat Yarmukhametov =?iso-8859-1?q?salavat_=CE=C1_regiongarant=2Eru?=
Чт Дек 30 12:50:31 MSK 2004


Thu, Dec 30, 2004 at 12:21:08AM +0800, Alexei Takaseev писал:
> On Wed, 29 Dec 2004 18:23:19 +0300
> Salavat Yarmukhametov <salavat на regiongarant.ru> wrote:
> 
> > 	Извините за офтопик, нужно дать возможность юзерам слать почту с
> > конторского сервера извне. т.е. smtp с авторизацией, т.е.
> > postfix+cyrus+sasl. postfix+sasl взял из dedalusa. создал пользователя
> > test командой saslpasswd2, в /etc/postfix/main.cf добавил
> > smtpd_sasl_auth_enable = yes
> > smtpd_sasl_security_options =
> > smtpd_sasl_local_domain =
> > smtpd_client_restrictions = permit_sasl_authenticated
> > smtpd_sender_restrictions = permit_sasl_authenticated
> > broken_sasl_auth_clients = yes
> > smtpd_recipient_restrictions = permit_sasl_authenticated,
> > permit_mynetworks, reject_unauth_destination, reject_invalid_hostname,
> > reject_non_fqdn_hostname, reject_non_fqdn_sender,
> > reject_non_fqdn_recipient, reject_unknown_sender_domain,
> > reject_unknown_recipient_domain, reject_unauth_pipelining
> 
> 
> # SMTP Auth
> smtpd_sasl_auth_enable = yes
> smtpd_sasl_security_options = noanonymous
> smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
> smtpd_tls_auth_only = no
> smtpd_sasl_local_domain = $mydomain
> smtp_sasl_auth_enable = no
> #smtp_sasl_password_maps = hash:/etc/postfix/saslpass
> #smtp_sasl_security_options = noplaintext
> smtp_sasl_tls_security_options = $smtp_sasl_security_options
> smtp_sasl_tls_verified_security_options =
> $smtp_sasl_tls_security_options smtpd_recipient_restrictions =
>    permit_sasl_authenticated,                             
>    permit_mynetworks,
>    check_relay_domains
> 
> > mailbox_transport = cyrus
> 
> Вместо этого нужно пользовать
> 
> mailbox_transport = lmtp:unix:/public/lmtp
> 
> А далее смотреть /usr/share/doc/cyrus-imapd-doc-2.2.10/README.ALT
> 
> > P.S. если закомментарить строчку mailbox_transport = cyrus в main.cf -
> > в логе ругань, что нет пользователя test.
> > гдеб почитать с примерчиками.
> > http://linuxportal.ru/print.php/803_0_3_0_M/
> > и http://www.multik.ru/linux/ispmailv2/ не помогли - авторы советуют
> > брать пакеты с сайтов разработчиков и собирать самому.
> 
> Вячеслав таки умный мужик, но то, что он описывал в 2003-м году в 2004-м
> успело устареть.
устарело, но другой инфы я не нашел:(
не выходит чаша :(
какие должны быть права на /var/spool/postfix/etc/sasl2/sasldb2?
если -rw-r-----  1 root sasl - в логе:
Dec 30 10:56:50 test postfix/smtpd[26827]: warning: SASL authentication
problem:
 unable to open Berkeley db /etc/sasl2/sasldb2: Permission denied

если:
-rw-r-----  1 postfix sasl 12288 Dec 30 10:37 sasldb2
то:
Dec 30 11:01:26 test postfix/postfix-script: warning: not owned by root:
/var/spool/postfix/etc/sasl2/sasldb2

завел пользователя test
[root на test log]# sasldblistusers2
salavat на test.regiongarant.ru: userPassword
test на test.regiongarant.ru: userPassword
salavat на test.regiongarant.ru: cmusaslsecretOTP
test на test.regiongarant.ru: cmusaslsecretOTP

пытаюсь подключиться:
[salavat на salavat salavat]$ telnet test.regiongarant.ru 25
220 test.regiongarant.ru ESMTP Postfix
ehlo test.regiongarant.ru
250-test.regiongarant.ru
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-AUTH PLAIN LOGIN
250-XVERP
250 8BITMIME
auth plain
334 
dGVzdAB0ZXN0AHRlc3RwYXNz
535 Error: authentication failed

в логе:
Dec 30 11:02:21 test postfix/smtpd[27067]: connect from
salavat.regiongarant.ru[192.168.1.2]
Dec 30 11:02:47 test postfix/smtpd[27067]: warning: SASL authentication
failure: Password verification failed
Dec 30 11:02:47 test postfix/smtpd[27067]: warning:
salavat.regiongarant.ru[192.168.1.2]: SASL plain authentication failed

--
Salavat Yarmukhametov		
Jabber: salik на jabber.ru	
ICQ:	21144441



Подробная информация о списке рассылки Sisyphus