Mailing List Archive

tcpserver log delimiter
People,

Is there a convenient way to put a delimiter on tcpserver logs? eg it
would be nice to put:


"-----------------------------------------------------------------------------------------"

before the:

tcpserver: status: 1/30

line when every new mail is starting to be processed - this would aid
readability while tailing a log that is moving reasonably quickly.

I couldn't find anything useful from Googling and reading about
tcpserver (the -v switch is no use).

Thanks,

Phil.
--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
RE: tcpserver log delimiter [ In reply to ]
I haven't used it but on the bottom of this site are 2 scripts mtrack and strack which could be of use for you

http://qmail.jms1.net/logfiles.shtml


met vriendelijke groet,

Maurice Lucas

TAOS-IT
………………………………………………………………....
Hoflandendreef 209
2614 MS Delft
www.taos-it.nl
KvK Haaglanden nr. 27254410

-----Original Message-----
From: Philip Rhoades [mailto:phil@pricom.com.au]
Sent: woensdag 13 maart 2013 16:16
To: qmail@list.cr.yp.to
Subject: tcpserver log delimiter

People,

Is there a convenient way to put a delimiter on tcpserver logs? eg it would be nice to put:


"-----------------------------------------------------------------------------------------"

before the:

tcpserver: status: 1/30

line when every new mail is starting to be processed - this would aid readability while tailing a log that is moving reasonably quickly.

I couldn't find anything useful from Googling and reading about tcpserver (the -v switch is no use).

Thanks,

Phil.
--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
RE: tcpserver log delimiter [ In reply to ]
And a sample on how to use it on http://qmailrocks.thibs.com/tracking.php


-----Original Message-----
From: Maurice Lucas - TAOS-IT [mailto:mslucas@TAOS-IT.nl]
Sent: mercredi 13 mars 2013 16:22
To: phil@pricom.com.au; qmail@list.cr.yp.to
Subject: RE: tcpserver log delimiter

I haven't used it but on the bottom of this site are 2 scripts mtrack and strack which could be of use for you

http://qmail.jms1.net/logfiles.shtml


met vriendelijke groet,

Maurice Lucas

TAOS-IT
………………………………………………………………....
Hoflandendreef 209
2614 MS Delft
www.taos-it.nl
KvK Haaglanden nr. 27254410

-----Original Message-----
From: Philip Rhoades [mailto:phil@pricom.com.au]
Sent: woensdag 13 maart 2013 16:16
To: qmail@list.cr.yp.to
Subject: tcpserver log delimiter

People,

Is there a convenient way to put a delimiter on tcpserver logs? eg it would be nice to put:


"-----------------------------------------------------------------------------------------"

before the:

tcpserver: status: 1/30

line when every new mail is starting to be processed - this would aid readability while tailing a log that is moving reasonably quickly.

I couldn't find anything useful from Googling and reading about tcpserver (the -v switch is no use).

Thanks,

Phil.
--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
RE: tcpserver log delimiter [ In reply to ]
People,

Those scripts are not any use. I have in
/var/qmail/supervise/qmail-smtpd/run :

exec /usr/local/bin/softlimit -m 64000000 \
/usr/local/bin/tcpserver -v -R -H -l "$LOCAL" \
-x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
/usr/local/bin/greylite \
/var/qmail/bin/qmail-smtpd 2> /var/log/greylite.log

which gives output like:

tcpserver: status: 0/30
tcpserver: status: 1/30
tcpserver: pid 23661 from 65.99.230.42
tcpserver: ok 23661 prix.pricom.com.au:10.1.1.10:25
:65.99.230.42::53651
greylite: argv[1]: /var/qmail/bin/qmail-smtpd: argv+1:
usr/local/bin/greylite
greylite: Address '65.99.230.42' is recognized as a verified server,
updating timestamp...
tcpserver: status: 2/30
tcpserver: pid 23722 from 217.196.149.56
tcpserver: ok 23722 prix.pricom.com.au:10.1.1.10:25
:217.196.149.56::57492
greylite: argv[1]: /var/qmail/bin/qmail-smtpd: argv+1:
usr/local/bin/greylite
greylite: Address '217.196.149.56' is recognized as a verified server,
updating timestamp...
tcpserver: end 23722 status 0
tcpserver: status: 1/30

