Search found 84 matches

by insomniac2k2
2019-06-05 17:25
Forum: User contributed hMailServer 5 scripts
Topic: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.
Replies: 11
Views: 1148

Re: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.

NVM. Brain fart: Installation Prerequisites: Windows 98 / Windows NT 4.0 / Windows 2000 / Windows XP / Windows Server 2003 TCP/IP Installing the Product To install the product, copy SScrRun.dll to a directory of your choice and execute the command "RegSvr32.exe SScrRun.dll". If the system is running...
by insomniac2k2
2019-06-05 16:47
Forum: User contributed hMailServer 5 scripts
Topic: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.
Replies: 11
Views: 1148

Re: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.

My bad. I should have posted that there is a dependency on the lookup. You should be able to install that on everything up to windows 2019. I have it installed on all my servers. You should also be able to test your database with DBBan.exe as well. As the lookup is only a function that calls dbban t...
by insomniac2k2
2019-06-04 21:47
Forum: User contributed hMailServer 5 scripts
Topic: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.
Replies: 11
Views: 1148

Re: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.

I'm curious of what your errors are. Maybe i caused them by sanitized the source code before sharing it. I'm sure there is an easy fix in there somewhere.
fjansen04 wrote:
2019-06-04 19:45
I don't think I will get this to work, I get lots of errors.

Thanks anyhow.
by insomniac2k2
2019-06-04 03:48
Forum: User contributed hMailServer 5 scripts
Topic: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.
Replies: 11
Views: 1148

Re: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.

I traced my download link, and its still live. Give this link a go:
https://dev.mysql.com/downloads/file/?id=484706

When i get a little time, i'll see if i do anything such as enabling backwards compatibility.
by insomniac2k2
2019-06-04 03:27
Forum: User contributed hMailServer 5 scripts
Topic: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.
Replies: 11
Views: 1148

Re: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.

That's an interesting and short sided dependency. Let me dig a little to see if I can come up with. Doesn't the site offer previous version downloads?
fjansen04 wrote:
2019-06-03 15:14
DBBAN.EXE fails with an IO error because the available connector is version 8.0.16, version 8.0.15 is not available anymore.
by insomniac2k2
2019-06-02 17:37
Forum: User contributed hMailServer 5 scripts
Topic: Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.
Replies: 11
Views: 1148

Utility to create and maintain a central MySQL based banlist and whitelist for multiple servers.

Below is v2 of my working central MySQL based whitelist and banlisting utility. It's a small executable which is called from your EventHandlers.vbs. It's entire function is the following: Create, delete, or verify a banlist entry Create, delete, or verify a whitelist entry The utility itself is desi...
by insomniac2k2
2019-06-02 15:27
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

Thank you for your contribution. I will update my servers as soon as i get a few free minutes :) 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/repository/download/HMail...
by insomniac2k2
2019-04-29 15:28
Forum: General discussions
Topic: fake "mail from"
Replies: 27
Views: 4709

Re: fake "mail from"

So that's exactly it. No one is logging in.This is pure relay and it handles both directions at the moment. I am able to keep the rest of the world from using the relay to send to others. The snag I ran into was that the outside world was able to bypass built in rules when sending as an internal use...
by insomniac2k2
2019-04-29 01:52
Forum: General discussions
Topic: fake "mail from"
Replies: 27
Views: 4709

Re: fake "mail from"

Nope. For my configuration, I accept mail from the outside and relay it into an internal server. I also accept email from the inside and route it according to scripted rules based on certain criteria. Needless to say, it's far from a common configuration. I just posted the scripting logic for others...
by insomniac2k2
2019-04-28 17:41
Forum: General discussions
Topic: fake "mail from"
Replies: 27
Views: 4709

Re: fake "mail from"

After posting the above, i decided that it was a bit inefficient. I switched the code to allow both individual ip's and ranges, and removed the verify against the whitelist entirely, by simply exiting out if an internal range or IP is present: Sub OnSMTPData(oClient, oMessage) ClientIp = oClient.IpA...
by insomniac2k2
2019-04-28 06:29
Forum: General discussions
Topic: fake "mail from"
Replies: 27
Views: 4709

Re: fake "mail from"

