Long thread but I think I helped with this issue before and wrote some script contained within the thread's posts.
viewtopic.php?f=7&t=35636&start=60
Search found 837 matches
- 2024-02-26 20:51
- Forum: General discussions
- Topic: Rewriting From and Reply-to headers
- Replies: 4
- Views: 67
- 2024-02-16 17:23
- Forum: Scripting
- Topic: Forward message as attachment
- Replies: 5
- Views: 219
Re: Forward message as attachment
Still tweaking: Sub DeliverAsAttachment(oMessage) if Len(oMessage.HeaderValue("X-hMailServer-Deliver-As-Attachment")) = 0 then set oOuterMessage = CreateObject("hMailServer.Message") oOuterMessage.HeaderValue("X-hMailServer-Deliver-As-Attachment") = "OUTER-MESSAGE" for iRecipient = 0 To oMessage.Rec...
- 2024-02-15 18:36
- Forum: Scripting
- Topic: Forward message as attachment
- Replies: 5
- Views: 219
Re: Forward message as attachment
Here is the final code: Sub DeliverAsAttachment(oMessage) if oMessage.HeaderValue("X-hMailServer-Deliver-As-Attachment") <> "Yes" then set oOuterMessage = CreateObject("hMailServer.Message") oOuterMessage.HeaderValue("X-hMailServer-Deliver-As-Attachment") = "Yes" for iRecipient = 0 To oMessage.Recip...
- 2024-02-14 22:23
- Forum: Scripting
- Topic: Forward message as attachment
- Replies: 5
- Views: 219
Re: Forward message as attachment
This worked: Sub DeliverAsAttachment(oMessage) set oOuterMessage = CreateObject("hMailServer.Message") for iRecipient = 0 To oMessage.Recipients.Count - 1 oOuterMessage.AddRecipient oMessage.Recipients(iRecipient).OriginalAddress, oMessage.Recipients(iRecipient).Address next oOuterMessage.From = oMe...
- 2024-02-14 21:56
- Forum: Scripting
- Topic: Forward message as attachment
- Replies: 5
- Views: 219
Re: Forward message as attachment
This is what I came up with: Sub DeliverAsAttachment(oMessage) set oOuterMessage = CreateObject("hMailServer.Message") oRecipients = oMessage.Recipients for each oRecipient in oRecipients oOuterMessage.AddRecipient oRecipient.OriginalAddress, oRecipient.Address next oOuterMessage.From = oMessage.Fro...
- 2024-02-14 20:31
- Forum: Scripting
- Topic: Forward message as attachment
- Replies: 5
- Views: 219
Forward message as attachment
There are some messages that I need to relay to the original recipient with the original intact message as an attachment to a clean message. I will do this with a global rule, but was wondering if anyone has already written script to accomplish this?
- 2024-02-06 19:20
- Forum: General discussions
- Topic: Mails in delivery queue seems to disappear after a period of time
- Replies: 5
- Views: 234
Re: Mails in delivery queue seems to disappear after a period of time
If the mailbox is not hosted on the local hMailServer instance, the message will be removed from the queue when successfully delivered to the next hop smtp relay server. It will not persist in the local queue until delivery to the mailbox is completed.
- 2024-01-18 20:00
- Forum: Off-topic discussions
- Topic: Spamhaus Blocklist (SBL) listings are moving
- Replies: 4
- Views: 847
- 2024-01-11 21:44
- Forum: General discussions
- Topic: MultiDomains not working with Gmail Relay
- Replies: 7
- Views: 1070
- 2023-12-05 00:54
- Forum: Scripting
- Topic: How to needed for Multi SMTP Relay
- Replies: 17
- Views: 4711
Re: How to needed for Multi SMTP Relay
Shouldn't...
be...
?
Code: Select all
oApp.Settings.SetSMTPRelayerPassword("supersecretpassword")
Code: Select all
oApp.Settings.SetSMTPRelayerPassword(myRelayerPassword)
- 2023-11-29 17:05
- Forum: General discussions
- Topic: Help With SMTP Routing - Related to DKIM
- Replies: 2
- Views: 1301
Re: Help With SMTP Routing - Related to DKIM
You need the Domain to hold the signing keys for outbound mail. But once you create a Domain, the hMailServer host becomes authoritative for local delivery for that Domain. But if you create a Route, you are configuring hMailServer also to handle the Domain as remote domain. With both, hMailServer w...
- 2023-11-17 19:41
- Forum: General discussions
- Topic: AWS SES SMTP - 554 Transaction failed: Empty address
- Replies: 25
- Views: 7318
Re: AWS SES SMTP - 554 Transaction failed: Empty address
F*ng hell.... Remove AUTH and it sends the MAIL FROM... I have two servers I can play with, just confirmed it. Conclusion; AUTH assumes MAIL FROM is ACCOUNT. No AUTH requires MAIL FROM to be specified ... Yes? Right, and "Administrator" has no matching "Account"... Maybe: Sub OnAcceptMessage(oClien...
- 2023-11-10 19:49
- Forum: General discussions
- Topic: Sending external emails from the domain we own
- Replies: 8
- Views: 2405
Re: Sending external emails from the domain we own
Another option is to configure hMailServer with a local domain (hMailServer Administrator > Domains > Add...) for your-domain.com and a route (hMailServer Administrator > Protocols > SMTP > Routes > Add...) for your-domain.com pointing to the GMail mail exchange. Set the MX record for your-domain.co...
- 2023-10-30 16:40
- Forum: General discussions
- Topic: Server 2016 vs Server 2022 - mail processing slow
- Replies: 4
- Views: 1174
Re: Server 2016 vs Server 2022 - mail processing slow
Can the new machine do RDNS lookups of connecting clients?
- 2023-10-26 00:09
- Forum: Off-topic discussions
- Topic: Nation State Hackers Exploiting Zero-Day in Roundcube Webmail Software
- Replies: 20
- Views: 4834
- 2023-10-25 16:06
- Forum: Off-topic discussions
- Topic: Nation State Hackers Exploiting Zero-Day in Roundcube Webmail Software
- Replies: 20
- Views: 4834
- 2023-10-18 20:07
- Forum: Development & alpha discussions
- Topic: hMailServer X
- Replies: 111
- Views: 114376
Re: hMailServer X
The Problem is Internal scripting which makes it possible to let hMailServer react to events like Email client logins via IMAP or SMTP, to respond to specific text tokens inside a Email or automate all sorts of stuff. Agree. That's where the webhooks come in. Processes register to subscribe to the ...
- 2023-10-18 18:38
- Forum: Development & alpha discussions
- Topic: hMailServer X
- Replies: 111
- Views: 114376
Re: hMailServer X
The next thing is Scripting. We cannot forever continue with VBScript so we need a reasonable replacement which is 1) Easy to integrate into the server 2) Easy to learn for VBScript users 3) Behave the same way on all platfroms 4) Not getting abandoned, deprecated or removed Perhaps an approach tha...
- 2023-10-07 00:30
- Forum: General discussions
- Topic: Use as smtp relay server
- Replies: 6
- Views: 1233
Re: Use as smtp relay server
Do not set up any domains or accounts. To use DKIM, you will need to add your sending domain configuration. If you want to use authenticated SMTP instead of authorization by IP, add an account for that purpose. I usually add a postmaster account for these scenarios. Authenticated submissions automa...
- 2023-09-06 17:05
- Forum: General discussions
- Topic: specified network name is invalid
- Replies: 12
- Views: 1153
Re: specified network name is invalid
Looks like your hMailServer is trying to bind on an IPv6 address for a Google MX. Are you running dual stack on the HMS server and the rest of your network?
- 2023-08-29 18:41
- Forum: General discussions
- Topic: Dictionary attack on email adresses
- Replies: 39
- Views: 4904
Re: Dictionary attack on email adresses
If someone writes to an account in my server but mispells it, the sender won't receive a non delivery message. You could script your own NDR handler and set it as a rule action for messages delivered to the catch-all. For instance, by checking the domain reputation of the sender's domain against th...
- 2023-08-29 16:50
- Forum: General discussions
- Topic: Dictionary attack on email adresses
- Replies: 39
- Views: 4904
Re: Dictionary attack on email adresses
Create a mailbox and set the catch-all address to that mailbox. Set a rule to delete all messages to that mailbox. The domain will accept messages for any address and the Unknown User messages will stop.
- 2023-07-13 20:15
- Forum: Off-topic discussions
- Topic: Zimbra urges admins to manually fix zero-day exploited in attacks
- Replies: 0
- Views: 3733
- 2023-06-01 19:28
- Forum: Scripting
- Topic: Blocking Country Script
- Replies: 4
- Views: 3270
Re: Blocking Country Script
You can still get the file from Internet Archive:
https://web.archive.org/web/20130430122 ... OM-1.3.zip
https://web.archive.org/web/20130430122 ... OM-1.3.zip
- 2023-05-26 20:16
- Forum: General discussions
- Topic: Spamhaus in hMailserver 5.6.7 doesn't work as expected
- Replies: 6
- Views: 689
Re: Spamhaus in hMailserver 5.6.7 doesn't work as expected
Seems like the justification Spamhaus provides for blocking recursive queries from Google's DNS service could very well be extended to many other public recursive DNS services.
- 2023-05-26 19:52
- Forum: General discussions
- Topic: Spamhaus in hMailserver 5.6.7 doesn't work as expected
- Replies: 6
- Views: 689
- 2023-05-26 18:48
- Forum: General discussions
- Topic: Spamhaus in hMailserver 5.6.7 doesn't work as expected
- Replies: 6
- Views: 689
Re: Spamhaus in hMailserver 5.6.7 doesn't work as expected
Run
from the command line and compare your result to mine:
Code: Select all
nslookup 219.117.23.111.zen.spamhaus.org
Code: Select all
Non-authoritative answer:
Name: 219.117.23.111.zen.spamhaus.org
Addresses: 127.0.0.3
127.0.0.4
- 2023-04-28 23:55
- Forum: General discussions
- Topic: Forwarding to gmail
- Replies: 2
- Views: 539
- 2023-03-22 17:28
- Forum: General discussions
- Topic: eml files not delivered to Mailsender
- Replies: 7
- Views: 1554
Re: eml files not delivered to Mailsender
My erp application create an eml files which delivers to the hmail server and which then fails to deliver to the mailsender server for sending. hMailServer does not have a "pickup directory" feature. How are you streaming the eml file data into hMailServer? as you can see the row "RECEIVED: 250 Mes...
- 2023-03-08 01:12
- Forum: General discussions
- Topic: S/MiME-signed Message Failing Signature Validation
- Replies: 27
- Views: 4910
Re: S/MiME-signed Message Failing Signature Validation
There is definitely an issue with Message.Save modifying the message body. The only solution I have found is to add conditions to any scripting to bypass message modification for mail that may be signed. Most of my scripting is rewrites to score messages for spam suppression, so I mostly switched th...
- 2023-02-28 17:21
- Forum: Scripting
- Topic: Code Error 800A0046
- Replies: 16
- Views: 4447
Re: Code Error 800A0046
Any practical examples for use with HMS/within Eventhandlers.vbs? My involvement in the previous thread was to help the OP with their use cases only. I haven't found a use case yet within the event handlers in my systems (I run three instances) to warrant implementing concurrency control. Theoretic...
- 2023-02-28 01:38
- Forum: Scripting
- Topic: Code Error 800A0046
- Replies: 16
- Views: 4447
Re: Code Error 800A0046
Concurrency control was discussed on on another thread and this post might be helpful:
https://www.hmailserver.com/forum/viewt ... ng#p235666
https://www.hmailserver.com/forum/viewt ... ng#p235666
- 2023-02-22 06:38
- Forum: General discussions
- Topic: S/MiME-signed Message Failing Signature Validation
- Replies: 27
- Views: 4910
Re: S/MiME-signed Message Failing Signature Validation
Agree with everything you said. There are some headers that are included in the hash, but whose headers are typically values that are displayed to the user such as the From, To, Subject, etc. "Invisible" headers should not affect the hash calculation. My hypothesis is that .Save is appending somethi...
- 2023-02-22 05:08
- Forum: General discussions
- Topic: S/MiME-signed Message Failing Signature Validation
- Replies: 27
- Views: 4910
Re: S/MiME-signed Message Failing Signature Validation
I have it isolated to the .Save method. Even if not changes are made to the message problematically, calling .Save rewrites the message in some way that changes the hash value computed. I tested with this code snippet: Sub OnAcceptMessage(oClient, oMessage) oMessage.Save End Sub If the oMessage.Save...
- 2023-02-21 22:29
- Forum: General discussions
- Topic: S/MiME-signed Message Failing Signature Validation
- Replies: 27
- Views: 4910
S/MiME-signed Message Failing Signature Validation
I'm trying to debug an issue with all S/MIME-signed messages that flow through my hMailServer. I suspect that either the core system, a rule, or script code is interfering with message fidelity, but I haven't been successful in isolating the cause. I've tried turning off all rules and disabling scri...
- 2023-02-16 17:32
- Forum: General discussions
- Topic: hMailServer Thunderbird sends really slow
- Replies: 37
- Views: 2999
Re: hMailServer Thunderbird sends really slow
AV disabled and no effect. I think it may be a firewall setting on the server? If there is a perimeter firewall between the client and server, what make/model? If this FW has deep packet or protocol inspection enabled, try to disable it, at least for the rule that passes SMTP protocol traffic, and ...
- 2023-02-15 01:59
- Forum: General discussions
- Topic: hMailServer Thunderbird sends really slow
- Replies: 37
- Views: 2999
Re: hMailServer Thunderbird sends really slow
Disable AV on the client and retest.
- 2023-02-05 21:54
- Forum: General discussions
- Topic: SPF how to reject all Domais without a SPF record
- Replies: 7
- Views: 900
Re: SPF how to reject all Domais without a SPF record
You could script a check for the DNS records using the DNSLibrary.DNSResolver COM component available here: https://vdhout.nl/category/hmailserver/page/2 The code for performing the check might look something like this: function SPFRecordExists(sDomain) Set objDNSResolver = CreateObject("DNSLibrary....
- 2023-02-02 00:52
- Forum: General discussions
- Topic: Ctritcal DKIM Error Failing
- Replies: 12
- Views: 884
Re: Ctritcal DKIM Error Failing
The TXT record is on the email domain, not the mail exchanger domain. If your email address are @smartglassspray.com then the TXT record should be <selector>._domainkey.smartglassspray.com, not <selector>._domainkey.mail.smartglassspray.com.
- 2023-01-21 04:00
- Forum: General discussions
- Topic: SSL/TLS-connection is required for authentication ??
- Replies: 11
- Views: 1613
Re: SSL/TLS-connection is required for authentication ??
I’m betting that the attempt to use insecure auth is counted as an auth failure, leading to the autoban.
- 2023-01-21 02:45
- Forum: General discussions
- Topic: SSL/TLS-connection is required for authentication ??
- Replies: 11
- Views: 1613
Re: SSL/TLS-connection is required for authentication ??
This is a per-range setting.
See Settings | Advanced | IP Ranges | <name of range> | Require SSL/TLS for authentication.
If the box is checked, connections sourced from an address matching that IP Range cannot use unsecured authentication.
See Settings | Advanced | IP Ranges | <name of range> | Require SSL/TLS for authentication.
If the box is checked, connections sourced from an address matching that IP Range cannot use unsecured authentication.
- 2023-01-19 21:48
- Forum: General discussions
- Topic: 550 User Unknown...BUT!
- Replies: 4
- Views: 722
- 2023-01-09 18:02
- Forum: Scripting
- Topic: Password Hashing
- Replies: 19
- Views: 5343
Re: Password Hashing
How can I properly fetch if its already in the database? I think you are asking how to can check if hMailServer is authoratative for the address, meaning that hMailServer will consider the address subject to local delivery and not remote relay. To check that, you have to see if: 1. The address exis...
- 2023-01-02 23:17
- Forum: Scripting
- Topic: Function to delete current message?
- Replies: 6
- Views: 3723
Re: Function to delete current message?
In the sub you are calling from a rule, if the delete condition is met, add a custom header to the message and save it. Then add another rule that deletes the message if the header is present with the trigger value. sub AddDeleteHeader(oMessage) if conditionToDeleteMessage then oMessage.HeaderValue(...
- 2022-12-22 00:50
- Forum: General discussions
- Topic: SPF, DMARC Failures - any solutions?
- Replies: 10
- Views: 1821
Re: SPF, DMARC Failures - any solutions?
IIFC (and it has been a good while), RewriteEnvelopeFromWhenForwarding=1 only works with Accounts and not Distribution Lists. I was involved in a LONG exchange to solve a similar problem documented in this thread: https://www.hmailserver.com/forum/viewtopic.php?f=7&t=35636 The thread has 145 message...
- 2022-12-20 02:09
- Forum: Scripting
- Topic: New user - simple script problem
- Replies: 13
- Views: 4482
Re: New user - simple script problem
Assuming you are running a 32-bit build, you can use a COM wrapped invocation of IXMLHTTPRequest2 interface. Remember you need to match formal and actual parameter lists. hMailServer will send your function the message invoking the call in the first parameter as an object variant. Sub MotionOnD3(oMe...
- 2022-12-09 20:49
- Forum: General discussions
- Topic: Cannot send to eBay - connection closed with 10054 error
- Replies: 4
- Views: 731
Re: Cannot send to eBay - connection closed with 10054 error
Use this tool to check if the source IP address you are connecting to eBay from is listed on any RBLs:
https://multirbl.valli.org/
If you are on an RBL there is a good chance eBay is simply dropping the connection before any protocol negotiation takes place.
https://multirbl.valli.org/
If you are on an RBL there is a good chance eBay is simply dropping the connection before any protocol negotiation takes place.
- 2022-12-06 21:34
- Forum: Scripting
- Topic: Utilities.ImportMessageFromFile
- Replies: 11
- Views: 4305
Re: Utilities.ImportMessageFromFile
I think I tried both import methods from the Utilities class and could not get them to operate as expected, which is why I wrote the cmdlets in the Powershell module reference above.jimimaseye wrote: ↑2022-12-06 21:02Have you also tried Utilities.ImportMessageFromFileToIMAPFolder ?
- 2022-12-06 20:42
- Forum: Scripting
- Topic: Utilities.ImportMessageFromFile
- Replies: 11
- Views: 4305
Re: Utilities.ImportMessageFromFile
I think I ran into this issue...check out this repo...it might give hints...
https://github.com/mjdibella/hMailServer.PSHelper
https://github.com/mjdibella/hMailServer.PSHelper
- 2022-12-05 20:49
- Forum: Scripting
- Topic: Save Message in .eml
- Replies: 3
- Views: 3448
Re: Save Message in .eml
Just copy the message to a folder of your choice: sub SaveMessage(oMessage) sDirectory = "C:\DIRECTORY\OF\YOUR\CHOICE" set oFS = CreateObject("Scripting.FileSystemObject") on error resume next oFS.CopyFile oMessage.Filename, sDirectory, True on error goto 0 End Sub Add this code to EventHandlers.vbs...
- 2022-11-23 20:16
- Forum: General discussions
- Topic: Private URIBL
- Replies: 5
- Views: 2428
Re: Private URIBL
Private URI BL is working well, but I have a question for the community before I dig into the source code. Are all URI BL lookups limited to 2nd level domain (i.e. spammydomain.tld) or can the host FQDN be queried too if it is a 3rd or higher order domain (i.e. spammyhostname.spammydomain.tld or spa...
- 2022-11-08 23:58
- Forum: Scripting
- Topic: HOW TO:how to save delivery status into DB?
- Replies: 15
- Views: 4348
Re: HOW TO:how to save delivery status into DB?
The missing piece is there is no OnDeliverySucceeded() event. You can start tracking delivery using OnDeliveryStart()/OnDeliverMessage() and detect when it has failed using OnDeliveryFailed(), but you have to INFER that delivery succeeded. To do that you need to implement an external, polled, queue ...
- 2022-11-03 17:43
- Forum: General discussions
- Topic: Outlook.office365.com auth problem
- Replies: 10
- Views: 3220
Re: Outlook.office365.com auth problem
I'd now like it to download emails for our helpdesk software to process, do you have any suggestions for how I can do this? Two ways come to mind: 1. HARDER: You can experiment with an authentication proxy that sits between a client that doesn't support OAuth and a server that requires OAuth. The p...
- 2022-10-31 17:40
- Forum: General discussions
- Topic: Private URIBL
- Replies: 5
- Views: 2428
Re: Private URIBL
TY both. Zone created and now tracking efficacy.
- 2022-10-31 03:13
- Forum: General discussions
- Topic: Private URIBL
- Replies: 5
- Views: 2428
Private URIBL
I need to create a private URIBL to fine tune UCE detection. I want to use an existing 2nd level namespace I have and just create a new zone off the namespace for the blacklisted URI hostnames. I've looked at a zone blocked by multi.surbl.org and it just looks like hits return a 127.0.0.x IP address...
- 2022-10-29 21:36
- Forum: Scripting
- Topic: Add Whitelist exclusion by sender address to custom Spam checking
- Replies: 4
- Views: 6174
Re: Add Whitelist exclusion by sender address to custom Spam checking
What's with the "?"? Is the "?" potentially in the address? I don't think its a wildcard for the whitelist. Good catch. I put it in during dev to test the "match single character" use case, but you are right, it should never appear the live whitelist data. I took that line out to simplify readabili...
- 2022-10-29 02:42
- Forum: Scripting
- Topic: Add Whitelist exclusion by sender address to custom Spam checking
- Replies: 4
- Views: 6174
Re: Add Whitelist exclusion by sender address to custom Spam checking
You could expand that a little to exit function if true. It could save a few cycles. You provided a great start. This is what decided on. My coding style is a little different that yours, but I kept some of your logic, like using regex eval. function IsWhitelisted(sAddress) IsWhitelisted = False se...
- 2022-10-28 19:46
- Forum: Scripting
- Topic: Add Whitelist exclusion by sender address to custom Spam checking
- Replies: 4
- Views: 6174
Add Whitelist exclusion by sender address to custom Spam checking
I need to make a function checks if an address is on the HMS built-in whitelist. It might have a prototype like this: BOOL IsWhitelisted(sAddress): returns true if the submitted well-formed email address (user@domain) matches one of the whitelist records by the Email address field. I'm struggling wi...
- 2022-10-28 00:47
- Forum: General discussions
- Topic: Outlook.office365.com auth problem
- Replies: 10
- Views: 3220
Re: Outlook.office365.com auth problem
That is likely.cacciatorino wrote: ↑2022-10-27 08:12May be the main org where I fetch messages from configured something to prevent this type of use.
- 2022-10-26 21:36
- Forum: General discussions
- Topic: Outlook.office365.com auth problem
- Replies: 10
- Views: 3220
Re: Outlook.office365.com auth problem
Create an app password: https://support.microsoft.com/en-us/acc ... 07799387e9