# Postfix/Postmap catch-all for local testing?

**URL:** <https://www.ruby-forum.com/t/postfix-postmap-catch-all-for-local-testing/164288>\
**Category:** Rails\
**Created:** [March 30, 2009, 11:01pm UTC](https://www.ruby-forum.com/t/postfix-postmap-catch-all-for-local-testing/164288 "2009-03-30T23:01:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danimal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bb73d2/32.png) [@Danimal](https://www.ruby-forum.com/u/Danimal)\
**Post date:** [March 30, 2009, 11:01pm UTC](https://www.ruby-forum.com/t/postfix-postmap-catch-all-for-local-testing/164288/1 "2009-03-30T23:01:38Z")

</div>

Hello all!

So this isn’t exactly a Ruby on Rails issue, but it fits so well into  
the RoR typical development cycle that I thought I’d post it here  
anyway.

I’m wondering if anyone knows how to configure postfix on a Mac so  
that emails sent using the local SMTP service will _all_ be  
intercepted and dropped into a local mailbox on the mac.

I found this blog post:  
[http://traumwind.de/tindertraum/archives/local\_mail\_osx.html](http://traumwind.de/tindertraum/archives/local_mail_osx.html)  
which has helped actionmailer testing ENORMOUSLY.

The problem is that what I really want to do is configure a virtual  
alias that looks something like:

_@_ username

So that any email to any address that hits the local postfix process  
would be delivered to my local user account, which I can then pick up  
locally for testing.

But I don’t know how to do this and can’t seem to find any  
documentation on how one might attempt this. I know that one would  
_never_ do this on a live server, but I’m only wanting to do this on  
my Mac laptop so I can test RoR apps with existing user data and not  
worry about it.

Thoughts? Anyone?

-Danimal

P.S. In the meantime, I have a development-environment-only hack to  
change email addresses so that instead of “removed\_email\_address@domain.invalid” they  
end up as “removed\_email\_address@domain.invalid” and then I set the postmap mapping  
to be:  
@mybox.localhost username  
which works fine… except for needing the email conversion hack.  
_sigh_
