5.4 SVN Source Change logs - May 27, 2012

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
Post Reply
Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

5.4 SVN Source Change logs - May 27, 2012

Post by Bill48105 » 2011-11-13 20:58

Seems it'd be handy for people without SVN access to see/know what has changed (plus this will eventually be indexed & searchable via google etc) so figured I'd post up a copy of the logs pruned down with as much non-essential stuff removed so as to not be too large to post on the forum. I'll try to keep this updated but the latest is always available via SVN for anyone interested.

Understand that some changes shown in logs no longer apply due to being changed afterwards or simply rolled back so they need to be considered in reverse chronological order to make much sense.

Also understand this is just what changes have occurred in the official source tree and DO NOT include changes done so far in the EXPERIMENTAL BUILDS (which have their own changes log) found here:
http://www.hmailserver.com/forum/viewto ... 10&t=21420

So here ya go:

Code: Select all

Date: Friday, May 04, 2012 3:05:12 PM
Removed dependency on Internet Explorer, JET and Windows Installer. While .NET Framework 2 according to docs are dependent on IE6, it seems to work fine to install it without IE6. Server Core does not come with IE, but comes with .NET. 

Date: Wednesday, May 02, 2012 2:53:22 PM
Issue 364, Global rule with changed delimiter 

Date: Wednesday, May 02, 2012 1:33:46 PM
Issue 359, Not display new accounts

Date: Monday, March 12, 2012 3:55:28 PM
Updated test to simplify troubleshooting

Date: Monday, March 12, 2012 3:26:14 PM
Clarification in error message.

Date: Monday, March 12, 2012 3:24:33 PM
Updated copyright year

Date: Monday, March 12, 2012 2:47:26 PM
362, Diagnostics for Backup Dir

Date: Monday, March 05, 2012 2:25:10 PM
ID367, Admin Console - Rule Action Sorting

Date: Monday, March 05, 2012 2:22:16 PM
ID 371, SSL certificate settings not restored correctly with backup

Date: Monday, March 05, 2012 2:08:51 PM
Test commit

Date: Friday, March 02, 2012 2:07:15 PM
Issue 368, Routes.ItemByName returns invalid object

Date: Friday, March 02, 2012 1:13:11 PM
Misc minor usability fixes

Date: Friday, March 02, 2012 12:48:25 PM
Indexing code was not compatible with Microsoft SQL Server Compact Edition.

Date: Friday, March 02, 2012 10:39:59 AM
Updated SURBL tests to only try every address once.
Also should properly support line feeds in the middle of email addresses now.

Date: Tuesday, February 28, 2012 12:56:58 PM
FIX: File permissions of 7z backup could be admin-only or incorrect when backing up messages due to 7za temp folder usage. Now using hmail's temp folder instead of system temp

Date: Saturday, February 25, 2012 5:51:27 AM
Test fixes

Date: Friday, February 24, 2012 1:46:39 PM
Test assumed directory exists.

Date: Friday, February 24, 2012 1:44:59 PM
Errors were logged even though no errors had occurred (wtf?)

Date: Friday, February 24, 2012 1:34:46 PM
Formatting cleanup

Date: Friday, February 24, 2012 1:23:50 PM
Test case TestCreateCopyGlobalRule caused an error.

Date: Friday, February 24, 2012 12:52:46 PM
Formatting

Date: Monday, December 26, 2011 2:41:08 PM
New path to source code on build machine.

Date: Monday, December 26, 2011 2:40:21 PM
New path to source code on build machine.

Date: 3:29:39 PM, Saturday, November 19, 2011
Admin GUI changes. Added ability to set/change the host name used for the outbound connect test in textbox with default still being mail.hmailserver.com. (Test is skipped if blank)
Banner response from outbound test connection now shown on diagnostic results such as "Received: 220 mail.hmailserver.com ESMTP" to confirm connection is to correct server (ie - resolved correctly) & type (ie - not pop etc). (1st line only)

Date: 3:20:45 PM, Saturday, November 19, 2011
Admin GUI changes. Server Status buttons changes from Stop/Start to Pause/Resume & text label added about using Windows to Start/Stop service added to reduce end-user confusion.
"Are you sure" confirmation added when removing messages from queue to reduce risk of loss of data due to removing messages on accident such as when meaning to do "Send now" but choosing "Remove" instead.

Date: 1:40:50 PM, Saturday, November 19, 2011
New: If connecting IP matches disabled ip range (such as autobanned IP) then connection is held for defined # seconds to avoid pounding.
New INI: BlockedIPHoldSeconds=0 (default is 0 or disabled)
NOTE: Need max connections per IP block as well to be added later. For now router firewall should handle it.

Date: 1:12:24 PM, Saturday, November 19, 2011
** DO NOT BUILD PREV REV! Missing files **
FIX: Forgot to add IniFileSettings.cpp & .h to previous commit
New INI settings: LoadHeaderReadSize=4000 LoadBodyReadSize=4000 (max of 50,000 due to static buffer size)

Date: 1:03:45 PM, Saturday, November 19, 2011
Fix: Dupe emails to some recipients on retry (such as greylisting)http://www.hmailserver.com/forum/viewtopic.php?f=10&t=21404
New: Let's allow user to define header & body read size. 
New INI settings: LoadHeaderReadSize=4000 LoadBodyReadSize=4000 (max of 50,000 due to static buffer size)
Fix: () needed around messagetypes to fix order of evaluation otherwise all HOLD's mistakenly queued & ID not reset to 0


Date: 2:48:08 PM, Friday, November 18, 2011
Fix to comply with RFC 2231 4.1. Code was incorrectly detecting if encoding of filename or not causing filename corruption if filename wrapped on multiple lines but not encoded. (We want the char before = NOT char after param name) http://www.hmailserver.com/forum/viewtopic.php?f=10&t=21417

Date: 2:45:12 PM, Friday, November 18, 2011
JamesDR Indexing performance changes (suggested & tested by sckramer2, coded by JamesDR & Bill48105) by adding new Quick indexing option with optimized query & limit to last 1000 new messages to greatly reduce CPU usage & reduce time significantly in tests.  Added new INI to control those limits: [Settings] IndexerFullMinutes=720 IndexerFullLimit=25000 IndexerQuickLimit=1000 Defaults shown if not defined

Date: 2:38:10 PM, Friday, November 18, 2011
Limit now 15G for built-in backups with 1.5G alert in logs (Backup not stopped until 15G). Popup alert confirmation in GUI when Restore pressed warning that all settings & messages will be deleted.

