Вы находитесь на странице: 1из 2

'------------------------------------------------------------------

' SMTP limit outgoing emails of domain and user --- Manual
'------------------------------------------------------------------

1. Activate scripting in hmailserver: hm admin tool, settings->advanced->settings

2. Click on show scripts and open eventhandler.vbs

3a. in case you aren't using any vbs scripts at the moment
Paste the entire script into the the eventhandler.vbs file

3b. in case you are using vbs scripts


paste the global variables and settings section at the top of your script file
activate and/or integrated the provided content of sub OnAcceptMessage in your
OnAcceptMessage
(just paste the provided content in your sub should do the trick)
paste the subs and functions below the sub OnAcceptMessage at the end of your
script
(starts with the line sub check_outgoing_limitations(oClient, oMessage))

Advise: If you are already using automatic whitelisting, ensure the general
functions don't exist twice!

4 do the settings (eventhandler.vbs)


ipslocalhost are the ips of the localhost separated by # from where you
can send mails without authentification
user and pw is the login data to hmailserver
logspath is the path where the logs of hm are saved, make sure it ends
with a backslash (\)
write_log_active is boolean and instructs the script to log the actions or not

outgoingstore is the file where the data is stored


outgoingexceptions here you can enter exceptions, will be created when first
executed.
outgoingstoreavg internal file to store data
max_emails_per_user general limit for all users
max_emails_per_domain general limit for all domains
warning_factor warning factor, when the warning will be sent
server_average_days amount of days the script calculates the outbound average
server_average_threshold_factor threshold factor, how much the todays
amount can be over the average
warning_factor_avg warning factor for average
msg_admin_warning send warning to admin when user gets over warning level
msg_admin_passed send msg to admin when user gets over limit
msg_user_warning send warning to user when user gets over warning level
msg_user_passed send msg to user when user gets over limit
msg_from Admins name and address
msg_fromaddress Admins address

5 save the files and close the editor

6 check syntax of the script in hm


7a syntax is correct -> reload the script in hm

7b syntax check fails -> check the error message an correct

8 check the event log and see if it works according to your testing
(this script writes a separate logfile in the logspath)

9 Define individual limits for a user or a domain


File will be created the first time the script is executed.
@domain.com 1234 for domain limitations
a@b.com 5678 for user limitations
Instruction is also in the file.

Вам также может понравиться