Operating System - HP-UX
1850467 Members
2173 Online
104054 Solutions
New Discussion

Re: Subject line on failed e-mails

 
SOLVED
Go to solution
Stuart Powell
Super Advisor

Subject line on failed e-mails

Our BAAN application will be sending out e-mails to various users. The subject line on each e-mail will show a unique invoice number. I want to capture any e-mail that fails to be delievers and generate a report that shows the subject information for the failed message.
Any ideas how I can glean that information. I can get the user's e-mail address and status from /var/adm/syslog/mail.log. But I'm not sure how to get the subject line.
Sometimes the best answer is another question
3 REPLIES 3
Craig Rants
Honored Contributor

Re: Subject line on failed e-mails

You may have to check /var/spool/mqueue and match up the emails in there that are being resent with the failures from /var/adm/syslog/mail.log

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
harry d brown jr
Honored Contributor
Solution

Re: Subject line on failed e-mails

You will have to either use something like "openmail" to send mails, or write a perl program (or something similar), to scan the sending users mail file in /var/mail. If the mailing user is invoicer, then scan /var/mail/invoicer where "Action: failed" or for this message

----- The following addresses had permanent fatal errors -----



live free or die
harry
Live Free or Die
Stuart Powell
Super Advisor

Re: Subject line on failed e-mails

That gave me some more places to look. Thanks.
Sometimes the best answer is another question