I'd like to set up a system that front-ends/proxies for many domains that
each have their own MTA for local delivery. My plan for determining how to
get to the map the email was to use MX preferences and blocking direct
access to the lower preference (block direct access to the MTA with a ACLs
or whatever).
Are you using djbdns? You can use client locations for this so external senders never see your second MTAs. You can do that in bind too, but I don't know how.
I'd also like to not end up storing/forwarding -- I'd like to fire right
into the right MTA. I'm working off the assumption that any single email I
get may have multiple recipients, but all of which are at the same domain.
Is there a value in $transaction or the $header that hints for me that I can
use in my Net::SMTP->new()?
You want: my %destinations = map { $_->host, 1 } $transaction->recipients()
If destinations has >1 key then you're in trouble of course ;-)
Also note there's an smtp-forward plugin already, so that would make a good starting point.
Matt.
