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

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.

1 Answer 1

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.