You don't need a (light-weight) MTA on your server when all applications that need to send email messages have native SMTP support and be configured to use an external SMTP server.
That is probably not the case: because rather than configuring all individual applications separately with MTA settings the conventional / classic Linux behavior is that you configure the host to send email. Once the host is configured correctly, then all applications on that host can call on
/var/lib/sendmail (which, a long time in the past, would actually have been sendmail but nowadays all more modern replacements like Postfix, Exim etc. provide their own replacement sendmail compatible stubs there instead) to send outgoing email. No configuration of individual applications necessary.
Rather then installing a full fledged MTA you can install a minimal MTA.
A minimal MTA won't do any of the advanced mail delivery and queueing, it will simply forward all email messages from that host to a "mailhub" (also know as a "smart host" or "SMTP relay") that will do the actual mail delivery to the intended recipients.
esmtp are some commonly used lightweight MTA's.
What will my server's MTA then really do if I want to use Google's SMTP?
Two, maybe three things:
/var/lib/sendmail functionality to all applications running on your server
- Authenticate (if necessary) and forward all email messages to Google's SMTP
- Maybe provide a SMTP service on localhost port 25 for applications that do have native SMTP support. That allows you to configure those applications to use localhost port 25 as the outgoing mail server rather than the mailhub with the minor the administrative benefit don't need to configure the credentials required for the mailhub in those applications.
How can I then send emails from Linux's CLI?
The minimal email client is
mailx and many much more advanced terminal email clients exists, alpine, mutt and others.