Page 4 of 4

Re: Sub OnHELO(oClient) progress?

Posted: 2019-05-13 20:03
by estradis
estradis wrote:
2019-04-26 09:34
... the executive board will probably decide to replace hms.
... and they did!

https://www.hmailserver.com/forum/viewt ... =7&t=33995

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-02 02:37
by RvdH
Install the latest production and/or beta version from the URL below, then copy and overwrite files in this archive in hmailserver '/bin' directory
https://build.hmailserver.com/repositor ... -B2437.exe
  1. Supports Sub OnHELO(oClient) event, issue #153
  2. Fixed Incorrect DEBUG logging for event 'OnDeliverMessage', issue #181
  3. Include HTMLBody into IMAP TEXT search, pull #193
  4. Fixed implicit conversion: "int" to "unsigned char" pull #204
  5. Faulty: SMTP 'Disconnect client after too many invalid commands' pull issue #160
  6. SMTP server error "550 Unsupported ESMTP extension" on MAIL FROM:... AUTH=<> [with fix] issue #164
  7. Removed warning if backup was more than 1,5GB and 15GB limit. There's no longer a recommended max-size - the time will vary with the installation size. issue #69
  8. Speed up 'update hm_messages set messageflags' issue #221
  9. Treat authenticated users as localsender if the sender is authenticated and AuthUserIsLocal=1 INI setting Office 2016 Bug
  10. Add Return-Path header as topmost header before sending the message to SA (+ delete Return-Path header after the SA check completes) issue #116
  11. Experimental eventhandler OnClientLogon(oClient), New ClientInfo property oClient.Authenticated (Boolean)
  12. Handling of long UIDL response lists was too slow. issue #93
  13. When calling SpamAssassin and there was a connection failure, sometimes temporary files were left behind issue #100
  14. SURBL detection properly fails to detect url's ending with a query string issue #108
  15. If a route is set up, but the recipient does not match an address in the route address list, the domain catch-all should be used if specified. issue #74
  16. Fix ExternalFetcher DELE when no RETR, pull pull #254
  17. SMTP multiply max message size with 1024 issue #267
  18. Add email address variable to SignatureAdder.cpp pull #265
  19. DKIM on acccount-rule 'reply' not applied #172 issue #172
  20. preserve RewriteEnvelopeFromWhenForwarding setting when forwarding from account rule
+ OpenSSL 1.0.2s (released may 28, 2019)

https://d-fault.nl/files/5.6.8-B2437.20 ... _1.0.2s.7z

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-02 09:48
by jimimaseye
First post on page 1 now points to the latest release as it became difficult finding the updates as the thread progresses. (I will edit and update it whenever a new one is posted).

That should help.

[Entered by mobile. Excuse my spelling.]

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-02 15:27
by insomniac2k2
Thank you for your contribution. I will update my servers as soon as i get a few free minutes :)
RvdH wrote:
2019-06-02 02:37
Install the latest production and/or beta version from the URL below, then copy and overwrite files in this archive in hmailserver '/bin' directory
https://build.hmailserver.com/repositor ... -B2437.exe
  1. Supports Sub OnHELO(oClient) event, issue #153
  2. Fixed Incorrect DEBUG logging for event 'OnDeliverMessage', issue #181
  3. Include HTMLBody into IMAP TEXT search, pull #193
  4. Fixed implicit conversion: "int" to "unsigned char" pull #204
  5. Faulty: SMTP 'Disconnect client after too many invalid commands' pull issue #160
  6. SMTP server error "550 Unsupported ESMTP extension" on MAIL FROM:... AUTH=<> [with fix] issue #164
  7. Removed warning if backup was more than 1,5GB and 15GB limit. There's no longer a recommended max-size - the time will vary with the installation size. issue #69
  8. Speed up 'update hm_messages set messageflags' issue #221
  9. Treat authenticated users as localsender if the sender is authenticated and AuthUserIsLocal=1 INI setting Office 2016 Bug
  10. Add Return-Path header as topmost header before sending the message to SA (+ delete Return-Path header after the SA check completes) issue #116
  11. Experimental eventhandler OnClientLogon(oClient), New ClientInfo property oClient.Authenticated (Boolean)
  12. Handling of long UIDL response lists was too slow. issue #93
  13. When calling SpamAssassin and there was a connection failure, sometimes temporary files were left behind issue #100
  14. SURBL detection properly fails to detect url's ending with a query string issue #108
  15. If a route is set up, but the recipient does not match an address in the route address list, the domain catch-all should be used if specified. issue #74
  16. Fix ExternalFetcher DELE when no RETR, pull pull #254
  17. SMTP multiply max message size with 1024 issue #267
  18. Add email address variable to SignatureAdder.cpp pull #265
  19. DKIM on acccount-rule 'reply' not applied #172 issue #172
  20. preserve RewriteEnvelopeFromWhenForwarding setting when forwarding from account rule
