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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty old mailq

Status
Not open for further replies.

BIS

Technical User
Jun 1, 2001
1,893
NL
Hallo All,

Hopefully somebody can give me some advice. I have successfully installed a new mailserver (RH7.3). Using Sendmail. As far as I can say, all mail is stored in /var/spool/mail until a user connects via pop3.

The new mailserver has the same ip address and hostname as the old one obviously. The old mailserver I have given a new internal ip (10.2.0.28) and a new hostname. I have edited the sendmail.cw file and added the new hostname there.

I can successfully get my old mail if I add a new account in outlook with the new hostname (of teh old server).

Is there any way, without asking everybody to create a new account to get their old mail, to empty/transport the old mail queue to the new server? I was thinking of cpying the user files in /var/spool/mail to the new server, but then I might overwrite the existing ones there...

Any ideas?
 
I have never tried this, but you could copy all of the files to the new server from /var/spool/mail into /var/spool/oldmail on the new server (look up scp to do this quickly).

Then (I THINK) you could just cat each file, and append the output to the other file;

cat /var/spool/oldmail/user1 >> /var/spool/mail/user1
same for user2 etc...

PLEASE COULD SOMEONE BACK THIS UP AS I AM NOT 100% SURE THIS WONT SCREW YOUR MAILBOXES!!
ChrisCW

** Helen Waite is now in charge of all rush orders. If you are in a hurry, just go to Helen Waite.
 
I will wait a bit then.. :)

 
Can anybody confirm this?
 

Not a 100% but I would have made the same suggestion.
Why don't you back up both and try to merge them.

There's no information in the mailbox itself so it can't go completely wrong.

Cheers Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Hmmmz - good idea!

I just tried and this seems to work ! Many thanks for everybodys help.
 
Good - I thought it would, but didn't want to be responsible if it screwed everything up!!

ChrisCW

** Helen Waite is now in charge of all rush orders. If you are in a hurry, just go to Helen Waite.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top