On 15/09/2022 12:00, Mark Rogers mark@more-solutions.co.uk wrote:
I always seem to struggle with this most simple of configuration tasks!
Starting from a clean install of (say) Ubuntu/Debian, and with a set of SMTP server credentials in your hand, what's the best/simplest way to get email set up so that emails from cron jobs get sent, and so that there's a minimal "mail" client at the commandline?
I don't want the overheads of postfix + MySQL that things like mailutils bring in. (Or maybe I should accept those overheads?)
The broader objective is that I can set the recipient address for email to root or other users, and the sender address from which emails get sent by default.
I would opt for msmtp-mta (standard package) which fakes sendmail: https://packages.debian.org/bullseye/msmtp-mta
No daemons, queues, special accounts or other malarky, just an API that other programs know how to operate and a protocol engine that can talk SMTP to your real mail system.
P.