Date: 2:29:53 PM, Friday, November 18, 2011
Changed 7z default options to -t7z -mmt -mx1 for lowest compression & multithreading off to limit memory & cpu usage which is especially important on background process like the backups.

Date: 2:20:42 PM, Friday, November 18, 2011
Added oClient.HELO which contains HELO string in OnAcceptMessage & OnSMTPData

Date: 10:34:25 AM, Wednesday, October 26, 2011
MessageUndeliverable string from database now used to prepend Subject on bounces. (String was being read in but never used so fig'd use it or remove it & using allows language change if needed etc)

Date: 10:32:38 AM, Wednesday, October 26, 2011
Queue randomness Win2K crash work-around (rnd skipped if disabled/default)
Temp fix for email bouncing immediately due to no mail servers when there should be (temp dns error?) so now treated as temp fail & queued until max tries.

Date: 10:26:12 AM, Wednesday, October 26, 2011
Wrong SQL upgrade scripts:
http://www.hmailserver.com/forum/viewtopic.php?f=10&t=21405

Date: 11:11:31 AM, Friday, October 21, 2011
Tweak to prioritize small & newer emails in queue delivery order. Assumption is that large emails will take longer to deliver tying up queue vs just getting rid of smaller emails 1st and messages with high # of tries are not likely to go anyway so why tie up newer emails in queue.

Date: 11:09:52 AM, Friday, October 21, 2011
Added %MACRO_ORIGINAL_HEADER% for ability to include original headers in undeliverable message
http://www.hmailserver.com/forum/viewtopic.php?f=2&t=19635

Date: 11:08:38 AM, Friday, October 21, 2011
- Added some LIST logging (should be changed to DEBUG only but needed something quick)
- Adjusted 550 reject responses for LISTS to help sender understand why rejected (owner vs not list member). 
** Potential for security leak exposing list owner but LISTS are ridiculously impossible to troubleshoot without that info.

Date: 10:58:27 AM, Friday, October 21, 2011
Comments-only for now regarding how plain text passwords in hmail are not case sensitive & perhaps that should be changed but worries about backward compatibility. (Not sure how long that has been that way or how many people rely on fact they are not case sensitive)

Date: 10:46:31 AM, Friday, October 21, 2011
Added missing MSSQL CE case to fix:
- 1.5G max backup size ignored when using MSSQL CE
- Quotas might be ignored when using MSSQL CE
- Mailbox sizes shown incorrectly in Admin when using MSSQL CE

Date: 10:43:35 AM, Friday, October 21, 2011
Better logging for when someone has over 100k folders to sort
Comments to suggest client should be able to adjust max if needed

Date: 10:40:19 AM, Friday, October 21, 2011
Fixes for SURBL lookup issues due to URL's not being recognized across line wraps
Comments added as reminder to consolidate URL's before lookups to eliminate dupes and allow user to define max URL's & time.

Date: 10:36:55 AM, Friday, October 21, 2011
Fix for Apple Mail BODY PEEK with start.size issue because start was always being ignored as it was not used causing corrupt attachments:
http://www.hmailserver.com/forum/viewtopic.php?f=10&t=21348.
- Copied 4.4.4 method of adding iByteStart to Add() call
- 5.3.4 tested OK with Apple Mail so believed this is new issue to 5.4

Date: 1:55:53 PM, Thursday, August 18, 2011
Wrong copyright year

Date: 2:49:06 PM, Tuesday, August 16, 2011
If a COM client constructed COM objects in an incorrect manner, hMailServer could crash.

Date: 3:32:29 PM, Friday, August 12, 2011
Account size was not updated properly when a new message was received.

Date: 5:17:22 AM, Monday, August 08, 2011
7za.exe

Date: 11:30:53 AM, Saturday, August 06, 2011
Replaced InfoZip with 7zip for backup. Also now stores partial paths in backup rather than full path.
Updated license file, removed infozip etc accordingly. Backup extension is now 7z instead of zip.

Date: 11:38:18 AM, Thursday, July 28, 2011
It was not possible to open messages in the queue in hMailServer Administrator, since the full path to the message file was not included.

Date: 3:19:28 PM, Monday, March 21, 2011
Removed duplicate check for space. Space == ASCII 32 and it was already checked for.

Date: 12:30:47 PM, Sunday, March 20, 2011
Some more logging, and some more tests.

Date: 9:09:02 AM, Saturday, March 19, 2011
New URI to MDAC installation program.

Date: 8:39:32 AM, Saturday, March 19, 2011
Fixed merge error.

Date: 8:32:48 AM, Saturday, March 19, 2011
Added a few more tests in an attempt to reproduce crash when delivering to a non-responding SMTP server. No luck in reproducing though, but the tests may still turn out to be useful some time.

Date: 4:52:07 PM, Wednesday, February 23, 2011
Issue 348. hMailServer hangs when too large message is saved via IMAP

Date: 2:02:03 PM, Monday, February 14, 2011
If a multi-art message was being parsed, and the main body (before the body parts, before the boundary lines) was empty, the thread was aborted with an exception (issue specific to 5.4)

Date: 10:46:14 AM, Saturday, January 22, 2011
The external account dialog should default to port 110. If SSL is selected, the port number is changed to 995.

Date: 1:39:27 PM, Wednesday, January 05, 2011
Reverted revision 57 since it screwed up buffering of data. It flushed data before the previous one had been sent.

Date: 3:42:47 PM, Tuesday, December 28, 2010
Incorrect logging. Caused error to be reported directly after fresh installation.

Date: 3:33:53 PM, Monday, December 27, 2010
Additional logging when changing database type.

Date: 8:39:26 AM, Sunday, December 26, 2010
The new partial paths in 5.4 caused problems when renaming domains or accounts. Fixed this issue.

Date: 8:29:02 AM, Sunday, December 26, 2010
The new partial paths in 5.4 caused problems when renaming domains or accounts. Fixed this issue.

Date: 2:23:04 PM, Saturday, December 25, 2010
Issue 287, AWStats logging always had the value 127.0.0.1 set for %host_r

Date: 12:25:27 PM, Saturday, December 25, 2010
Issue 337, Chained SSL certificates

Date: 11:49:30 AM, Saturday, December 25, 2010
Issue 343, Changing domain name doesn't change distribution list addresses

Date: 10:38:12 AM, Saturday, December 25, 2010
Issue 338, Recipient Count is wrong under certain circumstances.

Date: 9:50:45 AM, Saturday, December 25, 2010
Issue 319, SQL error on large domain

Date: 9:31:11 AM, Saturday, December 25, 2010
Issue 340, [IMAP] Incorrect date sorting order

Date: 8:44:23 AM, Saturday, December 25, 2010
Issue 319, SQL error on large domain

Date: 8:07:02 AM, Saturday, December 25, 2010
Issue 333, Add AD account creates false email address

Date: 8:03:11 AM, Saturday, December 25, 2010
Issue 339, EventHandlers.vbs template file missing oFetchAccount in OnExternalAccountDownload

Date: 8:00:13 AM, Saturday, December 25, 2010
Issue 325, Last logon time being updated at wrong point

Date: 7:59:55 AM, Saturday, December 25, 2010
Missing file.

Date: 5:08:32 AM, Sunday, December 12, 2010
Merged stability fixes for POP3 from 5.3.4

Date: 3:05:45 PM, Monday, December 06, 2010
Upgrade to 1.45

Date: 3:39:17 PM, Saturday, December 04, 2010
Upgrade to Boost 1.45

Date: 11:28:29 AM, Saturday, December 04, 2010
OpenSSL 1.0.0c

Date: 8:01:40 AM, Saturday, November 27, 2010
hMailServer assumed that all routes supported ETRN.

Date: 8:01:13 AM, Saturday, November 27, 2010
Message state was sometimes changed from 2 to 1 (if user clicked Retry after the message had been delivered).

Date: 6:44:43 AM, Saturday, November 27, 2010
Code formatting issue.

Date: 6:44:33 AM, Saturday, November 27, 2010
Recipients were marked with error, even though message had been delivered successfully to them.

Date: 6:43:16 AM, Saturday, November 27, 2010
Disabled asm since it caused linking incompatibility with VS /SAFESEH.

Date: 5:56:16 AM, Saturday, November 27, 2010
Removed ETRNDomain function which did not do what the name insinuated, and was not used.

Date: 5:55:44 AM, Saturday, November 27, 2010
Reverted some of Bill's logging changes. Application-events should be logged in the Application log and not in the SMTP log. Logging them in the SMTP log is not only incorrect according to the documentation, but also messes up any existing log parser which assumes that the SMTP log contains SMTP conversation events.

Date: 9:41:01 PM, Sunday, November 21, 2010
Added oMessage to OnSMTPData event call. We do not have entire message at that point but we still need it to test available info like to/from.

Date: 3:17:03 PM, Sunday, November 21, 2010
Fix in IO OP queue for timeouts not occurring due to bug in recent changes made to fix out-of-order data

Fix in SMTP Client ReadAndSend & state change set that was causing issues with gmail, hotmail, aol & others due to continue sendfile being called after already done causing connection to hang until timeout:
"DEBUG" 1464 "2010-11-15 16:05:00.434" "SMTPClientConnection::_ParseASCII()"
"DEBUG" 1464 "2010-11-15 16:05:00.434" "SMTPClientConnection::~_BEFORE SendFile"
"DEBUG" 1464 "2010-11-15 16:05:00.434" "SMTPClientConnection::~_Continue sendfile"
"DEBUG" 1464 "2010-11-15 16:05:00.444" "SMTPClientConnection::~_AFTER SendFile"
"DEBUG" 2512 "2010-11-15 16:05:01.155" "SMTPClientConnection::~_Continue sendfile"

Fix in SURL for URL's in plain-text emails where there was no trailing / causing very odd lookups. Debug logging added showed issue:
"DEBUG"	2300	"2010-11-21 15:15:35.982"	"SURBL:: Found URL: www.yahoo.com this is a test to see what happens when no "
"DEBUG"	2300	"2010-11-21 15:15:35.982"	"SURBL:: Lookup: yahoo.com this is a test to see what happens when no .multi.surbl.org"

Added user-customized min/max timeouts for SMTPC/SMTPD/POPC/POPD/SA/Clam (See New INI settings below) which help with premature timeouts when default is too low and locked box issues for iphone/cell users who lose connection before quit when default is too high.

Added ETRN server side: Upon delivery failure, if recipient is Route then message is put into HOLD state in queue. Upon successful ETRN command messages are released to be delivered again.

Added ETRN client side: For now no specific GUI area as "External Account" area is used temporarily. You put ETRN thehelddomain.com for Name, enter host/ip & 25 for port & minutes for how often. Rest of the settings are ignored.

Modified GUI Admin to show "Route Hold" for held ETRN messages.

Added option to replace sender IP in headers with fixed value such as 127.0.0.1 when auth'd as fix for barracuda & other blocking of email when end-user sender IP is blacklisted. IP is added to new X-AuthUserIP header instead. See INI setting below.

Changed SA so that results Temp file > original EML size to be considered not just > 0 which seems safer in event SA results are incomplete/corrupt. Since SA always adds SOMETHING (even just header) TMP should always be bigger than original otherwise just use original.

Added SA "move" file option vs copy+delete to help improve performance & cut down CPU/HDD load with debug logging to see which is in use & speed results.

Added new OnSMTPData(oClient) script event called after sender issues DATA which allows testing of sender/recipient(s)/IP & act without need to accept entire email 1st. 

Added new debug logging to help aid in tracking down cause of external account issues posted in forum. (suspect no header break..)

Added new POP server function to help filter TOP results (actual content of emails) from being logged. They are no longer logged unless LogLevel>8

Rejects for non-existent Route users now 421 temp vs 550 perm. Logic is it still stops secondary-relay spam but is safer if you define specific users in case list is not up-to-date. Should be as safe as greylisting since primary should accept eventually but could create a bit more traffic because of that.

Added new 3rd Result for OnAcceptMessage to allow for 453 temp fail result which is useful at times vs just 554 perm reject


New INI settings in hMailServer.ini [Settings]
ArchiveDir=C:\MailArchive
; Folder where copies of every email get stored. Default or undefined disables archiving
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=46
; 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


Date: 11:56:05 AM, Sunday, November 21, 2010
Upgraded to OpenSSL 1.0.0b. Should have no effect at all on hMailServer, but it's the recommended version.

Date: 11:55:36 AM, Sunday, November 21, 2010
Upgraded to OpenSSL 1.0.0b. Should have no effect at all on hMailServer, but it's the recommended version.

Date: 2:36:08 AM, Saturday, October 30, 2010
Changes to IOOperationQueue::Front to attempt fix of race condition causing odd POP errors where client/server appeared out of sync during download of messages.

Fix negative STAT results for >2GB using __int64 instead of int for total size calculation.

Fix minor spelling in POP timeout error message

Date: 4:12:04 PM, Sunday, October 24, 2010
Removed obsolete scripts no longer used and no longer working.

Date: 3:49:08 PM, Sunday, October 24, 2010
More MAIL FROM / RCPT TO syntax validation. Colon should be required in the command.

Date: 2:44:30 PM, Sunday, October 24, 2010
Changed the parsing of MAIL FROM and RCPT TO so that  the following is valid:
MAIL FROM:<email@example.com>
MAIL FROM: <email@example.com>
MAIL FROM:email@example.com
MAIL FROM: email@example.com
but the following is not:
MAIL FROM:<email@example.com
MAIL FROM:<email@example.com>
MAIL FROM:<   email@example.com

Date: 1:30:11 PM, Sunday, October 24, 2010
Added code to save the column widths in the Live log and Undelivered messages view. Implemented a generic way to do this which can be reused for all list views.

Date: 11:05:00 PM, Saturday, October 23, 2010
Added GUI Administrator Status tab column widths read from registry option. If values are not defined they default to original values.
(Saving current widths not yet done so requires being added by hand for now)
New keys with sample values:
[HKEY_CURRENT_USER\Software\hMailServer\Administrator]
"columnTypeWidth"=dword:00000040
"columnHeader3Width"=dword:000001f4
"columnTimeWidth"=dword:00000096
"columnIPWidth"=dword:00000050
"columnTextWidth"=dword:000001f4
"columnSessionWidth"=dword:00000040
"columnThreadWidth"=dword:00000040
"columnIDWidth"=dword:00000050
"columnCreatedWidth"=dword:00000050
"columnFromWidth"=dword:00000050
"columnToWidth"=dword:00000050
"columnNextTryWidth"=dword:00000050
"columnNoOfTriesWidth"=dword:00000050
"columnFilenameWidth"=dword:00000050

Date: 2:42:40 AM, Saturday, October 23, 2010
Added new queue control mechanism. MXTriesFactor which limits # of MX/A servers tried per retry to retry counter * MXTriesFactor. If MXTriesFactor=3 then on 1st try up to 3 MX/A servers will be tried, on try 2 up to 6, etc.

New hMailServer.INI value
[Settings]
MXTriesFactor=2
; Max MX/A servers to try per delivery attempt. Default 0/disabled

Date: 4:47:22 PM, Friday, October 22, 2010
ADDED: QuickRetries option which allows user to define number of minutes (QuickRetriesMinutes) for 1st X (QuickRetries) retries to override default retries option. This allows prompt delivery of some messages such as greylist delayed ones and allows for higher & more reasonable default retries to help better manage the queue by reducing # of retries on stuck messages. (Often one would need to set default retry very low to avoid greylisted messages being stuck too long which caused stuck messages to get tried way too often. Hopefully this helps with that.)

ADDED: Randomness factor for queue retries. When defined a random # of minutes between 0 & QueueRandomnessMinutes is added to the nexttrytime value above & beyond the normal minutes that would have been used. This factor should help spread out retries over more time to allow gaps for new messages to be delivered. (Sometimes when the queue is very busy new messages could be delayed while masses of emails - like list emails - hog the queue. Hopefully this helps with that a bit with little drawback.)

NEW hMailServer.INI values: (default is DISABLED/0 for all for backward compatibility)
[Settings]
QuickRetries=3 
;default is 0 or disabled

QuickRetriesMinutes=6
;default is 0 or disabled

QueueRandomnessMinutes=5
;default is 0 or disabled

Date: 7:21:28 PM, Wednesday, October 20, 2010
Added POP3 CAPA with USER, UIDL & TOP in results for now. Tested with latest Thunderbird (which supports CAPA) and Outlook Express 6 (which does not) without problems.

Date: 5:50:40 PM, Saturday, October 16, 2010
Bug fix: Some logging did not work correctly if SepSvcLogs was not set to 1 because of using wrong file handles when that was the case.

Changed keepFileOpen condition to include new IMAP, SMTP & POP3 logs

Date: 6:54:41 PM, Saturday, October 09, 2010
Fix for bug which caused invalid MAIL FROM addresses such as <user@domain.dom (note lack of end >) to be interpreted as <> or NULL sender if RFC option to allow that was enabled (default). Now if < or > are missing 'invalid address' error will be sent.

External account logging now shows as POP3C instead of POP3D to be more consistent with SMTP method.

Changes to allow separate log file per SMTP/POP/IMAP such as hmailserver_SMTP_2010-10-09.log. Default is old way (all in same log file) Enable with hMailServer.ini [Settings] SepSvcLogs=1 (Restart of hMailServer service required?)

Logging calls in various places were changed to accomidate for per-service logging option. 0 & "APP" or "TCP" used for calling params as needed & to denote where called from.

Changes to tame log output a bit where some IMAP SENT lines such as those with STATUS/FETCH/)-only are eliminated and long log lines (especially POP UIDL/LIST) are truncated in a tidy way to make more readable & reduce log size. Default is old way with full logging or enable with hMailServer.ini [Settings] LogLevel=1 to LogLevel=9 (1=min/least to 9=max/most)
Set truncate length with MaxLogLineLen=500 (Default if enabled is 500. Min 100 to ??) 
NOTE: If DEBUG logging is enabled these settings are ignored.

