Email Services Archives - Flipping Binary https://flippingbinary.com/category/web-services/email-services/ One bit at a time Thu, 22 Feb 2018 00:22:41 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 https://flippingbinary.com/wp-content/uploads/2017/10/cropped-FB-3-32x32.png Email Services Archives - Flipping Binary https://flippingbinary.com/category/web-services/email-services/ 32 32 Clear your Postfix email queue in Ubuntu https://flippingbinary.com/2018/02/20/clear-postfix-email-queue/?utm_source=rss&utm_medium=rss&utm_campaign=clear-postfix-email-queue https://flippingbinary.com/2018/02/20/clear-postfix-email-queue/#respond Tue, 20 Feb 2018 14:00:30 +0000 https://flippingbinary.com/?p=161 While you’re configuring a new email server with Postfix, you might run across a situation where your Postfix email queue has invalid emails waiting for delivery. Maybe you changed some settings and got some test emails stuck in limbo, or some external dependency changed on you. Regardless of the cause, you can clear out dead …

The post Clear your Postfix email queue in Ubuntu appeared first on Flipping Binary.

]]>
While you’re configuring a new email server with Postfix, you might run across a situation where your Postfix email queue has invalid emails waiting for delivery. Maybe you changed some settings and got some test emails stuck in limbo, or some external dependency changed on you. Regardless of the cause, you can clear out dead emails if you want your server to stop attempting to deliver the emails which are already queued up. It should be easy, but I ran into some advice which didn’t apply to my server. First, some places advise flushing the queue like this:

postfix -f

But flushing the queue would just force your server to attempt delivery again. Other places recommend this command to delete all emails in the queue:

postfix -d ALL

This looks like what we need, so I tried executing it on my new email server:

$ sudo postfix -d ALL
postfix: invalid option -- 'd'
postfix: fatal: usage: postfix [-c config_dir] [-Dv] command

Uh oh! What happened here? That command shows up whenever I search the web for how to delete the Postfix email queue, so why isn’t it working? Well it turns out that the proper command in Ubuntu (and perhaps other distributions) is postsuper, not postfix. That one change fixes the problem and behaves as expected:

sudo postsuper -d ALL

Problem solved! Now if only it was as easy to convince Microsoft to trust the emails coming from my server…

Share

The post Clear your Postfix email queue in Ubuntu appeared first on Flipping Binary.

]]>
https://flippingbinary.com/2018/02/20/clear-postfix-email-queue/feed/ 0