supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Re: postfix and svlogd ?
@ 2006-03-09 19:26 Roy Lanek
  0 siblings, 0 replies; 10+ messages in thread
From: Roy Lanek @ 2006-03-09 19:26 UTC (permalink / raw)
  Cc: supervision

> But am I seriously mistaken, or is it again some info
> about how to run postfix supervised? And not about how
> to grab postfix log messages so as to be able to use
> "svlogd"?

Well, the patch that I have indicated is the minimum of
the minimum--and good so!--in fact it touches nearly zero
of Postfix. (I would also NOT accept anything of the genre
that would go more in depth AND DOESN'T come with Wietse
Venema's green light.) 

Why does it need to be in svlogd per se?, use
socklog--from the SAME runit series (or *family*) and uses
the IDENTICAL style of config. files--I don't start any
log service for Postfix. 

Example from my /var/log/socklog/mail/...: 

...
2006-03-08_14:33:46.20193 mail.info: Mar  8 21:33:44
 postfix/postfix-script: starting the Postfix mail system
 (foreground)
2006-03-08_14:33:56.25236 mail.info: Mar  8 21:33:56
 postfix/master[156]: daemon started -- version
 2.3-20060202, configuration /etc/postfix
...
2006-03-08_22:32:05.18664 mail.info: Mar  9 05:32:05
 postfix/pickup[1005]: xxxxx: uid=yyyy from=<zzz>
... 

It doesn't solve 1-1 your requirements, but it's a
solution ... provided your #1 goal is to use Postfix a' la
runit (and mine it is). 


Cheers, 

/Roy Lanek
 --
########################
##### . slackware ######   air tenang menghanyutkan
##### +-----linux ######    still water runs deep
######################## 



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

* Re: postfix and svlogd ?
  2006-03-09 14:23   ` Gilles
  2006-03-09 20:53     ` Vincent Danen
@ 2006-03-14  0:31     ` Gilles
  1 sibling, 0 replies; 10+ messages in thread
From: Gilles @ 2006-03-14  0:31 UTC (permalink / raw)


Hi.

Eventually, to bring a conclusion to this thread:

> > 
> > Postfix uses syslog, but is there a way to make it work with
> > svlogd?

I don't know.  But...

> > Or will I have to install socklog and set it up as a UNIX
> > log service?
>

... I installed socklog, set up as a "unix" log server, and
it's all that's needed.
 
> 
> The fact that several people seem to imply that it isn't trivial
> [...] to
> run postfix under runit 
> 

At least for the Debian package, postfix runs fine as-is.


Thanks for the answers I've received.
Gilles.


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

* Re: postfix and svlogd ?
  2006-03-09 14:23   ` Gilles
@ 2006-03-09 20:53     ` Vincent Danen
  2006-03-14  0:31     ` Gilles
  1 sibling, 0 replies; 10+ messages in thread
From: Vincent Danen @ 2006-03-09 20:53 UTC (permalink / raw)


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

* Gilles <gilles@harfang.homelinux.org> [2006-03-09 15:23:51 +0100]:

> But am I seriously mistaken, or is it again some info about how
> to run postfix supervised?  And not about how to grab postfix
> log messages so as to be able to use "svlogd"?
> 
> The fact that several people seem to imply that it isn't trivial
> (such as the need for a patch to be applied, as stated above) to
> run postfix under runit make me wonder about the example script
> provided by Gerrit Pape, copied here below:
> 
> ---CUT---
> #!/bin/sh
> exec 1>&2
> 
> daemon_directory=/usr/lib/postfix \
> command_directory=/usr/sbin \
> config_directory=/etc/postfix \
> queue_directory=/var/spool/postfix \
> mail_owner=postfix \
> setgid_group=postdrop \
>   /etc/postfix/postfix-script check || exit 1
> 
> exec /usr/lib/postfix/master
> ---CUT---
> 
> [No mention of any caveat.]
> So actually, is this sufficient or not to run postfix under
> supervision???

Looks like it should be, but might be overkill as well.  What we use
with Annvix (and which works for supervision, without patches):

[vdanen@build ~]$ cat
svn/packages/releases/1.2-RELEASE/postfix/SOURCES/postfix.run 
#!/bin/sh
# this was originally posted at http://mandree.home.pages.de/postfix/daemontools.html
# but doesn't seem to be there anymore... thanks google!

set -e

PATH="/sbin:/usr/sbin:/bin:/usr/bin"

# this runs postfix supervised

command_directory=`postconf -h command_directory`
daemon_directory=`$command_directory/postconf -h daemon_directory`

# kill postfix if running to ensure we run supervised
$daemon_directory/master -t || $command_directory/postfix stop >/dev/null 2>&1

# make consistency check
$command_directory/postfix check >/dev/console 2>&1

exec $daemon_directory/master >/dev/null 2>&1



-- 
Annvix - Secure Linux Server: http://annvix.org/
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}
Wasting time like it was free...

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

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

