2

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?

1 Answer 1

5

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 /
1
  • Never used the -C flag before. I always did cd /the/directory; tar blah blah. Found it in the man page to see what it meant. Thanks for showing that! Apr 30, 2021 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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