Moving or Restoring Postfix Queue

Login as superuser by

\r\n

su -

\r\n

STOP postfix server

\r\n

/etc/init.d/postfix stop

\r\n

Navigate to directory where you want to move server

\r\n

cd /path/to/directory/

\r\n

Copy a directory named maildrop from original queue

\r\n

cp -R /var/spool/postfix/maildrop/ .

\r\n

cd maildrop

\r\n

Make sure that the owners of new maildrop directory are postfix & postdrop & having proper access
to have proper settings use:-

\r\n

chown postfix:postdrop maildrop

\r\n

chmod 730 maildrop

\r\n

now execute following commands to restore existing queues in maildrop folder

\r\n

cp -R /var/spool/postfix/incoming/ .

\r\n

cp -R /var/spool/postfix/active/ .

\r\n

cp -R /var/spool/postfix/deferred/ .

\r\n

find incoming active deferred -type f -exec mv '{}' . ';'

\r\n

rm -rf incoming active deferred

\r\n

now we can start the postfix server as

\r\n

/etc/init.d/postfix restart

to check the status of server

\r\n

/etc/init.d/postfix status

\r\n

Further Reading

\r\n


http://www.postfix.org/faq.html#copying

Categories