+ OpenSSL 1.0.2s (released may 28, 2019)

https://d-fault.nl/files/5.6.8-B2437.20 ... _1.0.2s.7z

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-04 09:25
by nitro
RvdH wrote:
2019-06-02 02:37
Install the latest production and/or beta version from the URL below, then copy and overwrite files in this archive in hmailserver '/bin' directory
https://build.hmailserver.com/repositor ... -B2437.exe
  1. Supports Sub OnHELO(oClient) event, issue #153
  2. Fixed Incorrect DEBUG logging for event 'OnDeliverMessage', issue #181
  3. Include HTMLBody into IMAP TEXT search, pull #193
  4. Fixed implicit conversion: "int" to "unsigned char" pull #204
  5. Faulty: SMTP 'Disconnect client after too many invalid commands' pull issue #160
  6. SMTP server error "550 Unsupported ESMTP extension" on MAIL FROM:... AUTH=<> [with fix] issue #164
  7. Removed warning if backup was more than 1,5GB and 15GB limit. There's no longer a recommended max-size - the time will vary with the installation size. issue #69
  8. Speed up 'update hm_messages set messageflags' issue #221
  9. Treat authenticated users as localsender if the sender is authenticated and AuthUserIsLocal=1 INI setting Office 2016 Bug
  10. Add Return-Path header as topmost header before sending the message to SA (+ delete Return-Path header after the SA check completes) issue #116
  11. Experimental eventhandler OnClientLogon(oClient), New ClientInfo property oClient.Authenticated (Boolean)
  12. Handling of long UIDL response lists was too slow. issue #93
  13. When calling SpamAssassin and there was a connection failure, sometimes temporary files were left behind issue #100
  14. SURBL detection properly fails to detect url's ending with a query string issue #108
  15. If a route is set up, but the recipient does not match an address in the route address list, the domain catch-all should be used if specified. issue #74
  16. Fix ExternalFetcher DELE when no RETR, pull pull #254
  17. SMTP multiply max message size with 1024 issue #267
  18. Add email address variable to SignatureAdder.cpp pull #265
  19. DKIM on acccount-rule 'reply' not applied #172 issue #172
  20. preserve RewriteEnvelopeFromWhenForwarding setting when forwarding from account rule
+ OpenSSL 1.0.2s (released may 28, 2019)

https://d-fault.nl/files/5.6.8-B2437.20 ... _1.0.2s.7z
Approximately 24 hours ago I updated my production server with this new version.
One of my clients uses the "damn" version of Outlook 2016, I have correctly configured the .ini for "RECEIVED: MAIL FROM: <>".
I have only detected these errors in the log as strange or different.

Code: Select all

"ERROR"	9928	"2019-06-03 18:59:30.767"	"Severity: 3 (Medium), Code: HM5310, Source: DKIM::SignHash_, Description: Unable to parse the private key file."
"ERROR"	9928	"2019-06-03 18:59:30.767"	"Severity: 3 (Medium), Code: HM5308, Source: DKIM::Sign, Description: Failed to create siganture."
"ERROR"	9928	"2019-06-03 18:59:30.767"	"Severity: 3 (Medium), Code: HM5306, Source: DKIMSigner::Sign, Description: Message signing using DKIM failed."

