nmh-workers
[Top] [All Lists]

Re: Hiding one's email source username/hostname/ISP

2021-03-14 13:19:44
Right.  I was hopeful that even that could be hidden.  For
example, if I use the Gmail web interface, the Received: headers
indicate that it came from Gmail itself (which makes sense).  I
was thinking it'd be useful to replicate that, even when I'm
actually sending it from my laptop _via_ the Gmail servers.

Unfortunately, that decision is up to Gmail; that's not something
we have control over.

I use the "clientname" option because otherwise it is set to
"localhost.localdomain" (since I don't use "localname"), and that
has been shown to be a huge red spam flag.

But, I think I should not use the "localname" option.

If I correctly understand the implication of using it --
specifically, "the hostname nmh considers local" -- then I think
this would be problematic, as the alternative "local hostname"
I'd want to specify would be "gmail.com."  But then, any time I
email "foo@gmail.com," NMH would try to deliver that locally
instead of sending it to the Gmail server, no?  That'd result in
100% bounces, since not even my own Gmail username, "dnc2dnc," is
a valid login ID on my laptop.  I suppose "bob@gmail.com" would
work, except I don't know them and so don't email them except by
accident.  B-)

So, we don't really do a wonderful job of explaining what "localname"
does, because ... it's kind of complicated.  But, since you asked ...

There's a function called "LocalName()" in nmh.  It returns ... the
local name of the host.  It takes a single argument, an integer flag.
If the flag is 0, it will return the local hostname, EXCEPT if localname
is configured.  Then it returns the value of localname.  If the flag
is non-zero, then it returns the fully qualified local hostname (the
output of gethostname() run through getaddrinfo() with AI_CANONNAME set).
If for some reason you have localdomain set, then that will be appended
to the local hostname.

LocalName() is called with a flag value of '0' in all instances, with the
exception of two cases:

- When a default value is used for clientname
- When a message-id is constructed (and you haven't overriden how message-ids
  are generated).

The most consequential result of "localname" is the construction of email
addresses.  Nmh's default idea of your email address is %(me)@%(myhost);
if you change localname, that changes "myhost".  It's also used in the
address parser as "default" host in a few places.  But that's the biggest
change.

But ... it doesn't affect mail delivery _at all_.  Unless you explicitly
configure it (and doing that is possible, but it can be complicated; you
would have had to do some extra work), nmh does not distinguish between
"local" and "remote" messages.  If you tell it to deliver your email to
gmail, that's what it's going to do regardless of how you configure
"localname".  Once, very long ago, nmh (and MH) tried to be a little
more intelligent about this sort of thing but it just made the address
parser more complicated and caused many problems, so now unless you do
extra work everything is delivered via your chosen submission method.
So feel free to use localname if you really want to (but I would personally
recommend using Local-Mailbox in your .mh_profile).

--Ken

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