Figured that I should share my script for this here. My criteria is that I use Hmail as a relay for both internal and external. From what I have seen so far, hmail is kind of an all or none for this scenario. I needed to devise a way to treat internal domains as Local when coming from an approved IP...
by insomniac2k2
2019-04-25 02:32
Forum: General discussions
Topic: Server is being attacked
Replies: 10
Views: 1502

Re: Server is being attacked

I'm curious what that looks like? The reason why I ask, is because I have just completed a complete and working implementation of a central MYSQL based banning and auto-whitelisting system that I call from Hmail. Being that it's in MySQL, I'm adding more and more fields which can be used for auto re...
by insomniac2k2
2019-04-25 02:13
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

Should I assume that this is your most recent build (obvious question, i know..) RvdH? I am god awful at source management. As i only code for hobby, but i have been considering hacking away at some changes that I've been wanting to make for quite some time. I believe your version is a good place to...
by insomniac2k2
2019-04-24 20:18
Forum: General discussions
Topic: Server is being attacked
Replies: 10
Views: 1502

Re: Server is being attacked

I get 2300 banned IP's a day on my servers ;) I would normally but this server isn't running an SSL. And let me add that SSL will NOT stop these hacking attempts I can definitely confirm that! As part of our defense strategy, we reduced the number of allowed errors to 1, so each failed login starts ...
by insomniac2k2
2019-04-24 20:15
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

I'm just glad your still here with us :)
RvdH wrote:
2019-04-24 11:01
Downloads should be fixed, sorry i didn't even noticed something was wrong until you guys here made me aware of this
by insomniac2k2
2019-04-23 19:01
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

This is a bit off topic, and not necessarily in an appropriate thread, but he was participating here all the same. Has there been a falling out with RvdH? The reason I ask, is because I appreciated his contributions and looked forward to his builds which included this Sub. As of recent, all download...
by insomniac2k2
2019-04-10 00:01
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

Same. Broken links for multiple downloads. Would love it if you could share your latest build when you find the time to fix it. :)
by insomniac2k2
2019-01-05 19:51
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4885

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

I just want you to know that you are not alone mats. I completely share your mentality on this topic. Hence why i started down that path. Albeit my solution was not quite as good as yours, from what it seems :) it's simple to do a msgbox of the password when it is stored in cleartext in the script, ...
by insomniac2k2
2019-01-05 00:06
Forum: General discussions
Topic: Am I paying AWS to let people try and hack my server?
Replies: 10
Views: 1338

Re: Am I paying AWS to let people try and hack my server?

I have found that "shoot first, ask questions later" is not good with banning. A huge "banning list" on a small server really kills performance. I definitely did experience this in the end by using Hmailserver bans. Although, now that I switched bans to my firewall, my servers are screaming fast an...
by insomniac2k2
2019-01-04 03:16
Forum: General discussions
Topic: Which antivirus to use?
Replies: 15
Views: 2277

Re: Which antivirus to use?

Well at least you now have a working antivirus solution instead of just a memory hog. ClamAV alone is just bad! :) Btw, thanks for the sanesecurity hint... I wasn't aware of those definitions. :shock: Now I obviously have no other choice to add those to ClamAV as well :cry: :lol: ... So my ClamAV me...
by insomniac2k2
2019-01-04 02:30
Forum: General discussions
Topic: Am I paying AWS to let people try and hack my server?
Replies: 10
Views: 1338

Re: Am I paying AWS to let people try and hack my server?

I used to have 40000 per serveruntil I purged them and moved bans to to windows firewall. While hmail seemed OK with this many bans, the client did not like to enumerate and crashed a lot towards the end. Banning at the server level drastically reduced the load and traffic on hmail.
by insomniac2k2
2019-01-03 18:18
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4885

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

Quite cool. I'm watching this with much curiosity :) 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 tha...
by insomniac2k2
2019-01-03 17:41
Forum: General discussions
Topic: Am I paying AWS to let people try and hack my server?
Replies: 10
Views: 1338

Re: Am I paying AWS to let people try and hack my server?

I highly recommend using SorenR's showshoe logic with windows firewall ban scripting. I have at least 50,000 bans from this alone. Here is a snippet of the code that I use on my servers (Not all my code. Many deserve credit.): Note that you will need to have a version of Hmailserver that supports On...
by insomniac2k2
2018-12-27 15:46
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4885

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

