[CentOS] send existing root email to another user

Robert Moskowitz rgm at htt-consult.com
Tue Dec 1 14:12:20 UTC 2009


Craig White wrote:
> On Tue, 2009-12-01 at 16:09 +1300, Lists wrote:
>   
>> Mathew S. McCarrell wrote: 
>>     
>>> On Mon, Nov 30, 2009 at 9:42 PM, Lists <lists at rheel.co.nz> wrote:
>>>         >
>>>         > Kate,
>>>         >
>>>         > You need to modify /etc/aliases to have something like:
>>>         >
>>>         
>>>         > root:          user at gmail.com <mailto:user at gmail.com>
>>>         >
>>>         >
>>>         > You should then run /usr/bin/newaliases to make these
>>>         changes active||.
>>>         >
>>>         > Matt
>>>         
>>>         Hi Matt,
>>>         
>>>         I have done this and it works for new mail arriving but I
>>>         need to onsend
>>>         the existing mail.
>>>
>>> Ah, I misread what you were looking to do.  You should be able to do
>>> the following then.
>>>
>>> cat /var/spool/mail/root | mail -s "Old Root Emails" user at gmail.com
>>>
>>> Hope that helps.
>>> Matt
>>>
>>>       
>> Argh spoke to soon - its mostly all good apart from the attachments
>> that are on the emails don't come through as attachments.
>> Is there any way I can send the so that they are received with
>> attachments still intact?
>>     
> ----
> secure shell copy (scp) the file over to whatever computer you want and
> open the file with Thunderbird or Evolution (I think Import mail) as it
> is an 'mbox' file. You can google how to open an mbox file with whatever
> e-mail program you use for e-mail (but probably not outlook).

This is also the way to get the archives from a mailing list, or at 
least all the thousands of mailing lists whose archives are in mbox 
format. And for Thunderbird there is a nice addon: ImportExportTools 
that is currently at v 2.3.1

This approach definitely processes any attachments.



More information about the CentOS mailing list