- I want a line:


"-----------------------------------------------------------------------------------------"

before the:

tcpserver: status: 1/30

lines.

Thanks,

Phil.


On 2013-03-14 02:26, Thibault Richard wrote:
> And a sample on how to use it on
> http://qmailrocks.thibs.com/tracking.php
>
>
> -----Original Message-----
> From: Maurice Lucas - TAOS-IT [mailto:mslucas@TAOS-IT.nl]
> Sent: mercredi 13 mars 2013 16:22
> To: phil@pricom.com.au; qmail@list.cr.yp.to
> Subject: RE: tcpserver log delimiter
>
> I haven't used it but on the bottom of this site are 2 scripts mtrack
> and strack which could be of use for you
>
> http://qmail.jms1.net/logfiles.shtml
>
>
> met vriendelijke groet,
>
> Maurice Lucas
>
> TAOS-IT
> ………………………………………………………………....
> Hoflandendreef 209
> 2614 MS Delft
> www.taos-it.nl
> KvK Haaglanden nr. 27254410
>
> -----Original Message-----
> From: Philip Rhoades [mailto:phil@pricom.com.au]
> Sent: woensdag 13 maart 2013 16:16
> To: qmail@list.cr.yp.to
> Subject: tcpserver log delimiter
>
> People,
>
> Is there a convenient way to put a delimiter on tcpserver logs? eg
> it would be nice to put:
>
>
> "-----------------------------------------------------------------------------------------"
>
> before the:
>
> tcpserver: status: 1/30
>
> line when every new mail is starting to be processed - this would aid
> readability while tailing a log that is moving reasonably quickly.
>
> I couldn't find anything useful from Googling and reading about
> tcpserver (the -v switch is no use).
>
> Thanks,
>
> Phil.
> --
> Philip Rhoades
>
> GPO Box 3411
> Sydney NSW 2001
> Australia
> E-mail: phil@pricom.com.au

--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
RE: tcpserver log delimiter [ In reply to ]
That isn't possible.

What if e.g.
Message 1 takes 5 minutes to complete
Message 2 till 1000 take 1 second each

the first message takes 5 minutes to complete a delivery do you want the logging to be placed in memory for 5 minutes?
So the next 1000 very small messages which are all complete within these 5 minutes aren't logged in real time?

What you want is a logger with a backqueue function in the logging.
This is why you take a parser after the logging is finished.

met vriendelijke groet,

Maurice Lucas

TAOS-IT
………………………………………………………………....
Hoflandendreef 209
2614 MS Delft
www.taos-it.nl
KvK Haaglanden nr. 27254410

-----Original Message-----
From: Philip Rhoades [mailto:phil@pricom.com.au]
Sent: woensdag 13 maart 2013 16:53
To: Thibault Richard
Cc: Maurice Lucas - TAOS-IT; qmail@list.cr.yp.to
Subject: RE: tcpserver log delimiter

People,

Those scripts are not any use. I have in /var/qmail/supervise/qmail-smtpd/run :

exec /usr/local/bin/softlimit -m 64000000 \
/usr/local/bin/tcpserver -v -R -H -l "$LOCAL" \
-x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
/usr/local/bin/greylite \
/var/qmail/bin/qmail-smtpd 2> /var/log/greylite.log

which gives output like:

tcpserver: status: 0/30
tcpserver: status: 1/30
tcpserver: pid 23661 from 65.99.230.42
tcpserver: ok 23661 prix.pricom.com.au:10.1.1.10:25
:65.99.230.42::53651
greylite: argv[1]: /var/qmail/bin/qmail-smtpd: argv+1:
usr/local/bin/greylite
greylite: Address '65.99.230.42' is recognized as a verified server, updating timestamp...
tcpserver: status: 2/30
tcpserver: pid 23722 from 217.196.149.56
tcpserver: ok 23722 prix.pricom.com.au:10.1.1.10:25
:217.196.149.56::57492
greylite: argv[1]: /var/qmail/bin/qmail-smtpd: argv+1:
usr/local/bin/greylite
greylite: Address '217.196.149.56' is recognized as a verified server, updating timestamp...
tcpserver: end 23722 status 0
tcpserver: status: 1/30