Date: 12:19:04 PM, Saturday, October 09, 2010
Issue 334, human readable text missing in OK response. Patch from dzekas.

Date: 3:45:11 PM, Monday, October 04, 2010
When appending a message to the Inbox, it was stored in the #Public directory on disk, rather than in the users folder. Added automated test and fix. Reported by Bill48105.

Date: 1:36:37 PM, Monday, October 04, 2010
Fox to remove temp file created during testing write of backup destination

Date: 6:52:36 AM, Sunday, September 26, 2010
When running Import-mode in DDS, DDS reported "Skipped" for every file already in the database. DDS should not report anything at all for these files.

Date: 7:26:59 AM, Sunday, September 12, 2010
Started to use InfoZip again.

Date: 1:48:04 PM, Tuesday, September 07, 2010
Logging and fix of issue at http://www.hmailserver.com/forum/viewtopic.php?f=7&p=115645

Date: 10:56:10 AM, Sunday, September 05, 2010
Memory leak detection (part 1 of 2)

Date: 5:48:00 AM, Sunday, September 05, 2010
New memory handler, some additional logging.

Date: 5:27:51 AM, Saturday, September 04, 2010
Issue 320, Claws mail fails to connect with hmailserver IMAP module 

Date: 2:33:48 PM, Tuesday, August 24, 2010
Switched to use simple LogonUser API rather than SSPI validation. Should be faster (requires no thread synchronization).

