On Fri, Aug 12, 2022 at 07:01:52PM +0200, Sébastien Hinderer wrote:
> 1. Am I correct that it will be possible, when calling smstp-queue, to
> specify which smarthost to use?
>
> In other words, am I correct that this will let me associate one smart
> host (SMTP configuration) to each mail in the queue, rather than using
> the smae smarthost for allthe mails in the queue?
CASE 1
IIRC, msmtp can be configured to use a different smarthost per *email
address*. (To emphasise: you would set that up in msmtp's config, not
in msmtp-queue's config. msmtp-queue doesn't really have or need much
configuration.) So, if that's what you meant, then yes, it's possible.
CASE 2
If, instead, you want to be able to choose, per outgoing *email* (rather
than per *email address* of yours), which smarthost to use, then I think
you would have to either:
- write a wrapper for msmtp-queue to give you an interactive menu for
choosing which smarthost to use for each outgoing email you send, or
- rewrite your installed msmtp-queue script to give you such a menu.
The menu part (UI) isn't so hard, but implementing the underlying
functionality would be a bit more work.
> 2. I think one of the things for which exim is used is the local
> delivery of e-mails. So for instance thee-mails from the cron user are
> delivered to root, but then the e-mails from root are delivered to my
> main local user account and I think it's exim which deals with this
> bit
Yes, lots of GNU/Linux boxes are set up like that by default.
> and I probably won't touch that, unless I have to.
Quite right.
> Also, there is a subtlety that I'll need to figure out, on Debian.
> there are two packages: msmtp and msmtp-mta. the second one conflicts
> with exim son both can not coexist on the same system (they both
> provide the mail-transpor-agent package). At least that's my
> understanding.
>
> Indeed if I try to install msmtp-mta it wants to remove 7 packages:
> exim4 exim4-base exim4-config exim4-daemon-light libgsasl7
> libmailutils6 libmu-dbm6. So I'll start with msmtp alone and see what
> happens, perhaps.
Alternatively, just install msmtp outside of Debian's package management
system? msmtp is (by design, I believe) quite lightweight/standalone,
so it's a good candidate for that approach.
Good luck, either way!
Sam