On 2020-08-28, Eduardo Chappa <
cha...@washington.edu> wrote:
>> I think he wants to know more specifically what alpine looks at to
>> determine your username and hostname. It was not running when you logged
>> in, so it cannot have looked at your "login information" as you logged
>> in . Does it look at some environment variable ($USER)? Does it look at
>> the uid of the running alpine? Or does it get this information from
>> somewhere else?
>
> Imagine you run a linux machine. And you login to it. Your system must get
> you login information from somewhere (including your home, username, etc.)
> That is what Alpine does.
It gets your machine name from the fact that you log on on that machine
or using the hostname command I assume.
login gets your username because you type it in. It then remembers your
user name because it stores it in $USER environment variable and because
it starts up programs under your uid, and remembers it because childred
of a program get the same uid as the parent.
Alpine does not user the environment variable USER (I just tried it-- I
changed USER and opened alpine, and it did not use the new USER), so it
probably gets it from the uid of running alpine program.
>
> I have no idea why anyone would think that Alpine uses environment
> variables for this purpose. The answer is Alpine does not use environement
> variables for this purpose.
Experimentally I agree.
>
> As I said before, it uses your login information.
It has to get your "login information" from somewhere. You say, and my
experiment agrees, that it does not use the environment variable to get
that information. The only other place I can imagine it getting that
information is from the uid of the alpine process.
>
> But again, you are missing the point in terms of the answer: Use a role to
> send email and make sure that the From: address is allowed to send email
> in that SMTP server. That is all that is needed.
I do not understand what you mean by a "role". I presume it is as
explained in
http://alpine.x10host.com/alpine/alpine-info/roles/
>
> Most personal computers are not configured to have the exact username and
> domain than the one in the SMTP server, and in particular this would be
> useless as soon as you configure two accounts, but even if you could
> configure one computer with this data, it would have to be part of the
> network in which the SMTP server resides, and so again, it would be not
> useful for most people. In other words, the infomation about login/domain
> is mostly irrelevant as obtained by default by Alpine, because it hardly
> ever matches the information that is needed to send the email, so
> configure a role, and use the correct address in it, so that your email
> can go to its destination when sent through the chosen SMTP server
> attached to that email address.
>
> Having said all of that, some ISPs set their SMTP servers open for their
> subscribers, and these rules do not apply at all. The situations I am
> describing have to do more with commercial services such as Gmail,
> Outlook, etc.
>
> Bottom line: do not worry about this as much, worry more about setting
> your from header correctly so that it will be accepted in the SMTP server
> when sending, and then everything will be work correctly.
I think his question is precisely how to set up the header so that it
uses his alternative From: line. I will assume that the header he wants is suitable for
his SMTP server. Alpine seems to set the From: line on its own without any way of
configuring it except by using a "role", is that correct?
>