[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: email lacks sender address



On Tue 26 Apr 2022 at 09:25:48 (-0400), Haines Brown wrote:
> On Tue, Apr 26, 2022 at 10:10:48AM +0100, Jonathan Dowland wrote:
> > On Mon, Apr 25, 2022 at 11:39:01AM -0400, Haines Brown wrote:
> > > I infer that exim is not being given the envelop address of the
> > > sender.
> > 
> > Quoting /etc/exim4/exim4.conf.template:
> > 
> > # By default, exim forces a Sender: header containing the local
> > # account name at the local host name in all locally submitted messages
> > # that don't have the local account name at the local host name in the
> > # From: header, deletes any Sender: header present in the submitted
> > # message and forces the envelope sender of all locally submitted
> > # messages to the local account name at the local host name.
> > # The following settings allow local users to specify their own envelope sender
> > # in a locally submitted message. Sender: headers existing in a locally
> > # submitted message are not removed, and no automatic Sender: headers
> > # are added. These settings are fine for most hosts.
> > # If you run exim on a classical multi-user systems where all users
> > # have local mailboxes that can be reached via SMTP from the Internet
> > # with the local FQDN as the domain part of the address, you might want
> > # to disable the following three lines for traceability reasons.
> > .ifndef MAIN_FORCE_SENDER
> > local_from_check = false
> > local_sender_retain = true
> > untrusted_set_sender = *
> > .endif
> > 
> > 👱🏻	Jonathan Dowland
> > ✎	 jmtd@debian.org
> > 🔗	https://jmtd.net
> 
> Johathan, many thanks for pointing out the content of exim 
> configuration template. The exim config files are so intimidating that 
> unless there is a reason to so so an amateur like myself tries to 
> avoid them.

I would be very surprised if you had /any/ need to configure exim4
beyond what is offered by Debian's  dpkg-reconfigure exim4-config
script (which writes /etc/exim4/update-exim4.conf.conf for you)
and adding a line of credentials to /etc/exim4/passwd.client so
that you can authenticate your system to your smarthost.

> What I get out of this is that my MUA (mutt) might generate a message 
> that lacks a local account name (I assume it is defined by the content 
> of /etc/mailname, whicn in my case happens to be lenin.histomat.net). 
> I infer this is the value that appaars in the Sender: line of the 
> message header consructed by mutt. 
> 
> The above text describes what exim does if that Sender: line in the 
> header happens to be empt or missing. If I understand correctly, exim 
> deletes the empty Sender: line and instead uses the value of 
> /etc/mailname to be the envelop sender. Is this so?

Do you know why mutt is adding a Sender: line to your emails?
Did you ask it to, or have you been asked to by someone else?

But don't confuse the specific "Sender:" field in the header with the
conversational use of "sender" to talk about the person/software/system
that's sending the email. (The emails you send here do not contain
a Sender: field.)

A typical, straightforward, email contains a From: field, which is the
email address of the sender (not Sender), as opposed to the recipient
(ie the To: field). Again, typically, straightforwardly, the From:
and To: fields will be used to generate the envelope's MAIL FROM
and RCPT TO addresses.

> The text goes on to say that if the three lines it specifies at the 
> end are present, it allows the user to specify whatever he/she 
> likes to appear as the envelop's sender.
> 
> This raises questions. 
> 
> First, the implication seems to be that an empty Sender: line means 
> that mutt is falling down on the job and for some reason this past 
> week ceasad to provide a value for the Sender: line in the header of 
> the some mail it sent to exim. So is the obvious thing to do is fix 
> mutt? Since I've been using the same mutt configuration for years, its 
> not a configuration problem but samage to mutt. Looks like a reinstall 
> and slow reconstruction of its confirturation. 

You have to tell mutt what to use. It can't assume that your $LOGNAME
and /etc/mailname are, taken together, going to generate a satisfactory
From: field for an email.

It sounds as if you're making too many assumptions about what mutt
can determine about you, like what your sending and receiving email
addresses are. (Like in your next line: without any configuration)

> I already ran mutt without any configuration and it didn't seem to 
> help.  I sumitted by domain name to an online mail tesing site and get 
> "Unverified address: postoffice.omnis.com said: 521 5.5.1 Protocol 
> error." Omnis told me the problem was the Sender: line was empty in 
> some messages.  

This is why I'm struggling to understand your situation. It's not like
mutt to randomly choose whether to bother to add fileds to the header.
What did Omnis actually say, literally?

In your OP, you wrote "554 5.7.1 Empty Sender Address
  is prohibited through this server; from=<>"

I have assumed that "554 5.7.1 Empty Sender Address" is the actual
response, and it's capitalised, whereas "is prohibited through this
server" is their gloss, uncapitalised. So I don't think it's saying
anything about a Sender: field, rather, the MAIL FROM address.

(Should I guess that that's Omnis speaking?)

> Another question. The implication is that if the three lines are 
> present in the exim configuration it whould allow the user to specify 
> the envelop sender. Is this merley a statement of fact or 
> is the template file used to construct the exim configuration? If the 
> latter, then I should be able to write my own envelope sender line.
> 
> I can't imagine why I would want to do that, but if I did, how does 
> one go about doing it? In the exim4 configuraiton routine one defines 
> the define default system mail name. Is this value the name used for 
> the envelope sender? Sometimes I have merely put in the host name and 
> some times appended the domain name to it. Seems to work in either 
> case. When the problem being discussed came up I changed from the 
> former to the latter when I reconfigured exim. It did not help.

Well, the simple way, which is why I use it, is to put:

  set envelope_from_address="someuser@somedomain"
  set use_envelope_from

into mutt's configuration file (always assuming it gets read!), as
I wrote before. (At this point, I didn't have an inkling of Sender:
being involved, and hope that is still true.)

The reason /I/ have to do that is that submission to my ISP requires
an email address belonging to them. I've never used my ISP's email
system beyond logging in to it every so long to prevent it expiring.

> In exim configuration I hide outgoing local mail name and provide
> the domain name without prepending host name. I assume
> this is irrevant and is merley a cosmetic isaue. Is that so?

If it's an email address, it shouldn't cause a problem. I'm assuming
that you're doing away with lenin, so to speak, which is probably
the correct thing to do, as I'm guessing that you don't run a mail
server on lenin.

Summary: tell mutt who you are. And note that "Sender" gets one very
trivial mention in mutt's manual (for tagging emails containing such).

Cheers,
David.


Reply to: