Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail dead.letter reprocess

Fred Ruffet
Honored Contributor

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.)
6 REPLIES
Steven E. Protter
Exalted Contributor

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
Fred Ruffet
Honored Contributor

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.)
TTr
Honored Contributor

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.
Fred Ruffet
Honored Contributor

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.)
Dennis Handly
Acclaimed Contributor

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.
Fred Ruffet
Honored Contributor

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.)