ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Stas <stas.grumbler@gmail.com>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] postfix sasl
Date: Fri, 21 Oct 2016 12:09:50 +0500
Message-ID: <5809BF3E.4050109@gmail.com> (raw)
In-Reply-To: <201610210958.56585.a_s_y@sama.ru>



On 21.10.2016 10:58, Sergey wrote:
> Ещё вот на это внимание обратите:
> https://bugzilla.altlinux.org/show_bug.cgi?id=30270
>
> К исходному вопросу, видимо, не относится, но может быть важно.

Спасибо за информацию.
Я уже решил проблему - сделал workaround.

Библиотечный модуль /usr/lib64/postfix/xsasl_cyrus.so postfix  находит
"из коробки". /usr/lib/sasl* в P7 при том списке пакетов вообще не
существует.
Зато postfix требует чтобы конфиг sasl был в /etc/postfix/sasl, тогда
как все остальные конфиги SASL размещены в /etc/sasl2. Судя по
http://www.postfix.org/SASL_README.html, в стоковом postfix используется
именно этот путь для конфига SASL, а в Debian, Ubuntu и Altlinux -
/etc/postfix/sasl, значит виноват патч для postfix

Но тут есть одна серьёзная особенность.
Postfix в Altlinux (по умолчанию, и IMHO это правильный путь) работает в
chroot, поэтому нужно обеспечить доступность конфига sasl в chroot.
Проще всего это сделать , когда конфиг в дереве /etc/postfix.
Полагаю, что chroot и является причиной такого "костыльного" решения.
IMHO недоработка тут в том, что скрипт /etc/chroot.d/postfix.conf не
копирует файл, указанный в main.cf в директиве smtpd_sasl_path, из
/etc/postfix/sasl/ в /var/spool/postfix/etc/postfix/sasl/, например, так:
smtpd_sasl_path=etc/postfix/sasl/`/usr/sbin/postconf -h
smtpd_sasl_path`.conf
install -g postfix -m 440 "/$smtpd_sasl_path" "$smtpd_sasl_path"

В настройке postfix-sasl-cyrus есть ещё один момент. saslauthd требует
нешифрованный пароль. Если нужна аутентификация с передачей
хешированного/шифрованного пароля, приходиться использовать sasldb или
ldap или sql. В случае sasldb файл базы нужно подать в
/var/spool/postfix/etc/sasl2/.
Простейшее решение - `mount --bind /etc/sasl2/
/var/spool/postfix/etc/sasl2 && mount -o remount, ro,bind /etc/sasl2/
/var/spool/postfix/etc/sasl2` требует модификации скрипта
/etc/chroot.d/postfix.conf или /etc/chroot.d/postfix.all. IMHO нужна
возможность добавить вызов пользовательского скрипта из
/etc/chroot.d/postfix.all

Наверное, это уже темя для sisyphus@ и багзиллы.

-- 
Станислав Дёгтев
Служба "Ваш админ"
 Мои контакты:
 - jabber: grumbler@grumbler.org
 - email: stas.grumbler@gmail.com и stas@vashadmin.su
 - телефоны в Е-бурге +79045430461 и +79222112259


  reply	other threads:[~2016-10-21  7:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20  8:25 Stas
2016-10-20  9:33 ` Nikolay A. Fetisov
2016-10-20 20:55   ` Stas
2016-10-20 10:01 ` Andrew Borodin
2016-10-21  5:58 ` Sergey
2016-10-21  7:09   ` Stas [this message]
2016-10-21  7:33     ` Sergey
2016-10-21  7:41       ` Stas
2016-10-21  7:47     ` Anton Gorlov
2016-10-21  8:36       ` Stas
2016-10-25  1:27       ` В.А. Илларионов
2016-10-25  4:45         ` Stas
2016-10-25  6:26           ` В.А. Илларионов
2016-10-25  6:45             ` Stas
2016-10-25  9:20               ` В.А. Илларионов
2016-10-21  7:26   ` Nikolay A. Fetisov
2016-10-21  7:34     ` Sergey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5809BF3E.4050109@gmail.com \
    --to=stas.grumbler@gmail.com \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git