Search found 2332 matches
- 2020-11-02 17:24
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7807
Re: Delete messages older than N days
I cleaned up a bunch of stuff like variable naming so it makes more sense, plus better error checking. Working great now. Everything below <# Begin hMailServer Backup Prune Messages #> is taken straight from my working backup script: https://github.com/palinkas-jo-reggelt/hMailServer_Offsite_Backup ...
- 2020-11-02 14:11
- Forum: Scripting
- Topic: hMailServer Offsite Backup
- Replies: 56
- Views: 8206
Re: hMailServer Offsite Backup
Updated message pruning script to look down all subfolder levels that exist. Also deletes empty subfolders of matching folders.
See here for testing: https://hmailserver.com/forum/viewtopic.php?f=9&t=35463
See here for testing: https://hmailserver.com/forum/viewtopic.php?f=9&t=35463
- 2020-11-02 14:08
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7807
Re: Delete messages older than N days
Worked as intended in last night's backup routine. 

- 2020-11-02 01:28
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7807
Re: Delete messages older than N days
I've been testing by creating several levels of subfolders and copying old messages. Seems to work perfectly now. I'm going to implement it tonight into my backup routine.
- 2020-11-01 22:45
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7807
Re: Delete messages older than N days
OK, I think I fixed that search-for-empty-folders issue. Look at function SubFoldersEmpty. Otherwise, I'm very confident in the message deleting. You can turn off DeleteEmptySubfolders in the config if you don't want to do that, but I think its good now. Anyway, set DoDelete to false for testing. <#...
- 2020-11-01 19:53
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7807
Re: Delete messages older than N days

- 2020-11-01 19:30
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7807
Re: Delete messages older than N days
OOPS... I wish the post edit time were longer. Already found a flaw in the delete folder > check subfolders for messages logic. It was doing the exact opposite of what was intended! :oops: Its fixed now. <# .SYNOPSIS Prune Messages .DESCRIPTION Delete messages in specified folders older than N days ...
- 2020-11-01 18:49
- Forum: Scripting
- Topic: Delete messages older than N days
- Replies: 28
- Views: 7807
Delete messages older than N days
There's a few of these around here, so this is nothing new, of course. But I do think I've improved on it, so I'm sharing it here. As part of my hmailserver backup offsite routine I also made a fairly simplistic cleardown script, which was basically Jimimaseye's backup and cleardown script but rewri...
- 2020-10-31 13:39
- Forum: Off-topic discussions
- Topic: Corona Virus
- Replies: 266
- Views: 79305
Re: Corona Virus
All of these countries have had wearing masks as compulsory for months. And still are. As I said, it doesn't look like wearing masks works, does it. And one has to remember to factor in the quality of what people are wearing out there and suitability of how people wear them. After all, the average ...
- 2020-10-30 15:20
- Forum: Scripting
- Topic: hMailServer Offsite Backup
- Replies: 56
- Views: 8206
Re: hMailServer Offsite Backup
I added better error handling for the upload part. * If there is a failure during upload, it will try again N times (specified in the config). * If there's a successful upload, but the remote file size does not match the size of the file uploaded, it will throw an error, delete the uploaded file and...
- 2020-10-27 19:35
- Forum: Scripting
- Topic: hMailServer Offsite Backup
- Replies: 56
- Views: 8206
Re: hMailServer Offsite Backup
Probably the most useful script in the whole place. 

