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

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



Dear Gregor,

Many thanks for your messages!

Gregor Zattler (2022/09/08 10:24 +0200):
> there is https://github.com/xundeenergie/exim4-multiaccount,
> which worked for me, but I always felt uneasy because I did
> not grok the configuration.

I can understand the feeling, yes. Also, I had a look and it's all in
german! Not that I don't understand german at all, but still, it's not
as easy as english and makes it feel it's a niche thingthat never really
took over...

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

Yes, that's also what I had in mind, cron. Plus the e-mails that are
sent by the Debian installer and some other services andwhich, thanks to
Exim, end up in the spool mailbox of my main user, which I find
something valuable and would prefer not to lose.

> and msmtp for delivery from my local account to
> smarthosts.  There are no other users on my system=laptop.

I have the same configuration here.

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

It would be nice to also have a cron job that regularly tries to send
queued e-mails, in case the network appears. Or someting bound to the
event of the network becoming available. I don't know which of these
ways exim4 uses to achieve sending queued e-mails but I imagine it must
be one of these two.

> There also is a package "msmtp-mta" which I did *not*
> install since it conflicts with exim4.

Yes, I noticed that to and I think if I finally follow the msmtp route
I'll do exactly like you suggest.

> But I need exim4 for local delivery.

Same here.

> In sum msmtp is configured for my single user and exim4 as a
> system wide local delivery MTA.

That approach seems reasonable to me. The only thinkg I'd maybe regret
is that, as I understandit, there is a way to achieve the same with just
exim but fully understanding it seems difficult, if one wants to do more
than just copy/pasting code blindly, which often does notwork anyway.

> For local delivery into maildirs I still use fetchmail.

Ah well on my system exim recognizes that a spoofile is a directory
and then treats it as a maildir, I think.

For the rest I connect directly to imap servers with mutt nowadays,
although I have been a fetchmail user for years and still don't leave
mails on servers.

> 
> Ciao; Gregor

Gregor Zattler (2022/09/08 17:49 +0200):
> Hi Sébastien, debian users,
> * Gregor Zattler <telegraph@gmx.net> [2022-09-08; 10:24 +02]:
> > In sum msmtp is configured for my single user and exim4 as a
> > system wide local delivery MTA.
> 
> I forgot, this is the last part of my .msmtprc:
> 
>     # use exim4 for local addresses
>     account exim4
>     host localhost
>     tls off
>     
>     ### Set a default account
>     account default : exim4
> 
> 
> 
> Ciao; Gregor

Many thanks for your two answers! I don't know yet which of the proposed
solution I will end-up using, it feels like it will require some more
pondering, but in any case I find your response really valuable and
addressing the quesiton in a precise and complete manner!

Best wishes,

Sébastien.


Reply to: