Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run mailq on SSH command line terminal, I got list of mail. However, the server does not have mail server to send those mails.

How can I export the mail queue and export it to another server?

share|improve this question

migrated from Feb 21 '11 at 6:34

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

Copy /var/spool/mqueue directory:

old# tar -zpcvf mqueue.tar.gz /var/spool/mqueue
old# scp mqueue.tar.gz newserver:
new# tar -zpxvf mqueue.tar.gz -C /
share|improve this answer
it works! thanks a lot! – hachiari Feb 28 '11 at 5:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.