Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jul 2017 23:14:18 +0200
From:      Christoph Moench-Tegeder <cmt@burggraben.net>
To:        freebsd-ports@freebsd.org
Subject:   Re: Best practice to tail a log and start it as service using rc.d scripts
Message-ID:  <20170703211418.GA23149@elch.exwg.net>
In-Reply-To: <62c231e8-74b0-8515-eb22-4e4edf6ff5e2@fechner.net>
References:  <62c231e8-74b0-8515-eb22-4e4edf6ff5e2@fechner.net>

next in thread | previous in thread | raw e-mail | index | archive | help
## Matthias Fechner (idefix@fechner.net):

> That mailtrain can handle bounce message with postfix together it is
> necessary to tail the postfix log and pass it to mailtrain, using a
> command like this:
> tail -F -n +0 /var/log/maillog | nc localhost 5699 -

That looks like a bad idea. As Eugene already demonstrated, you
can use syslog (not just "our" syslog, all decent syslog daemons
have some way to feed the log into a pipe) - and you can also use
syslog to get the log to the mailtrain host, in case that's not
running on the same host as postfix (or otherwise seperated).
That way, your problem would just not exist, and the setup would
be much more robust in general.
So, if it's possible to hook the mailtrain "receiver" end to
syslog, instead of "some" port...

Regards,
Christoph

-- 
Spare Space



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170703211418.GA23149>