- I want a line:


"-----------------------------------------------------------------------------------------"

before the:

tcpserver: status: 1/30

lines.

Thanks,

Phil.


On 2013-03-14 02:26, Thibault Richard wrote:
> And a sample on how to use it on
> http://qmailrocks.thibs.com/tracking.php
>
>
> -----Original Message-----
> From: Maurice Lucas - TAOS-IT [mailto:mslucas@TAOS-IT.nl]
> Sent: mercredi 13 mars 2013 16:22
> To: phil@pricom.com.au; qmail@list.cr.yp.to
> Subject: RE: tcpserver log delimiter
>
> I haven't used it but on the bottom of this site are 2 scripts mtrack
> and strack which could be of use for you
>
> http://qmail.jms1.net/logfiles.shtml
>
>
> met vriendelijke groet,
>
> Maurice Lucas
>
> TAOS-IT
> ………………………………………………………………....
> Hoflandendreef 209
> 2614 MS Delft
> www.taos-it.nl
> KvK Haaglanden nr. 27254410
>
> -----Original Message-----
> From: Philip Rhoades [mailto:phil@pricom.com.au]
> Sent: woensdag 13 maart 2013 16:16
> To: qmail@list.cr.yp.to
> Subject: tcpserver log delimiter
>
> People,
>
> Is there a convenient way to put a delimiter on tcpserver logs? eg it
> would be nice to put:
>
>
> "-----------------------------------------------------------------------------------------"
>
> before the:
>
> tcpserver: status: 1/30
>
> line when every new mail is starting to be processed - this would aid
> readability while tailing a log that is moving reasonably quickly.
>
> I couldn't find anything useful from Googling and reading about
> tcpserver (the -v switch is no use).
>
> Thanks,
>
> Phil.
> --
> Philip Rhoades
>
> GPO Box 3411
> Sydney NSW 2001
> Australia
> E-mail: phil@pricom.com.au

--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
RE: tcpserver log delimiter [ In reply to ]
Maurice,


On 2013-03-14 03:05, Maurice Lucas - TAOS-IT wrote:
> That isn't possible.
> What if e.g.
> Message 1 takes 5 minutes to complete
> Message 2 till 1000 take 1 second each


Doesn't that just mean that I would get something like:

tcpserver: status: 0/30
-----------------------------------------------------------------------------------------
tcpserver: status: 1/30
-----------------------------------------------------------------------------------------
tcpserver: status: 1/30
tcpserver: pid 23661 from 65.99.230.42
.
.
.

?

- that would still be helpful as your example seems like the exception
- I have watched this log a LOT and have never seen something like that
(it is not a particularly heavily loaded mail server).

Otherwise it looks like I have to live with the current situation . .

Thanks,

Phil.


