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?

masegaloeh
  • 17,978
  • 9
  • 56
  • 104
bbnn
  • 209
  • 1
  • 3
  • 10

1 Answers1

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 /
ooshro
  • 10,874
  • 1
  • 31
  • 31
  • 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! – DevOpsSauce Apr 30 '21 at 16:39