A Rails app I’m working on will receive emails with attachments and then process those attachments.
What I would like to do is configure Postfix so that I can send an email with attachments from Mail.app to an email address that will be picked up by Postfix locally. I’m quite happy with getting the mail contents into my app once it’s been received in Postfix.
I’ve tried setting robin-fishers-macbook.local to localhost in my hosts file in the hope that email sent to robinjfisher@robin-fishers-macbook.local might be routed locally but no joy.
Any help appreciated.
Thanks
Robin
You won’t need to use a public server. If you setup a DNS server locally, perhaps using a guide like this one for Mac OSX, you can create a zone for
robin-fishers-macbook.local, point everything to 127.0.0.1 (or if your actually running this on another Mac, point it to the IP that has postfix running on it), and add anIN MX 10 127.0.0.1. Then you just need to make sure to change your resolver to use the local DNS instead of the one you normally use. Things like google and other domains will still resolve as well as therobin-fishers-macbook.localdomain.