When I was developing on a PC, I used a program called PostCast (http://www.postcastserver.com/) to act as my local SMTP server and catch any messages that my web applications generated. It then had a GUI where I could view the messages as if I were on the receiving end. The server could also be configured to never actually send the messages but hold them indefinitely until I manually removed them. This worked out great especially when I was testing against real customer data.

I've since moved on to a Mac and I've yet to find a good way of doing the same thing. For now, I've just been manually changing all of the email addresses to my own and viewing them in Gmail, but I would prefer to be able to mimic the functionality I had in PostCast. Is there a similar way of doing this on Snow Leopard? (I've currently got PHP configured to use the built-in postfix mail server. FWIW, I don't use any desktop mail applications [e.g. Mail.app] and shouldn't really ever need to actually send email directly from my machine.)

  • Using postfix, there are two options that immediately spring to mind: rewrite the To: header to a mail address of your choosing (serverfault.com/questions/77668/postfix-rcpt-to-switch) or deliver all mail locally (serverfault.com/questions/94640/…). If you'd prefer to use another OS X app over postfix, please specify in your question. – Zayne S Halsall Nov 20 '10 at 8:21
  • I don't care if the backend uses postfix or not, though that would be easiest since MAMP is already configured to use it. I would rather not have the mail delivered anywhere at all honestly. I just want it helld in a folder until I remove it, but I also need a way to view the message as an end user would (i.e. via an email client interface) – Chris Bloom Nov 22 '10 at 1:11
  • BTW: the second post you linked to does seem to be barking up the same tree, but I can't find any info on how to run smtp-sink, or even where it's installed. A simple which smtp-sink on OSX 10.6 returns nothing. – Chris Bloom Nov 22 '10 at 1:27
  • 1
    I know this is a super, super old post, but I've found where smtp-sink lives (on OSX 10.9 at least): /usr/libexec/postfix/smtp-sink – rossipedia Oct 27 '13 at 16:54

I know this is a late response, but there is a native Mac app to do this now: MockSMTP. Works great and does exactly what you want.

  • Sorry for the delayed response. I've been meaning to try this program out and haven't yet gotten around to it. If you tried it, how has it worked for you in the last month? – Chris Bloom May 24 '11 at 13:03
  • I've finally had an opportunity to try this with a few applications, 1 PHP and 1 Rails. It definitely does exactly what I needed it to. Thanks for the tip! – Chris Bloom Jun 16 '11 at 12:19

I've done this using DoveCot on my Mac Mini Server (running OS X 10.6 Server). I can configure it to cache sent messages to a folder, and since the Mini Server is the web server, messages are sent from it (the web server uses DoveCot for outgoing mail). I hope this helps.

  • 1
    Unless this "DoveCot" is something different from the Dovecot I know and have been using for years, it doesn't handle outgoing mail at all; it's strictly a POP/IMAP service. You need to configure your MTA appropriately to capture the outgoing emails. – Ignacio Vazquez-Abrams Nov 20 '10 at 6:09
  • Excuse me, Dovecot/Postfix – Everett Nov 20 '10 at 6:21
  • Everett: can you provide any instructions on what you did to accomplish this? – Chris Bloom Nov 22 '10 at 1:28
  • Using the ServerAdmin utility, select the server on the left side, then Mail. Once that service is open, click on settings at the top. The 5th box under Enable SMTP email is "Copy all mail to:" If you want you could also "Copy undeliverable mail to:" and have it intentionally sent to an email address that doesn't exist. – Everett Nov 22 '10 at 4:00
  • Ah, I'm not on a server, just a MBP, so I don't think those options are available to me. – Chris Bloom Nov 22 '10 at 4:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.