- 2020-10-27 17:51
- Forum: Scripting
- Topic: hMailServer Offsite Backup
- Replies: 56
- Views: 8206
hMailServer Offsite Backup
First of all, I have to give Jimimaseye 100% credit for this. Except for the uploading part, its all from his backup script here: https://hmailserver.com/forum/viewtopic.php?f=21&t=28139 which I've been using with great success for over a year. I wasn't planning on touching it at all, but I couldn't...
- 2020-10-27 15:29
- Forum: General discussions
- Topic: Cannot send mail via client
- Replies: 124
- Views: 19725
Re: Cannot send mail via client
I have ran some of those tests... I don't have DKIM signature .. SPF: You will certainly need those things (and more) Ok I get that I need this and that... but can you explain whats the meaning of every other thing? how do I get it ? and what its purpose ? https://en.wikipedia.org/wiki/Sender_Polic...
- 2020-10-27 04:00
- Forum: General discussions
- Topic: Possible port 25 block and MX record issues
- Replies: 7
- Views: 3616
Re: Possible port 25 block and MX record issues
You’ve set up a mx record for mx. zgamelogic.com: https://mxtoolbox.com/SuperTool.aspx?action=mx%3amx.zgamelogic.com That’s the reason why the mx record for zgamelogic.com couldn’t be found. Yes. OP should change the mx record from mx.zgamelogic.com to zgamelogic.com, then point it to either mail.z...
- 2020-10-26 00:29
- Forum: General discussions
- Topic: Cannot send mail via client
- Replies: 124
- Views: 19725
Re: Cannot send mail via client
I want to make sure it works perfectly There is SO MUCH more to running a mailserver than simply installing the software and opening ports on your router (with instruction). You need a valid SSL certificate, and not a self signed one You need SPF, DKIM and DMARC records You need RDNS to match your ...
- 2020-10-25 20:14
- Forum: General discussions
- Topic: 550 Rejected by SpamCop - when using Sendgrid
- Replies: 24
- Views: 7303
Re: 550 Rejected by SpamCop - when using Sendgrid
SendGrid suffered an incursion in August and a large number of customer accounts were compromised. https://krebsonsecurity.com/2020/08/sendgrid-under-siege-from-hacked-accounts/ Spammer quickly hoovered up the account and the resulting spam assault BL many SendGrid IPs. They are still recovering. I...
- 2020-10-23 20:03
- Forum: Scripting
- Topic: Free Unlimited Offsite Backup
- Replies: 5
- Views: 2396
Re: Free Unlimited Offsite Backup
Fixed a bug that caused file encoding to corrupt the archive to be uploaded. Took a while to figure that one out. Clue was here: https://stackoverflow.com/questions/25469118/trouble-with-powershell-script-to-call-http-post-with-multipart-form-data #ISO-8859-1 is only encoding where byte value == cod...
- 2020-10-23 15:09
- Forum: General discussions
- Topic: 550 Rejected by SpamCop - when using Sendgrid
- Replies: 24
- Views: 7303
Re: 550 Rejected by SpamCop - when using Sendgrid
Firstly, it wasn't vicious by even the broadest standard. Being accused of spamming on the internet is about the same as being accused of a murder in real life, so yes, this was vicious. Hmmmm....... That's interesting. Let's review: A) Someone hurt your feelings vs B) Arrest, prosecution, $$$ to d...
- 2020-10-22 21:24
- Forum: General discussions
- Topic: 550 Rejected by SpamCop - when using Sendgrid
- Replies: 24
- Views: 7303
Re: 550 Rejected by SpamCop - when using Sendgrid
PS: I do not understand why you are viciously attacking an innocent victim. Sendgrid is for spamming like HTTP is for child porn. I cannot help it: I have to develop a wrapper for Sendgrid API for an infrastructure monitoring application, but you keep attacking me personally. Give your head a shake...
- 2020-10-21 14:19
- Forum: Off-topic discussions
- Topic: Why using "master" in Github is bad ...
- Replies: 23
- Views: 6403
Re: Why using "master" in Github is bad ...
I came across a thing called 'USER_IN_WELCOMELIST', previously know as 'USER_IN_WHITELIST' in spamassassin....we are kind of going crazy with blm, aren't we? Allthough, blacklist_from seems unchanged (yet) From recent back and forth in the SA user list, there is only one set of rules for all versio...
- 2020-10-21 14:06
- Forum: General discussions
- Topic: Where to place created MX record in hMail
- Replies: 27
- Views: 8088
Re: Where to place created MX record in hMail
Meh... All signs point to landslide victory. Yard signs, merchandise, donations, every conceivable metric. Except fake news polls. They're the only holdout and just as fake as they were in 2016. There is simply zero enthusiasm for the corrupt, senile kiddie diddler candidate that hides in his basem...
- 2020-10-21 00:38
- Forum: General discussions
- Topic: Where to place created MX record in hMail
- Replies: 27
- Views: 8088
Re: Where to place created MX record in hMail
I wouldn't worry about that. Trump is the peace president, disengaging from eternal war. Plus, he has the election in the bag. A landslide cometh. This is brave. Can you imagine the "told you so" and opportunity for ridicule this is opening up. I presume the "eternal war" should have been "external...
- 2020-10-20 16:50
- Forum: Scripting
- Topic: Free Unlimited Offsite Backup
- Replies: 5
- Views: 2396
Re: Free Unlimited Offsite Backup
Future releases here: https://github.com/palinkas-jo-reggelt/ ... and-Upload
- 2020-10-20 16:30
- Forum: General discussions
- Topic: hMailServer and Sendgrid
- Replies: 15
- Views: 4183
Re: hMailServer and Sendgrid
have you read this ? https://sendgrid.com/docs/for-developers/sending-email/getting-started-smtp/ roughly: "Create a SendGrid API key on the API Keys page." "Convert your API key to Base64" "when authenticating use the API username encoded in Base64. Everyone's username is apikey, which is YXBpa2V5...
- 2020-10-20 16:28
- Forum: General discussions
- Topic: hMailServer and Sendgrid
- Replies: 15
- Views: 4183
Re: hMailServer and Sendgrid
Ahhh... Sorry, I thought the api key was only for the control panel stuff. They're requiring everyone script an email client. That's probably not a big deal for marketers. hMailServer is not a solution for this API. It looks like they're phasing out smtp relaying altogether. https://sendgrid.com/blo...
- 2020-10-20 15:56
- Forum: Scripting
- Topic: Free Unlimited Offsite Backup
- Replies: 5
- Views: 2396
Re: Free Unlimited Offsite Backup
Fixed up a bit. This version creates the archive as well as upload. <# .SYNOPSIS LetsUpload Backup Utility .DESCRIPTION Compresses and uploads folder contents to LetsUpload.io .FUNCTIONALITY Compresses and uploads folder contents to LetsUpload.io .PARAMETER UploadFolder Specifies the folder on local...
- 2020-10-20 15:37
- Forum: General discussions
- Topic: hMailServer and Sendgrid
- Replies: 15
- Views: 4183
Re: hMailServer and Sendgrid
SMS should do the trick. Get a code, type it in... Easy peasy. I'm sorry but I don't follow you If sendgrid offers SMS as a 2FA method, you make your request for new keys, they send you a text with a one time code, you use the code to validate the 2FA form. Then you get your new keys. Just like whe...
- 2020-10-20 13:15
- Forum: General discussions
- Topic: hMailServer and Sendgrid
- Replies: 15
- Views: 4183
Re: hMailServer and Sendgrid
SMS should do the trick. Get a code, type it in... Easy peasy.
- 2020-10-20 03:06
- Forum: General discussions
- Topic: Where to place created MX record in hMail
- Replies: 27
- Views: 8088
- 2020-10-19 18:46
- Forum: General discussions
- Topic: Where to place created MX record in hMail
- Replies: 27
- Views: 8088
- 2020-10-19 15:50
- Forum: General discussions
- Topic: Where to place created MX record in hMail
- Replies: 27
- Views: 8088
- 2020-10-19 11:50
- Forum: Scripting
- Topic: Free Unlimited Offsite Backup
- Replies: 5
- Views: 2396
Re: Free Unlimited Offsite Backup
I will. Thanks for the tip!
- 2020-10-19 03:44
- Forum: General discussions
- Topic: A strange issue with STARTTLS
- Replies: 4
- Views: 1929
Re: A strange issue with STARTTLS
Sorry, I don't have a solution for you, but this happens when TLS is required from the beginning by the client. StartTLS on 587 first connects unencrypted and then upgrades the connection to TLS. 465 starts the connection with TLS (no unencrypted connection/upgrade). Your client is going in hot (enc...
- 2020-10-19 03:31
- Forum: Scripting
- Topic: Free Unlimited Offsite Backup
- Replies: 5
- Views: 2396
Free Unlimited Offsite Backup
No, this is not spam. :lol: I had an idea to backup my work files so I started looking around for a dropbox/onedrive/googledrive type of solution. None of them had a free account with enough storage. Then I found letsupload.org with FREE UNLIMITED storage. Who knows how long this will last but may a...
- 2020-10-18 18:39
- Forum: General discussions
- Topic: Where to place created MX record in hMail
- Replies: 27
- Views: 8088
- 2020-10-18 16:59
- Forum: User-submitted tutorials
- Topic: HOW TO: Ready-To-Go Backup and Cleardown script
- Replies: 165
- Views: 114295
Re: HOW TO: Ready-To-Go Backup and Cleardown script
What if there were a way to backup your server into an AES-256 encrypted archive, then upload it to a free file storage site that allows unlimited storage space and will hold your backups for 60 days, no matter how large the files are? Would you say I was completely crazy for suggesting such a thing...
- 2020-10-18 16:53
- Forum: General discussions
- Topic: Where to place created MX record in hMail
- Replies: 27
- Views: 8088
Re: Where to place created MX record in hMail
No MX required if you're NEVER going to attempt to contact outside servers, or have mail delivered from the internet. All you need is a local domain: mydomain.local Of course, you're limited to sending messages to your local domain only, but that appears to be your intent. Out of curiosity, what is ...
- 2020-10-13 12:49
- Forum: General discussions
- Topic: Windows defender firewall IP blocking is not working in version 5.7
- Replies: 21
- Views: 3910
Re: Windows defender firewall IP blocking is not working in version 5.7
Maybe the OP should simply delete the block rule, then recreate it. I just had a look at my rules list. My firewall ban project adds rules many times a day, then consolidates the previous day's rules, then at the bribing of the month consolidates the previous month's rules. So they're constantly bei...
- 2020-10-12 17:19
- Forum: General discussions
- Topic: Windows defender firewall IP blocking is not working in version 5.7
- Replies: 21
- Views: 3910
Re: Windows defender firewall IP blocking is not working in version 5.7
See 'rules store' here >> https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc755604(v=ws.10)?redirectedfrom=MSDN Rules are run from the top down the Hmailserver rule take precedence to the block single IP rule (In saying that, when I create a test block IP rule,...
- 2020-10-12 00:57
- Forum: General discussions
- Topic: Securing SMTP Sending
- Replies: 20
- Views: 3603
Re: Securing SMTP Sending
Now that that's sorted out, does your client work?
- 2020-10-11 13:45
- Forum: General discussions
- Topic: Securing SMTP Sending
- Replies: 20
- Views: 3603
Re: Securing SMTP Sending
Is there an error log?
- 2020-10-10 16:06
- Forum: General discussions
- Topic: Windows defender firewall IP blocking is not working in version 5.7
- Replies: 21
- Views: 3910
Re: Windows defender firewall IP blocking is not working in version 5.7
Hmailserver does not do firewall blocking. What do you think was happening with 5.6?
- 2020-10-10 04:21
- Forum: General discussions
- Topic: Securing SMTP Sending
- Replies: 20
- Views: 3603
Re: Securing SMTP Sending
Thanks. I can't create an IP range for my client because the client is remote. That's not true. Just set the IP of the IP range to the IP of the client. Just like external MTA's it comes in through the one public IP address of the server. Yes. But it comes in to port 587 using authentication. Mail ...
- 2020-10-09 23:19
- Forum: General discussions
- Topic: Securing SMTP Sending
- Replies: 20
- Views: 3603
Re: Securing SMTP Sending
I want to use hmailserver to send emails to other MTA's from a software client I have created. I assume this is what people call SMTP relay. My question is, how do I restrict the mail server to sending to other MTA's only from my client while allowing other MTA's to still send mail to my mail serve...
- 2020-10-09 23:02
- Forum: General discussions
- Topic: 5.6.8-B2431 SPF Check Failures
- Replies: 75
- Views: 18182
Re: 5.6.8-B2431 SPF Check Failures
Yes, I’m absolute sure it is no spam :-) DKIM, IP-address and content are all correct. Only SPF not according to hmail. out of curiosity what does the spf check at mxtoolboox say ? ( i have actually never come across anyone using macros like that yet, so i am curious ) Same here. Not sure how that ...
- 2020-10-09 16:05
- Forum: User contributed hMailServer 5 scripts
- Topic: Dynamic Black/Whitelists in your script.
- Replies: 110
- Views: 52517
Re: Dynamic Black/Whitelists in your script.
FYI - bitcoin address regex here: ^[13][a-km-zA-HJ-NP-Z0-9]{26,33}$ Update. \b((bc|tb)(0([ac-hj-np-z02-9]{39}|[ac-hj-np-z02-9]{59})|1[ac-hj-np-z02-9]{8,87})|([13]|[mn2])[a-km-zA-HJ-NP-Z1-9]{25,39})\b\s From: https://stackoverflow.com/questions/21683680/regex-to-match-bitcoin-addresses To test: http...
- 2020-10-09 14:11
- Forum: General discussions
- Topic: 5.6.8-B2431 SPF Check Failures
- Replies: 75
- Views: 18182
Re: 5.6.8-B2431 SPF Check Failures
If you're sure it's not spam, you could whitelist the addresses.
- 2020-10-09 00:03
- Forum: General discussions
- Topic: Using hMail as SMTP Relay for Scanners
- Replies: 13
- Views: 3358
Re: Using hMail as SMTP Relay for Scanners
"DEBUG" 2788 "2020-10-08 13:52:34.570" "Performing SSL/TLS handshake for session 30. Verify certificate: True , Expected remote host name: smtp-relay.gmail.com" "TCPIP" 5748 "2020-10-08 13:52:34.633" "TCPConnection - TLS/SSL handshake failed. Session Id: 30, Remote IP: 74.125.202.28, Error code: 33...
- 2020-10-08 19:17
- Forum: General discussions
- Topic: Using hMail as SMTP Relay for Scanners
- Replies: 13
- Views: 3358
Re: Using hMail as SMTP Relay for Scanners
Uncheck "external to external email addresses" under "require smtp authentication".
- 2020-10-08 16:31
- Forum: User contributed hMailServer 5 scripts
- Topic: Check Service Status, Take Action, Notify
- Replies: 6
- Views: 5769
Re: Check Service Status, Take Action, Notify
Refreshed for 2020... :D <# .SYNOPSIS Test telnet on hMailServer .DESCRIPTION Uses telnet to ensure hMailServer properly functioning .FUNCTIONALITY 1) Telnets in to hMailServer and checks for 220 Banner 2) If banner found, exit 3) If banner not found then wait, check again, if still not found then r...
- 2020-10-08 15:07
- Forum: General discussions
- Topic: Messages are doubling infinitely ro local recepients
- Replies: 1
- Views: 782
Re: Messages are doubling infinitely ro local recepients
How about some logs?
- 2020-10-08 03:25
- Forum: Scripting
- Topic: MaxMinds GeoIP for local MySQL
- Replies: 31
- Views: 13966
- 2020-10-08 01:05
- Forum: General discussions
- Topic: Why I always got "Verify certificate : False" ?
- Replies: 5
- Views: 1453
Re: Why I always got "Verify certificate : False" ?
Certificates are verified through certificate authorities. Many servers still use self signed certificates in order to establish a SSL connection. If you attempt verify a self signed certificate, it will fail and hmailserver will drop the connection. There's no need to verify a sending server. All y...
- 2020-10-07 16:02
- Forum: Scripting
- Topic: MaxMinds GeoIP for local MySQL
- Replies: 31
- Views: 13966
Re: MaxMinds GeoIP for local MySQL
I optimized a query and finally got a chance to test it last night (with the new weekly release of MaxMind data). 10 times faster now. YUUUUGE improvement. I'm going to experiment with just deleting all the data and starting from scratch. That would remove several steps involving manipulating the CS...
- 2020-10-07 15:27
- Forum: General discussions
- Topic: Display number of emails pending in each account?
- Replies: 19
- Views: 3409
Re: Display number of emails pending in each account?
SELECT hm_accounts.accountaddress,COUNT(*) FROM hm_messages INNER JOIN hm_accounts ON hm_messages.messageaccountid = hm_accounts.accountid WHERE RIGHT(BIN(hm_messages.messageflags),1) = '0' GROUP BY hm_accounts.accountaddress ORDER BY SUBSTRING_INDEX(hm_accounts.accountaddress, "@", -1) I made one ...
- 2020-10-07 13:46
- Forum: General discussions
- Topic: Display number of emails pending in each account?
- Replies: 19
- Views: 3409
Re: Display number of emails pending in each account?
SELECT hm_accounts.accountaddress,COUNT(*) FROM hm_messages INNER JOIN hm_accounts ON hm_messages.messageaccountid = hm_accounts.accountid WHERE RIGHT(BIN(hm_messages.messageflags),1) = '0' GROUP BY hm_accounts.accountaddress ORDER BY SUBSTRING_INDEX(hm_accounts.accountaddress, "@", -1) Haha! That'...
- 2020-10-06 23:32
- Forum: General discussions
- Topic: Display number of emails pending in each account?
- Replies: 19
- Views: 3409
Re: Display number of emails pending in each account?
Found one minor flaw. Your all in one query outputs in alphabetical order by address, instead of by domain, then by address. Its not really a flaw, just a nitpick. Using the COM with your first query, and then using if unread > 0, puts them back into orderly fashion, without the no-unread accounts. ...
- 2020-10-06 23:22
- Forum: General discussions
- Topic: Display number of emails pending in each account?
- Replies: 19
- Views: 3409
Re: Display number of emails pending in each account?
SELECT hm_accounts.accountaddress, COUNT(*) FROM hm_messages INNER JOIN hm_accounts ON hm_messages.messageaccountid = hm_accounts.accountid WHERE RIGHT(BIN(hm_messages.messageflags),1) = '0' GROUP BY hm_accounts.accountaddress; OK, it will ONLY list accounts with unread messages... :roll: BUT ! You...
- 2020-10-06 22:46
- Forum: General discussions
- Topic: Display number of emails pending in each account?
- Replies: 19
- Views: 3409
Re: Display number of emails pending in each account?
SELECT COUNT(hm_messages.messageid) FROM hm_messages INNER JOIN hm_accounts ON hm_messages.messageaccountid = hm_accounts.accountid WHERE hm_accounts.accountaddress = 'wile.e.coyote@acme.inc' AND RIGHT(BIN(hm_messages.messageflags),1) = '0'; You are welccome... :mrgreen: Beeyooteefool! I'll push ou...
- 2020-10-06 21:58
- Forum: General discussions
- Topic: Display number of emails pending in each account?
- Replies: 19
- Views: 3409
Re: Display number of emails pending in each account?
SELECT COUNT(hm_messages.messageid) FROM hm_messages INNER JOIN hm_accounts ON hm_messages.messageaccountid = hm_accounts.accountid WHERE hm_accounts.accountaddress = 'wile.e.coyote@acme.inc' AND RIGHT(BIN(hm_messages.messageflags),1) = '0'; You are welccome... :mrgreen: Beeyooteefool! I'll push ou...