Date: 12:33:31 PM, Tuesday, August 24, 2010
Chose the most permissive license option

Date: 12:21:40 PM, Tuesday, August 24, 2010
Removed 3'rd party components which should no longer be in use.

Date: 9:24:23 AM, Saturday, August 07, 2010
Old versions of the MSSQL database contained an object for the recipientoriginaladdress (default) which made it impossible (?) to alter it's type

Date: 7:05:27 AM, Saturday, August 07, 2010
Upgrade scripts for 5.1 was only included in branch.

Date: 3:25:39 PM, Wednesday, August 04, 2010
Added some error reporting if the database type is not initialized properly.

Date: 1:40:09 PM, Wednesday, August 04, 2010
Regression test fix for: Possible fix of Issue 320, Claws mail fails to connect with hmailserver IMAP module

Date: 1:24:08 PM, Wednesday, August 04, 2010
Broken regression tests (when using PGSQL).

Date: 1:18:20 PM, Wednesday, August 04, 2010
Broken regression tests (when using PGSQL).

Date: 11:22:17 AM, Wednesday, August 04, 2010
Misc 5.4 fixes: DDS reinitialization, VMware testing.

Date: 10:47:38 AM, Wednesday, August 04, 2010
Command line parsing was not case sensitive.

Date: 9:31:28 AM, Wednesday, August 04, 2010
VMware tester should log the current time whenever a test is started, to make it easier to determine how long a specific test has been running.

Date: 8:53:24 AM, Wednesday, August 04, 2010
An error message was shown if the Administrator password was empty. Empty administrator password should be OK.

Date: 8:20:51 AM, Wednesday, August 04, 2010
Enabled automated regression tests.

Date: 8:18:05 AM, Wednesday, August 04, 2010
Database scripts had an invalid format.

Date: 5:13:52 PM, Sunday, August 01, 2010
Added tests for false positives. If a file with no virus is scanned, the virus scanner should not report that a virus exists.

Date: 5:03:29 PM, Sunday, August 01, 2010
Added ClamAV settings and possibility to test the virus scanners using the frontend.

Date: 6:35:13 PM, Tuesday, July 27, 2010
Moved a few virus scanning classes from /Common/Util/AntiVirus so that all are now located under /Common/AntiVirus.

Date: 6:13:32 PM, Tuesday, July 27, 2010
Added "Test" button to ClamWin and Custom virus scanner section as well (in Administrator). Using the button, the user can test whether the settings seems to work.

Date: 2:01:36 PM, Tuesday, July 27, 2010
ClamAV: Added user interface in Administrator to change settings and test the connection.

Date: 8:23:44 AM, Tuesday, July 27, 2010
UI test client for hMailServer.

Date: 8:22:54 AM, Tuesday, July 27, 2010
ClamAV integration (no user interface yet).

Date: 1:55:15 PM, Monday, July 26, 2010
Possible fix of Issue 320, Claws mail fails to connect with hmailserver IMAP module

Date: 1:06:23 PM, Monday, July 26, 2010
Issue 321, The live logging list did not contain the protocol type.
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

prisma
Senior user
Senior user
Posts: 310
Joined: 2010-07-09 13:16

Re: 5.4 SVN Source Change logs

Post by prisma » 2011-11-15 12:30

Hi Bill,

thanks for your work. It's good to see someone working on the code, going open source seemed to be the right decision . I really appreciate it.
So please don't misunderstand my question:

Do all the changes you've made have to pass the same tests Martin used before? Are there a kind of unit tests and/or a standardized virtual test environment?

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 SVN Source Change logs

Post by Bill48105 » 2011-11-15 16:35

prisma wrote:Hi Bill,

thanks for your work. It's good to see someone working on the code, going open source seemed to be the right decision . I really appreciate it.
So please don't misunderstand my question:

Do all the changes you've made have to pass the same tests Martin used before? Are there a kind of unit tests and/or a standardized virtual test environment?
Hey Prisma,
martin has final say in which changes stay in the code & all releases are still done by martin & yes he does all of the tests he always has and adds new ones as needed. The issue is it is taking WAY too long between releases (look how long it took to go from alpha to beta even with a hold on code changes for months) so we're doing a multi-staged approach for now where I'll be posting experimental builds with 'hotfixes' and some minor feature changes between builds. The hope is to have enough people test them that the changes can be added to the official code without big risk of issues holding up the next release.

Btw the testing code done by martin is part of the svn source tree so in theory anyone could setup & run the tests, I just haven't done so as I believe the code is specific to martin's setup & it'd take a decent amount of time/effort to get an environment setup like his to be able to do the regression testing. At this point I've got way too many things on my plate & am limited on time so my tests are putting it live on my server & feedback from others who try it.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

sckramer2
Normal user
Normal user
Posts: 133
Joined: 2009-07-31 21:50

Re: 5.4 SVN Source Change logs

Post by sckramer2 » 2011-11-15 20:18

Awesome work... Someone should give Martin a call, see what is up w/him :D

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 SVN Source Change logs

Post by Bill48105 » 2011-11-15 21:35

sckramer2 wrote:Awesome work... Someone should give Martin a call, see what is up w/him :D
Thanks.
We've been in touch with him regularly. He's just very busy with work & life.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by Bill48105 » 2011-11-21 04:48

I realized people sub'd to the thread won't get notified if I just edit the 1st post so from now on I'll add a new post at the end & deleting the previous notifier post as needed.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

ObiWan
Senior user
Senior user
Posts: 278
Joined: 2010-07-21 14:30
Location: Halfway between Germany and Egypt

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by ObiWan » 2011-11-29 19:28

Hi Bill, just picked the 5.4 from the download page... I suppose it's the latest official build/binary (if not... where do I pick it ?), anyhow, nice job; configured hMS to use ClamD (on localhost:3310) and it works just fine; as a note the box (it's a test box) was running hMS 5.3 and the setup went just fine, no glitches or issues at all !

