I am using postfix as a SMTP server on a network that does not have internet connection. I would like to configure every mail client to send mail to the postfix SMTP server. When the server receive a mail, it can't deliver it because it is not connected to internet, so I want it to save the mail in a file. I will then handle this file myself to send it when possible.

Is it possible to use postfix as describe above? Could you give me some advice to acheive this?


2 Answers 2


Easiest way is to create a local email address on the SMTP server (a fake address obviously) and then configure postfix to redirect all mails to that address and discard them afterwards.

This way, you can manage that address and forward the mails as you please.

But really, this is necessary only if you want to have personal control on which mails to forward and which to discard.

If it's only a matter of connectivity, i.e. Internet goes up and down frequently but you don't need to manage which mails to forward, the postfix queue will automatically take care of that.

You can configure the queue to keep messages for a long time trying to deliver. When Internet goes up, the mails will be automatically forwarded.


depending on what you actually plan to do with the emails, you may want to look at the Postfix smtp-sink utility.


it will capture email trasactions and write them to file(s) on local disk, allowing the sending servers to complete their SMTP session.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .