sendmail dead.letter reprocess (353 Views)
Reply
Honored Contributor
Fred Ruffet
Posts: 1,366
Registered: ‎08-17-2003
Message 1 of 7 (353 Views)

sendmail dead.letter reprocess

Hi all,

I have a sendmail process that has been unconfigured for a while. /var/tmp/dead.letter has grown and contains many mails. Some of the mails inside are important to me, and I'd like to reprocess this in sendmail for it to send them. Is this possible ? and How ?

Any help appreciated,

Fred
--

"Reality is just a point of view." (P. K. D.)
Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 2 of 7 (353 Views)

Re: sendmail dead.letter reprocess

Shalom,

Seems possible.

Don't know which link has the magic bullet.

http://www.ussg.iu.edu/usail/mail/debugging/

You might try something simple like using cat to append the file to your /var/spool/mail/username file

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Honored Contributor
Fred Ruffet
Posts: 1,366
Registered: ‎08-17-2003
Message 3 of 7 (353 Views)

Re: sendmail dead.letter reprocess

Shalom Peter,

I've been away for a while and it's nice to see you're always here :)

In fact, yes, I think than adding it to my own mailbox would give me access to the mails. But I'd like get them delivered to their true recipients, which are not local users.

Mails have been generated by programs and sent to local sendmail. This local sendmail is supposed to send them to smtp relay, but this last one was refusing relaying. So mails have gone to dead.letter. I've solved my relaying problem. But I'd like to resent those mails.

I'm actually trying to understand /var/spool/mqueue directory usage, in order to put mails directly in it. But for the moment it doesn't work.

No need to say that some mails are old, and original programs are not able to write the same mails again.

Thanks,

Fred

--

"Reality is just a point of view." (P. K. D.)
Honored Contributor
Honored Contributor
TTr
Posts: 3,434
Registered: ‎01-22-2008
Message 4 of 7 (353 Views)

Re: sendmail dead.letter reprocess

The format of the dead.letter file is a mailbox format. That is the messages in this file are in the "received" state just as any message in the /var/mail/. You can not process this file with sendmail, you cab only process it with a mail reader such as mailx, elm, pine. You have the right idea using /var/spool/mqueue but you will have to do a lot of scripting footwork to break up each mail message from the dead.letter file and create a header file and a message file so that sendmail can process them. Or extract the "to" address and the body of the message and use mailx to resend them.
I do not reply to forumers who 1) consistently don't assign points, 2) ask for step-by-step instructions for a topic but appear to have no IT experience and make no effort to learn. Some exceptions for newcomers and special topics.
Honored Contributor
Fred Ruffet
Posts: 1,366
Registered: ‎08-17-2003
Message 5 of 7 (353 Views)

Re: sendmail dead.letter reprocess

Yes, that's what I'm working on. Perl is my friend :)

I'll probably go with mailx, cause I can't manage to put directly a file in /var/spool/mqueue.
--

"Reality is just a point of view." (P. K. D.)
Acclaimed Contributor
Dennis Handly
Posts: 25,274
Registered: ‎03-06-2006
Message 6 of 7 (353 Views)

Re: sendmail dead.letter reprocess

>I'll probably go with mailx,

I use mailx. But if you need anything complex, you can use use thunderbird/mozilla/netscape manually to sort and forward mass quantities of mail to the proper user.

Just create an empty folder and use mailx's save command to save it in that folder.
Honored Contributor
Fred Ruffet
Posts: 1,366
Registered: ‎08-17-2003
Message 7 of 7 (353 Views)

Re: sendmail dead.letter reprocess

I said mailx cause I can script it and there is a huge amount of mails :)

Thanks everybody for your help.
--

"Reality is just a point of view." (P. K. D.)
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.