* Re: postfix and svlogd ?
  2006-03-07 18:42 ` Gilles
  2006-03-07 19:01   ` Charlie Brady
@ 2006-03-09 14:23   ` Gilles
  2006-03-09 20:53     ` Vincent Danen
  2006-03-14  0:31     ` Gilles
  1 sibling, 2 replies; 10+ messages in thread
From: Gilles @ 2006-03-09 14:23 UTC (permalink / raw)


Hi.

> Doesn't anyone use postfix with runit?
> 
> Postfix uses syslog, but is there a way to make it work with
> svlogd?
> Or will I have to install socklog and set it up as a UNIX
> log service?
> 

I'm pasting here yet another reply (sent personally) to that
post:

> I do--I use postfix with runit--and there is a patch [1]
> that you can't apply cleanly [as it is in the original],
> yet is the one to go. 
> 
> See here below what the patch misses ... the stuff
> between "start patch manuale" and "fine patch manuale." 
> 
> Of course you need then to *stop/restart* Postfix
> [indirectly] via runit. 
> 
> You can replace completely your original "start)" with the
> new "start|start-foreground)" case here below ... it's in: 
> 
>   postfix-2.xxx/conf/postfix-script 
> 
>   in which 2.xxx is your Postfix version (I am using
>   postfix-2.3-2006zzzz) 
> 
> and it stays stable/invariant (... so far) 
> 
> Look for: 
> 
> ** snippet begin: 
> 
> stop_msg)
>   echo "Stop postfix"
>   ;; 
> 
> start|start-foreground)
>   $daemon_directory/master -t 2>/dev/null || {
>       $FATAL the Postfix mail system is already running
>       exit 1
>   }
>   if [ -f $queue_directory/quick-start ]
>   then
>       rm -f $queue_directory/quick-start
>   else
>       $config_directory/postfix-script check-fatal || {
>           $FATAL Postfix integrity check failed!
>           exit 1
>       }
>       # Foreground this so it can be stopped. All
>       # inodes are cached.
>       $config_directory/postfix-script check-warn
>   fi
>   # -- roy: start patch manuale
>   if [ $1 = "start-foreground" ] ; then
>       $INFO "starting the Postfix mail sys. (foreground)"
>       exec $daemon_directory/master
>   else
>       $INFO starting the Postfix mail system
>       $daemon_directory/master &
>   fi
>   # -- roy: fine patch manuale
>   ;; 
> 
> drain)
>  ... 
> 
> ** snippet end. 
> 
> 
> Cheers, 
> 
> /Roy Lanek (West Sumatra) 
> 
> 
> [1] search (google) for: postfix-20031026-foreground.diff 


But am I seriously mistaken, or is it again some info about how
to run postfix supervised?  And not about how to grab postfix
log messages so as to be able to use "svlogd"?

The fact that several people seem to imply that it isn't trivial
(such as the need for a patch to be applied, as stated above) to
run postfix under runit make me wonder about the example script
provided by Gerrit Pape, copied here below:

---CUT---
#!/bin/sh
exec 1>&2

daemon_directory=/usr/lib/postfix \
command_directory=/usr/sbin \
config_directory=/etc/postfix \
queue_directory=/var/spool/postfix \
mail_owner=postfix \
setgid_group=postdrop \
  /etc/postfix/postfix-script check || exit 1

exec /usr/lib/postfix/master
---CUT---

[No mention of any caveat.]
So actually, is this sufficient or not to run postfix under
supervision???


Thanks for your advice,
Gilles


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

* Re: postfix and svlogd ?
  2006-03-07 19:46     ` Michael P. Soulier
  2006-03-07 20:01       ` Charlie Brady
@ 2006-03-07 23:46       ` Gilles
  1 sibling, 0 replies; 10+ messages in thread
From: Gilles @ 2006-03-07 23:46 UTC (permalink / raw)


> 
> This was on a page linked from the top page in a google search on "postfix
> runit". 
> 
> http://www.dt.e-technik.uni-dortmund.de/~ma/postfix/daemontools.html

Is there anything about logging on that page?

