How to deliver/forward a /var/spool/mail/user file
Hi all,
Okay, I will just ask the question first, then explain the background after. How do I send each email message in a /var/spool/mail/username file to a specific email address? I host web sites and email for companies. Obviously, sometimes companies switch hosting providers. When all the DNS changes have propagated, the users are getting their email from the new hosting provider. But, many times, users ask about email which landed on my server. So, I would like to write a script (Perl, CSH, Bash, whatever) which parses the mailfile, and individually resend each message to the user. Obviously, I would need to make sure my servers DNS server, and my local sendmail configuration knows it is no longer answering for the domain name. I have tried writing macros/scripts using mailx and mutt, to no avail. Any input would be helpful. Thank you, Steve |
Have you looked at procmail?
|
Didn't really consider it. I thought it was only used to process incoming email :b
Ah... http://www.panix.com/panix/help/filterfaq.html formail -s procmail < mailfile Thanks for the tip. Quote:
|
All times are GMT -5. The time now is 01:14 AM. |