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

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



On Wed, Sep 07, 2022 at 10:31:37PM +0200, Sébastien Hinderer wrote:
I was advised to use msmtp but, although it has the feature I am looking
for, it misses two features of exim4 that I find useful: local e-mail
delivery to users' maildirs and the ability to queue emails composed while
the computer is off-line so that they get sent the next time the network
becomes available.

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. (For systems with no mail service configured, it's a great solution.)

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.
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.

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.


Reply to: