HMailserver HIDDEN settings

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
Post Reply
User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

HMailserver HIDDEN settings

Post by jimimaseye » 2017-02-03 01:44

Published: 2nd February 2017

Over the years and starting at version 5.4, with the aid of public input, some hidden functionality was added to Hmailserver that is not official, documented or available from within the GUI. The main contributor to these changes, 'Bill', made a list of his changes (found here) and some of those changes have been retained (undocumented) up to current production build (5.6.6 - Build 2383). This functionality is enabled or set by the means of adding entries to the Hmailserver.ini file under a subsection "[Settings]" (add to the bottom of the INI file if not already present).

WARNING: These functions are not official in current build (5.6.6) and so no guarantee is being offered and you use these functions at your own risk. (However, many have been used and tested with feedback given to Bill in the original thread at the time. This could lead to assume that if the functionality remains then it has been cleared as ok by those users when used in the correct circumstances).

Some of the functions/modifications undertook by inclusion of the settings is obvious from the narratives given below, others are not. DO NOT APPLY ANY SETTINGS without guidance from experienced users on this forum (especially in the case of absent explanation narrative). You will receive little sympathy if you destroy your production email server by implementing these settings without testing its effectiveness.

NOTE: Although currently they have still been retained since being introduced at 5.4, any of these hidden settings may be removed/deactivated at any time by the author in any official release of Hmailserver. There are no guarantees that these settings are still active from any production release forwards on from current build (at time of writing) 5.6.6 - Build 2383. Those that are interested and able can self-check for their inclusion in later releases by reviewing the source code.

The list below is a replication of the list containing all remaining settings.


hMailServer/bin/hMailServer.INI
[Settings]

SepSvcLogs=1
; This key tells hmailserver to split SMTP/IMAP/POP into their own log files such as
; hmailserver_SMTP_2010-10-24.log, hmailserver_IMAP_2010-10-24.log, hmailserver_POP3_2010-10-24.log
; Default is to have all services logged together in 1 file.

LogLevel=9
;1=lowest/least 9=highest/most
;NOTE: Not really functional at this point except a few specific places
;Default=9 if not defined.

MaxLogLineLen=300
; This key causes log lines to be neatly truncated at specified # of characters to reduce log sizes.
; Example: "POP3D" 3952 2 "2010-10-24 15:18:59.924" "127.0.0.1" "SENT: 1 756[nl]2 ... 350[nl]1973 371[nl]."
; This defaults to disabled if key doesn't exist or LogLevel > 2 or if debug logging is enabled

QuickRetries=5

QuickRetriesMinutes=7
; Defines # of minutes to delay for each retry if QuickRetries is enabled otherwise normal delivery schedule
; is used
; Defaults to 6 if QuickRetries is enabled otherwise ignored

QueueRandomnessMinutes=3
; This key defines how many minutes to use for 'QuickRetries' that over-rides the default retry schedule.
; This does not apply to NEW messages as they are still queued for immediate delivery as before.
; This defaults to 0 or disabled

MXTriesFactor=2
; This key defines a multiplier to determine how many MX/A server results to try per retry.
; For example: If set to 2 & the recipient has 11 servers, on 1st try, 1 x MXTriesFactor or 2 are tried.
; On 2nd try, 2 x MXTriesFactor or 4 are tried. On 3rd 6 are tried & so on. Eventually all 11
; would be tried if the message was not successively delivered enough times.
; This defaults to disabled if not defined

ArchiveDir=C:\MailArchive
; Folder where copies of every email get stored. Default or undefined disables archiving. A copy of all inbound and sent emails appear in a single folder under each domain named subfolder within nominated the archive folder. (Like MIRRORING without the need of SMTP delivery to an email address). eg, inbound: "{F4917B04-F8AB-4FE2-8B11-603659BF48B5}.eml" and outbound file: "Sent-{F4917B04-F8AB-4FE2-8B11-603659BF48B5}.eml".

ArchiveHardLinks=1
; Enables use of NTFS Hardlinks. (NOT FAT/FAT32!) Default or 0 disables & forces normal Copy

