FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 12-01-2009, 01:58 AM
Lists
 
Default send existing root email to another user

Jason Pyeron wrote:
>> -----Original Message-----
>> From: Lists
>> Sent: Monday, November 30, 2009 21:33
>> To: centos@centos.org
>> Subject: [CentOS] send existing root email to another user
>>
>> Hi all,
>>
>> I'm running Centos 5.4
>> I have a pile of emails in my root users /var/spool/mail/root
>> file I need to send this all to another address (preferrably
>> external but local would possibly do)
>>
>>
>
> You want to bounce the messages. Tools like Pine can do it throught a fancy UI.
> Or you can:
>
> formail -s procmail < mbox
>
> Assuming you set it up to be delivered corectly now.
>
> http://googleit1st.com/search?q=redeliver+mbox
>
hmm I tried that but nothing seemed to happen. I used Matts suggestion
of cat /var/spool/mail/root | mail -s "mail" user@domain.com which has
set it as one email.

Thanks
Kate
>
>> I have searched a lot but can't find any way to do this. I
>> have set it so future emails get forwarded to my external
>> address but I also need to shift the existing emails.
>>
>> Thanks
>> Kate
>>
>> _______________________________________________
>> CentOS mailing list
>> CentOS@centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>>
>
>
>
>
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> - -
> - Jason Pyeron PD Inc. http://www.pdinc.us -
> - Principal Consultant 10 West 24th Street #100 -
> - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
> - -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This message is copyright PD Inc, subject to license 20080407P00.
>
>
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-01-2009, 02:09 AM
Lists
 
Default send existing root email to another user

Mathew S. McCarrell wrote:

On Mon, Nov 30, 2009 at 9:42 PM, Lists <lists@rheel.co.nz>
wrote:



>

> Kate,

>

> You need to modify /etc/aliases to have something like:

>


> root: * * * * *user@gmail.com
<mailto:user@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@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?



Kate



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-01-2009, 02:29 AM
Craig White
 
Default send existing root email to another user

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@rheel.co.nz> wrote:
> > >
> > > Kate,
> > >
> > > You need to modify /etc/aliases to have something like:
> > >
> >
> > > root: user@gmail.com <mailto:user@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@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).

Craig


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-01-2009, 02:37 AM
"Mathew S. McCarrell"
 
Default send existing root email to another user

On Mon, Nov 30, 2009 at 10:09 PM, Lists <lists@rheel.co.nz> wrote:









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?



Kate




Not that I can think of but Craig's suggestion might work.

Matt

--
Mathew S. McCarrell
Clarkson University '10

mccarrms@gmail.com


mccarrms@clarkson.edu
1-518-314-9214


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-01-2009, 02:48 AM
John R Pierce
 
Default send existing root email to another user

> 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?

install mutt if you haven't already. (yum install mutt)

as root, go into mutt. you should see all your messages, or at least
the first screenful of them.

tag all the messages by...
T .* <enter>
(no spaces, just shift-T, then .* to tag all and enter to make the tag
happen)
now each message header should show a *

;b

to 'bounce' all messages that are taggged. give it an address to
'bounce' them too, and voila. they remain in the mailbox, so...

;d

and yes to delete all. q to quit (it won't actually purge the deleted
messages til you quit)

in general, ; means the next command is executed on all tagged messages.

I'm sure there's probably a more elegant way to do this, but this is
thie quickest way I know.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-01-2009, 03:16 AM
Les Mikesell
 
Default send existing root email to another user

Lists wrote:
> Hi all,
>
> I'm running Centos 5.4
> I have a pile of emails in my root users /var/spool/mail/root file
> I need to send this all to another address (preferrably external but
> local would possibly do)
>
> I have searched a lot but can't find any way to do this. I have set it
> so future emails get forwarded to my external address but I also need to
> shift the existing emails.

If you are running an imap server (dovecot) you can connect to both accounts
from any imap client (evolution, thunderbird, even outlook) and select the
messages in one account and drag to a folder in another account.

--
Les Mikesell
lesmikesell@gmail.com

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-01-2009, 01:12 PM
Robert Moskowitz
 
Default send existing root email to another user

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@rheel.co.nz> wrote:
>>> >
>>> > Kate,
>>> >
>>> > You need to modify /etc/aliases to have something like:
>>> >
>>>
>>> > root: user@gmail.com <mailto:user@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@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.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-01-2009, 01:16 PM
Robert Moskowitz
 
Default send existing root email to another user

Mathew S. McCarrell wrote:
> On Mon, Nov 30, 2009 at 9:32 PM, Lists <lists@rheel.co.nz
> <mailto:lists@rheel.co.nz>> wrote:
>
> Hi all,
>
> I'm running Centos 5.4
> I have a pile of emails in my root users /var/spool/mail/root file
> I need to send this all to another address (preferrably external but
> local would possibly do)
>
> I have searched a lot but can't find any way to do this. I have set it
> so future emails get forwarded to my external address but I also
> need to
> shift the existing emails.
>
>
> Kate,
>
> You need to modify /etc/aliases to have something like:
>
> root: user@gmail.com <mailto:user@gmail.com>
>
>
> You should then run /usr/bin/newaliases to make these changes active||.

An alternative is to create the file: /root/.forward with the one line:

user@domain

I don't know which of these approaches is more efficient. With the
.forward, the change takes effect immediately.

>
> Matt
>
> --
> Mathew S. McCarrell
> Clarkson University '10
>
> mccarrms@gmail.com <mailto:mccarrms@gmail.com>
> mccarrms@clarkson.edu <mailto:mccarrms@clarkson.edu>
> 1-518-314-9214
> ------------------------------------------------------------------------
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-01-2009, 01:19 PM
 
Default send existing root email to another user

> >> 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?

mutt -f /var/mail/root

tag all messages: "T."
bounce all tagged messages: ";b"
enter address to bounce to


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-01-2009, 07:33 PM
Lists
 
Default send existing root email to another user

John R Pierce wrote:


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?



install mutt if you haven't already. (yum install mutt)

as root, go into mutt. you should see all your messages, or at least
the first screenful of them.

tag all the messages by...
T .* <enter>
(no spaces, just shift-T, then .* to tag all and enter to make the tag
happen)
now each message header should show a *

;b

to 'bounce' all messages that are taggged. give it an address to
'bounce' them too, and voila. they remain in the mailbox, so...

;d

and yes to delete all. q to quit (it won't actually purge the deleted
messages til you quit)

in general, ; means the next command is executed on all tagged messages.

I'm sure there's probably a more elegant way to do this, but this is
thie quickest way I know.



Thank you this worked perfectly.



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 06:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org