postfix

All posts tagged postfix

Suppose that you need second full functional Postfix instance on the same machine. You can edit ‘master.cf‘ file of course but this solution does not provide necessary separation level. This tutorial describes how to start second Postfix instance with separate ‘/var/spool/postfix‘ directory (queues, sockets, pids etc.).

In first step you need to create separate working directory for another server instance. Let’s copy:

/var/spool/postfix directory to /var/spool/postfix2,

/etc/postfix directory to /etc/postfix2.

Next create a copy of /usr/lib/systemd/system/postfix.service (with new name ‘postfix2.service’) and change following lines in ‘[Service]‘ section. Continue Reading

Hello again :). Today I would like to introduce two commands that may be used to flush Postfix queue (after network failure for example).

First of them is postsuper command. Use this syntax to re-queue all waiting mails.

# postsuper -r ALL

You can type individual mail ID instead of word ALL. Next flush all mail immediately.

# postqueue -f

Now the whole mail queue is processed again.

 

In many cases Postfix’s anvil module in not sufficient and we need something more intelligent and configurable. The popular issue is a limiting of incoming messages number from the specified domain. We will use a postfwd (Postfix Firewall Daemon). Let’s create a simple rule for this in /etc/postfix/postfwd.cf file.

Continue Reading