The question was how to make postfix provide its logging output
as input to svlogd (if it's at all possible).
[The intention is to avoid running syslogd.]


Regards,
Gilles


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

* Re: postfix and svlogd ?
  2006-03-07 19:46     ` Michael P. Soulier
@ 2006-03-07 20:01       ` Charlie Brady
  2006-03-07 23:46       ` Gilles
  1 sibling, 0 replies; 10+ messages in thread
From: Charlie Brady @ 2006-03-07 20:01 UTC (permalink / raw)
  Cc: Gilles, supervision


On Tue, 7 Mar 2006, Michael P. Soulier wrote:

> On 07/03/06 Charlie Brady said:
>
>> Last time I looked I found that postfix works quite hard to make itself
>> unsupervisable. I haven't seen any patches for it to make it better
>> behaved, but I also haven't looked very hard.
>
> This was on a page linked from the top page in a google search on "postfix
> runit".
>
> http://www.dt.e-technik.uni-dortmund.de/~ma/postfix/daemontools.html

Thanks Mike.

Looks like the initscripts-ng-devel list is another good resource. See, 
e.g.:

http://www.mail-archive.com/initscripts-ng-devel@lists.alioth.debian.org/msg00015.html


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

* Re: postfix and svlogd ?
  2006-03-07 19:01   ` Charlie Brady
@ 2006-03-07 19:46     ` Michael P. Soulier
  2006-03-07 20:01       ` Charlie Brady
  2006-03-07 23:46       ` Gilles
  0 siblings, 2 replies; 10+ messages in thread
From: Michael P. Soulier @ 2006-03-07 19:46 UTC (permalink / raw)
  Cc: Gilles, supervision

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

On 07/03/06 Charlie Brady said:

> Last time I looked I found that postfix works quite hard to make itself 
> unsupervisable. I haven't seen any patches for it to make it better 
> behaved, but I also haven't looked very hard.

This was on a page linked from the top page in a google search on "postfix
runit". 

http://www.dt.e-technik.uni-dortmund.de/~ma/postfix/daemontools.html

Mike

-- 
Michael P. Soulier <msoulier@digitaltorque.ca>
"Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction."
--Albert Einstein

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

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

* Re: postfix and svlogd ?
  2006-03-07 18:42 ` Gilles
@ 2006-03-07 19:01   ` Charlie Brady
  2006-03-07 19:46     ` Michael P. Soulier
  2006-03-09 14:23   ` Gilles
  1 sibling, 1 reply; 10+ messages in thread
From: Charlie Brady @ 2006-03-07 19:01 UTC (permalink / raw)
  Cc: supervision


On Tue, 7 Mar 2006, Gilles wrote:

>> Is it possible to have postfix logging managed by svlogd?
>> [The postfix directory (in the debian package with sample
>> services) does not contain a log/run script.]
>>
>
> It seems I didn't get any response to that one...
> Doesn't anyone use postfix with runit?

Last time I looked I found that postfix works quite hard to make itself 
unsupervisable. I haven't seen any patches for it to make it better 
behaved, but I also haven't looked very hard.


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

* Re: postfix and svlogd ?
  2006-03-01 23:23 Gilles
@ 2006-03-07 18:42 ` Gilles
  2006-03-07 19:01   ` Charlie Brady
  2006-03-09 14:23   ` Gilles
  0 siblings, 2 replies; 10+ messages in thread
From: Gilles @ 2006-03-07 18:42 UTC (permalink / raw)


> 
> Is it possible to have postfix logging managed by svlogd?
> [The postfix directory (in the debian package with sample
> services) does not contain a log/run script.]
> 

It seems I didn't get any response to that one...
Doesn't anyone use postfix with runit?

Postfix uses syslog, but is there a way to make it work with
svlogd?
Or will I have to install socklog and set it up as a UNIX
log service?


Thansk,
Gilles


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

* postfix and svlogd ?
@ 2006-03-01 23:23 Gilles
  2006-03-07 18:42 ` Gilles
  0 siblings, 1 reply; 10+ messages in thread
From: Gilles @ 2006-03-01 23:23 UTC (permalink / raw)


Hello.

Is it possible to have postfix logging managed by svlogd?
[The postfix directory (in the debian package with sample
services) does not contain a log/run script.]

Thanks.
Gilles


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

end of thread, other threads:[~2006-03-14  0:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-09 19:26 postfix and svlogd ? Roy Lanek
  -- strict thread matches above, loose matches on Subject: below --
2006-03-01 23:23 Gilles
2006-03-07 18:42 ` Gilles
2006-03-07 19:01   ` Charlie Brady
2006-03-07 19:46     ` Michael P. Soulier
2006-03-07 20:01       ` Charlie Brady
2006-03-07 23:46       ` Gilles
2006-03-09 14:23   ` Gilles
2006-03-09 20:53     ` Vincent Danen
2006-03-14  0:31     ` Gilles

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).