Limit outbound mails by user, domain or server average
-
- New user
- Posts: 22
- Joined: 2013-07-14 19:03
- Location: Pittsburgh, PA
Re: Limit outbound mails by user, domain or server average
Great explanation! You're right, that secondary log file is pretty useless once everything is verified as working correctly. Didn't even consider turning that logging off after everything is fully tested. Thanks for mentioning that, because that's exactly what I'll do.
From everything I can see, this seems to work perfectly now! Thank you!
I will make a point of checking the hmailserver forum from time to time in hopes that I can help someone else someday and "pay it forward".
From everything I can see, this seems to work perfectly now! Thank you!
I will make a point of checking the hmailserver forum from time to time in hopes that I can help someone else someday and "pay it forward".
Re: Limit outbound mails by user, domain or server average
That, and the fact that hMailserver is VERY customisable by the use of built in scripting (like this thread) are the reasons that I volunteer here.ttambellini wrote:I'm used to working with software companies that sell overpriced crappy software and offer very little support. My experience with hmailserver has been the exact opposite; Great software at no cost, and folks willing to help because they like helping out their fellow hmailserver users.
I find hMailserver very intuitive and easy to use / customise.
I can't think of another product that I use that matches the combination of 'simple to use' and yet 'highly customisable'.
Excellent.ttambellini wrote:I will make a point of checking the hmailserver forum from time to time in hopes that I can help someone else someday and "pay it forward
I also use the helping others as a 'learning experience' for me. I'm self taught.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: Limit outbound mails by user, domain or server average
How about you start a new thread with this version in the first post of that thread.percepts wrote:Limit SMTP VERSION 6
I have made quite a few more modifications and cleanup to script and recreated zip file which contains everything you need with install instructions. Consider this zip file an updated alternative to the one in post 1 of this topic.
I have therefore called it Version 6 of script.
Good work percepts.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: Limit outbound mails by user, domain or server average
Hello
It does not work with base64 encoded authentication:
http://www.hmailserver.com/documentatio ... d_for_spam
It does not work with base64 encoded authentication:
http://www.hmailserver.com/documentatio ... d_for_spam
Regards"<spammers IP address>" "RECEIVED: AUTH LOGIN"
"<spammers IP address>" "SENT: 334 VXNlcm5hbWU6"
"<spammers IP address>" "RECEIVED: dGVzdEB0ZXN0LmNvbQ=="
"<spammers IP address>" "SENT: 334 UGFzc3dvcmQ6"
Re: Limit outbound mails by user, domain or server average
you are wrong or at least your interpretation of why its not working is wrong.
Please show link to post which you downloaded the script from. There are many versions of the script.
Please show link to post which you downloaded the script from. There are many versions of the script.
Re: Limit outbound mails by user, domain or server average
Link is: http://www.hmailserver.com/forum/viewto ... 47#p151947percepts wrote:you are wrong or at least your interpretation of why its not working is wrong.
Please show link to post which you downloaded the script from. There are many versions of the script.
I have installed it, but one of our users sent a lot of emails without any limitation.
Re: Limit outbound mails by user, domain or server average
Hello,
I have installed the V6 script.
Logs seems fine and while testing I received a "warning" and "locked" message. However, after the locked message I can still send e-mails without any problems...
Do I perhaps missing something?
I have installed the V6 script.
Logs seems fine and while testing I received a "warning" and "locked" message. However, after the locked message I can still send e-mails without any problems...
Do I perhaps missing something?
-
- Normal user
- Posts: 66
- Joined: 2017-09-29 13:09
Re: Limit outbound mails by user, domain or server average
hi...how i can limit an account or domain???? I would like you to tell me how to send me an email when an account reaches the limit. thanks very much...
Re: Limit outbound mails by user, domain or server average
Did you even read this thread?
go back to the first page of this thread, and implement the script as instructed
go back to the first page of this thread, and implement the script as instructed
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
-
- Normal user
- Posts: 66
- Joined: 2017-09-29 13:09
Re: Limit outbound mails by user, domain or server average
hi....i add this script and is very usefull. but i have a question...
Public obApp
Public domain_buffer
Public Const ipslocalhost = "0.0.0.0" 'separated by #
Public Const user = "Administrator"
Public Const pw = "xxxxxxxxxxx"
Public Const logspath = "C:\MailServer\Events\" 'ends with a backslash
Public Const write_log_active = true
in 5 line. 'Public Const pw ' i must be to put the password????thanks
Public obApp
Public domain_buffer
Public Const ipslocalhost = "0.0.0.0" 'separated by #
Public Const user = "Administrator"
Public Const pw = "xxxxxxxxxxx"
Public Const logspath = "C:\MailServer\Events\" 'ends with a backslash
Public Const write_log_active = true
in 5 line. 'Public Const pw ' i must be to put the password????thanks
- jimimaseye
- Moderator
- Posts: 10060
- Joined: 2011-09-08 17:48
Re: Limit outbound mails by user, domain or server average
yes
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
-
- Normal user
- Posts: 66
- Joined: 2017-09-29 13:09
Re: Limit outbound mails by user, domain or server average
hi...thanks very much for your answer....
'User and Domain outgoing limitation
Public Const outgoingstore = "C:\MailServer\Events\outboundstore.txt"
Public Const outgoingexceptions = "C:\MailServer\Events\outboundexceptions.txt"
Public Const outgoingstoreavg = "C:\MailServer\Events\outboundstoreavg.txt"
i have a small problem...i have chnage the path of the folders..the Public Const outgoingstore and Public Const outgoingexceptions write corrent in the folder but the Public Const outgoingstoreavg write a home directory of the hmail server but and this have the path with the rest...
'User and Domain outgoing limitation
Public Const outgoingstore = "C:\MailServer\Events\outboundstore.txt"
Public Const outgoingexceptions = "C:\MailServer\Events\outboundexceptions.txt"
Public Const outgoingstoreavg = "C:\MailServer\Events\outboundstoreavg.txt"
i have a small problem...i have chnage the path of the folders..the Public Const outgoingstore and Public Const outgoingexceptions write corrent in the folder but the Public Const outgoingstoreavg write a home directory of the hmail server but and this have the path with the rest...
Re: Limit outbound mails by user, domain or server average
Thank you Andyp for this great script.
One question...
outboundstore.txt will store number of emails sent by the users and domains. Is this for the script functionality or just a log? Do I need to clear/delete it daily using task scheduler in order for the script to function on daily base?
Thank you
Br,
Dali
One question...
outboundstore.txt will store number of emails sent by the users and domains. Is this for the script functionality or just a log? Do I need to clear/delete it daily using task scheduler in order for the script to function on daily base?
Thank you
Br,
Dali
-
- New user
- Posts: 22
- Joined: 2013-07-14 19:03
- Location: Pittsburgh, PA
Re: Limit outbound mails by user, domain or server average
outboundstore.txt is a log used for the script functionality.
You do not need to edit this file or change it in any was yourself. I don't remember if it resets daily or keeps a running total of mail sent in the last 24 hours, but the values are updated by the script, then compared to the limits in the script or in the outboundexceptions file.
As a side note, you can edit this file, and I will do that sometimes if a user is sending a lot of emails one day and they start getting close to their limit, I will reduce the number of emails sent as shown in this file, and that essentially "turns back the counter" for that user's limit.
You do not need to edit this file or change it in any was yourself. I don't remember if it resets daily or keeps a running total of mail sent in the last 24 hours, but the values are updated by the script, then compared to the limits in the script or in the outboundexceptions file.
As a side note, you can edit this file, and I will do that sometimes if a user is sending a lot of emails one day and they start getting close to their limit, I will reduce the number of emails sent as shown in this file, and that essentially "turns back the counter" for that user's limit.
Re: Limit outbound mails by user, domain or server average
Thank you for reply.
Yes, it seems it's been doing the job automatically. I was just confused with point 10 in the manual about CycleEvents.vbs/txt that I am not able to find anywhere and I don't know what it actually does.
This is the script for ruining batch file on every incoming mail.
' OSTICKET CRON (on every email RUN the batch)
Sub Osticket_cron(oMessage)
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "c:\Util\Scripts\Osticket_cron.bat", 1, false
End Sub
Should I expect any problems if I comment out Option Explicit?
Thank you
Br,
Dali
Yes, it seems it's been doing the job automatically. I was just confused with point 10 in the manual about CycleEvents.vbs/txt that I am not able to find anywhere and I don't know what it actually does.
On the other hand the script works great so far. The only thing I had to comment in the scrip is 'Option Explicit as it wasn't working with script in the EventHandlers.vbd.10 The hmailserver_events.log file needs to be cycled since there is no hmail inbuilt procedure for this. To do this setup a windows task scheduler job to run CycleEventLog.vbs (rename CycleEventLog.txt to CycleEventLog.vbs ) on a daily, weekly or monthly cycle according to which you prefer. (daily works best IMO)
This is the script for ruining batch file on every incoming mail.
' OSTICKET CRON (on every email RUN the batch)
Sub Osticket_cron(oMessage)
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "c:\Util\Scripts\Osticket_cron.bat", 1, false
End Sub
Should I expect any problems if I comment out Option Explicit?
Thank you
Br,
Dali
Re: Limit outbound mails by user, domain or server average
I'm actually a basic user with only a few domains and email accounts. no big deal. I'm coming from Mdeamon. HMS had been great form me for past few years. No problems. Mostly got hacked by a test accounts with simple, not strong, passwords like test123, user123 and such. Yes, my fault, no doubt. I should use strong passwords. But it blacklisted me for fewl times now. And more users one have more options to get hacked. I'm also not familiar how other mail servers are dealing with this, but I believe this should be a core functionality od any email server and enabled by default. Then the admin could add exceptions when needed. When ip gets blacklisted, all other mail users gets punished for several days.
Thank you
Br,
Dali
Thank you
Br,
Dali