Is there a way to pause mail delivery in Postfix (accumulate in queue)?

Just shut down postfix. Any legit sending server will queue your mail and retry after a time delay if it is not able to contact your server. As long as your maintenance is short, say under 6 hours, your chances of losing mail are very small.


Use this to stop (pause) and start delivery of outgoing mail again:

sudo postconf -e defer_transports=smtp; sudo postfix reload
sudo postconf -e defer_transports=; sudo postfix reload; sudo postfix flush

This should be applicable to other transports as well.

Source: nixtips.net