> met vriendelijke groet,
> Maurice Lucas
> TAOS-IT
> ………………………………………………………………....
> Hoflandendreef 209
> 2614 MS Delft
> www.taos-it.nl
> KvK Haaglanden nr. 27254410
> -----Original Message-----
> From: Philip Rhoades [mailto:phil@pricom.com.au]
> Sent: woensdag 13 maart 2013 16:53
> To: Thibault Richard
> Cc: Maurice Lucas - TAOS-IT; qmail@list.cr.yp.to
> Subject: RE: tcpserver log delimiter
> People,
> Those scripts are not any use. I have in
> /var/qmail/supervise/qmail-smtpd/run :
> exec /usr/local/bin/softlimit -m 64000000 \
> /usr/local/bin/tcpserver -v -R -H -l "$LOCAL" \
> -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
> -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
> /usr/local/bin/greylite \
> /var/qmail/bin/qmail-smtpd 2> /var/log/greylite.log
> which gives output like:
> tcpserver: status: 0/30
> tcpserver: status: 1/30
> tcpserver: pid 23661 from 65.99.230.42
> tcpserver: ok 23661 prix.pricom.com.au:10.1.1.10:25
> :65.99.230.42::53651
> greylite: argv[1]: /var/qmail/bin/qmail-smtpd: argv+1:
> usr/local/bin/greylite
> greylite: Address '65.99.230.42' is recognized as a verified server,
> updating timestamp...
> tcpserver: status: 2/30
> tcpserver: pid 23722 from 217.196.149.56
> tcpserver: ok 23722 prix.pricom.com.au:10.1.1.10:25
> :217.196.149.56::57492
> greylite: argv[1]: /var/qmail/bin/qmail-smtpd: argv+1:
> usr/local/bin/greylite
> greylite: Address '217.196.149.56' is recognized as a verified
> server, updating timestamp...
> tcpserver: end 23722 status 0
> tcpserver: status: 1/30
> - I want a line:
> "-----------------------------------------------------------------------------------------"
> before the:
> tcpserver: status: 1/30
> lines.
> Thanks,
> Phil.
> On 2013-03-14 02:26, Thibault Richard wrote:
>> And a sample on how to use it on
>> http://qmailrocks.thibs.com/tracking.php
>> -----Original Message-----
>> From: Maurice Lucas - TAOS-IT [mailto:mslucas@TAOS-IT.nl]
>> Sent: mercredi 13 mars 2013 16:22
>> To: phil@pricom.com.au; qmail@list.cr.yp.to
>> Subject: RE: tcpserver log delimiter
>> I haven't used it but on the bottom of this site are 2 scripts mtrack
>> and strack which could be of use for you
>> http://qmail.jms1.net/logfiles.shtml
>> met vriendelijke groet,
>> Maurice Lucas
>> TAOS-IT
>> ………………………………………………………………....
>> Hoflandendreef 209
>> 2614 MS Delft
>> www.taos-it.nl
>> KvK Haaglanden nr. 27254410
>> -----Original Message-----
>> From: Philip Rhoades [mailto:phil@pricom.com.au]
>> Sent: woensdag 13 maart 2013 16:16
>> To: qmail@list.cr.yp.to
>> Subject: tcpserver log delimiter
>> People,
>> Is there a convenient way to put a delimiter on tcpserver logs? eg
>> it
>> would be nice to put:
>> "-----------------------------------------------------------------------------------------"
>> before the:
>> tcpserver: status: 1/30
>> line when every new mail is starting to be processed - this would aid
>> readability while tailing a log that is moving reasonably quickly.
>> I couldn't find anything useful from Googling and reading about
>> tcpserver (the -v switch is no use).
>> Thanks,
>> Phil.
>> --
>> Philip Rhoades
>> GPO Box 3411
>> Sydney NSW 2001
>> Australia
>> E-mail: phil@pricom.com.au
> --
> Philip Rhoades
> GPO Box 3411
> Sydney NSW 2001
> Australia
> E-mail: phil@pricom.com.au

--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
Re: tcpserver log delimiter [ In reply to ]
Philip Rhoades <phil@pricom.com.au> wrote:
> On 2013-03-14 03:05, Maurice Lucas - TAOS-IT wrote:
> >That isn't possible.
> >What if e.g.
> >Message 1 takes 5 minutes to complete
> >Message 2 till 1000 take 1 second each
>
> Doesn't that just mean that I would get something like:
>
> tcpserver: status: 0/30
> -----------------------------------------------------------------------------------------
> tcpserver: status: 1/30
> -----------------------------------------------------------------------------------------
[...]
> - that would still be helpful as your example seems like the exception

To quote djb, "This is Unix. Stop acting so helpless."

View your log through a trivial 2-line awk script like this:

#!/usr/bin/awk -f
/tcpserver: status:/ { print "----------------------" ; print ; next }
{ print }

