nmh-workers
[Top] [All Lists]

Re: smtp.gmail.com and nmh

2020-08-22 13:27:07
Have you considered altering your sendmail MTA configuration so it knows
Gmail is the ‘smarthost’ through which all outgoing email as
you@gmail.com should be sent?  Then your nmh email could continue its
route through sendmail, as now.

I have many email aliases in a couple of domains, that I use them for my
"envelope From".  I'm guessing I could not do that if I made Gmail
my sendmail 'smarthost'.  

I'm trying, slowly to get away from google.
I'm very dependent on them, but it's a goal. I just got a nextcloud account,
on a non profit's vps, so I will be learning about that.

As a general comment ... nowadays due to anti-spam measures like SPF,
DKIM, etc etc, it's difficult to do final delivery from your local
workstation with it getting tagged as spam so mail providers has been
trending toward forcing you to use their SMTP servers.  I think most
people understand this, but I just wanted to re-state it.

Now, if you have MULTIPLE email addresses from different providers, then
that means when you send email with a From header showing corresponding
to "A" you want to use A's SMTP servers, and when you use a From header
from account "B" you want to use B's SMTP servers.  This is probably
possible with popular SMTP server software, but it's complicated and
outside of the scope of nmh.  But ... we can do it directly in nmh, and
that's what I would recommend for most people.  This would be an easy
way to start migrating away from gmail if that's what you desire.

There are two ways to do this: (1) write a custom postproc, or (2) use
"sendfrom" support written by David Levine.  I personally did (1) because
(2) wasn't implemented at the time, but I would recommend everyone use
(2) as it is much simpler.

You can read send(1) for the details; look at the section "Selection
based on sender address".  There are a number of examples there and
I hope it is self-explanatory, but ask questions if things are
unclear.

--Ken


<Prev in Thread] Current Thread [Next in Thread>