As for the "ini file settings", I hope that sooner or later someone which knows what they are for will put together some reference; I recall some of those from past discussions but others are just floating above me so, well, for the moment didn't fiddle with the ini settings and left them as they were/are

All in all, nice job, way to go :) !!

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by Bill48105 » 2011-11-29 20:08

Thanks ObiWan. :)

No the 5.4 beta build 1931 isn't really the latest & actually has known issues as noted in the experimental thread which is also where i've been posting custom/urgent builds along with testing some updates:
http://www.hmailserver.com/forum/viewto ... 10&t=21420

Thanks for reminding on me on the ini thing.. I suppose I should post them up all in 1 place but even then people will say they can't find it. lol (All new INI's are noted in the change logs & various places on the forums but I understand that's not ideal. Once martin releases 5.4 finally we'll look into migrating to database or at least ones that make sense to bother with as most INI's are not needed for normal average user & could just be confusing.)
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

ObiWan
Senior user
Senior user
Posts: 278
Joined: 2010-07-21 14:30
Location: Halfway between Germany and Egypt

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by ObiWan » 2011-11-30 09:47

Bill48105 wrote:Thanks ObiWan. :)

No the 5.4 beta build 1931 isn't really the latest & actually has known issues as noted in the experimental thread which is also where i've been posting custom/urgent builds along with testing some updates:
http://www.hmailserver.com/forum/viewto ... 10&t=21420

Thanks for reminding on me on the ini thing.. I suppose I should post them up all in 1 place but even then people will say they can't find it. lol (All new INI's are noted in the change logs & various places on the forums but I understand that's not ideal. Once martin releases 5.4 finally we'll look into migrating to database or at least ones that make sense to bother with as most INI's are not needed for normal average user & could just be confusing.)
Bill
Oh, no need to thank, you deserve it :)

As for the builds... I think I'll give a spin to the latest one (if I'm not wrong the idea is to stop hMS and replace the binaries ... right ?) on the test box to see how it goes and, by the way, will then report here

As for the "ini" no real hurry, don't get me wrong, it's just that I tried to understand the various additions but, while I know about some of those from past discussions, I missed others and I'm somewhat at loss about those; an idea may be adding a "sample.ini" file to the setup containing all the various entries along with comments (e.g. "; this is for ...") so that people may just look there for a quick reference :)

