Search found 24 matches

by mats
2019-01-12 16:25
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

Const sAdminPassword = "<ADMINISTRATORPASSWORD>" The included backup script in Hmailserver. Just add a msgbox sAdminPassword and you are done,. That is the current security level. That is exactly why i said with password stored in a CONST you could, but then again simply do not do that! So why don'...
by mats
2019-01-05 18:04
Forum: Development & alpha discussions
Topic: New hMailServer x 64 MSI Installer
Replies: 26
Views: 5494

Re: New hMailServer x 64 MSI Installer

I know it's more work but I would like to suggest an alternative to sockets. belive an rest based admin webservice would be even better. Just about any language can talk to a webservice. It's also a protocol that can be proxied and further secured with extra auth layers if you want too. Just my 2c A...
by mats
2019-01-05 17:59
Forum: Feature requests
Topic: LUA-Scripting integration
Replies: 2
Views: 1032

Re: LUA-Scripting integration

For some strange reason I do prefer powershell.
The core edition is open source under MIT licensing
by mats
2019-01-05 17:44
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

Why not use vbsedit to convert vbs to an exe file ... Now that is an interesting thought From HELP file... Convert Into Executable VbsEdit lets you convert your scripts into standalone applications. Unlike the older versions of VbsEdit, the script will now be executed directly within the executable...
by mats
2019-01-05 17:42
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

With the password in script all the attacker needs is notepad or cmd ....... Don't they also need access to your file system? Yes, but a compromised serviceaccount will have that. If running as system you own the file system. If you are running as user it's a little better but still, the serviceacc...
by mats
2019-01-05 13:51
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

it's simple to do a msgbox of the password when it is stored in cleartext in the script, I don't believe we have to discuss that further Please show me how, i could not do it....and i doubt you can do it either, Sure, if you stored the password in a CONST you could, but then again simply do not do ...
by mats
2019-01-04 23:06
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

There are currently three public functions GenerateSalt (string) It will accept an empty string EQ use no salt The string User will make it use a Salt based on the user sid The string Static will make it use a static salt encoded in the DLL Any other string will be used as the salt encode(password, ...
by mats
2019-01-04 22:22
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

Simply to prevent someone from doing msgbox "here is the secret password" and that's the part where I'm going to bluntly steal some code ;) And how exactly does your solution prevent the msgbox "here is the secret password" example you referred to yourself earlier? (Not saying MsgBox "here is the s...
by mats
2018-12-30 22:23
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

Making more progress. Been playing around with com objects and passing and returning an object as a parameter to a com object. The nice thing is that we can call objects byref IE we can modify the object externally and continue to use it after that. That makes it possible to do an external auth func...
by mats
2018-12-29 17:19
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

Did a little democode in VB.net to test the API. Found out that I don't even have to call the API. There is a Dotnet class for it - Protecteddata. That made it really simple, just three lines of code to encrypt the data and store it to file Sub encode(indata As String) Dim clearTextbytes() As Byte =...
by mats
2018-12-28 21:18
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

It was indeed. After thinking things through a few times I probably will have to do more in compiled code than I really would like to. Simply to prevent someone from doing msgbox "here is the secret password" and that's the part where I'm going to bluntly steal some code ;) The other part about stor...
by mats
2018-12-27 12:31
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

You mean like this: https://www.hmailserver.com/forum/viewtopic.php?f=20&t=31874 I started using this as a banning solution and ended up adapting it to use it as an auth function for multiple things interop based. The source is there, so you can adapt it to whatever you need. One way of solving the...
by mats
2018-12-26 20:29
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

The trick is to find a reasonably safe and user friendly solution :) I have now changed the service account for Hmailserver from System to a dedicated account (network service would work too). It has read on the Hmailserver folder structure and modify on the data substructure as described in https:/...
by mats
2018-12-26 18:37
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

Done since long.
Next step moving Hmailserver away from running as system
by mats
2018-12-26 14:46
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

One way of solving the password problem is to store the PW in an external file. That file should then be encrypted with EFS (you must be logged on as the account that is running the Hmailserver service to do this). Cons: An external file reference. You need a windows version with EFS Pro:s Crypto ke...
by mats
2018-12-25 16:19
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

My server is rather low loaded so it should be rather safe i hope :) However I found a "feature" aka BUG the current code seems to be comparing the percentage values as strings meaning that 20 is smaller than 5. quick fix PercentageReject = cint("5") PercentageWarn = cint("2") PercentageInform = cin...
by mats
2018-12-23 18:17
Forum: User-submitted tutorials
Topic: Harddrive, Folder and Database encryption for hMailServer
Replies: 9
Views: 2239

Re: Harddrive, Folder and Database encryption for hMailServer

Just to clarify. Win 8 and above will store a bitlocker key in onedrive if you log on with an MS account during installation. If you choose a local account it won't (it won't default arm bitlocker either). IF the box is joined to an AD domain it's controllable by GPO If you just would like to encryp...
by mats
2018-12-22 22:32
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

updated. Missed one parameter Sub OnClientConnect(oClient) 'Variables ClientIp = oClient.IpAddress 'Connecting remote IP address WhiteList = "127.0.0.1,172.16.1.1-172.16.255.255,1.2.3.4" 'Variable array for whitelisted IP addresses to exclude, localhost, maybe your servers IP address, your WebClient...
by mats
2018-12-22 21:02
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

My variant, added support for whitelisting IP ranges Sub OnClientConnect(oClient) 'Variables ClientIp = oClient.IpAddress 'Connecting remote IP address WhiteList = "127.0.0.1,172.16.1.1-172.16.255.255,1.2.3.4" 'Variable array for whitelisted IP addresses to exclude, localhost, maybe your servers IP ...
by mats
2018-12-22 17:00
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

Thanks.
I have activated that and made my own variant of the AbuseIPDB script to blacklist all that i can.
by mats
2018-12-20 21:48
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

Seems to be 25 only.

I have 5.6.6 installed.
Does DisableAUTHList work with that?
Found an older thread that indicated that a special build was required
by mats
2018-12-19 20:53
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Re: Can i do an autban script based on this?

I see two repeating patterns on my mailserver of spammers trying to use on of my domains. They try to send a Mail and when they get a PW request they quit the connection. "SMTPD" 2316 1668 "2018-12-18 18:34:56.751" "190.236.239.220" "SENT: 530 SMTP authentication is required." "DEBUG" 2316 "2018-12...
by mats
2018-12-18 20:39
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4658

Can i do an autban script based on this?

I see two repeating patterns on my mailserver of spammers trying to use on of my domains. They try to send a Mail and when they get a PW request they quit the connection. "SMTPD" 2316 1668 "2018-12-18 18:34:56.751" "190.236.239.220" "SENT: 530 SMTP authentication is required." "DEBUG" 2316 "2018-12-...
by mats
2018-05-06 22:46
Forum: User-submitted tutorials
Topic: Step by step LetsEncrypt WinSimple
Replies: 45
Views: 20398

Re: Step by step LetsEncrypt WinSimple

This is my way of having letsencrypt.exe handle cert updates and restarting hmailserver when needed. letsencrypt calls a smple script i created (importhmailserver.cmd) with {0} {2} as parameters (ie the domain name and the pfx path) powershell.exe c:\letsencrypt\scripts\importhmailserver.ps1 %1 %2 %...