Moving mailboxes between systems

David Hummel dhml at comcast.net
Wed Jun 29 16:20:15 EDT 2005


On Wed, Jun 29, 2005 at 02:30:23PM -0400, Jerry Feldman wrote:
> 
> In a specific case where email exists:
> system:/var/spool/mail/<user>
> I want to move that email to another system.
> I can easily do it as follows:
> scp /var/spool/mail/<user> othersystem:/tmp/<somename>
> rm /var/spool/mail/<user> (or cat /dev/NULL > /var/spool/mail/<user> )
> 
> log into other system as root
> stop mail
> cat /tmp/<somename> >> /var/spool/mail/<user>
> rm /tmp/<somename>
> start mail
> 
> The above procedure works fine. I was looking for a way that I could
> utilize the MTA (or MDA) in some way for forward the email in
> /var/spool/mail/ (or /var/mail) using the mail transport system.

If the source machine has a POP or IMAP server running, this is exactly
what fetchmail is for.

-David



More information about the Discuss mailing list