May 22, 2012
tom

Postfix – how to add emails to the queue without being delivered?

Question

I have a quick question. How does one add emails to Postfix’s queue without it delivering the emails? I am writing a script to email Postfix statistics (queue count, sent, etc) to our support staff. I want to test it when there are emails in Postfix’s queue to see if its working correctly. However, every time I send an email from Postfix it gets delivered. :)

Thanks!

Asked by thiesdiggity

Answer

Some methods:

  • Use @EightBitTony’s approach
  • Use a VM for development and pull the virtual plug to the network
  • Use a firewall rule to drop outgoing packets for port 25.

and the best way:

Answered by SvenW

Related posts:

  1. Minimum PostFix configuration for sending emails only?
  2. Specifying Postfix queue lifetimes on a per-message basis
  3. Postfix with Dovecot configured and send emails with no errors. When sending from a remote client message-id is empty, and emails go to spam.
  4. Postfix – sending emails to external domains?
  5. How to configure sendmail (or postfix) to send confirmation emails using webmin?

Leave a comment