If all you want is a spam header, hmailserver already provides that as X-hMailServer-Spam.
Search found 2321 matches
- 2020-12-07 17:16
- Forum: Scripting
- Topic: "universial" header to mark mail as spam?
- Replies: 11
- Views: 669
- 2020-12-07 14:07
- Forum: Scripting
- Topic: "universial" header to mark mail as spam?
- Replies: 11
- Views: 669
Re: "universial" header to mark mail as spam?
That's exactly my question, in other words, how to sent it directly to the spam folder (which should be possible by setting the right header) That can be done by global rule in hmailserver. Criteria (Use AND): X-hMailServer-Spam equals "YES" X-hMailServer-LoopCount Less Than 1 X-hMailServer-Reason-...
- 2020-12-07 14:03
- Forum: General discussions
- Topic: CSV File attachment not sent when using SMTP send through an Application
- Replies: 10
- Views: 441
Re: CSV File attachment not sent when using SMTP send through an Application
Has to be something with how your app attaches the file. Can you post logs of a failed attempt to send with attachment?
How is your app attaching the file?
How is your app attaching the file?
- 2020-12-07 13:59
- Forum: Development & alpha discussions
- Topic: MTA / MSA port?
- Replies: 14
- Views: 956
Re: MTA / MSA port?
My MUA always connects to SMTP server on port 25 for submission. Do other SMTP servers also connect to port 25 for delivering mail? The MSA and MTA could still be located on port 25 but only exist hypothetically. Perhaps you should start at the beginning ... https://tools.ietf.org/html/rfc821 Are y...
- 2020-12-07 13:56
- Forum: Scripting
- Topic: "universial" header to mark mail as spam?
- Replies: 11
- Views: 669
Re: "universial" header to mark mail as spam?
If not, what do Outlook (ver. 2010, 2013, 2016, 2019) use/look for? Its not the app, but the user that looks for spam. That's why prepending the subject works well. You can also send possible spam to the spam folder. People understand today that the spam folder is where spam goes. Did you check the...
- 2020-12-07 03:55
- Forum: Off-topic discussions
- Topic: Detecting email sender's country
- Replies: 5
- Views: 531
Re: Detecting email sender's country
Not specifically what you're looking for, but Tor exit list here: https://www.dan.me.uk/torlist/?exit
- 2020-12-06 15:42
- Forum: User-submitted tutorials
- Topic: Giving back to the team and community: log file database upload
- Replies: 36
- Views: 2860
Re: Giving back to the team and community: log file database upload
- 2020-12-06 15:29
- Forum: User-submitted tutorials
- Topic: Giving back to the team and community: log file database upload
- Replies: 36
- Views: 2860
- 2020-12-06 15:26
- Forum: Off-topic discussions
- Topic: Hmailserver - the social organiser
- Replies: 26
- Views: 2209
Re: Hmailserver - the social organiser
I forgot one of our main dudes is on the other side of the planet. Maybe zoom + beer is better after all. :D Anyway, I like the idea. I have no one to talk about email. Literally nobody cares. I imagine that's probably how the guy at the water plant feels after inventing gizmos to keep us all choler...
- 2020-12-06 15:18
- Forum: Off-topic discussions
- Topic: Hmailserver - the social organiser
- Replies: 26
- Views: 2209
Re: Hmailserver - the social organiser
If corona Chan allows, I will be in Europe in August. Had to cancel 2020 trip. Actually LOT cancelled, not me. Schedule very tight. No promises.
Or if you prefer the Big Apple, which is dying for tourism at the moment, I can meet literally anytime (except Aug 2021).
Beer > zoom

Or if you prefer the Big Apple, which is dying for tourism at the moment, I can meet literally anytime (except Aug 2021).
Beer > zoom

- 2020-12-06 15:09
- Forum: User-submitted tutorials
- Topic: Giving back to the team and community: log file database upload
- Replies: 36
- Views: 2860
Re: Giving back to the team and community: log file database upload
Let me guess: some of them probably belong to either of the networks 212.70.149.0 or 45.142.120.0. These are known abusers who brute-force or DDOS SMTP servers around the globe 24/7. Here's the list: Firewall banned IPs having > 999 drops in the last 3 months. HITS IP ADDRESS ====== ===============...
- 2020-12-06 14:58
- Forum: User-submitted tutorials
- Topic: Giving back to the team and community: log file database upload
- Replies: 36
- Views: 2860
Re: Giving back to the team and community: log file database upload
Should have mentioned #1 is unauthenticated SMTP only. Hmmm... I run everything through IDS except connections from localhost, local LAN and local WAN. IP gets removed if authenticated logon -OR- message fully processed (received from outside server). I never had an issue with mobile imap clients. ...
- 2020-12-04 20:15
- Forum: User-submitted tutorials
- Topic: Giving back to the team and community: log file database upload
- Replies: 36
- Views: 2860
Re: Giving back to the team and community: log file database upload
I counted 38 IPs > 1000 hits in the last 3 months. 

