Syntax
Re: Syntax
Uh, what
oClient.Username = "" means a client without a username, eg: unauthenticated
maybe you should search the forum for examples/inspiration

oClient.Username = "" means a client without a username, eg: unauthenticated
maybe you should search the forum for examples/inspiration
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
Re: Syntax
Well, my goal is to block attachments for specific users and therefor
I have to adapt the following script for specific users:
Sub OnAcceptMessage(oClient, oMessage)
' Ignore messages from local users
if oClient.Username = "" then
Dim oAttachment
Dim oRegExp
Set oRegExp = new RegExp
For oAttachment = 0 to oMessage.Attachments.Count-1
' Test for undesirable attachments
with oRegExp
.Pattern = "^.*\.(bat|cmd|com|cpl|csh|docm|exe|hta|htb|inf|js|jse|lnk|msi|msp|pif|reg|scf|scr|shs|shb|vbe|vbs|wsf|wsh|zip)$"
.IgnoreCase = True
.Global = False
end with
Sorry if my English is not very good. (Germany)
Thanks.
I have to adapt the following script for specific users:
Sub OnAcceptMessage(oClient, oMessage)
' Ignore messages from local users
if oClient.Username = "" then
Dim oAttachment
Dim oRegExp
Set oRegExp = new RegExp
For oAttachment = 0 to oMessage.Attachments.Count-1
' Test for undesirable attachments
with oRegExp
.Pattern = "^.*\.(bat|cmd|com|cpl|csh|docm|exe|hta|htb|inf|js|jse|lnk|msi|msp|pif|reg|scf|scr|shs|shb|vbe|vbs|wsf|wsh|zip)$"
.IgnoreCase = True
.Global = False
end with
Sorry if my English is not very good. (Germany)
Thanks.
Re: Syntax
Once again....Search
There are plenty of forum topics covering attachment handling that should get you started


There are plenty of forum topics covering attachment handling that should get you started
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
Re: Syntax
Thanks.
I'd seen that before but it's not exactly what I need.
There are attachments to be blocked (or not) but
for some specific users only.
And I still don't know how it goes.
I'd seen that before but it's not exactly what I need.
There are attachments to be blocked (or not) but
for some specific users only.
And I still don't know how it goes.
Re: Syntax
What about specifying/defining the usernames?
You are really asking weird questions or asking the obvious, use your brain if you have one and try to put some effort in yourself....search the forums for other examples and test, test & test
Code: Select all
If oClient.Username = "username1@domain.com" OR oClient.Username = "username2@domain.com" Then
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
Re: Syntax
You don't have to become unpolite. I'm realy not stupid.
I asked from the beginning what syntax should I use.
In VBA or Excel, for example, is the syntax for defining conditions
or in separating terms very different. And I have a pretty large experience with that.
Nevertheless, thank you.
I asked from the beginning what syntax should I use.
In VBA or Excel, for example, is the syntax for defining conditions
or in separating terms very different. And I have a pretty large experience with that.
Nevertheless, thank you.
Re: Syntax
If you have a problem with english try send a message to Dravion, he is german and an excellent developer.usermm wrote: ↑2020-03-25 19:52You don't have to become unpolite. I'm realy not stupid.
I asked from the beginning what syntax should I use.
In VBA or Excel, for example, is the syntax for defining conditions
or in separating terms very different. And I have a pretty large experience with that.
Nevertheless, thank you.
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: Syntax
VBA, Excel?
https://www.hmailserver.com/documentati ... ce_scripts
Maybe next time try to consult the documentation first
https://www.hmailserver.com/documentati ... ce_scripts
Maybe next time try to consult the documentation first
CIDR to RegEx: d-fault.nl/CIDRtoRegEx
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
DNS Lookup: d-fault.nl/DNSTools
DNSBL Lookup: d-fault.nl/DNSBLLookup
GEOIP Lookup: d-fault.nl/GeoipLookup
Re: Syntax
Thank you SorenR. I'll do this in future.
I hope he might be more friendly and not
as arrogant as some other people here.
And I'm not referring to you, of course...
Thanks again.
I hope he might be more friendly and not
as arrogant as some other people here.
And I'm not referring to you, of course...
Thanks again.