baudehlo/Haraka — Issue #149: Stuck in loop delivering to localhost
Author: sstur
Created: 2012-01-21 01:15:31+00:00
State: open

I've started using Haraka in production as a mail relay to listen on localhost and deliver outgoing messages for web applications (specifically a bulk mail PHP app). Haraka has been extremely performant compared to other solutions I've tried and the ability to write custom functionality using simple JS is priceless, so thanks for all your hard work on this project!

Given the quantities of outgoing mail (84k yesterday), I've run into a few issues worth mentioning (I am working on solutions in a few cases).

Particularly, I ran into an odd situation where an email address's domain had it's MX record resolving to to 127.0.0.1. Given my setup where Haraka doesn't require auth for local connections, this sent it into an endless loop of delivering to itself.

As a workaround, I'm going to either change the port to 587, or configure auth even for local connections, but I wanted to bring this up as in issue because there are situations where web apps are hard coded to deliver to localhost:25 without auth, so it might be something worth looking into.

Besides some various fixes, I've been working on a maillog plugin that logs SMTP conversations properly with timestamp to files cycled each day. I had to add a hook to outbount.js (one-liner) so I might issue a pull request before I release the plugin if that's something you would be interested in.

Cheers,
Simon