Hi Sébastien, debian users, * Sébastien Hinderer <sebastien.hinde...@ens-lyon.org> [2022-09-07; 22:31 +02]: > (I am not subscribed to the list) > > Currently I am using exim4 as mail transport agent (MTA). > > I am looking for another one, because I would like to be able to > configure the SMTP server to use based on the address I am using in the >>From header. For instance, if I am sending from my personal account then > I'd like to use one smarthost and SMTP configuration, but if I am > sending from my work address, I would like the MTA to choose my work's > SMTP server as its smarthost. Am I correct that exim4 does not allow for > such a configuration? If it would, I think that would be my preferred > solution, although I find exim4 really big and difficult to apprehend.
there is https://github.com/xundeenergie/exim4-multiaccount, which worked for me, but I always felt uneasy because I did not grok the configuration. It's not updated since 2018. > 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 use exim4 now for local delivery only (think cron job mails) and msmtp for delivery from my local account to smarthosts. There are no other users on my system=laptop. Package msmtp features a queueing mechanism implemented via shell scripts. Its buried in the example directory of it's documentation. I set links from /usr/local/bin/msm... to /usr/share/doc/msmtp/examples/msmtpq/msm... and use msmtpq as sendmail: $ lt /usr/local/bin/ | grep msm lrwxrwxrwx 1 root root 43 Aug 8 2021 msmtpq -> /usr/share/doc/msmtp/examples/msmtpq/msmtpq lrwxrwxrwx 1 root root 48 Aug 8 2021 msmtp-queue -> /usr/share/doc/msmtp/examples/msmtpq/msmtp-queue lrwxrwxrwx 1 root root 6 Aug 8 2021 msmtpQ -> msmtpq It either sends email straight to the smarthost or queues it. There is not *automatic* queue maintenance nor notification if mails were queued instead of sent. There is a log file though. Next time you send another email the queue will be emptied (if possible). There also is a package "msmtp-mta" which I did *not* install since it conflicts with exim4. But I need exim4 for local delivery. In sum msmtp is configured for my single user and exim4 as a system wide local delivery MTA. For local delivery into maildirs I still use fetchmail. Ciao; Gregor -- -... --- .-. . -.. ..--.. ...-.-