ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] Postfix vs. aliases owner
@ 2007-03-01 16:43 Grigory Batalov
  2007-03-01 21:33 ` Dmitry V. Levin
  0 siblings, 1 reply; 5+ messages in thread
From: Grigory Batalov @ 2007-03-01 16:43 UTC (permalink / raw)
  To: sisyphus

[-- Attachment #1: Type: text/plain, Size: 1276 bytes --]

Здравствуйте!

Нормально ли, что письмо, полученное постфиксом, обрабатывается от имени
владельца aliases.cdb? Вот пример:

/etc/postfix/main.cf :
alias_maps = cdb:/etc/postfix/aliases, cdb:/etc/mailman/aliases

$ ls -la /etc/mailman/aliases*
-rw-rw-r-- 1 root mailmanadm 1134 Мар  1 18:46 /etc/mailman/aliases
-rw-rw-r-- 1 bga  mailmanadm 3053 Мар  1 18:49 /etc/mailman/aliases.cdb

/etc/mailman/aliases :
test1:             "|/usr/bin/id && /bin/false"

Отправляю письмо по SMTP.

/var/log/maillog :
Mar  1 19:21:30 bga postfix/local[2525]: 762426C056: to=<test1@bga.spb.altlinux.org>, relay=local, delay=7, status=bounced (Command died with status 1: "/usr/bin/id && /bin/false". Command output: uid=500(bga) gid=500(bga) groups=500(bga) )

$ sudo chown root /etc/mailman/aliases.cdb

Отправляю заново.

/var/log/maillog :
Mar  1 19:23:11 bga postfix/local[2536]: DFBDF6C056: to=<test1@bga.spb.altlinux.org>, relay=local, delay=5, status=bounced (Command died with status 1: "/usr/bin/id && /bin/false". Command output: uid=106(postman) gid=48(postman) groups=48(postman) )

Как в этом случае обходиться с mailman? Раньше у членов mailmanadm
была возможность добавлять новые списки и обновлять aliases без
дополнительных полномочий.

$ rpm -q postfix
postfix-2.2.11-alt2



[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sisyphus] Postfix vs. aliases owner
  2007-03-01 16:43 [sisyphus] Postfix vs. aliases owner Grigory Batalov
@ 2007-03-01 21:33 ` Dmitry V. Levin
  2007-03-01 22:20   ` Grigory Batalov
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry V. Levin @ 2007-03-01 21:33 UTC (permalink / raw)
  To: ALT Linux Sisyphus mailing list

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Hi,

On Thu, Mar 01, 2007 at 07:43:02PM +0300, Grigory Batalov wrote:
> Нормально ли, что письмо, полученное постфиксом, обрабатывается от имени
> владельца aliases.cdb?

Цитирую local(8):

DELIVERY RIGHTS
	Deliveries to external files and external commands are made with
	the rights of the receiving user on whose behalf the delivery
	is made.  In the absence of a user context, the local(8) daemon
	uses the owner rights of the :include: file or alias database.
	When those files are owned by the superuser, delivery is made
	with the rights specified with the default_privs configuration
	parameter.

Таким это поведение было всегда.

А в чём, собственно говоря, проблема?


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sisyphus] Postfix vs. aliases owner
  2007-03-01 21:33 ` Dmitry V. Levin
@ 2007-03-01 22:20   ` Grigory Batalov
  2007-03-01 22:45     ` Dmitry V. Levin
  0 siblings, 1 reply; 5+ messages in thread
From: Grigory Batalov @ 2007-03-01 22:20 UTC (permalink / raw)
  To: sisyphus

On Fri, 2 Mar 2007 00:33:54 +0300, Dmitry V. Levin wrote:

> > Нормально ли, что письмо, полученное постфиксом, обрабатывается от имени
> > владельца aliases.cdb?
> 
> Цитирую local(8):
> 
> DELIVERY RIGHTS
> 	Deliveries to external files and external commands are made with
> 	the rights of the receiving user on whose behalf the delivery
> 	is made.  In the absence of a user context, the local(8) daemon
> 	uses the owner rights of the :include: file or alias database.
> 	When those files are owned by the superuser, delivery is made
> 	with the rights specified with the default_privs configuration
> 	parameter.
> 
> Таким это поведение было всегда.
> 
> А в чём, собственно говоря, проблема?

  Это я от неожиданности =). Уже разобрался, как быть.

-- 
 Grigory Batalov,
 ALT Linux Team



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [sisyphus] Postfix vs. aliases owner
  2007-03-01 22:20   ` Grigory Batalov
@ 2007-03-01 22:45     ` Dmitry V. Levin
  2007-03-02 10:37       ` [sisyphus] Mailman groups (was: Postfix vs. aliases owner) Grigory Batalov
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry V. Levin @ 2007-03-01 22:45 UTC (permalink / raw)
  To: ALT Linux Sisyphus mailing list

[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

On Fri, Mar 02, 2007 at 01:20:16AM +0300, Grigory Batalov wrote:
> On Fri, 2 Mar 2007 00:33:54 +0300, Dmitry V. Levin wrote:
> 
> > > Нормально ли, что письмо, полученное постфиксом, обрабатывается от имени
> > > владельца aliases.cdb?
> > 
> > Цитирую local(8):
> > 
> > DELIVERY RIGHTS
> > 	Deliveries to external files and external commands are made with
> > 	the rights of the receiving user on whose behalf the delivery
> > 	is made.  In the absence of a user context, the local(8) daemon
> > 	uses the owner rights of the :include: file or alias database.
> > 	When those files are owned by the superuser, delivery is made
> > 	with the rights specified with the default_privs configuration
> > 	parameter.
> > 
> > Таким это поведение было всегда.
> > 
> > А в чём, собственно говоря, проблема?
> 
>   Это я от неожиданности =). Уже разобрался, как быть.

И как же быть? ;)


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [sisyphus] Mailman groups (was: Postfix vs. aliases owner)
  2007-03-01 22:45     ` Dmitry V. Levin
@ 2007-03-02 10:37       ` Grigory Batalov
  0 siblings, 0 replies; 5+ messages in thread
From: Grigory Batalov @ 2007-03-02 10:37 UTC (permalink / raw)
  To: sisyphus

On Fri, 2 Mar 2007 01:45:47 +0300, Dmitry V. Levin wrote:

> > > > Нормально ли, что письмо, полученное постфиксом, обрабатывается от имени
> > > > владельца aliases.cdb?
> > > 
> > > Цитирую local(8):
> > > 
> > > DELIVERY RIGHTS
> > > 	Deliveries to external files and external commands are made with
> > > 	the rights of the receiving user on whose behalf the delivery
> > > 	is made.  In the absence of a user context, the local(8) daemon
> > > 	uses the owner rights of the :include: file or alias database.
> > > 	When those files are owned by the superuser, delivery is made
> > > 	with the rights specified with the default_privs configuration
> > > 	parameter.
> > > 
> > > Таким это поведение было всегда.
> > > 
> > > А в чём, собственно говоря, проблема?
> > 
> >   Это я от неожиданности =). Уже разобрался, как быть.
> 
> И как же быть? ;)

  Этот файл (aliases.cdb) вероятнее всего будут создавать администраторы
  списков или root. Т.е. нужно разрешить запускать mail- и cgi-обработчики
  (у них внутри собственная проверка) группам mailmanadm и postman. Это просто.

  Но есть другая проблема.
  Консольному создателю списков нужен доступ на запись в /etc/mailman/aliases.
  У нас это реализовано группой mailmanadm и правами g+w. Однако, есть ещё
  cgi-программа для создания списков. Она запускается веб-сервером, например,
  apache, с битом SGID mailman, чтобы писать в логи и создавать файлы в
  /var/lib/mailman/lists/ и т.п. При этом она не может обновить aliases, т.к.
  группа этого файла - mailmanadm.

  С другой стороны, даже консольному админу нужно членство в группе mailman,
  т.к. он тоже хочет писать в /var/lib/mailman/lists/ . Консольные скрипты -
  это текст на питоне, так что SUID/SGID им не выставить.

  Пока что я склоняюсь упразднить группу mailmanadm, а админов включать
  в группу mailman.

-- 
 Grigory Batalov,
 ALT Linux Team



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-02 10:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-01 16:43 [sisyphus] Postfix vs. aliases owner Grigory Batalov
2007-03-01 21:33 ` Dmitry V. Levin
2007-03-01 22:20   ` Grigory Batalov
2007-03-01 22:45     ` Dmitry V. Levin
2007-03-02 10:37       ` [sisyphus] Mailman groups (was: Postfix vs. aliases owner) Grigory Batalov

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

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


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