Oh ok. I misunderstood what you were trying to accomplish. Glad it was of some help though. 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 b...
by insomniac2k2
2018-12-27 02:41
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4885

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 insomniac2k2
2018-12-24 02:12
Forum: Scripting
Topic: Can i do an autban script based on this?
Replies: 43
Views: 4885

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

Just a heads up. I check AbuseIPDB as well, and it has either temp banned my IP address for hammering or has been down for reasonably long periods of time. In either case, it you have a busy server like I do, the byproduct is that mail will slow to a trickle and get backed up. You basically end up w...
by insomniac2k2
2018-12-17 01:55
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

Thanks for sharing this code. Some day in the future I plan on doing quite a bit with some custom whitelisting, as well as doing stuff quite similar to what you are doing with this IDS code. I love the thought of a central database database, as I run about 10 hmail based servers as hardened relays. ...
by insomniac2k2
2018-12-16 17:08
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

While the rolling ban rule logic that I posted above works fine, I have really busy servers. I've found that I can have up to 10 redundant attempts to create a new rule at a time. Fortunately only one can be created by using my logic, but it causes a bit of hammering. I decided to break out the fire...
by insomniac2k2
2018-12-10 22:29
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

Go 2019. :) 1000 bans per list! I say that, because for me it's really easy. I use hmailserver as a hardened relay. I'd hate to have to migrate to a more updated server.. There is a way to control your Firewall witn VBScript (Windows 7 and up) using the COM API of Windows Firewall with Advanced Secu...
by insomniac2k2
2018-12-10 04:52
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

I figured I should post a little logic that I added for the ban rule. I'm running windows 2012R2 presently, and it seems like the ban list is limited to 1000 entries. On a busy day, I can fill 1. In order to mitigate this and also mitigate running out of ban space, use the scripting below to copy yo...
by insomniac2k2
2018-12-05 20:28
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

Thanks for your contribution Nitro. I've done Windows firewall bans from script before, but im giving this a try again. I really like the prospect to reducing bans on Hmail and putting the load on Windows better. In my case, I have near 80,000 bans in Hmail. I've kind of been watching it like a scie...
by insomniac2k2
2018-10-01 03:23
Forum: Feature requests
Topic: Malware - Delete mail or attachment
Replies: 19
Views: 6944

Re: Malware - Delete mail or attachment

This is not directly answering your inquiry, but it I figured that I would share how I am configured. I am very happy with my results. I use Spamassassin to call ClamAV + sanesecurity. As others have stated, ClamAV is completely useless. But when you add sanesecurity, you end up with quite an amazin...
by insomniac2k2
2018-09-28 16:08
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

viewtopic.php?f=20&t=32739&p=206184#p206167
RvdH wrote:
2018-09-27 15:28
mattg wrote:
2018-09-27 10:48
Did you create that disconnect.exe?
Yeah, i posted the code for it earlier in the other topic as a replacement for cports...can't find the specific topic though :shock:
by insomniac2k2
2018-08-29 14:05
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

Just an update of testing this script with autoban and cports. I am seeing a drastic reduction of spam that is hitting my users junk email folder. I originally started using this at 40%. I have since adjusted it to 25%. I'm now considering around 15%. Before I do so, I'll do another spot check on an...
by insomniac2k2
2018-08-29 04:33
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

I have this problem across 4 independent installations. Definitely more often now than before. My biggest issues is having remote servers keeping sessions open. I imagine if i get cports working, this issue would Well, how big a issue is that actually? The connection will time-out sooner or later......
by insomniac2k2
2018-08-29 04:18
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

Thanks for being my google :) I did actually get cports to work by applying SorenR's suggestion, but I do like this and will give it a try a bit later next week. In that case... 10kb :wink: Source: stackoverflow.com using System; using System.Collections; using System.Runtime.InteropServices; namesp...
by insomniac2k2
2018-08-29 04:16
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

More like hundreds. And while I understand that this should not be a problem with locking hmailserver threads, it seems to be very common in my installation. I know that as soon as i see a bunch of banned IPs that match up to what is presently connected to my server, i can count oh Hmailserver slowl...
by insomniac2k2
2018-08-28 22:39
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

