[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] Feature request: MX lookups



On Sun, 31. Aug 2008, 08:01:35 +1000, Mary Gardiner wrote:
> On Sat, Aug 30, 2008, Martin Lambers wrote:
> > MX lookups, just like queueing or local deliveries, are beyond what
> > msmtp was originally intended to do. In my opinion, a real MTA should be
> > used for this. What's wrong with postfix?
> 
> Thanks for your notes. I'm thinking of a slightly different (and
> simpler) use of MX records than your notes seem intended for, and
> probably more suited to the msmtp use-case, I hope. Your notes seem
> intended to deliver each outgoing mail directly to its email domain's
> MX. Eg, joe@...45... goes to example.com's mail exchangers and
> jane@...165... to example.org's mail exchangers. I agree that this is
> more suited to something like Postfix!
> 
> The feature I was thinking of was instead that the user still specifies
> only one outgoing mail relay: relay.example.com. However, instead of
> (only) doing an A record lookup on example.com, getting IP address
> 0.0.0.0 and attempting delivery through 0.0.0.0 only, that msmtp could
> instead do an MX record lookup on relay.example.com, receive several
> answers, eg mx1.example.com, mx2.example.com and attempt delivery
> through each of them in order of priority of their MX record. This is
> somewhat more complex than the current behaviour as failures must be
> tracked a little, but not as complex as trying to determine the correct
> MX on a per email basis: there's still no parsing of addresses.
> 
> The relay could be specified in either of two ways:
>  - a new config variable, eg "mxhost relay.example.com"
>  - preference for MX lookups and fallback to the existing behaviour
>    (this happens to be what Postfix does)
> 
> This should be considerably easier to implement than direct connections
> to each email's intended MX.

I misunderstood your original mail, sorry. This is indeed a very
interesting feature!

What do you think about an additional config variable "mxlookup (on|off)"
or similar? The hostname could still be set with the "host" variable.
The new variable would activate additional MX lookups and fall back to
the given host name if that fails.

Martin