POP3DMinTimeout=30
; 10 seconds is default which becomes 15 internally

POP3DMaxTimeout=90
; 600 seconds is default

SMTPDMinTimeout=90
; 10 seconds is default which becomes 15 internally

SMTPDMaxTimeout=300
; 1800 seconds is default

POP3CMinTimeout=30

; 30 seconds is default

POP3CMaxTimeout=90
; 900 seconds is default

SMTPCMinTimeout=90
; 30 seconds is default

SMTPCMaxTimeout=300
; 600 seconds is default

SAMinTimeout=45
; 30 seconds is default

SAMaxTimeout=90
; 90 seconds is default

ClamMinTimeout=45
; 15 seconds is default

ClamMaxTimeout=90
; 90 seconds is default

SAMoveVsCopy=1
; Tells hmail to use move vs copy+delete. Defaults to 0 which means use "copy"

AuthUserReplacementIP=127.0.0.1
; Tells hmail to replace AUTH'd sender's IP with this value (to help when sender IP is on public blacklist).
; X-header is added instead.
; Default is blank or use sender's real IP

AddXAuthUserIP=1
; Default is 1 or enabled. If set to 0 X-AuthUserIP header with user's IP will not be added.

IndexerFullMinutes=720
; How often a FULL meta data index is done/forced if enabled in Performance Message Indexing
; Defaults to 720 if not defined

IndexerFullLimit=25000
; Maximum # of records returned to have meta data indexed if enabled in Performance Message Indexing
; Defaults to 25000 if not defined

IndexerQuickLimit=1000
; Maximum # of records returned to have meta data QUICK indexed if enabled in Performance Message Indexing
; Defaults to 1000 if not defined

LoadHeaderReadSize=4000

; Amount in bytes of file to be read in at a time when loading headers from messages
; Defaults to 4000 if not defined

LoadBodyReadSize=4000
; Amount in bytes of file to be read in at a time when loading messages
; Defaults to 4000 if not defined

BlockedIPHoldSeconds=10
; Number of seconds to wait before dropping the connection of an IP range banned IP
; Default is 0 or disabled if not defined

BackupMessagesDBOnly=0
; Defaults to 0 or disabled. When set to 1 backups & restores with 'messages' selected will backup ONLY database info for
; messages & NOT the actual Data folder.
; WARNING!! Until finished this is truly experimental feature. Understand even set to 1 doing a restore WILL ERASE DATA TREE! To get around
; that rename Data folder BEFORE restoring then rename it back when restore is complete. YOU'VE BEEN WARNED!!! (This will be fixed eventually)
; It is HIGHLY recommended you have another complete backup before restoring just in case..

DisableAUTHList=25,587
; Comma delimited list of SMTP ports to disable AUTH EHLO response banner & command
; Default if not defined is SMTP AUTH enabled on all SMTP ports
; NOTE: Disables AUTH Plain as well.
; Particularly effective on blocking all attempted authentication attempts on the stated ports.
; Recommend applying it to port 25 and setting all clients to connect and authenticate on port 587.

RewriteEnvelopeFromWhenForwarding=1
; Defaults to 0 or disabled.
; This will rewrite the FROM envelope of an email message when forwarding it on to another address.
; The default is to retain the original FROM address (potentially causing SPF checking failures by the forward address server).
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

Kelden
Normal user
Normal user
Posts: 51
Joined: 2011-05-02 13:58

Re: HMailserver HIDDEN settings

Post by Kelden » 2017-02-05 22:58

DisableAUTHList is great. I already wanted to write a script to disable auth logins on port 25.

User avatar
mattg
Moderator
Moderator
Posts: 22435
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: HMailserver HIDDEN settings

Post by mattg » 2017-02-06 00:01

I think that DisableAuthList has come from Martin - but either way it is great

These are what I have as being from Martin - The top few aren't on the list above

Code: Select all

;**********************************
;INI settings from Martin
;**********************************

