You've got a point there. #251 was 4 years ago, no wonder it did not ring a bell... And yes, To and Cc are also MIME headersRvdH wrote: ↑2022-03-26 13:10That is because you have this https://github.com/hmailserver/hmailserver/pull/251 pull request included, not?SorenR wrote: ↑2022-03-26 12:54Not sure I agree on the "To,Cc" included in the list.
What is the rationale for including them in the "MIME Headers" when they are clearly addressed further down the code in the event NO "MIME Headers" are populated?
There has to be a deeper meaning for Martin to split them up like this ...
So asking martin has little use, it is no code coming from him but the pull request you included but that never made it to any official builds
Just look at the original code, both To and CC are included there as well and normally are NOT addressed further down
That commit makes not much sense to me to be honest, why would you first try the others? You instruct it to "Deliver to recipients in MIME headers" when that checkbox is enabled (last time i checked To and CC are MIME headers as well), and the RecipientParser clears out the doubles, if any
https://github.com/hmailserver/hmailserver/issues/250 tells "some" servers don't do that correctly, but should we change our (intended) functionality because of that?
https://www.hmailserver.com/documentati ... tchaccountbool ProcessMIMERecipients
Read message recipients from To/CC headers.
But maybe To and CC should be fixed headers (eg: always parse even when not defined in the possible MIME headers), but with testing (split & join) in mind i simply included them
Check also X-Original-To header when processing MIME headers
Re: Check also X-Original-To header when processing MIME headers
SørenR.
Woke is Marxism advancing through Maoist cultural revolution.
Woke is Marxism advancing through Maoist cultural revolution.
Re: Check also X-Original-To header when processing MIME headers
Just brainstorming, few options here:
- Always try to parse To, CC + any optional additional defined headers
- Define all MIME recipient headers to be parsed, which basically gives the opportunity to leave out To and/or CC (eg: a bit like pull #251 handles this and issue #250 describes)
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup
Re: Check also X-Original-To header when processing MIME headers
Option 2...
To and CC are easily faked so should be prioritized lower than system generated MIME headers.
To and CC are easily faked so should be prioritized lower than system generated MIME headers.
SørenR.
Woke is Marxism advancing through Maoist cultural revolution.
Woke is Marxism advancing through Maoist cultural revolution.
Re: Check also X-Original-To header when processing MIME headers
Thats the GUI (for now), still have to rewrite all the variables in hmailserver itself to be named properly for option 2
"To,CC,X-RCPT-TO,X-Envelope-To" should be The default, for backward compatibility, or "To,CC,X-RCPT-TO,X-Envelope-To,X-Original-To"?
Next issue, what is they empty the MIME recipient headers textbox? Restore defaults?
Or leave empty end disable the "Deliver to recipients in MIME headers" checkbox on saving?
"To,CC,X-RCPT-TO,X-Envelope-To" should be The default, for backward compatibility, or "To,CC,X-RCPT-TO,X-Envelope-To,X-Original-To"?
Next issue, what is they empty the MIME recipient headers textbox? Restore defaults?
Or leave empty end disable the "Deliver to recipients in MIME headers" checkbox on saving?
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup
Re: Check also X-Original-To header when processing MIME headers
Error message. Enter headers or deselect.
If you deselect with empty box -> nothing
Select with empty box -> populate with default.
If you deselect with empty box -> nothing
Select with empty box -> populate with default.
SørenR.
Woke is Marxism advancing through Maoist cultural revolution.
Woke is Marxism advancing through Maoist cultural revolution.
Re: Check also X-Original-To header when processing MIME headers
As I wrote from my POV it is perfectly sufficient have hard-coded list of processed MIME headers - To, Cc, X-RCPT-To, X-Envelope-To, Envelope-To, X-Original-To (simplest straighforward implementation with 1-2 lines of new source code)
As far as I can say processing recipient in these headers should not cause unwanted deliveries.
The only reason why I proposed to provide this list as configurable option was comment from RvdH: "i already hesitated to add another non-rfc header". This comment leads me to proposal - have this list as configurable if there is problem with non-standard headers.
But if this feature is alredy implemented then keep it.
1. I would put on first place in tab-position checkbox "Deliver to recipients in MIME headers"
2. If this option is checked then subsequent editbox "MIME recipients headers" (I would name it "Processed MIME headers") will be enabled. I will put then idented under checkbox "Deliver to recipients in MIME headers".
3. If editbox will be left blank then it will automatically deselect checkbox "Deliver to recipients in MIME headers"
4. If checkbox "Deliver to recipients in MIME headers" will be toggled from unselect to select state then subsequent editbox will be populated with default values "To,CC,X-RCPT-TO,X-Envelope-To,X-Original-To"
As far as I can say processing recipient in these headers should not cause unwanted deliveries.
The only reason why I proposed to provide this list as configurable option was comment from RvdH: "i already hesitated to add another non-rfc header". This comment leads me to proposal - have this list as configurable if there is problem with non-standard headers.
But if this feature is alredy implemented then keep it.
1. I would put on first place in tab-position checkbox "Deliver to recipients in MIME headers"
2. If this option is checked then subsequent editbox "MIME recipients headers" (I would name it "Processed MIME headers") will be enabled. I will put then idented under checkbox "Deliver to recipients in MIME headers".
3. If editbox will be left blank then it will automatically deselect checkbox "Deliver to recipients in MIME headers"
4. If checkbox "Deliver to recipients in MIME headers" will be toggled from unselect to select state then subsequent editbox will be populated with default values "To,CC,X-RCPT-TO,X-Envelope-To,X-Original-To"
Re: Check also X-Original-To header when processing MIME headers
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup