Operating System - Linux
1825719 Members
3112 Online
109686 Solutions
New Discussion

send emails already in /var/mail/

 
SOLVED
Go to solution

send emails already in /var/mail/

Hi! How can I send all the email (n??30) arrived in my mbox /var/mail/mymbox on a RH7.2 to a specific address of another domain?

Bye!

Leo.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: send emails already in /var/mail/

try this

mailq

lists mail in the que but not delivered.

if there are listings

sendmail -q

as root

This will send them if they are queued.

P
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
Stuart Browne
Honored Contributor

Re: send emails already in /var/mail/

Given that you've already received the mail, you would need to use an MUA to 'forward' the message to another recipient, unless you had the ability just to 'copy' the mail folders whole.

Failing that, you'd have to manually break open the mail box, create your envelopes, and then forward them directly into your MTA (sendmail).

How far do you want to take this?
One long-haired git at your service...

Re: send emails already in /var/mail/

Well, I'm thinking about three steps to follow:
First: split text in mbox
Two: rewrite "From" (I think with formail)
Three: send file in mbox format.

For Step three I attach a file I would like to be sent (piping to a MUA....)
Vitaly Karasik_1
Honored Contributor
Solution

Re: send emails already in /var/mail/

see attached letter

Re: send emails already in /var/mail/

Thanks a lot Mr. Karasik. It's really great. images, attachments, everything.

when I launched it:#fwd /var/mail/mbox:mailaddress --> it was perfect. Infact it's not a pure forward with the original mail attached, but the mailaddress receive the mail as it was for him. Opening the msg you see the original header and message.

p.s. to get the message I changed the link as follow: http://forums.itrc.hp.com/cm/components/FileAttachment/0,,0xe5155bd3782dd711abdc0090277a778c,00.zip and after download I changed the extention from .zip to .msg; After I had problems unpacking the archive but this was due to my personal "problems" :-))