... and you have exactly what you want. You don't need to change multilog to
accomplish this.

Charles
--
--------------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
--------------------------------------------------------------------------
Re: tcpserver log delimiter [ In reply to ]
Charles,


On 2013-03-14 04:24, Charles Cazabon wrote:
> Philip Rhoades <phil@pricom.com.au> wrote:
>> On 2013-03-14 03:05, Maurice Lucas - TAOS-IT wrote:
>>> That isn't possible.
>>> What if e.g.
>>> Message 1 takes 5 minutes to complete
>>> Message 2 till 1000 take 1 second each
>>
>> Doesn't that just mean that I would get something like:
>>
>> tcpserver: status: 0/30
>> -----------------------------------------------------------------------------------------
>> tcpserver: status: 1/30
>> -----------------------------------------------------------------------------------------
> [...]
>> - that would still be helpful as your example seems like the
>> exception
>
> To quote djb, "This is Unix. Stop acting so helpless."
>
> View your log through a trivial 2-line awk script like this:
>
> #!/usr/bin/awk -f
> /tcpserver: status:/ { print "----------------------" ; print ; next
> }
> { print }
>
> ... and you have exactly what you want. You don't need to change
> multilog to
> accomplish this.


With a minor modification this does exactly what I want! Many thanks
Charles!