- 2020-12-04 14:07
- Forum: General discussions
- Topic: hMailserver to send WordPress email
- Replies: 4
- Views: 563
Re: hMailserver to send WordPress email
It seems that WordPress uses PHP as the method to send email - the result is that email is marked as SPAM. Your spam issue has nothing to do with PHP. Its just a programming language. I can get this to work with a Commercial Email provider ( SendGrid ) but 20% of their email is marked as SPAM. Beca...
- 2020-12-03 14:17
- Forum: General discussions
- Topic: Cannot send mail via client
- Replies: 124
- Views: 18555
Re: Cannot send mail via client
This thread slid off the rails near the top of the first page. 

- 2020-12-01 15:55
- Forum: Scripting
- Topic: Script Conditionally Save Attachement
- Replies: 16
- Views: 3930
Re: Script Conditionally Save Attachement
Easy peasy ... https://twiki.org/p/pub/Codev/TWikiPresentation2013x03x07/regex-example.png :mrgreen: A dot is a matching character when enclosed in square brackets (no escaping)? I just tested it on regex101 and yes, it matches as dot and NOT as any character. You can also escape it - there's no di...
- 2020-12-01 03:49
- Forum: Scripting
- Topic: Script Conditionally Save Attachement
- Replies: 16
- Views: 3930
Re: Script Conditionally Save Attachement
Ha! Changed it to “contains” from “equals” and it worked. Sweet. Would like to understand why that was necessary? If you don't specify "contains", it attempts to match the entire string. "John Doe" <john@doe.com> does CONTAIN but does NOT EQUAL john@doe.com ^string$ does not necessarily equal ^.*st...
- 2020-12-01 03:45
- Forum: Scripting
- Topic: Script Conditionally Save Attachement
- Replies: 16
- Views: 3930
Re: Script Conditionally Save Attachement
Also, is there a way for me to invoke a specific PowerShell script? Can I set up a function like the one we did above that will run a PowerShell script wit a message of particular criteria is received? I am fairly proficient with PowerShell, much less so with VBS. I admit I did not search for it ye...
- 2020-12-01 02:25
- Forum: Scripting
- Topic: Script Conditionally Save Attachement
- Replies: 16
- Views: 3930
Re: Script Conditionally Save Attachement
Hoping I can get a few pointers here. Just trying to facilitate attachments that get sent into Hmail get saved off to a local folder. I edited C:\Program Files (x86)\hMailServer\Events\EventHandlers.vbs to add the following to the bottom of the file (It was not clear if it needed to be anyplace spe...
- 2020-11-30 14:22
- Forum: General discussions
- Topic: Add a Certificate / Reduce Blocing
- Replies: 8
- Views: 1100
Re: Add a Certificate / Reduce Blocing
Hi All, I am running hMailServer with phpBB and it's superb. One small issue - I use a static IP which is registered as residential, some hosts such as Hotmail return errors, example below. I assume that I cannot overcome this by adding a certificate somewhere? I'm sure the answer is no - but let's...
- 2020-11-30 06:03
- Forum: Scripting
- Topic: Parsing Public Suffix List in VBS
- Replies: 11
- Views: 2854
Re: Parsing Public Suffix List in VBS
Playing around with this tonight. I changed the vbs to a recursive function so it a) cuts down on the number of lines and b) can test any length of domain. Option Explicit Function Include(sInstFile) Dim f, s, oFSO Set oFSO = CreateObject("Scripting.FileSystemObject") On Error Resume Next If oFSO.Fi...
- 2020-11-29 21:43
- Forum: General discussions
- Topic: How to make mails internal->internal available externally too?
- Replies: 3
- Views: 760
Re: How to make mails internal->internal available externally too?
Have you moved your server from "ourprovider.de" to internal hmailserver? Or you are trying to use BOTH hmailserver and "ourprovider.de"?
- 2020-11-29 21:40
- Forum: General discussions
- Topic: MS Outlook Professional Plus 2019, POP3 Fail
- Replies: 19
- Views: 2201
Re: MS Outlook Professional Plus 2019, POP3 Fail
But interesting is that Outlook 365 still allows Port 465 to use StartTLS but then Outlook 365 might not be updated quite yet or maybe not for a long time. There are other discrepancies in Outlook 365 perhaps as well. Port 465 is fine with STARTTLS or SSL as long as it is either. It cannot be unenc...
- 2020-11-28 23:26
- Forum: General discussions
- Topic: Sending | Receiving Issue
- Replies: 13
- Views: 1550
Re: Sending | Receiving Issue
I just installed this https://github.com/messagerie-melanie2/Roundcube-Skin-Melanie2-Larry-Mobile to support mobile devices... I thought you had to pay for that one. Rainloop has a mobile interface built in. Its pretty cool. More updated UI than RC. Plus a couple of nice features like hmailserver c...
- 2020-11-28 23:25
- Forum: General discussions
- Topic: Sending | Receiving Issue
- Replies: 13
- Views: 1550
Re: Sending | Receiving Issue
I just installed this https://github.com/messagerie-melanie2/Roundcube-Skin-Melanie2-Larry-Mobile to support mobile devices... I thought you had to pay for that one. Rainloop has a mobile interface built in. Its pretty cool. More updated UI than RC. Plus a couple of nice features like hmailserver c...
- 2020-11-28 19:25
- Forum: General discussions
- Topic: Sending | Receiving Issue
- Replies: 13
- Views: 1550
Re: Sending | Receiving Issue
I just installed this https://github.com/messagerie-melanie2/Roundcube-Skin-Melanie2-Larry-Mobile to support mobile devices... I thought you had to pay for that one. Rainloop has a mobile interface built in. Its pretty cool. More updated UI than RC. Plus a couple of nice features like hmailserver c...
- 2020-11-28 18:15
- Forum: General discussions
- Topic: MS Outlook Professional Plus 2019, POP3 Fail
- Replies: 19
- Views: 2201
- 2020-11-28 17:30
- Forum: General discussions
- Topic: libmysql.dll
- Replies: 8
- Views: 13256
Re: libmysql.dll
Can confirm. I just rebuilt my server recently. Of course I had the same issue. Heidi solved it.Virinum wrote: ↑2020-11-27 07:43Do you have a link? I couldn’t find a working dll there.
I just installed https://www.heidisql.com/ and took the dll from it’s installation folder.
- 2020-11-28 17:25
- Forum: General discussions
- Topic: Sending | Receiving Issue
- Replies: 13
- Views: 1550
- 2020-11-25 14:18
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7245
Re: Delete messages older than N days
With option to skip matching accounts and/or domains if you don't want to include them in the routine: <# .SYNOPSIS Prune Messages .DESCRIPTION Delete messages in specified folders older than N days .FUNCTIONALITY Looks for folder name match at any folder level and if found, deletes all messages old...
- 2020-11-25 14:12
- Forum: General discussions
- Topic: Cannot send mail via client
- Replies: 124
- Views: 18555
- 2020-11-24 14:08
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
I guess nothing's ever done. PULL THE FORK! PULL THE FORK!!! :mrgreen: I realized I missed something - the ability to skip domains or user accounts if wanted. <# .SYNOPSIS Feed Bayes Database .DESCRIPTION Feeds messages to SPAMC for Bayes spam/ham learning .FUNCTIONALITY Looks for folder name match ...
- 2020-11-23 01:34
- Forum: General discussions
- Topic: Cannot send mail via client
- Replies: 124
- Views: 18555
- 2020-11-23 01:23
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
I made some changes RvdH suggested in the "delete older than N days" thread. The two use the same com routine for finding messages. I also figured out a way to successfully trap errors sa-learn --backup. <# .SYNOPSIS Feed Bayes Database .DESCRIPTION Feeds messages to SPAMC for Bayes spam/ham learnin...
- 2020-11-22 22:50
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7245
Re: Delete messages older than N days
And i would remove the else statement after 'If ($DeleteMessageErrors -gt 0) {}', as you can have both errors AND still purge messages successfully (i got 1 error, on DeleteByDBID on my first successful run) If ($DeleteMessageErrors -gt 0) { ... } If ($TotalDeletedMessages -gt 0) { ... } same proba...
- 2020-11-22 20:47
- Forum: Scripting
- Topic: hMailServer Offsite Backup
- Replies: 56
- Views: 6185
Re: hMailServer Offsite Backup
typo, schmypo... 

