Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Postfix + Mandrill Bounce Notifications
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Postfix + Mandrill Bounce Notifications

sleddogsleddog Member

I'm experimentally using Mandrill as an SMTP relayhost for my Postfix setup.

At the moment I'm stuck at understanding how bounce notifications work.

  • User Joe has his desktop mail app configured to send via my Postfix
  • He composes a message, making a typo in the "To" address, and sends it
  • My Postfix receives it and relays it to Mandrill
  • Mandrill tries to deliver the message, that fails. A bounce event is visible in the Mandrill web interface.

My Postfix knows nothing about the bounce:

Apr  7 11:40:54 mailserv postfix/smtp[8555]: 197A04DC004: to=, relay=smtp.mandrillapp.com[54.71.32.218]:587, delay=1.9, delays=1/0.04/0.58/0.24, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 694A32C0342)
Apr  7 11:40:54 mailserv postfix/qmgr[27068]: 197A04DC004: removed

This shows that the message was successful sent to (and accepted by) Mandrill. Nothing else is logged.

Shouldn't there be a DSN message from Mandill back to my Postfix, saying the message bounced? How is Joe supposed to know that his message bounced?

I've been googling this for an hour, and I'm stumped. Any help appreciated :)

Comments

  • vfusevfuse Member, Host Rep

    As far as I know Mandrill will only register the bounce but won't do anything with it. You can use their API to get a list of bounced messages.

    I think Mandrill can forward bounced messages but only to 1 address.

  • Thanks @vfuse. This confirms what I've found. It really reduces the usefulness of Mandrill as an SMTP relay. I'm surprised it isn't mentioned more often.

    The only solutions I can see are:

    1. Configure a [email protected] address in Mandrill, then attempt to parse messages sent there, and send DSN mail to the original senders. This is fraught with potential errors...

    2. Periodically query the API and send DSN messages. Assuming it's done correctly and actually works, there's still a delay -- the cron interval.

    Both are essentially re-inventing the way SMTP works, and are hacks. Shame on you, Mandrill. Time to look at other SMTP services....

  • Figured out another solution: a Mandrill webhook. Basically, in the Mandrill interface setup a webhook that POSTs json data to a specified URL on an event, e.g., a bounced message. From the data, create and send a delivery-failed notification to the sender...

  • jarjar Patron Provider, Top Host, Veteran

    That's a lot of work just to pass the mail through someone else's IPs. Don't be afraid to send from your own :)

  • 4n0nx4n0nx Member

    Jar said: That's a lot of work just to pass the mail through someone else's IPs. Don't be afraid to send from your own :)

    Maybe he's with crissic or a similar provider that does not allow bulk mailing. They want their customers to use mandrill \o/

  • @Jar said:
    That's a lot of work just to pass the mail through someone else's IPs. Don't be afraid to send from your own :)

    I'm not :) Been doing so for nearly ten years. But I like to sometimes try something different.

    @4n0nx said:
    Maybe he's with crissic or a similar provider that does not allow bulk mailing. They want their customers to use mandrill \o/

    No. I use a real provider.

    Thanked by 14n0nx
  • sleddogsleddog Member
    edited April 2015

    Jar said: That's a lot of work

    Actually solution #3 (the webhook) turned out to be quite easy and is the way to do it. After a bounce, Mandrill POSTs to the webhook within a minute. From the data you can extract the sender & recipient addresses, the message subject and the remote SMTP server response. Construct a message and drop it to the sender. And you can verify that it's really Mandrill you're talking to.

  • vmunichvmunich Member
    edited May 2015

    Use Sendgrid and setup bounce fowarding to the original sender:

  • sleddogsleddog Member

    vmunich said: Use Sendgrid

    Just don't send 40,001 emails in a month. Wonky pricing scheme.

  • @sleddog said:

    Why, as on that plan "$0.00100 price per email thereafter"

    Ok so they'd have to invoice $0.01 extra presumably, even then hardly going to break the bank.

    Thanked by 1Dylan
  • sleddogsleddog Member
    edited May 2015

    I didn't see the details, was just going on the package pricing...

    Bronze - $9.95/month - 40,000 emails

    Silver - $79.95/month - 100,000 emails

    Silver gives you 2.5X the number of emails for 8X the price.... but includes a dedicated IP so I guess that's why.

Sign In or Register to comment.