Next: , Up: Use cases  


Occasional connection to mail server

Assume that you have got your own Postfix SMTP server connected to the Internet. But you read and write emails on your notebook, that is connected to it just from time to time. How can you flush buffered mail queues when your notebook is connected?

One possibility is to log in and run something like postqueue -f, but by default you have got only several days so and sender will receive notification emails that his messages still are not delivered yet. Also you must have secure link (SSH, VPN, etc).

Another possibility is to use POP3/IMAP4 servers, but this is too overcomplicated and bloated for the simple task. Not an option. KISS!

Just tell both of your Postfixes (on the server and notebook) to drop email as a mail via NNCP to specified node. This is done similarly as with UUCP and as written in Postfix documentation.

Search for uucp related strings in master.cf and replace command to NNCP ones:

nncp unix - n n - - pipe flags=Fqhu user=nncp argv=nncp-mail -quiet $nexthop $recipient

then add transport map, telling that mail for example.com domain can be reached through NNCP transport to node bob:

example.com nncp:bob

Now, all mail will be stored in NNCP spool, that after exchanging and tossing will call local sendmail command to deliver them just that was happened on the same machine.