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

Re: Which MTA for from-based smarthost selection, local delivery and queuing?



Hello Michael,

Michael Stone (2022/09/09 11:01 -0400):
> I would not recommend msmtp if you have a local mail service configured on
> the system because you then have two places to debug mail problems.

I agree it's suboptimal somehow, but as you could see others do that...

> Another possibility if you're only going to send the work emails via mutt is
> to use mutt's internal smtp, something like    set
> smtp_url="smtp://user@example.com@smtp.example.com:587/"
> You can then use mutt's folder & account hook facilities to switch between
> local and external smtp depending on which account is open. I tend to think
> this is cleaner than hard-coding a per-user credential into a global
> configuration, and is much more practical than implementing xoauth2 (if
> needed) in the system mta.

Sure but (correct me if I am wrong), this would only work on a system
that has constant access to the network, right? I am guessing that mutt
does not know, internally, how to queue messages so if you write an
e-mail while you are offline it's not going to work. Or am I wrong?

> On Thu, Sep 08, 2022 at 01:06:07PM +0800, Jeremy Ardley wrote:
> > It's incredibly easy using postfix sender_dependent_relayhost_maps
> 
> Specifically, for example:
> 
> /etc/postfix/main.cf: sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
> 
> /etc/postfix/sender_relay: @example.com [smtp.example.com]:587
> 
> This sort of configuration typically requires a password, which is another
> couple of entries in main.cf (smtp_sasl_password_maps, etc) and another file
> containing the username/password. Though, see above for thoughts about doing
> per-user auth at the MUA rather than the MTA.

I had missed Jeremy's response because I was not Cc-ed, so I am greatly
thankful for having quoted it, thanks!

Well, one more solution to consider, but certainly too many solutions is
better than too few.


> 
> > One option retaining exim4 is to use postfix as an outgoing mail gateway
> > and forward to it from the exim4 instance.
> 
> That also sounds like a debugging nightmare. I'd just pick one.

Well, I can imagine myself combining exim4 and msmtp, but frankly,
combining exim4 and postfix really feels overkill to me (responding to
JEremy, here).

Sébastien.



Reply to: