Okay, I think I've gotten this one sorted now. I changed the $MAIL_SETTINGS variable to point to a .txt file as you described, and the Sender header was there in the .txt file. In the end I've narrowed the culprit down to sendmail. If I set the Sending Preferences to sendmail, then the Sender header is gone when I receive the email in my Inbox. But if I set the Sending Preferences to use an SMTP server, then the Sender header is there, and is correctly set based on what I've put in the %EMAIL_HEADERS section.
(BTW, it looks like setting the $MAIL_SETTINGS variable to point to a .txt file only works when the Sending Preferences page is set to use sendmail rather than SMTP. If I set it to SMTP, but also set the $MAIL_SETTINGS variable to point to a .txt file, the .txt file is not used and the email still gets sent out via SMTP. Is this by design, or a bug?)
Anyway, I guess there must be something odd going on with sendmail on the web host that I'm currently using - seems kinda strange to me, but who knows. I'll stick with using the SMTP server for now anyway.
In answer to some of the other questions and comments you've written above.....
What was your prev. list software?
I've been using MDaemon, a really great commercial Windows mail server which includes mailing list functionality (I'm also one of their official beta testers, which might not surprise you!)
I'd like to do some research on just what the Sender: header is for (and what usually sets it - the app that creates the message initially, or the MTA?
The Sender header can be set by either the MTA or the MUA (mail client). Some clients such as MS Outlook will generate the Sender header when used in an Exchange environment, when one user has been given "send on behalf of" delegate permissions for another user's mailbox on the Exchange server (eg. the secretary having permission to send mail on behalf of the boss). In that case, the From field would be that of the secretary, and the Sender field (meaning "sent on behalf of") would be that of the boss.
Furthermore, when Outlook *receives* an email which contains both the From and the Sender headers, it will show both names in the GUI, with one being "on behalf of" the other.
I've seen other mailing lists use the Sender header to indicate the name of the mailing list itself, and this is what I want to use it for too. It makes the most sense to use it when the From header is always that of the actual sender (their own name/address) rather than that of the mailing list - this would typically be the case with a discussion list, but it could also be the case with an announcement list too, if you set your announcement list to show your own name/address in the From field rather than the mailing list's name/address.
In those scenarios, you then would put the mailing list's name/address into the Sender header instead of the From header. Thus, the recipient can see the name/address of the person who wrote the email in the From field, as well as the name/address of the mailing list which distributed the email (essentially "on behalf of" the sender) in the Sender field. It makes sense when you think of it that way, because the mailing list really is sending your email "on behalf of" you, in a similar way to how a secretary might send an email on behalf of their boss.
As you quoted from the RFC, "If the originator of the message can be indicated by a single mailbox and the author and transmitter are identical, the "Sender:" field SHOULD NOT be used. Otherwise, both fields SHOULD appear." Thus, if the mailing list name/address is already being used in the From field, then there's no need to repeat it again in the Sender field, and so the Sender field should be omitted.
In my case, I'm using Dada Bridge as a discussion list, which means the From field will always be that of the original sender (eg. John Smith). So I want to have the Sender header inserted, and for it to indicate the name/address of my mailing list. Ideally I'd like it to use <!-- tmpl_var list_settings.list_name --> for the name part and <!-- tmpl_var list_settings.discussion_pop_email --> for the email address part (which I equate to being the address of the mailing list), but I also think it's best to leave it up to the list owner to configure.
When an email configured this way, using the Sender header, is received by a client which supports it (such as Outlook), then the sender information would be displayed like this in the Outlook GUI:
My Mailing List [listaddress@example.com]; on behalf of John Smith [john.smith@hotmail.com]
...although the actual From column in the Inbox view of Outlook would still only display "John Smith", which is what the From header contains. So there's an advantage here of making it more clear to the recipient as to where the email came from, ie. what mailing list it came through, especially if the recipient might not know who the sender actually is (maybe it's a very big mailing list and the recipients don't know each other) - the recipient at least can see the name of the mailing list there in the GUI, if he's using a client like Outlook (perhaps other clients/webmail interfaces also show it too). So it's one more way of visibly promoting openness and clarity about the origin of a mailing list email, which can only be a good thing.
Perhaps a new control in the GUI can be added so this can be configured accordingly for those who want it?
I definitely think this should be (optionally) available at least to list owners who are using Dada Bridge as a discussion list, for the emails which are processed by the Dada Bridge plugin (ie. sent to the POP3 mailbox). But actually I also think the Sender header should be used when a message is sent from the "Send a Message" page, for those owners who are using Dada Bridge as a discussion list. Eg. I can imagine myself on some occasions wanting to send a message "as the administrator" directly from the Send a Message page, rather than from my own mail client, and I'd still want the Sender header inserted then, because my list is still a discussion list even though I'm not sending that particular message via the POP3 mailbox. Make sense?!
Cheers,
Jeremy