Moving mailboxes

Moving mailboxes from one server to another can be a painful experience. Formail is a handy command that makes this a lot easier:
cd /var/spool/mail/;formail -Y -s sendmail -oi $user@domain
replace $user@domain with the real alias you want to send to eg. michele@blacknight.ie
replace $mailbox with the local mailbox name eg. michele1
The only thing to watch out for is that your sendmail doesn't try to deliver the mail locally!
Sendmail Cookbook

By Michele Neylon

Michele is founder and CEO of Irish hosting provider and domain name registrar Blacknight.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version