It's been a real issue several times in the recent past. Even after modifying the allowed amount of threads on the server, I have had hmail stop passing emails due to every thread being used/reserved. Once forcefully releasing these sessions, mail resumes immediately. I should note that I have very ...
by insomniac2k2
2018-08-28 18:54
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

I'll give that a try. Running as admin makes sense. I've been worried about the ban list getting a little heavy but have not seen performance issues yet. My biggest issues is having remote servers keeping sessions open. I imagine if i get cports working, this issue would become moot. Thanks for the ...
by insomniac2k2
2018-08-28 17:27
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

I have banned near 3000 ip addresses in 24 hours using this. I am doing spot lookups on these IP addresses and so far, they are definitely IP addresses that need to be banned! Hey SorenR, I take it that you are on an older OS. Have you had any issues using cports to close connections? I cant seem to...
by insomniac2k2
2018-08-26 16:28
Forum: User contributed hMailServer 5 scripts
Topic: Check incoming connections with AbuseIPDB
Replies: 43
Views: 10338

Re: Check incoming connections with AbuseIPDB

I'm actually surprised that this script has not seen more interest. With something like this combined to an autoban or even better, firewall ban inclusion, some wonderful things could happen. For example: Using Sorren's AutoBan logic and Cports, you would reject, ban the ip address, and forcefully c...
by insomniac2k2
2018-02-22 19:20
Forum: User contributed hMailServer 5 scripts
Topic: Add timeout to script function?
Replies: 5
Views: 1698

Re: Add timeout to script function?

Thanks. I'll poke around elsewhere then. 1000ms is definitely fine.
RvdH wrote:I believe the Resolver in the component uses a timeout of 1000 milliseconds (3 retries)
This is not adjustable
by insomniac2k2
2018-02-22 16:57
Forum: User contributed hMailServer 5 scripts
Topic: Add timeout to script function?
Replies: 5
Views: 1698

Re: Add timeout to script function?

Interesting. What is the default timeout? Because presently, I have a pretty busy server. It's not unusual to have most all threads open at the same time. Is it adjustable by ini?
by insomniac2k2
2018-02-21 19:17
Forum: User contributed hMailServer 5 scripts
Topic: Add timeout to script function?
Replies: 5
Views: 1698

Add timeout to script function?

I've ran into an issue several times where i will have a bunch of open sessions which are waiting for various lookup sites to reply. These open sessions eventually cause a thread lock on the hmail server. In order to prevent this, i've come to the conclusion that I need to add some sort of timeout i...
by insomniac2k2
2017-12-06 17:51
Forum: User contributed hMailServer 5 scripts
Topic: Ban IP address on Hmail with Password proxy
Replies: 33
Views: 7943

Re: Ban IP address on Hmail with Password proxy

Porcupine added some great and necessary changes and was nice enough to share. Attached his his version oh Program.cs. Just overwrite the original program.cs file with this one. They are all great changes. Using the interop's event writer was much smarter than my hackery. :) Copy Paste of changes: "...
by insomniac2k2
2017-11-23 04:04
Forum: Off-topic discussions
Topic: IMAP "attack" by a very slow bot-net
Replies: 59
Views: 14707

Re: IMAP "attack" by a very slow bot-net

My appologies. I should have been a bit more specific. I was referring to RvDH's resolver helper that is posted some posts above. I believe its still necessary in order to call hostkharma and nerds auth list.(at least that's how i'm presently configured). I was thinking that it would be a great inte...
by insomniac2k2
2017-11-22 20:19
Forum: Off-topic discussions
Topic: IMAP "attack" by a very slow bot-net
Replies: 59
Views: 14707

Re: IMAP "attack" by a very slow bot-net

That wouldn't work for me. I don't use any hmail scoring presently. I just use spamassassin and CLAMAV scoring. While the lists are live, the incremental changes are insignificant. I'm willing to play the odds that some random IP wont connect to my servers and try to authenticate an hour before my n...
by insomniac2k2
2017-11-21 21:52
Forum: Off-topic discussions
Topic: IMAP "attack" by a very slow bot-net
Replies: 59
Views: 14707

Re: IMAP "attack" by a very slow bot-net

