Fun With Postfix and Launchd

Apple Hints Serenity Now!

If it is not one thing, it is another. I recently had to set up a web server using Mac OS X 10.4 that needed PHP 5 and Postfix so I could send email via a particular PHP script. I used Marc Liyanage ‘s PHP 5 package and then decided to to then use Mac OS X’s built install of Postfix to handle the mail. After having some issues getting Postfix working, I finally found a great article on which helped with my mail and launchd questions – as I have never had to do anything with launchd up until this point. (Goodbye cron, hello launchd)

At this point I was pretty proud of myself and figured I got Postfix working because of my pizza combos intake, but then a few minutes later and a ton of email messages later, I realized all my failed attempts and test messages had built up in the que. I now had to scramble to unplug the server and figure out how to manage the Postfix queue…something I had never done before. Enter my quick tips for managing the Postfix queue:

  • To view the queue, use: mailq
  • To delete a message, use:postsuper -d 111 (111= the message ID found by running mailq)
  • If you want to delete all messages in the queue, use: postsuper -d ALL

One problem solved, 24 more to go 😉
[tags]Mac OS X 10.4, postfix, launchd, PHP5[/tags]

4 thoughts on “Fun With Postfix and Launchd”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Javascript Web Development

A Weekend Full of Learning

What a crazy and full weekend! Many thanks to Demitrious for helping me out this weekend with PHP. If you are a beginner, check out Demtrious’s article: Poor Man’s Debugger. This article helped me greatly over the past weekend and I feel like I now have a good handle on what to do when things […]

HOWTOs WordPress

iPod and WordPress coolness in one day.

I came across an awesome HOWTO on getting linux and games on your iPod. Now if I just had a color screen iPod (I have gen 2). On another note, now offers “VIP Hosting” which would be a great option for a few projects I am working on. Great job Automattic! [tags]iPod, linux, games, […]