Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Migration server A --> server B

Status
Not open for further replies.

datadan

IS-IT--Management
Jul 22, 2002
283
US
I have recently changed primary email servers.

old machine = mail2.foo.com
new machine = mail.foo.com

When i do the command:
cat /var/spool/mail/datadan |formail -ds /usr/sbin/sendmail datadan@mail.innerstep.com

the maillog says Sent, but the message is bounced stating:

reason: 554 5.4.6 Too many hops

How can I forward email in spool files from my old machine (mail2.foo.com) to my new machine (mail.foo.com)?

Thanks,

 
I'd just copy the file to the new server just make sure they are both down at the time so mail isn't coming in while you are doing this.
 
RythymAce's suggestion is what I would do. Easiest way to accomplish that would be to stop sendmail on both machines, then from mail.foo.com "scp -r mail2.foo.com:/var/spool/mail/* /var/spool/mail/*" then restart sendmail.

There ARE a few issues to be aware of, though. The first and obvious one is that you can lose mail if a user already has messages sitting in the spool on mail.foo.com, and you overwrite that with the above. The second problem is that if your passwd files are not identical (i.e. your users have different uids on the new machine) you'll wind up with ownership issues.

Simple scripts will get you around either problem, though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top