Howtos / Articles

Remove mail from the Postfix queue

Queue maintenance is an important part of the administration of any SMTP mail server. There may be times where you get a lot of emails attempting to be sent, that either aren’t getting transmitted successfully, or you don’t want them to get transmitted. The “postsuper” command allows you to remove individual emails, or even all emails from the queue. If you would like to just remove one specific email from the queue, you need to get the Queue ID. You…

Read more [...]

View the Postfix mail queue

If you are having issues sending emails with the Postfix SMTP server, the two best places to look to diagnose the issue, are the log files, and the mail queues. Any emails that don’t get sent successfully, or that haven’t been sent yet, will be stored in the queue waiting for transmission/re-transmission. To view the Postfix mail queue, you can use the following command: postqueue -p -p = Produce a traditional sendmail-style queue listing. After the Queue ID field in…

Read more [...]

Flush the Postfix mail queue to force retry

Typically if a mail server can’t connect to a remote mail/SMTP server, it will keep the email in a queue and periodically retry sending the email until it is either successful, or fails after a specific time frame which set in the mail server configuration. This tip shows you how to flush the Postfix mail queue, which will retry any emails that are waiting to send, or waiting to be resent (due to errors such as DNS resolution, or connectivity…

Read more [...]

Run Postfix on multiple ports

The default port for SMTP is port 25, but there may be some scenarios where you may need Postfix to listen on another port as well (or instead of). For example, if you want to send emails via your own mail server, from your work computer, but the work network may be blocking all port 25 traffic out onto the internet from all PC’s but the mail server. You can get around this by setting up Postfix on another port…

Read more [...]

Limit Postfix to listen on specific IP addresses

On a default install of Postfix, it will listen on all interfaces/IP addresses on your machine. Sometimes this is not what you want. For example, the computer may be connected directly to the internet on one network interface, and connected to a lan on another interface, however you may not want to allow access to the SMTP server from the internet, and only use it for internal mail. You can do this by specifying only the internal address to listen…

Read more [...]