Skip to contentSkip to conversation

sendmail problem

DISCUSSION Sarvesh Singhal 2 participants 2 messages Nov 27, 2003

lore
Share & tools
lore
#0 lore raw

Hi all,

last many days I am looking at ways to backup all out going mail in a particaular direct./mail id/...

is there any way out?

With Regards,
Sarvesh Singhal

#1 lore raw
Quoted 4 lines · Sarvesh Singhal

last many days I am looking at ways to backup all out going mail in a particaular direct./mail id/...

is there any way out?

You can log *all* traffic into a single file by using the -X switch, e.g.

sendmail -bd -q15m -X /var/log/sendmail.dump

From there, you can extract individual messages with a script. Note that this will only log mail which is sent through the daemon. That will be sufficient for a dedicated mail server, but not for a system on which users have shell accounts.

Anything other than that is messy. The sendmail FAQ's contribution to this topic is limited to the following:

[from http://www.sendmail.org/faq/section4.html#4.20 ]

Subject: Q4.20 -- How can I automatically copy messages based on sender or recipient addresses?

Date: June 30, 2000
Updated: February 27, 2001
Updated: June 5, 2001
Updated: February 13, 2003

It would require custom programming. You could either write a mail filter using the new Milter API in sendmail 8.10 and later (see libmilter/README) or you could look at some of these other unsupported hints:

o Axel Reinhold's logall.c module
o Message-Id: <[email protected]>
o the procmailrc man page

Note that no such feature has been added to sendmail. When asked about this one of the sendmail developers said it was "because we still believe a bit in privacy."

Signature · 1 line
Glynn Clements <[email protected]>