- 2020-11-22 20:43
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7245
Re: Delete messages older than N days
I had more files being deleted after i changed the $PruneFolders to be lowercase and change the script like: $PruneFolders = "test 4th level|trash|deleted|junk|spam|(2020-[0-1][0-9]-[0-3][0-9])$|listmail|unsubscribes" If ($SubFolderName .ToLower() -match [regex]$PruneFolders) { If ($hMSIMAPFolder.N...
- 2020-11-22 20:38
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7245
Re: Delete messages older than N days
Done. Thanks for the troubleshooting. One other thing I fixed was regex was case sensitive when it should have been case insensitive. I had: If ($hMSIMAPFolder.Name -match [regex]$PruneFolders) { removing [regex] did the trick. If ($hMSIMAPFolder.Name -match $PruneFolders) { <# .SYNOPSIS Prune Messa...
- 2020-11-22 19:44
- Forum: Scripting
- Topic: hMailServer Offsite Backup
- Replies: 56
- Views: 6185
Re: hMailServer Offsite Backup
What's a pdate?jimimaseye wrote: ↑2020-11-22 10:56I love a nice clean fresh 'pdate'. Sad when we don't get one.
(Arent there special parties for these things?)
[Entered by mobile. Excuse my spelling.]
- 2020-11-22 19:42
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7245
Re: Delete messages older than N days
Got it (for real this time :) ) I had one domain without account (domain holds only a alias), wrap this around Do { $hMSAccount = $hMSDomain.Accounts.Item($IterateAccounts) ... } Until ($IterateAccounts -eq $hMSDomainAccountsCount) If ($hMSDomainAccountsCount -gt 0) { } And while we are on it, you ...
- 2020-11-21 20:32
- Forum: Scripting
- Topic: hMailServer Offsite Backup
- Replies: 56
- Views: 6185
Re: hMailServer Offsite Backup
If $HTML is enabled, you get a nice color message email. No errors here, but they are in red if they exist. I went to great lengths to make the email display properly (no line wrapping) on mobile view. Maybe that's a silly small thing, but that's how I look at the message in the morning and I want t...
- 2020-11-21 20:13
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
Here you go - untangled version. Bayes feeding only script with a couple of minor fix-ups. Stick a fork in it. Its done. <# .SYNOPSIS Feed Bayes .DESCRIPTION Feeds messages to Bayes for spam/ham learning .FUNCTIONALITY Looks for folder name match at any folder level and if found, feeds messages to s...
- 2020-11-21 15:01
- Forum: Scripting
- Topic: hMailServer Offsite Backup
- Replies: 56
- Views: 6185
Re: hMailServer Offsite Backup
Added Bayes training using SpamAssassin SpamC
https://github.com/palinkas-jo-reggelt/ ... ite_Backup
https://github.com/palinkas-jo-reggelt/ ... ite_Backup
- 2020-11-21 14:57
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
Not having analysed the 1991 emails I believe I could rely on SpamAssasson for 95% of my SPAM fighting. That is the result of a well-trained Bayes database. :mrgreen: Not with all those delicious spam filters you came up with. My spam fighting is highly tilted toward reject first, ask questions lat...
- 2020-11-21 03:01
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
Not having analysed the 1991 emails I believe I could rely on SpamAssasson for 95% of my SPAM fighting. That is the result of a well-trained Bayes database. :mrgreen: Not with all those delicious spam filters you came up with. My spam fighting is highly tilted toward reject first, ask questions lat...
- 2020-11-21 00:54
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
sa-learn is used for batch learning as it can reference an entire directory thus using the journal make sense not to lock the database for the duration of processing the directory. "--sync" is required to update the database from the journal and activate the learned tokens. spamc however is normall...
- 2020-11-21 00:26
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
OK, here's my version. Sorry about the commingled script for deleting old messages - I'm too lazy to untangle it, so I'm just pasting it in its entirety. This will be in my backup & offsite upload routine shortly. <# .SYNOPSIS Prune Messages & Feed Bayes .DESCRIPTION Delete messages in specified fol...
- 2020-11-20 23:50
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
- 2020-11-20 22:22
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
- 2020-11-20 18:25
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
# If this option is set, whenever SpamAssassin does Bayes learning, it will # put the information into the journal instead of directly into the database. # This lowers contention for locking the database to execute an update, but # will also cause more access to the journal and cause a delay before...
- 2020-11-20 17:51
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
Nope, I can see you received 2 new message, 1 of the 2 new messages was used to learn some HAM tokens and one SPAM message was re-visited :mrgreen: But spamd will not use these tokens unless the journal is synced - correct? I think the tokens are being placed into the db, but not being used to scor...
- 2020-11-20 17:45
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
Ehhh.... Never mind. Just took a dump.
At least I know what to do now. 
Code: Select all
0.000 0 0 0 non-token data: last journal sync atime

- 2020-11-20 17:38
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
Yes and Yes ... My test script seems to run fine even though I did not change "--allow-tell". First operational run had errors for file too large for spamc to scan: Finished feeding 190 messages to Bayes in 1 minute 47 seconds Learned tokens from 141 of 185 HAM messages fed to Bayes Learned tokens ...
- 2020-11-20 16:52
- Forum: SpamAssassin implementation discussions
- Topic: SA vs ClamAV for phishing heuristics
- Replies: 14
- Views: 6822
Re: SA vs ClamAV for phishing heuristics
ClamAV.cf AND ClamAV.pm (version 2.0) both go into same directory as local.cf... ClamAV.cf #loadplugin Mail::SpamAssassin::Plugin::ClamAV loadplugin ClamAV clamav.pm full CLAMAV eval:check_clamav() describe CLAMAV Clam AntiVirus detected a virus score CLAMAV 3 add_header all Virus _CLAMAVRESULT_ I'...
- 2020-11-20 16:35
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
OK, this is slowly getting out of hand ... :mrgreen: Support for "spamc.exe -L" and "sa-learn.exe". For spamc to work you must run spamd with "--allow-tell". When Batch = 0 (spamc) mode is selected there will be no sync of the database and no backup. Spamd is doing the sync on-the-fly and backup is...
- 2020-11-20 15:52
- Forum: User contributed hMailServer 5 scripts
- Topic: SpamAssassin Bootcamp (sa-learn) train BAYES
- Replies: 169
- Views: 86911
Re: SpamAssassin Bootcamp (sa-learn) train BAYES
OK, this is slowly getting out of hand ... :mrgreen: Support for "spamc.exe -L" and "sa-learn.exe". For spamc to work you must run spamd with "--allow-tell". When Batch = 0 (spamc) mode is selected there will be no sync of the database and no backup. Spamd is doing the sync on-the-fly and backup is...
- 2020-11-19 13:18
- Forum: General discussions
- Topic: Let's Encrypt on hmailserver
- Replies: 17
- Views: 3210
Re: Let's Encrypt on hmailserver
This is probably your issue, though. Make sure hMailServer has privileges to read the certificate. hMailServer runs under local system account by default. How can I check if hMailServer has those privileges? Look at the folder properties the certificates are stored in and make sure local system acc...
- 2020-11-19 12:52
- Forum: General discussions
- Topic: Let's Encrypt on hmailserver
- Replies: 17
- Views: 3210
Re: Let's Encrypt on hmailserver
What is "fullchain"? Is that a certbot thing? I only get cert, chain and key from win-acme, so I use "chain". Try that one. BTW I can't open the .pem files for some reason, apparently I don't have permissions to open the file, the same occurred when I tried to link hmail to my certificate files, I h...
- 2020-11-17 16:04
- Forum: General discussions
- Topic: Cannot send mail via client
- Replies: 124
- Views: 18555
Re: Cannot send mail via client
well you are wrong, im not blocked, my emails goes to spam folder (Atleast at my email using yahoo.) I dont know about others. OK I'm wrong. I know... completely shocking.... :lol: I DO reject PBL. Many others do as well. I guess I was wrong about the big providers. Instead of blocking, they send i...
- 2020-11-17 13:58
- Forum: General discussions
- Topic: Cannot send mail via client
- Replies: 124
- Views: 18555
Re: Cannot send mail via client
For sending email, you should also provide SPF and DKIM records. This improves your reputation and lowers the chance for your emails to got to the spam folder. These records you also have to store in the nameserver of your domain name registrar. That's not going to help him when he's policy blocked...