I pondered on whether or not i should start a new thread on this topic, but this discussion seems more appropriate. So here is my question and thoughts: I presently use spamrats and hostkharma lookups to block auth hackers. While it works great, I find that the lookups are pretty slow for busy serve...
by insomniac2k2
2017-11-17 18:21
Forum: Off-topic discussions
Topic: Test
Replies: 2
Views: 1752

Re: Test

icle
by insomniac2k2
2017-11-14 06:27
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

Gotcha. I see that I pretty much have the same configuration as you do. From what you posted, you are using this? https://wiki.apache.org/spamassassin/ClamAVMultipleScores If so, you have my exact same configuration. I score virus as 50 and malware of 10. Anything over 10 i am presently discarding. ...
by insomniac2k2
2017-11-11 17:50
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

I like those options, but they are likely a lot of work for a little payoff (guessing about implied code changes). I'm curious about why after you spam score something so high, why would you need to verify their cert? Why not just reject them? What I'd like to see (RVHD and SorenR) is there be some ...
by insomniac2k2
2017-11-08 18:54
Forum: User contributed hMailServer 5 scripts
Topic: Ban IP address on Hmail with Password proxy
Replies: 33
Views: 7943

Re: Ban IP address on Hmail with Password proxy

Glad you found use for it! Attached is updated source and compiled exe. I fixed a few small bugs and corrected some loops that were making redundant calls. I also added standardized logging for all tasks to write to the hmailserver_events.log file. If the file doesnt exist, it will create and use it...
by insomniac2k2
2017-11-01 18:18
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

I figure if I am going to post code on the internet, it should work. If anyone is referencing my log parsing code that i posted above, below would be a better way of doing it: List<string> found = new List<string>(); string line; var lineCount = 0; using (StreamReader file = new StreamReader(@"C:\Pr...
by insomniac2k2
2017-10-30 19:59
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

Now that's the best one yet. I did not think about doing a port check at all! Ill throw that check in and omit the workaround to test. This would be the most efficient use of resources. EDIT: I believe i spoke too soon. I believe that StartTLS just escalates SSL communication on port 25. Thus resett...
by insomniac2k2
2017-10-30 19:28
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

Then the bool wouldn't be set, and OnHELO sub would process. I suppose the easier way would be to process OnHELO on first connect and omit running OnHELO in startTLS. Yep, I find the logging useful. Many different ways to skin a cat. Personally, i think the real fix is in the server code. Without lo...
by insomniac2k2
2017-10-30 18:40
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

Yep, I find the logging useful. Many different ways to skin a cat. Personally, i think the real fix is in the server code. Without looking at it, i would hope that a boolean could be set if startTLS is initiated, to skip onHELO. Then allow OnHELO after the startTLS connection was initiated. This wou...
by insomniac2k2
2017-10-30 16:41
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

For posterity, here is a better approach to skip duplicate database entries: try { List<string> lines = File.ReadAllLines(@"C:\Program Files (x86)\hMailServer\Logs\hmailserver_events.log").ToList(); string myString = IP; int count = lines.Count(s => myString.Contains(s)); if (count > 1) { return; } ...
by insomniac2k2
2017-10-30 04:34
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

I'm only counting the log lines from the event log. It should rarely see traffic. And the traffic that it does see is only the events that I am writing to it. So far, that is only ban and greywhitelist information. That and at the same moment the GreyWhiteList is called, the read will happen. The pr...
by insomniac2k2
2017-10-30 03:11
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: RE: Re: Sub OnHELO(oClient) progress?

For now, until I get a chance to take a look at the server code, I just implemented some easy line parsing logic my application which will check the second to last line to see if a redundant entry is already in the Event log. If entry exists, then exit without trying to create the GreyWhitelist. Sim...
by insomniac2k2
2017-10-30 02:20
Forum: Development & alpha discussions
Topic: Sub OnHELO(oClient) progress?
Replies: 197
Views: 42679

Re: Sub OnHELO(oClient) progress?

This is exactly what i was looking for. thanks! As to why this happens... The google ip address that is being added is this. Notice the redundant entries that happen within milliseconds of each other.: 6060 "2017-10-29 10:39:15.920" "Message from: 74.125.82.50 mail-wm0-f50.google.com Added as to Gr...