Hello,
I dont see expiration and expiration date within properties list in the documentation
also, when I created a new range via vbscript, when I use the hmailserver interface, I cannot "edit" it when I clic on it. but I can delete it
here is a part of the code
dim SecurityRges
dim SecurityRge
dim obApp
Set obApp = CreateObject("hMailServer.Application")
Call obApp.Authenticate("Administrator", "password")
set SecurityRges = obApp.settings.SecurityRanges
set SecurityRge = SecurityRges.add
SecurityRge.AllowIMAPConnections = false
SecurityRge.AllowPOP3Connections = false
SecurityRge.AllowSMTPConnections = false
SecurityRge.AllowDeliveryFromLocalToLocal = false
SecurityRge.AllowDeliveryFromLocalToRemote = false
SecurityRge.AllowDeliveryFromRemoteToLocal = false
SecurityRge.AllowDeliveryFromRemoteToRemote = false
SecurityRge.EnableSpamProtection = false
SecurityRge.LowerIP = SendfromIP
SecurityRge.UpperIP = SendfromIP
SecurityRge.name = "blacklist IP :" & SendfromIP
SecurityRge.priority = 10
SecurityRge.save
many thanks
SecurityRange properties
Re: SecurityRange properties
Did you ever figure out if you can set the expiry through the COM API/Scripting?
I'm looking at adding something similar to one of my scripts.
Thanks,
Phil
I'm looking at adding something similar to one of my scripts.
Thanks,
Phil
Re: SecurityRange properties
I think...
SecurityRange.Expires (Boolean) where True = expiry enabled
SecurityRange.ExpiresTime (date & Time) = Daye and time of expiry.
( I got this from the PHPWebAdmin.php)
SecurityRange.Expires (Boolean) where True = expiry enabled
SecurityRange.ExpiresTime (date & Time) = Daye and time of expiry.
( I got this from the PHPWebAdmin.php)
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: SecurityRange properties
Thanks Matt,
Yes, you are right.... I figured it out looking at the COM interface with OLEView.
I got it working nicely
Phil
Yes, you are right.... I figured it out looking at the COM interface with OLEView.
I got it working nicely

Phil
Re: SecurityRange properties
I know this was a long time ago but I found it useful but also had the secondary issue that the original post mentioned: rules I create in my script could not be edited when clicked on in the admin interface.
The solution was very simple: close the admin tool down and open it again (you probably leave it open all the time like I do).
Basically it is a minor bug (or two) in the admin tool code that any rule created by scripts whilst it is running will appear in the list box (but not in the "tree" list in the navigation on the left) and can be clicked on but can only be deleted, not even viewed let alone edited.
It's not a bigee but thought someone might hit the same problem if they are looking at this post.
The solution was very simple: close the admin tool down and open it again (you probably leave it open all the time like I do).
Basically it is a minor bug (or two) in the admin tool code that any rule created by scripts whilst it is running will appear in the list box (but not in the "tree" list in the navigation on the left) and can be clicked on but can only be deleted, not even viewed let alone edited.
It's not a bigee but thought someone might hit the same problem if they are looking at this post.
Re: SecurityRange properties
Did you try hitting F5 on your keyboard?FixItDik wrote: ↑2020-09-25 12:06I know this was a long time ago but I found it useful but also had the secondary issue that the original post mentioned: rules I create in my script could not be edited when clicked on in the admin interface.
The solution was very simple: close the admin tool down and open it again (you probably leave it open all the time like I do).
Basically it is a minor bug (or two) in the admin tool code that any rule created by scripts whilst it is running will appear in the list box (but not in the "tree" list in the navigation on the left) and can be clicked on but can only be deleted, not even viewed let alone edited.
It's not a bigee but thought someone might hit the same problem if they are looking at this post.
SørenR.
Algorithm (noun.)
Word used by programmers when they do not want to explain what they did.
Algorithm (noun.)
Word used by programmers when they do not want to explain what they did.
Re: SecurityRange properties
I just change 'branches' in the tree in the left pane, then change back
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