We've been using postfix + AuthSMTP for quite awhile for our outgoing email notifications. AuthSMTP is getting kind of expensive, so I'm trying to switch to Amazon's Simple Email Service. I've successfully configured postfix to send through SES and it works great, but Amazon throttles you heavily until you've proven yourself as a good email citizen, so we can't just flip the switch to it.
What I'd like to achieve is having amazon-ses as the default transport, and when it starts getting failures, falling back to the authsmtp transport for some time before attempting aws-email again. This would let us send as much as possible through amazon, hopefully getting our quota raised quickly. (We have an aws-email transport set up that sends through a perl script that returns an error on quota overages.)
I've scoured the postfix config docs for a couple hours, but nothing stands out to me as able to do this. The closest thing I can find are the *_destination_concurrency_* options, but those appear to be specific to destinations, not the transports themselves.
Is there some way to accomplish this in postfix?
--
Zach Wily
This was designed to implement a graveyard service for mail
that can't be delivered via the preferred service.
http://www.postfix.org/postconf.5.html#smtp_fallback_relay
Wietse
zach
You have soft_bounce = yes enabled.
This is a bad idea for production systems.
http://www.postfix.org/postconf.5.html#soft_bounce
--
J.
Is there something bad about soft_bounce that I'm missing?
Either way, I tried turning it off, and I still didn't get the behavior I want. When I hit Amazon's limit, emails started failing and were not delivered via AuthSMTP. The relevant config looked like this:
soft_bounce = yes
default_transport = aws-email
smtp_fallback_relay = [mail.authsmtp.com]:2525
(I have smtl_sasl_password_maps set up which defines the credentials for authsmtp.)
Then, you made a mistake. Unfortunately, the crystal ball does not
show what that mistake might be.
Wietse
This is a transport.
> smtp_fallback_relay = [mail.authsmtp.com]:2525
>
This is a mail host.
In the normal case, your mail would be queued for
aws-email:destination.domain
In case this causes errors, it would re-queue to
aws-email:[mail.authsmtp.com]:2525
I would suggest you use relay_host = [amazon.ses.server] instead.
--
J.
Argh. That should be
relayhost = [amazon.ses.server]
--
J.