It is amazing, I start off thinking that something needs to be achieved
in a particular way and get lost in the complexity of that approach
instead of going back to basics . . doh! In biological evolution it's
called "canalisation" (ie "You can't get to there from here". Oh well .
. it's nice to have other brains around sometimes . .

Regards,

Phil.
--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
RE: tcpserver log delimiter - #2 [ In reply to ]
Maurice,

I know it is bad form to reply to my own post but see below:


On 2013-03-14 03:26, Philip Rhoades wrote:
> Maurice,
>
>
> On 2013-03-14 03:05, Maurice Lucas - TAOS-IT wrote:
>> That isn't possible.
>> What if e.g.
>> Message 1 takes 5 minutes to complete
>> Message 2 till 1000 take 1 second each
>
>
> Doesn't that just mean that I would get something like:
>
> tcpserver: status: 0/30
> -----------------------------------------------------------------------------------------
> tcpserver: status: 1/30
> -----------------------------------------------------------------------------------------
> tcpserver: status: 1/30
> tcpserver: pid 23661 from 65.99.230.42
> .
> .
> .
>
> ?
>
> - that would still be helpful as your example seems like the
> exception - I have watched this log a LOT and have never seen
> something like that (it is not a particularly heavily loaded mail
> server).


Now that I have installed Charles' awk script, it is easier to see the
occasional problem you talked about (it is happening with about 5% of
the mails I would guess). Anyway, the delimiter script is still useful
and now I can also see a bit better what tcpserver is doing!

Thanks,

Phil.



>> met vriendelijke groet,
>> Maurice Lucas
>> TAOS-IT
>> ………………………………………………………………....
>> Hoflandendreef 209
>> 2614 MS Delft
>> www.taos-it.nl
>> KvK Haaglanden nr. 27254410
>> -----Original Message-----
>> From: Philip Rhoades [mailto:phil@pricom.com.au]
>> Sent: woensdag 13 maart 2013 16:53
>> To: Thibault Richard
>> Cc: Maurice Lucas - TAOS-IT; qmail@list.cr.yp.to
>> Subject: RE: tcpserver log delimiter
>> People,
>> Those scripts are not any use. I have in
>> /var/qmail/supervise/qmail-smtpd/run :
>> exec /usr/local/bin/softlimit -m 64000000 \
>> /usr/local/bin/tcpserver -v -R -H -l "$LOCAL" \
>> -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
>> -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
>> /usr/local/bin/greylite \
>> /var/qmail/bin/qmail-smtpd 2> /var/log/greylite.log
>> which gives output like:
>> tcpserver: status: 0/30
>> tcpserver: status: 1/30
>> tcpserver: pid 23661 from 65.99.230.42
>> tcpserver: ok 23661 prix.pricom.com.au:10.1.1.10:25
>> :65.99.230.42::53651
>> greylite: argv[1]: /var/qmail/bin/qmail-smtpd: argv+1:
>> usr/local/bin/greylite
>> greylite: Address '65.99.230.42' is recognized as a verified server,
>> updating timestamp...
>> tcpserver: status: 2/30
>> tcpserver: pid 23722 from 217.196.149.56
>> tcpserver: ok 23722 prix.pricom.com.au:10.1.1.10:25
>> :217.196.149.56::57492
>> greylite: argv[1]: /var/qmail/bin/qmail-smtpd: argv+1:
>> usr/local/bin/greylite
>> greylite: Address '217.196.149.56' is recognized as a verified
>> server, updating timestamp...
>> tcpserver: end 23722 status 0
>> tcpserver: status: 1/30
>> - I want a line:
>> "-----------------------------------------------------------------------------------------"
>> before the:
>> tcpserver: status: 1/30
>> lines.
>> Thanks,
>> Phil.
>> On 2013-03-14 02:26, Thibault Richard wrote:
>>> And a sample on how to use it on
>>> http://qmailrocks.thibs.com/tracking.php
>>> -----Original Message-----
>>> From: Maurice Lucas - TAOS-IT [mailto:mslucas@TAOS-IT.nl]
>>> Sent: mercredi 13 mars 2013 16:22
>>> To: phil@pricom.com.au; qmail@list.cr.yp.to
>>> Subject: RE: tcpserver log delimiter
>>> I haven't used it but on the bottom of this site are 2 scripts
>>> mtrack
>>> and strack which could be of use for you
>>> http://qmail.jms1.net/logfiles.shtml
>>> met vriendelijke groet,
>>> Maurice Lucas
>>> TAOS-IT
>>> ………………………………………………………………....
>>> Hoflandendreef 209
>>> 2614 MS Delft
>>> www.taos-it.nl
>>> KvK Haaglanden nr. 27254410
>>> -----Original Message-----
>>> From: Philip Rhoades [mailto:phil@pricom.com.au]
>>> Sent: woensdag 13 maart 2013 16:16
>>> To: qmail@list.cr.yp.to
>>> Subject: tcpserver log delimiter
>>> People,
>>> Is there a convenient way to put a delimiter on tcpserver logs? eg
>>> it
>>> would be nice to put:
>>> "-----------------------------------------------------------------------------------------"
>>> before the:
>>> tcpserver: status: 1/30
>>> line when every new mail is starting to be processed - this would
>>> aid
>>> readability while tailing a log that is moving reasonably quickly.
>>> I couldn't find anything useful from Googling and reading about
>>> tcpserver (the -v switch is no use).
>>> Thanks,
>>> Phil.
>>> --
>>> Philip Rhoades
>>> GPO Box 3411
>>> Sydney NSW 2001
>>> Australia
>>> E-mail: phil@pricom.com.au
>> --
>> Philip Rhoades
>> GPO Box 3411
>> Sydney NSW 2001
>> Australia
>> E-mail: phil@pricom.com.au

--
Philip Rhoades

GPO Box 3411
Sydney NSW 2001
Australia
E-mail: phil@pricom.com.au
Re: tcpserver log delimiter [ In reply to ]
On Thu, 14 Mar 2013, Philip Rhoades wrote:
> It is amazing, I start off thinking that something needs to be achieved
> in a particular way and get lost in the complexity of that approach
> instead of going back to basics . . doh! In biological evolution it's
> called "canalisation" (ie "You can't get to there from here". Oh well .
> . it's nice to have other brains around sometimes . .

We call those "moose on the roof" problems at work. I.e., the person
comes to you with a secondary problem in achieving their desired solution
to a primary problem, when the solution is not the correct approach to
tfirst place. Sometimes the problem they perceive in the first place
isn't even the correct problem, leading to the canonical response, "Where
do I even begin?"

:)

-Mike