Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to edit the message sent to maillog

13 views
Skip to first unread message

ma...@dressel.co.uk

unread,
Nov 22, 2016, 1:10:15 PM11/22/16
to
Hi, I have read that I can add the 'To' email address to the message sent to the maillog file but for the life of me I cannot find out how to do this.

Can somebody please put me out of my misery and let me know how / where I edit the message format?

Thanks,
Mark

Claus Aßmann

unread,
Nov 22, 2016, 1:50:03 PM11/22/16
to
Mark wrote:
> Hi, I have read that I can add the 'To' email address to the message sent to the maillog

Where did you read it?

> file but for the life of me I cannot find out how to do this.

> Can somebody please put me out of my misery and let me know how / where I edit the message format?

In the source code...
Or you could use the syslog map, see doc/op/op.*


"What's the problem you are trying to solve?"

sendmail logs a to= entry:
uAM8pP94020964: to=<SOME...@sendmail.org>, delay=00:00:08, xdelay=00:00:02, mailer=esmtp, pri=44174, relay=...., stat=Sent



--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

ma...@dressel.co.uk

unread,
Nov 22, 2016, 3:51:25 PM11/22/16
to
Hi Claus,

I read about the options to add to the maillog message here;
http://docstore.mik.ua/orelly/networking/sendmail/ch26_01.htm#SML2-CH-26-TAB-3

The syslog man pages seem only to refer to managing the log files, not the messages sent to the files by the facilities.

The only op.* file I can find on my Centos VPS is /usr/lib64/perl5/CORE/op.h which seems to be for the setup of the Perl environment. :(

Claus Aßmann

unread,
Nov 22, 2016, 8:10:04 PM11/22/16
to
> I read about the options to add to the maillog message here;
> http://docstore.mik.ua/orelly/networking/sendmail/ch26_01.htm#SML2-CH-26-TAB-3

I don't see anything about "options to add"; that (illegal copy of the
Bat book?) only shows what is logged by sendmail.

> The only op.* file I can find on my Centos VPS is /usr/lib64/perl5/CORE/op.h which seems to
> be for the setup of the Perl environment. :(

Download the real thing from ftp.sendmail.org and access doc/op/op.*


I didn't see an answer to my question what you are trying to
achieve... (considering that sendmail logs to=).

ma...@dressel.co.uk

unread,
Nov 23, 2016, 5:50:34 AM11/23/16
to
Hi Claus,

> Download the real thing from ftp.sendmail.org and access doc/op/op.*
>
I have downloaded this :)

>
> I didn't see an answer to my question what you are trying to
> achieve... (considering that sendmail logs to=).

For some reason I am not getting the to= value in my log.

Unfortunately I have run out of time on this issue and will have to get back to it another day. Thanks for your help :)




Claus Aßmann

unread,
Nov 23, 2016, 8:40:03 AM11/23/16
to
> For some reason I am not getting the to= value in my log.

as root:
date | sendmail -v -Am $USER

then check the log. If to= isn't logged, check the queue.

Or try:
date | sendmail -v -Am -D/tmp/sm.log -d89.9 $USER
cat /tmp/sm.log

0 new messages