Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When using combination of Postfix/Dovecot, is there a way to tell smtp server (Postfix) not to store mails on disk but hold/add them to queue until "maintenance finished"?

Useful for disk upgrades, volume extensions, chkdisk etc.

share|improve this question
up vote 1 down vote accepted

I don't believe so; the incoming queue is on disk. Perhaps you could temporarily move the queue to a ramdisk mount?

mkdir /mnt/pframqueue
mount -t tmpfs -o size=512M tmpfs /mnt/pframqueue
service postfix stop
mv /var/spool/postfix/* /mnt/pframqueue/
<<<adjust 'queue_directory' in to /mnt/pframqueue>>>
service postfix start

Do the opposite once you're done.

IMHO that's more trouble than it's worth, especially if something goes screwy in the mv

share|improve this answer

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.

share|improve this answer
This could be a good answer but then what to do with internal users who connect to the smtp for outgoing mail? – Alex Dec 21 '12 at 5:54
@Alex During maintenance? – Michael Hampton Dec 21 '12 at 18:20
@Alex - I agree with Michael here. If you only have a single server, you're clearly not in a high-availability environment to start with, so just take things down during a published maintenance period. This is fairly standard practice, and is typically well-received by users as long as you communicate with them about it. – EEAA Dec 21 '12 at 19:46

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.