I understand that it has realation with:

Code: Select all

DKIM on acccount-rule 'reply' not applied
Is it because of a bad configuration in the DKIM?
To this day I have not suffered that error.

Thank you very much for your work and your help to keep hmailserver alive.


Update

Code: Select all

Scenario:

1, DKIM signing setup and enabled - Sending an email with email client signs the email correctly (with the usual "dkim-signature:" header).

[b]2, Set up an Account Rule with a "REPLY (email)" as an action (all fields filled correctly).[/b]

BUT the received reply email (sent by the rule) does not get DKIM signed.
Could it be the problem?

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-04 11:37
by RvdH
The account address this account rule is assigned to and the address defined in the From field are the same?

Addendum: And only emails to external accounts get signed by DKIM

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-04 11:52
by nitro
RvdH wrote:
2019-06-04 11:37
The account address this account rule is assigned to and the address defined in the From field are the same?
No, it is a forwarding over the same domain but not on the same account.

Image

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-04 11:57
by RvdH
Forwarding? Settings in that Tab, have literally nothing to do with an Account Reply rule, or what am i missing here?

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-04 12:02
by nitro
RvdH wrote:
2019-06-04 11:57
Forwarding? Settings in that Tab, have literally nothing to do with an Account Reply rule, or what am i missing here?
There is no rule defined for those accounts, I do not know if the forwarding behaves internally as if it were a rule.

That domain and those accounts do not have any other special configuration.

From the moment of the error, more than 1000 emails have already been processed and the error has not been repeated.

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-04 12:25
by RvdH
nitro wrote:
2019-06-04 12:02
There is no rule defined for those accounts, I do not know if the forwarding behaves internally as if it were a rule.
No :!:

Do you use?
RewriteEnvelopeFromWhenForwarding=1

But yes, also here note that only mails to external recipients are dkim signed, if you forward from a local account to local account it never gets signed

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-04 12:37
by nitro
Do not pay attention to me, it's just a blank space in the DKIM chain of dns.

I have reconfigured, this time correctly and the error no longer appears when receiving an email from an external account.

From what I see, it must have been configured for a long time but with the previous versions it did not show an error in the log.

I feel the discomfort, and thanks for your help.

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-04 12:38
by RvdH
Glad you got it resolved :wink:

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-06 09:55
by estradis
Install the latest production and/or beta version from the URL below, then copy and overwrite files in this archive in hmailserver '/bin' directory
https://build.hmailserver.com/repositor ... -B2437.exe
Please check your certificate. It's expired.

Re: Sub OnHELO(oClient) progress?

Posted: 2019-06-06 13:28
by RvdH
It is not mine ;)

Re: Sub OnHELO(oClient) progress?

Posted: 2019-07-08 08:08
by RvdH
Install the latest production and/or beta version from the URL below, then copy and overwrite files in this archive in hmailserver '/bin' directory
https://build.hmailserver.com/repositor ... -B2437.exe
  1. Supports Sub OnHELO(oClient) event, issue #153
  2. Fixed Incorrect DEBUG logging for event 'OnDeliverMessage', issue #181
  3. Include HTMLBody into IMAP TEXT search, pull #193
  4. Fixed implicit conversion: "int" to "unsigned char" pull #204
  5. Faulty: SMTP 'Disconnect client after too many invalid commands' pull issue #160
  6. SMTP server error "550 Unsupported ESMTP extension" on MAIL FROM:... AUTH=<> [with fix] issue #164
  7. Removed warning if backup was more than 1,5GB and 15GB limit. There's no longer a recommended max-size - the time will vary with the installation size. issue #69
  8. Speed up 'update hm_messages set messageflags' issue #221
  9. Treat authenticated users as localsender if the sender is authenticated and AuthUserIsLocal=1 INI setting Office 2016 Bug
  10. Add Return-Path header as topmost header before sending the message to SA (+ delete Return-Path header after the SA check completes) issue #116
  11. Experimental eventhandler OnClientLogon(oClient), New ClientInfo property oClient.Authenticated (Boolean)
  12. Handling of long UIDL response lists was too slow. issue #93
  13. When calling SpamAssassin and there was a connection failure, sometimes temporary files were left behind issue #100
  14. SURBL detection properly fails to detect url's ending with a query string issue #108
  15. If a route is set up, but the recipient does not match an address in the route address list, the domain catch-all should be used if specified. issue #74
  16. Fix ExternalFetcher DELE when no RETR, pull pull #254
  17. SMTP multiply max message size with 1024 issue #267
  18. Add email address variable to SignatureAdder.cpp pull #265
  19. DKIM on acccount-rule 'reply' not applied #172 issue #172
  20. preserve RewriteEnvelopeFromWhenForwarding setting when forwarding from account rule
  21. The logical flow should be to disregard "Require SMTP authentication" if "Allow deliveries from" is unselected issue #287