What else... any plan to add SRS :) ? (I know, I know, don't shoot me, please :D)

ObiWan
Senior user
Senior user
Posts: 278
Joined: 2010-07-21 14:30
Location: Halfway between Germany and Egypt

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by ObiWan » 2011-11-30 19:26

Bill48105 wrote: No the 5.4 beta build 1931 isn't really the latest & actually has known issues as noted in the experimental thread which is also where i've been posting custom/urgent builds along with testing some updates:
http://www.hmailserver.com/forum/viewto ... 10&t=21420
Ok, upgraded to the latest version found here

http://download.hmailserver.com/dev/hma ... 1111901.7z

and things went quite ok; only one glitch; while on the other system where I tried the upgrade everything went smooth, on the second one (the one which I upgraded to B2011... now) the setup of the "regular" 5.4 beta popped out an error related to the SQL database upgrade; the issue was then solved but I think a report may be due; basically the DB updater choked when trying to alter the attributes of the messagefilename column in the hm_messages table; given that the "DataDirectorySyncronizer" docs (correctly) state that creating an index on the column helps speeding up operations, that DB had such an index in place, but the DBupdater didn't like it, so to let it complete it was needed to remove the index; not a big issue but worth a report since may hit some other hMS user

Anyhow, once 5.4 (1931) was then happily running, I went on, downloaded the above "7z" package, stopped hMS, backed up the bin folder and extracted the updated files, next I ran the DBupdater (just in case) and it told me that the database was already up-to-date, so I started back hMS and... well, it's working now :)

[edit]

One last thing; running diagnostics tells me that "full paths are stored into the DB"... now I remember seeing instructions about the method to "migrate" the database and turn those full paths into relative ones but my brain is probably farting and I can't remember where I saw them nor how to do it... would you be so kind to shed some light and help me with such a task :) ?

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by Bill48105 » 2011-11-30 21:19

ObiWan,
Yeah SRS is nearing top of my wish list aka to-do but it has a big risk of breaking things so I've been avoiding working on it until 5.4 gets released so we have a stable working starting point people can use for awhile vs relying on experimentals like now since even the 1931 beta has known issues.

Wow thanks for the upgrade info. I've known there are issues at times but haven't been able to reproduce to figure out what was up. Interesting that it'd care if the index was there or not, seems odd. Btw what database type were you using?


Yeah the full paths thing is an ongoing common issue for many people. The good news it doesn't hurt anything to have long paths so it's not urgent to fix it. One suggested method of fixing the paths is to run the DataDirectorySyncronizer but that takes a LONG time if you have very many users/messages cuz it literally walks the Data folder comparing every EML file with the database. FAR from efficient but it is definitely thorough. Plus there is a certain amount of risk any time you run that tool so backups in advance are a must. Perhaps a better (faster) way to fix it would be this:
(Read warnings below though)

Code: Select all

UPDATE hm_messages SET messagefilename=REPLACE(messagefilename, messagefilename, right(messagefilename,42));
BUT understand what that does. It chops off everything to left of 42 chars which in theory should be the filename & nothing else. If a stored value is a full filename or a normal full path you are golden & even safe to run it multiple times but in the event the value is anything else it will get butchered. One example happened the other day with a user who for some reason had SHORT file path so it foobar'd the value. So besides the obvious: BACKUP/DUMP YOUR DATABASE 1st!!!, it might be a good idea to search your hm_messages for short names looking for ~ just to be safe such as:

Code: Select all

SELECT * FROM hm_messages where messagefilename LIKE '%~%';
To see if you get any results or not.

Or assuming you don't have many, an alternative is to run the above update then run:

Code: Select all

SELECT * FROM hm_messages where LEFT(messagefilename, 1) <> "{";
Which should show any mucked up ones left after the update. But likely better to be safe & avoid mucking up any in 1st place. :D

Btw if most of your database paths were already successfully converted then you could try the LEFT query above to see if maybe you have just a few oddball ones left to be fixed manually instead..

Hope that helps
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

ObiWan
Senior user
Senior user
Posts: 278
Joined: 2010-07-21 14:30
Location: Halfway between Germany and Egypt

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by ObiWan » 2011-12-01 10:36

Bill48105 wrote:ObiWan,
Yeah SRS is nearing top of my wish list aka to-do but it has a big risk of breaking things so I've been avoiding working on it until 5.4 gets released so we have a stable working starting point people can use for awhile vs relying on experimentals like now since even the 1931 beta has known issues.
I see, may I dare suggesting to add to the 5.4 code some calls (placed in the appropriate points) to SRS functions like (e.g.) "SRSencode" and "SRSdecode" (or whatever) ? The idea basically is to add some "wrapper functions" to the code and leave them empty for the moment, at that point you'll have the "insertions points" ready so, adding SRS may just mean (e.g.) adding a DLL or in any case some other module to the hMS and avoiding to touch the code too much :) - basically, as I wrote elsewhere, the idea may be to add the code found here to hMS (even as an external DLL) and call it through whatever wrapper function (as above) so trying to minimize the impact of the change on the main source tree ... is it crazy ?
Bill48105 wrote:Wow thanks for the upgrade info. I've known there are issues at times but haven't been able to reproduce to figure out what was up. Interesting that it'd care if the index was there or not, seems odd. Btw what database type were you using?
The database was/is SQL Server 2008 and it's working just fine; the problem (if we want to call it so) is that, to alter a column which is indexed, you'll need to drop the index, alter the column and recreate the index, that's where the DBupdater choked since it just tried an "alter" withouth dealing with the index (which, as I wrote, is recommended in case one uses the "DataDirectorySyncronizer" since it speeds up things quite a lot) so... well, it may be worth considering to add to the DBupdater a message stating that if you created additional indexes on the database (and on that table) you'll need to (temporarily) drop them before running the update
Bill48105 wrote:...
Perhaps a better (faster) way to fix it would be this:
(Read warnings below though)

Code: Select all

UPDATE hm_messages SET messagefilename=REPLACE(messagefilename, messagefilename, right(messagefilename,42));
...
Uhm... will pass the suggestion to another folk which is co-admin of that box, we'll see what we may come out with and if we'll find some better way, I'll report it here; as for backups... yes, that's the first thing to do, especially if you don't want to run away as a bat out from hell when the users will try to cover you with tar and feathers since the mail doesn't work and they lost their precious messages :D

fk@mvps.org
New user
New user
Posts: 7
Joined: 2011-12-01 10:58

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by fk@mvps.org » 2011-12-01 12:14

Here is what I just sent to Obiwan:

The *safe* way to convert filenames is to rely on those filenames beginning with '{'. Here is a demonstration of the concept:

Code: Select all

select top 100
	messagefilename,
	right(messagefilename,42) as blind,
	len(messagefilename) as length,
	charindex('{', messagefilename) as pos,
	right(
		rtrim(messagefilename),
		len(messagefilename) -
		charindex('{', messagefilename) + 1
	) as chopped
from
	hm_messages
where
	messagefilename not like '%{%{%'
Note the WHERE condition -- it prevents mucked-up filenames (with an extra "{" in the path) from ruining our day.

And here is this thing with an UPDATE statement:

Code: Select all

update
	hm_messages
set
	messagefilename =
		right(
			rtrim(messagefilename),
			len(messagefilename) -
			charindex('{', messagefilename) + 1
		)
where
	messagefilename not like '%{%{%'
I would recommend dropping the index on messagefilename first, but it's not that bad even with it. The "where" clause, with its wildcard in front, forces a full sequential scan anyway.

Regarding the update problem: The big issue is that the index is created by hand, with a more or less random name, by the admin. I can suggest SQL for the update script that will locate all indexes that cover the messagefilename column and drop them before the ALTER TABLE for messagefilename (it'll be gnarly, but who cares?). I can even offer code that will "remember" whether such an index existed and recreate it.

But the _only_ two mentions of messagefilename in the DBScript directory are the failing update (Upgrade5320to5400MSSQL.sql), where the column is set to "nvarchar(255) not null" -- and the initial creation (CreateTablesMSSQL.sql), where the column is created as "nvarchar(255) not null" anyway!

That's right, the column doesn't need changing at all, so we can just remove that statement in line 47 of Update5320to5400MSSQL.sql. I didn't check the scripts for the other databases, but I would suspect that a similar situation holds.

Cheers,
Felix.

ObiWan
Senior user
Senior user
Posts: 278
Joined: 2010-07-21 14:30
Location: Halfway between Germany and Egypt

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by ObiWan » 2011-12-01 15:51

fk@mvps.org wrote:Here is what I just sent to Obiwan:
...cut...
Felix.
Hi there, Felix :D !!!!

It's COOL to see you here and... well, I just got back (ye know) and didn't yet check my "e"; at any rate, after a quick eyeball to the code and knowing you... I do believe it *works* as expected :)

What else... uh, yes !!

@Bill

As Felix knows, earlier today I was @ a cust site and, while there, I had some time to think, now... you wrote about beta "issues" and "difficulties to repeat bugs"... well, here's my suggestion

Add to the hMS code tree something like this (just an example, didn't test it, so please forgive me for the bad code, I wrote it "on the fly")

Code: Select all

/* 
** references/docs:
**
** http://msdn.microsoft.com/en-us/library/windows/desktop/aa363362(v=vs.85).aspx
** http://technet.microsoft.com/en-us/sysinternals/bb896647
**
*/

// needed for the various functions
#include <stdlib.h>
#include <stdarg.h>
#include <malloc.h>
#include <windows.h>

// name tag max size
#define	NAME_TAG_LEN	255

// global application name tag (app defined)
// used to tag messages and allow to filter
// the dbgview output to only see this app
// trace messages
char	gszNameTag[NAME_TAG_LEN + 1];

// Verbosity levels
enum tag_enTraceLevels {
	tlNoTrace = 0,	// 0 No tracing
	tlError,		// 1 Errors
	tlWarning,		// 2 Warnings	
	tlNotice,		// 3 Notices
	tlInfo,			// 4 Info
	tlVerbose,		// 5 verbose logging
	tlDebug			// 6 all messages
} enTraceLevel;

// global trace level (user/app defined)
enTraceLevel	gTraceLevel;

// outputs a trace message which can be viewed by
// running the "DbgView" tool from "SysInternals"
// http://technet.microsoft.com/en-us/sysinternals/bb896647
void TraceMsg(enTraceLevel nLevel, char *szFmt, ...)
{
   va_list args;
   int 	   len;
   char   *buffer, *p;

   // skip if over current trace level
   if (nLevel > gTraceLevel) return;
   
   // allocate and fill the out buffer; add room
   // for the name tag, the message level, the 
   // newline and the string termination char
   va_start( args, format );
   len = _vscprintf(format, args) + 1;
   buffer = malloc(len * sizeof(char)) + NAME_TAG_LEN + 16;
   if (NULL == buffer) return;
   sprintf(buffer, "[%s] (%d): ", gsNameTag, nLevel);
   p = buffer + strlen(buffer); // bump string ptr
   vsprintf(p, format, args);
   strcat(buffer, "\n");
   
   // output message, cleanup and return
   OutputDebugString(buffer);
   free(message);
   free(buffer);
}
by the way, feel free to split the above into "h" and "c" as needed; in any case, the idea basically is the one to use the native debugger API (OutputDebugString) to help pinpointing issues... lemme be somewhat clear; let's say you'll add a new "ini" file entry called "TraceLevel" with values ranging from 0 (no trace) to "N" (full messages including the kitchen sink and then some more :D) at this point, the hMS code should just fill in the "name tag", that will be used to generate the debug messages so that they'll be something like "[hMS] (6): malloc(foobar) succeeded" now, let's say someone experience an issue (bug...whatever), our folk may just report it here, at that point "you" may just add the desired "tracing code" and publish a new "beta"; our folk may then proceed installing the new binaries and then, after setting the "TraceLevel" to the appropriate value (6 in our case), fire up "DbgView" (see the code) and check what's going on... more, he may then save the log and post it somewhere (or email it) and this may/will hopefully help debugging and fixing the issue.

Also and since we're at it, notice that 1: the function won't do anything if the level is set to zero and 2: the "outputdebugstring" call is a "no brainer" since if there isnt' a "registered debugger" the kernel code will just issue a straight "RET" w/o any overhead :)

HTH

ObiWan
Senior user
Senior user
Posts: 278
Joined: 2010-07-21 14:30
Location: Halfway between Germany and Egypt

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by ObiWan » 2011-12-01 17:07

Bill48105 wrote:
Changed the parsing of MAIL FROM and RCPT TO so that the following is valid:
MAIL FROM:<email@example.com>
MAIL FROM: <email@example.com>
MAIL FROM:email@example.com
MAIL FROM: email@example.com
but the following is not:
MAIL FROM:<email@example.com
MAIL FROM:<email@example.com>
MAIL FROM:< email@example.com
Bill... maybe I'm dumb or blind... but sincerely I can't understand the difference between the first and the 6th entry above; if I'm not wrong, both are the same so I suspect you meant something like "MAIL FROM:email@example.com>" or either "MAIL FROM: email@example.com>" ... am I correct ?

Anyhow... given what's in the RFCs, an MTA should pick the "MAIL" or "RCPT" commands, parse them up to the ":", remove any head/tail blanks from the remainder and then check the resulting address and deal with the "inners" of it (that is "<email@example.com >" should NOT be considered valid, same for similar combos)

am I missing something ?

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by Bill48105 » 2011-12-01 17:50

ObiWan,
It was a typo in the log entry. The < was supposed to be missing.

All moot at this point cuz martin removed (changed) my changes as he said they were too restrictive although as far as I am concerned still better. IMO the current method is too lax as it allows hmail to accept invalid email addresses but at least it isn't as bad as before the changes so guess a step in the right direction in either case.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

ObiWan
Senior user
Senior user
Posts: 278
Joined: 2010-07-21 14:30
Location: Halfway between Germany and Egypt

Re: 5.4 SVN Source Change logs - Nov 19, 2011

Post by ObiWan » 2011-12-01 19:36

Bill48105 wrote:ObiWan,
It was a typo in the log entry. The < was supposed to be missing.

All moot at this point cuz martin removed (changed) my changes as he said they were too restrictive although as far as I am concerned still better. IMO the current method is too lax as it allows hmail to accept invalid email addresses but at least it isn't as bad as before the changes so guess a step in the right direction in either case.
Bill
<sigh> oh well, hope Martin will change his mind and possibly add some conditional (INI flag ?) option to let the end user decide about such a behaviour

Having dealt with such stuff, the idea (ok, you know about it :D) basically is to pick the "MAIL FROM:" or "RCPT TO:" full line including whatever follows the ":", cut off the SMTP command (after checking it's correct btw), cleaning heading and trailing spaces and then dealing with the bare email address; at this point, you'll either have something like "email@example.com" or "<email@example.com>" in the latter case, you'll need to perform a second check and ensure that if there's one "bracket" either at start or at end, there's a corresponding closing bracket at the other side; if that's the case then you may proceed removing both brackets so obtaining the "naked" address, done that, you'll need (again) to trim leading and tailing spaces so that, having (e.g.) "<mail@example.com >" or "< mail@example.com>" or in any case stuff like that, after the cleanup you'll have "mail@example.com"; such an implementation should solve the issues and still... allow Martin to be happy... or at least I hope so :D

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 SVN Source Change logs - May 27, 2012

Post by Bill48105 » 2012-05-27 20:56

For anyone following this thread I updated the above SVN change logs post to reflect all changes to date.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

prisma
Senior user
Senior user
Posts: 310
Joined: 2010-07-09 13:16

Re: 5.4 SVN Source Change logs - May 27, 2012

Post by prisma » 2012-05-29 11:24

Bill48105 wrote:

Code: Select all

Date: Friday, May 04, 2012 3:05:12 PM
Removed dependency on Internet Explorer, JET and Windows Installer. While .NET Framework 2 according to docs are dependent on IE6, it seems to work fine to install it without IE6. Server Core does not come with IE, but comes with .NET. 
reasonable!

Bill48105
Developer
Developer
Posts: 6192
Joined: 2010-04-24 23:16
Location: Michigan, USA

Re: 5.4 SVN Source Change logs - May 27, 2012

Post by Bill48105 » 2012-05-29 19:40

prisma wrote:
Bill48105 wrote:

Code: Select all

Date: Friday, May 04, 2012 3:05:12 PM
Removed dependency on Internet Explorer, JET and Windows Installer. While .NET Framework 2 according to docs are dependent on IE6, it seems to work fine to install it without IE6. Server Core does not come with IE, but comes with .NET. 
reasonable!
You can thank martin, he made the changes a few weeks ago.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***

Post Reply