DNSBLChecksAfterMailFrom=1
; DNSBLChecksAfterMailFrom now works. It was removed during the re-design of the spam protection but have been added again.


GreylistingEnabledDuringRecordExpiration=true
GreylistingRecordExpirationInterval=240
; Anti spam: Using two new ini file settings
; it's now possible to configure how often expired greylisting records should be cleared from the database
; and whether or not greylisting should be active during this period.
; The new settings are named GreylistingEnabledDuringRecordExpiration and GreylistingRecordExpirationInterval.


RewriteEnvelopeFromWhenForwarding=1
; When performing forwarding, hMailServer now keeps the original From address rather than changing to that of the forwarding account.
; This change was made to reduce risk of message delivery failures.
; To force the previous behavior, set RewriteEnvelopeFromWhenForwarding=1



DisableAUTHList=25
; Setting DisableAUTHList allows you to specify a comma-separated list of SMTP ports which authentication should not be enabled for.
; This is useful when working with legacy systems with malfunctioning SMTP support.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

palinka
Senior user
Senior user
Posts: 4455
Joined: 2017-09-12 17:57

Re: HMailserver HIDDEN settings

Post by palinka » 2019-06-12 14:08

RewriteEnvelopeFromWhenForwarding=1
; Defaults to 0 or disabled.
; This will rewrite the FROM envelope of an email message when forwarding it on to another address.
; The default is to retain the original FROM address (potentially causing SPF checking failures by the forward address server).
There was a discussion about this recently but i couldn't find it.

Does this apply to ALL forwarded emails (e.g. manually from mua) or ONLY for auto forwarded messages (domains > accounts > username > forwarding)?

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HMailserver HIDDEN settings

Post by jimimaseye » 2019-06-12 14:20

I think auto forwarding and doesn't work for rule based forwarding. (Might be wrong though).
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
katip
Senior user
Senior user
Posts: 1158
Joined: 2006-12-22 07:58
Location: Istanbul

Re: HMailserver HIDDEN settings

Post by katip » 2019-06-12 14:59

jimimaseye wrote:
2019-06-12 14:20
I think auto forwarding and doesn't work for rule based forwarding. (Might be wrong though).
this is true as i also understand. rule based forwarding writes account address where rule is fired as FROM in envelope.
thread here : viewtopic.php?f=7&t=34026
RvdH might have posted a build where this behaviour is unified. not tried.
Katip
--
HMS 5.7, MariaDB 10.4.10, SA 4.0.0, ClamAV 0.103.8

palinka
Senior user
Senior user
Posts: 4455
Joined: 2017-09-12 17:57

Re: HMailserver HIDDEN settings

Post by palinka » 2019-06-12 18:34

katip wrote:
2019-06-12 14:59
jimimaseye wrote:
2019-06-12 14:20
I think auto forwarding and doesn't work for rule based forwarding. (Might be wrong though).
this is true as i also understand. rule based forwarding writes account address where rule is fired as FROM in envelope.
thread here : viewtopic.php?f=7&t=34026
RvdH might have posted a build where this behaviour is unified. not tried.
That's the thread I was looking for. Thanks. Sheesh, my search skills are going downhill with age.

And it contained the answer, which is yes - only account tab forwarding applies, which is exactly what i was looking for.

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HMailserver HIDDEN settings

Post by jimimaseye » 2023-02-09 18:51

mattg wrote:
2017-02-06 00:01
I think that DisableAuthList has come from Martin - but either way it is great

These are what I have as being from Martin - The top few aren't on the list above

Code: Select all

;**********************************
;INI settings from Martin
;**********************************

DNSBLChecksAfterMailFrom=1
; DNSBLChecksAfterMailFrom now works. It was removed during the re-design of the spam protection but have been added again.
This one seems to cause a problem for this user despite it being entered but set to 0: https://www.hmailserver.com/forum/viewt ... 0&p=245307

You will see that even whilst set as 0 it peformed DNSBL checking after each recipient (RCPT TO command). When the user removed the setting then his problem went away.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

Post Reply