+ OpenSSL 1.0.2s (released may 28, 2019)

https://d-fault.nl/files/5.6.8-B2437.21 ... _1.0.2s.7z

Re: Sub OnHELO(oClient) progress?

Posted: 2019-07-08 10:28
by nitro
I'll update to see how it works, so I see it's a minor update. Thanks for your job.

Re: Sub OnHELO(oClient) progress?

Posted: 2019-07-08 13:18
by mattg
Thanks from me too
Already installed and in use

Re: Sub OnHELO(oClient) progress?

Posted: 2019-07-08 17:17
by ras07
Installed and using, no problems so far - thanks!

Re: Sub OnHELO(oClient) progress?

Posted: 2019-12-23 23:04
by ras07
Is 5.6.8-B2437.21 still the latest?

Is OnHelo in the current main beta yet? (build 2494)

Re: Sub OnHELO(oClient) progress?

Posted: 2019-12-24 00:30
by mattg
no sorry, although OnHelo is in the 5.7 Alpha

I've been using it for months
https://build.hmailserver.com/ (use your forum login details)
Check in artifacts for 5.7 and you will see the latest .exe

Re: Sub OnHELO(oClient) progress?

Posted: 2019-12-24 01:36
by ras07
Not yet comfortable running the alpha in production (I do accept the risk of running the beta (specifically RvDH's builds) in production).

Is there a later RvDH build that's recommended?

Re: Sub OnHELO(oClient) progress?

Posted: 2019-12-24 01:40
by SorenR
ras07 wrote:
2019-12-23 23:04
Is 5.6.8-B2437.21 still the latest?

Is OnHelo in the current main beta yet? (build 2494)
5.6.8-B2489.22
Last extra commit (INI setting) is to overrule 'Host name' set in SMTP settings as domain part of the NDR address, which in real world scenarios would be the PTR DNS records of you IP address. This can be usefull in cases where, for example if your PTR is assigned by your ISP and you have no control over it. Or you simply like another domain to be used as NDR address

You can set the 'DaemonAddressDomain' in the INI under [Settings]

[Settings]
DaemonAddressDomain=example.com
the resulting NDR address will become mailer-daemon@example.com

Re: Sub OnHELO(oClient) progress?

Posted: 2019-12-24 01:42
by palinka
The only issue I've run across is the autoban score changed from 20 to 100, and when I upgraded I was not informed about it and my other IP Range priorities remained the same. Therefore, autoban took priority over my other ranges and that screwed me up until I figured it out. Easy fix - you just need to be aware.

Otherwise, its been milk and honey since installing a few months ago.

Re: Sub OnHELO(oClient) progress?

Posted: 2020-03-10 12:48
by RvdH
  1. Supports Sub OnHELO(oClient) event, issue #153
  2. Fixed Incorrect DEBUG logging for event 'OnDeliverMessage', issue #181
  3. Include HTMLBody into IMAP TEXT search, pull #193
  4. Fixed implicit conversion: "int" to "unsigned char" pull #204
  5. Faulty: SMTP 'Disconnect client after too many invalid commands' pull issue #160
  6. SMTP server error "550 Unsupported ESMTP extension" on MAIL FROM:... AUTH=<> [with fix] issue #164
  7. Removed warning if backup was more than 1,5GB and 15GB limit. There's no longer a recommended max-size - the time will vary with the installation size. issue #69
  8. Speed up 'update hm_messages set messageflags' issue #221
  9. Treat authenticated users as localsender if the sender is authenticated and AuthUserIsLocal=1 INI setting Office 2016 Bug
  10. Add Return-Path header as topmost header before sending the message to SA (+ delete Return-Path header after the SA check completes) issue #116
  11. Experimental eventhandler OnClientLogon(oClient), New ClientInfo property oClient.Authenticated (Boolean)
  12. Handling of long UIDL response lists was too slow. issue #93
  13. When calling SpamAssassin and there was a connection failure, sometimes temporary files were left behind issue #100
  14. SURBL detection properly fails to detect url's ending with a query string issue #108
  15. If a route is set up, but the recipient does not match an address in the route address list, the domain catch-all should be used if specified. issue #74
  16. Fix ExternalFetcher DELE when no RETR, pull pull #254
  17. SMTP multiply max message size with 1024 issue #267
  18. Add email address variable to SignatureAdder.cpp pull #265
  19. DKIM on acccount-rule 'reply' not applied #172 issue #172
  20. preserve RewriteEnvelopeFromWhenForwarding setting when forwarding from account rule
  21. The logical flow should be to disregard "Require SMTP authentication" if "Allow deliveries from" is unselected issue #287
  22. Add ability to DKIM sign NDR messages (forwarded to external) pull #301
  23. Use custom daemonaddressdomain from INI pull #301
  24. Fix SURBL regex pull #320
  25. Add RMSPF library SpamTestSPF Result to DEBUG logging, see this forum topic
5.6.8-B2494.25.7z

Re: Sub OnHELO(oClient) progress?

Posted: 2020-03-10 13:47
by nitro
I just updated my server. It seems to work correctly. Thanks for your work. :D

Re: Sub OnHELO(oClient) progress?

Posted: 2020-03-10 15:14
by mattg
RvdH wrote:
2020-03-10 12:48
  • Add RMSPF library SpamTestSPF Result to DEBUG logging, see this forum topic
Did this one make it into the 5.7 version that you built a couple of days ago? I've been running that build since about an hour after it hatched. excellent so far (as usual)
nitro wrote:
2020-03-10 13:47
Thanks for your work. :D
Yes indeed.

Re: Sub OnHELO(oClient) progress?

Posted: 2020-03-10 15:18
by RvdH
mattg wrote:
2020-03-10 15:14
RvdH wrote:
2020-03-10 12:48
  • Add RMSPF library SpamTestSPF Result to DEBUG logging, see this forum topic
Did this one make it into the 5.7 version that you built a couple of days ago? I've been running that build since about an hour after it hatched. excellent so far (as usual)
Nope, but i can make u pull request for it if the majority thinks this is useful
[edit] already made a pull request for it to be included in 5.7.x

Re: Sub OnHELO(oClient) progress?

Posted: 2020-05-14 12:22
by RvdH
Latest is 5.6.8-B2505.26
Just install the latest production and/or beta artifact from the URL below, then copy and overwrite files in this archive in hmailserver '/bin' directory
https://build.hmailserver.com/viewLog.h ... =artifacts (login as guest)
  1. Supports Sub OnHELO(oClient) event, issue #153
  2. Fixed Incorrect DEBUG logging for event 'OnDeliverMessage', issue #181
  3. Include HTMLBody into IMAP TEXT search, pull #193
  4. Fixed implicit conversion: "int" to "unsigned char" pull #204
  5. Faulty: SMTP 'Disconnect client after too many invalid commands' pull issue #160
  6. SMTP server error "550 Unsupported ESMTP extension" on MAIL FROM:... AUTH=<> [with fix] issue #164
  7. Removed warning if backup was more than 1,5GB and 15GB limit. There's no longer a recommended max-size - the time will vary with the installation size. issue #69
  8. Speed up 'update hm_messages set messageflags' issue #221
  9. Treat authenticated users as localsender if the sender is authenticated and AuthUserIsLocal=1 INI setting Office 2016/2019 Bug
  10. Add Return-Path header as topmost header before sending the message to SA (+ delete Return-Path header after the SA check completes) issue #116
  11. Experimental eventhandler OnClientLogon(oClient), New ClientInfo property oClient.Authenticated (Boolean)
  12. Handling of long UIDL response lists was too slow. issue #93
  13. When calling SpamAssassin and there was a connection failure, sometimes temporary files were left behind issue #100
  14. SURBL detection properly fails to detect url's ending with a query string issue #108
  15. If a route is set up, but the recipient does not match an address in the route address list, the domain catch-all should be used if specified. issue #74
  16. Fix ExternalFetcher DELE when no RETR, pull pull #254
  17. SMTP multiply max message size with 1024 issue #267
  18. Add email address variable to SignatureAdder.cpp pull #265
  19. DKIM on acccount-rule 'reply' not applied #172 issue #172
  20. preserve RewriteEnvelopeFromWhenForwarding setting when forwarding from account rule
  21. The logical flow should be to disregard "Require SMTP authentication" if "Allow deliveries from" is unselected issue #287
  22. Add ability to DKIM sign NDR messages (forwarded to external) pull #301
  23. Use custom daemonaddressdomain from INI pull #301
  24. Fix SURBL regex pull #320
  25. Add RMSPF library SpamTestSPF Result to DEBUG logging, see this forum topic
  26. Ignore SpamTestSPF and SpamTestHeloHost when send thru local IP Address, see this forum topic
https://d-fault.nl/files/hMailServer-Bu ... 2505.26.7z

Re: Sub OnHELO(oClient) progress?

Posted: 2020-05-14 13:39
by SorenR
I've built my copy with the full RMSPF 1.12 - your version is using a subset of RMSPF 1.10 altered by Martin.

RMSPF 1.12 actually have this change already :mrgreen:

Re: Sub OnHELO(oClient) progress?

Posted: 2020-05-14 14:44
by RvdH
SorenR wrote:
2020-05-14 13:39
I've built my copy with the full RMSPF 1.12 - your version is using a subset of RMSPF 1.10 altered by Martin.

RMSPF 1.12 actually have this change already :mrgreen:
1.10 has that originally in it as well, but it seems martin removed this deliberately, see pull #323

Full? I hope you are aware hMailServer SPF check only uses 1/2 from the RMSPF lib? (eg: it only check the From address, no SPF HELO checks etc are executed)

What other 'benefits' has using 1.12 over 1.10? Does it change something in this behaviour? I never get a explanation returned, it just displays as "Rejected by SPF ()" but as far as i understand it it should return some explanation or reason between the left parenthesis and right parenthesis

Re: Sub OnHELO(oClient) progress?

Posted: 2020-05-14 14:58
by SorenR
RvdH wrote:
2020-05-14 14:44
SorenR wrote:
2020-05-14 13:39
I've built my copy with the full RMSPF 1.12 - your version is using a subset of RMSPF 1.10 altered by Martin.

RMSPF 1.12 actually have this change already :mrgreen:
1.10 has that originally in it as well, but it seems martin removed this deliberately, see pull #323

Full? I hope you are aware hMailServer SPF check only uses 1/2 from the RMSPF lib? (eg: it only check the From address, no SPF HELO checks etc are executed)

What other 'benefits' has using 1.12 over 1.10? Does it change something in this behaviour? I never get a explanation returned, it just displays as "Rejected by SPF ()" but as far as i understand it it should return some explanation or reason between the left parenthesis and right parenthesis
Good question... I haven't got the foggiest ;-)

If I set SPF check active with a score of 0 ... Does it still check SPF?
I guess I have to enable debug to see...

One thing I was toying with but never managed to get sorted was to print (debug) into Eventlog from RMSPF.cpp. Seems that calling c++ from c is not that easy.

Re: Sub OnHELO(oClient) progress?

Posted: 2020-05-15 02:42
by mattg
I would hope that with the full set we could get a different response (other than pass) for open SPF records (ends in -all), and for softfail addresses (~all)

That hMailserver passes these outright is a failing in my view.

Re: Sub OnHELO(oClient) progress?

Posted: 2020-05-15 11:33
by RvdH
SorenR wrote:
2020-05-14 14:58
One thing I was toying with but never managed to get sorted was to print (debug) into Eventlog from RMSPF.cpp. Seems that calling c++ from c is not that easy.
I believe, that is exactly what the https://github.com/hmailserver/hmailserver/pull/322 &explain, sExplanation params should return back after the SPF check, but this return value seems broken i never ever seen the sfp check return anything other then Rejected by SPF ()

Re: Sub OnHELO(oClient) progress?

Posted: 2020-05-15 15:31
by SorenR
RvdH wrote:
2020-05-15 11:33
SorenR wrote:
2020-05-14 14:58
One thing I was toying with but never managed to get sorted was to print (debug) into Eventlog from RMSPF.cpp. Seems that calling c++ from c is not that easy.
I believe, that is exactly what the https://github.com/hmailserver/hmailserver/pull/322 &explain, sExplanation params should return back after the SPF check, but this return value seems broken i never ever seen the sfp check return anything other then Rejected by SPF ()

Code: Select all

"DEBUG"	3832	"2020-05-15 15:26:58.769"	"Spam test: SpamTestDNSBlackLists, Score: 0"
"DEBUG"	3832	"2020-05-15 15:26:59.065"	"Spam test: SpamTestSPF, Result: Pass"
"DEBUG"	3832	"2020-05-15 15:26:59.065"	"Spam test: SpamTestSPF, Score: 0"
"DEBUG"	3832	"2020-05-15 15:26:59.065"	"Total spam score: 0"
I've edited SPF.cpp since it seems that sExplanation is not used anywhere in the code (solution)...

Code: Select all

      const char* explain;
      int result=SPFQuery(family,BinaryIP,T2A(sSenderEmail),NULL,NULL,NULL,&explain);

      if (explain != NULL)
      {
         sExplanation = explain;
		 SPFFree(explain);
		 LOG_DEBUG(Formatter::Format("Spam test: SpamTestSPF, Explanation: {0}", sExplanation));
	  }

      LOG_DEBUG(Formatter::Format("Spam test: SpamTestSPF, Result: {0}", EnumToString(result)));
So... Now I'm waiting :mrgreen:

Re: Sub OnHELO(oClient) progress?

Posted: 2020-05-18 15:28
by SorenR
RvdH wrote:
2020-05-15 11:33
SorenR wrote:
2020-05-14 14:58
One thing I was toying with but never managed to get sorted was to print (debug) into Eventlog from RMSPF.cpp. Seems that calling c++ from c is not that easy.
I believe, that is exactly what the https://github.com/hmailserver/hmailserver/pull/322 &explain, sExplanation params should return back after the SPF check, but this return value seems broken i never ever seen the sfp check return anything other then Rejected by SPF ()
I believe this will tell the full story ;-)

Code: Select all

; example.com fragment
$ORIGIN example.com.
....
; domain SPF record
example.com. IN  TXT "v=spf1 mx -all exp=getlost.example.com"
....

; the getlost TXT record
getlost      IN  TXT "Not allowed to send mail for domain"
sExplanation should contain "Not allowed to send mail for domain".

I don't think the option "exp=<domain>" is used that often ;-)

Re: Sub OnHELO(oClient) progress?

Posted: 2020-05-18 15:42
by RvdH
Ah, OK... that explains why i could not get that to return anything :lol:

Re: Sub OnHELO(oClient) progress?

Posted: 2020-05-18 16:09
by SorenR
RvdH wrote:
2020-05-18 15:42
Ah, OK... that explains why i could not get that to return anything :lol:
Found it here... https://www.zytrax.com/books/dns/ch9/spf.html