Changes ======= Vr. 1.9 (2003-04-12) - Chg: Completed AUTH/SASL support for POP3 (client and server). - New: Experimental support for SASL authentication mechanism DIGEST-MD5. - New: More detailed authentication settings for remote POP3 servers. (HControl -> Config. -> Remote server -> POP3). - Fix: When deleting an account, the mailbox directory was not removed. - Fix: When deleting an account, it was not removed from (all) mail lists. - New: Basic SSL support for accessing remote servers (see "How to" in helpfile; requires additional files and setup). - Fix: When sending mails, "MAIL FROM:" and "RCPT TO:" were given with an additional, invalid space character. - Fix: Script function "int" caused errors instead of just returning 0. - New: Additional, optional parameter for script function "int" giving the value that is returned when calling with unconvertable expressions. - New: Optional parameter for script function "HamVersion" returning additional values. (TGL) - New: Scripts now support "elseif". (TGL) - Chg: Former limit of 32 supported RAS connections removed. (TGL) - Fix: Use of uninitialized variables in script expressions did not show appropriate error in all cases yet. - Chg: "sub"-parameters in scripts marked with a leading "*" are now true "by reference" parameters. Vr. 1.8 (15 DEC 2002) - Fix: Restoring previous state and size of HControl's window fix^Wimproved. - Fix: Message boxes and dialogs in HControl were partly in german. - Fix: Known sender address was converted to local account name when sending mails to remote servers. Such mails might have been rejected by remote servers. - Chg: All Live Mode requests now accept a trailing CR/LF, so script command HamRequest can safely be used for all commands now. - New: Added "Original-Recipient:", "X-Resent-For:", "X-Resent-To:" and "Resent-To:" to checked headers in "Any-Recipient:" mail filters. - Chg: Reloading the list of scripts in HControl now also refreshes internal list in HService, so manual changes in script folders are reflected. - Chg: HamArtTextExport (scripts) now quotes all lines starting with "From ", so any import programs will at least recognize article boundaries. - New: Script functions: - HamArtImportFile, HamArtExportFile - GlobalValueAppend - MsgHeaderExists - hr_*.hsm modules containing constants and more convenient wrapper functions for executing Live requests (HamRequest, HamRequestStr) - New: New entity called "Mail Lists" for storing lists of muliple mail recipients. (HControl -> Config. -> Mail Lists). - New: Mails received for an account can now be forwarded to a different account, a specific mail address or to the members of a mail list. (HControl -> Config. -> Accounts -> Mail). - New: Forwarding mails to the members of a mail list can now be restricted based on the (authenticated) sender of the mail. If sender does not meet the given restriction, the mail is sent to the list owner only. (HControl -> Config. -> Mail Lists -> Accept from). - Chg: Only one failure notification if a mail could not be sent out by any of the MX or fallback servers (former: failure notification for every attempt, although the mail finally could be sent out successfully). - New: Separate button/menu-item to start script with parameters in HControl. - Chg: Former thread ID in logfile lines (hex number within {}) was replaced by HService's internal, unique ID (decimal number within {} as well). - Old^H^H^HNew: Parameter "-W" for scripts started by RC server in Telnet Mode is available again (-> wait until finished and send script output). - Fix: If APOP authentication was requested for a remote POP3 server but this server either didn't support it or rejected it, there was a fallback to (cleartext) USER/PASS authentication. Vr. 1.7 (17 NOV 2002) - Fix: First server in list of newsservers was always treated as "readonly", so it was not possible to post to it. - Fix: Adding a new server always showed a silly "server unknown" warning. - Fix: A missing or invalid timepoint when a newsgroup was added had the effect, that the group was always reported as being a new one. This especially happened with internal.misc added automatically by Hamster. - New: Some new functions to send mails directly to recipient's mail exchange (MX) servers: - new configuration file "SmtpRouter.hst" - new script command "HamSendMailMX" - new "Start MX" button on HControl's "Start Tasks -> Mail Out" page - Chg: Show warning, if any of the stored passwords can't be decrypted again. - Fix: Task counters were sometimes not updated in HControl when task ended. - New: Script functions: - CharsetList, CharsetExists, CharsetDefault, CharsetConvert - Decode( 3, ... ) Vr. 1.6 (10 NOV 2002) - Chg: Slightly modified posting of articles (send at once not line by line; reliable Detail-log entry after msg is out and waiting for response). - Chg: Updated Indy components used for TCP/IP (now using vr. 9.0.10). - Fix: Crosspostings to unknown groups always failed with 'no permission' regardless of account's patterns for allowed groups. - Chg: More detailed log file entries if any requested newsserver/group/pull can't be found. - Fix: Some fixes related with newsgroup names containing 8 bit characters. - New: Script functions to share data between muliple running scripts and to synchronize them: - GlobalValueGet, GlobalValueSet, GlobalValueAdd, GlobalValueWait - GlobalEnter, GlobalLeave - Chg: Improved transfer of (large) data from client to Hamster (SMTP-DATA, NNTP-POST). Same change for data transferred from remote servers to Hamster. - Chg: Start of Daily Maintenance is now delayed for about two minutes after starting HService, so it does not slow down boot time. - Chg: If a Message-ID is added to a mail received by POP3, it is now marked with ".nomid" in front of "@". An added Date is marked with "-0000" timezone. - Chg: When decoding header values, known character sets are mapped to active codepage of computer running HService. Known character sets are: utf-8, utf-7, windows-1250/.../-1258, ISO-8859-1/.../-16, IBM437/850, KOI8-R. This affects: Filter lines with "~", script command "decode(2,...)". Vr. 1.5 (26 OCT 2002) - Fix: Scripts: MsgSetHeaders set body, MsgGetBody returned full article. - Fix: Some futher problems fixed related with alias extensions for servers (some.serv.er/alias), e. g. when accessing server properties like its SMTP-AUTH settings. - New: New global option to automatically delete mails left on server after a given number of days after loading them. (HControl -> Config. -> Hamster -> Remote Mail). - Chg: Scripts: 4th parameter of HamScoreTest now selects which score value to return. By default it returns the final sum now. - New: Extended 'X-Hamster-Info:' header of loaded articles to additionally show the score values of both runs ('ScoreLoad=... ScoreSave=...'). - Fix: If multiple connections from the same client were opened, some of them may have been refused without recognizable reason. - New: Max. number of concurrent connections from same client can be changed now (former: fix limit of 4 connections). (HControl -> Config. -> Hamster -> Local Details). - New: Option to disable a remote server temporarily. (HControl -> Config. -> Remote Server -> Common). Vr. 1.4 (06 OCT 2002) - Fix: Scripts: If a "sub" was left with "return", still active loops were not terminated, which either caused misleading errors or even unpredictable loop behaviour. - Chg: Scripts: Scope of if/else/endif and all loops is now bound to current sub context, i. e. corresponding statements are only searched up to next "endsub". - Fix: Retrieving large messages from Hamster was very slow. - Fix: "Last Server Pull" and "Last Client Pull" were exchanged in HControl's newsgroups information. - Chg: Default value for service setting "Interactive" changed to "False". - New: Added NNTP server commands: AUTHINFO SIMPLE, MODE STREAM - New: Script actions: Added "NewsIn" action. - New: Script actions: Added "Silent" option for all actions. - Fix: Alias extension for newsservers (news.serv.er/alias) did not work. - Chg: Further optimized local servers: POP3-TOP, NNTP-LIST ACTIVE/NEWSGROUPS Vr. 1.3 (01 SEP 2002) - New: Local SMTP server: Option to accept mails for local recipients without prior authentication (HControl -> Config. -> Hamster -> Local Mail). - Chg: Local SMTP server: Unknown local and invalid addresses are now rejected immediately (former behaviour: send to "admin"). - Chg: Result of 'IniWrite' (scripts) is now -1 on error and 0 on success. - New: Script functions: - Const: declare constants - ConstEnum: declare enumeration constants - Dump(True): also show constants - ListAppend: append list's content to a file - TimeToRfc/TimeFromRfc: convert time to/from RFC format - Fix: Timestamps used for purging and NEWNEWS were missing in postings to local groups and in archive copies of posted articles, so the "Date:" values were used instead (-> new ones might not be reported on NEWNEWS). - New: SASL mechanism "CRAM-SHA1". - New: HControl: "View Selected Thread" added to context menu of task view and client list. Also called when double-clicking a line of these lists. - New: Option to store posted articles in local groups immediately (HControl -> Config. -> Hamster -> Remote News). - Chg: Unique identifiers of task and client threads (UID) now share the same numbers (former: independant numbers). - Chg: HControl: More details on tasks list on what task is doing. - Chg: Live Mode commands: - LMREQ_TASKS_LIST now additionally returns class name and state info - LMREQ_RUN_NEWSJOBS now returns UID list of started tasks Vr. 1.2 (28 Jul 2002) - Fix: Some logfile (error-) entries on startup forced HService to terminate immediately without any notice. - Fix: Account "admin" did not have access to RC server after updates in some cases, preventing HControl from being used at all. - New: Script functions: - DiskInfo: get free space of disk and its total size - MsgLoad, MsgSave: load/save message from/to file - HamNewMail: send mail by script - HamRequest, HamRequestStr: execute Live server requests - HamSendMail[Auth]: added optional To-selection - Chg: Some (minor) optimizations regarding local newsserver access. - New: Option to add milliseconds to timestamp in logfile entries (HControl -> Config. -> App. -> Logfile). - New: HControl: "View All" and "View Selected Thread" added to context menu of log view. Second one is also called when double-clicking a log line. - Fix: Possible race condition leading to an access violation with threads started by scripts, by Live server or in Daily Maintenance. - Chg: Extended error checking and logging for script's Dll functions. - Chg: Besides startup and shutdown messages, HService itself will only show errors, warnings and system messages while it is running. - Fix: ParamStr(0) did not contain path if script was started by RunScript. - Chg: Script action "MailInternal" removed - it is also a "MailIn" now. - Fix: Possible deadlock when using old script commands "HamNewsPost" and "HamNewsPull". Newer "HamNewsJobs*" commands were not affected. - Chg: Improved error checking and handling for group files (e. g. disk full, group file's size limit reached). - New: Size limit of a group's data file raised from 2 GB to 4 GB. - Chg: Script Actions: Definitions and parameters of message related actions have changed. Script now has direct access to the message text before it is saved to any file. See "Script Actions" in helpfile for details. - New: Adding of "Followup-To: poster" header when redirecting mails to news- groups by "postto" rules (mail filters) can now be turned off. (HControl -> Config. -> Hamster -> Remote Mail) - New: Completed/enhanced support for moderated and "news-to-mail" newsgroups: - Unapproved postings in moderated groups (=groups of type "m") can now be sent to its moderator by mail. If no moderator address is set, the group is like a "y" one (i. e. remote server handles "moderation"). - Added a new group type "g" (gateway) to redirect postings to (e. g.) a mailing list. If no mail address is given, the group is like a "n" one (i. e. no posting allowed, user's are forced to use mail). See "group type" and "mail address" at (HControl->Config.->Newsgroups ->Settings) for details. - New: Added "LIVE REQUEST " command to execute a Live request in RC server's "Telnet Mode". Vr. 1.1 (15 Jun 2002) Due to heavy changes, there is no detailed list for this version, just a few notes about remarkable ones: - The outdated help file was replaced by an updated one. It is not completed yet, but there is also a "Todo" page in it, which contains the changes not documented or updated so far. - Former Hamster.exe was replaced by two programs. HService.exe is the service program, which is intended to be run in the background and which does the actual work. HControl.exe is the client program, which talks to HService.exe by TCP/IP. - Remote Control Server: Besides former "Telnet Mode", there is a new "Live Mode" for communication between HService and HControl. - Scripts: Interactive script functions like "msgbox" were removed. - Account "admin" now has a default password on new installations: "admin". - Sourcecode: TCP/IP communication is now done with "Indy" components. To compile the sources, a current snapshot of Indy Vr. 9 is required (see http://www.nevrona.com/indy/). ------------------------------------------------------------------------------ Vr. 1.0.0.91 - 1.0.0.96 (02 Mar 2002) - Fix: Scripts, module usage: - If "#!initialize" failed, the error message did not show the right module name. - Already loaded modules were not recognized and could therefore be loaded and initialized multiple times on multiple/cascaded "#!load". - Initialization of modules was in wrong sequence, so a module could have been used, although it was not initialized yet. - New: Modules can now have a "#!finalize" to clean up ressources when script has finished. Syntax is exactly the same as with "#!initialize": #!initialize # initialize/allocate ressources before script starts return(0) #!finalize # free ressources after script has finished return(0) Notes: - If "#!finalize" is used, the module must also have an "#!initialize" (but not vice versa), and "#!initialize" must be located before the "#!finalize". If there's a "#!finalize" without prior "#!initialize", the script will not start and report an appropriate error message. - "#!finalize" will be executed for all modules, that were previously initialized. Therefore, it will always be executed, even if the script or a previously executed "#!finalize" has terminated with an error. - Chg: Some former script "statements" (=can't be used in expressions) were turned into "functions". Those are, with their new result values: - sleep (given sleep time) - dump (0) - debug (previous debug level) - trace (previous trace setting, 0/1) - entercontext, leavecontext (new context ID) - var (number of variables) - Fix: Scripts could not be started by menu of tray icon. - Fix: Script commands "MemGetStr" and "MemSetStr" failed with a size of 0. - Fix: Script command "wait" did not work. - New: New Windows API-Module "hw_syncobjs.hsm". Vr. 1.0.0.79 - 1.0.0.90 (03 Feb 2002) - REMOVED: - OLE server and its functions - HAM.EXE (was based on OLE) - Plugins - Fix: Script threads started by RC server without "-W" flag (wait) were not freed when script finished. - Fix: Scripts started in "wait until finished" mode (e. g. started by HS2's "runscript") could sometimes lead to hangs or various exceptions. - Fix: Number of logfiles was always 14 on initial startup. - New: "Score-After-Load" - If lines in Scores.hst (=scorefile for pulling news) are preceded with a "?", these lines are tested AFTER the article was loaded. The syntax for a "ScoreRule" noted in (outdated) help file therefore changed to: ScoreRule = ["?"] ["="] ScoreValue 1*WSP ScoreSelection cEOL Furthermore, the "ScoreField" is not limited to overview values like in lines without "?". As the full article is available in this case, all headers can be used here, e. g.: ?+42 X-Posting-Agent: "Hamster" ?=-9999 NNTP-Posting-Host: "@known.spammer.domain" Beside such real header values, the fictitious "Score-Before-Load" headers "Bytes", "XPost", "Number" and "Age" also work here. And, last but not least, there are additional ones named "Header" (anywhere in header lines), "Body" (anywhere in body lines) and "Article" (anywhere in article), e. g.: ?+42 Article "Hamster" ?+42 Header "Hamster" ?+42 Body "Hamster" Note: The MIME decoding by preceding the field name with a "~" does not work for these special keywords. - If - after loading the article - the score value of all "?"-lines is below zero, the article is ignored and will not be saved. Like with "Score-Before-Load", there will just be an entry in file Kills.log. - The final score value noted in Hamster's "X-Hamster-Info:" header of a stored article will be the sum of both score values (i. e. "before load" plus "after load" score), limited to +/- 9999. The entry in Kills.log for a loaded but not saved article will only contain the (negative) "after load" score value. - New: NNTP server command "XHSEARCH" for searching articles in Hamster's news database. It has to be enabled per user with a "NewsXHSearch=1" line in file "Accounts.!!!". - Format 1, single line: XHSEARCH groupregex field patterns "groupregex" is a regular expression for the names of newsgroups, in which articles should be searched. "field patterns" is the same as the part named "ScoreSelection" of scorefile lines, i. e. a scorefile line without the leading score value. The "field" values (="ScoreDefField") are the same as with "Score-After-Load", e. g. special values like "article" and "body" are also allowed here. Example: xhsearch ^hamster\..* subject hamster hamrc - Format 2, multiple lines: XHSEARCH Like above, but parameters are given on separate lines, up til a line with a single dot ("."). The parameters have to be marked with a leading "GRP" for "groupregex" and "PAT" for "field patterns". If multiple "GRP" lines are given, the additional ones extend the list of groups selected so far. If a pattern starts with a "-", the groups selected by the following pattern are removed from the list. If multiple "PAT" lines are given, they all have to match. Example: xhsearch grp ^hamster grp software grp -\.announce$ pat subject hamster hamrc pat article xhsearch . - For each article found, one line with the name of the newsgroup, the article's number and Message-ID is returned (with values separated by a single TAB): (groupname) TAB (article number) TAB (Message-ID) The result list may also contain embedded comments, which are lines starting with a dot, immediately followed by a keyword. Currently, there is only a final summary line with the number of articles found and the number of articles tested: .summary TAB (found) TAB (tested) The result list ends with a line containing only a single dot ("."). - New: NNTP server command "XHHELP" - like HELP, but for XH commands. - New: Script functions: - $score = HamScoreTest( $grp, $art, $log, True ) If new 4th parameter is given and true, the "Score-After-Load" value of the given article is returned instead of its "Score- Before-Load" value. - $art = HamArtTextByMid( $mid ) If an article with the given Message-ID is available, its text is returned else an empty string. Please note, that only Message-IDs of articles work here, that are within the "Days to keep data: History" range. Older articles are not accessible with this function. - $count = HamArtSearch( $ParamList, $ResultList ) Like the multiline version of NNTP server's new XHSEARCH command, this new script command searches for articles in Hamster's news database. $ParamList is a list that has to be filled with parameter lines in the same format as with XHSEARCH, i. e. "GRP ..." and "PAT ..." lines. $ResultList will be filled with the same [1] info for matching articles as with XHSEARCH, i. e. "Groupname TAB Article-Number TAB Message-ID". [1] One exception: No "embedded comments" here, so each line in $ResultList will be the info of a matching article. Example: VarSet( $lp, ListAlloc ) ListAdd( $lp, "grp ^hamster" ) ListAdd( $lp, "grp software" ) ListAdd( $lp, "grp -\.announce" ) ListAdd( $lp, "pat subject hamster hamrc" ) ListAdd( $lp, "pat article xhsearch" ) VarSet( $lr, ListAlloc ) HamArtSearch( $lp, $lr ) Print( ListGetText( $lr ) ) # Tip: To split a result line into its parts, use RE_Split: # Var( $i, $Line, $GrpNam, $ArtNo, $ArtMid ) # For( $i, 0, ListCount($lr)-1 ) # $Line = ListGet( $lr, $i ) # RE_Split( $Line, "\t", $GrpNam, $ArtNo, $ArtMid ) # Print( $GrpNam, " ", $ArtNo, " ", $ArtMid ) # EndFor The return value is either the number of articles found (>=0) or an error marker: -1=invalid script parameters, -2=invalid search parameters ($ResultList will contain error message in this case). - Chg: Removed former limit of at least 42 characters in mailtext when sending a mail to SMTP server. - Chg: Leading and trailing spaces in header values returned in overview data by NNTP server are now left intact. CRLF pairs of folded header lines are removed ("unfolded"), not replaced by spaces. - New: SOCKS support for connecting to external servers through firewalls and routers, which provide a SOCKS server for this purpose (e. g. AVM's KEN!). The common settings used for all connections are defined under [Setup] in Hamster.ini: socks.version=0 0=None - connect directly, 1=SOCKS V4, 2=SOCKS V4A, 3=SOCKS V5 socks.server= Name/IP of SOCKS server socks.port=1080 Port of SOCKS server (mostly 1080) socks.auth=0 0=No authentication, 1=Username+Password (SOCKS V5 only) socks.user= socks.pass= Username and password for authentication with socks.auth=1. You can also set socks.user to one of the multi purpose passwords (e. g. $20) to avoid noting these values in cleartext here. If socks.version is set to 1, 2 or 3 and socks.server and socks.port are given, all connections to external news and mail servers are then established through the given SOCKS server. To avoid using SOCKS for specific servers in this configuration (e. g. to access an "intranet" server), you have to edit the file Server.ini for such servers and change/add the following setting under [Setup]: socks=0 0 = Never use SOCKS when connecting to this server. 1 = Default = Use SOCKS, if it's configured in Hamster.ini. Vr. 1.0.0.73 - 1.0.0.78 (03 Jan 2002) - Fix: Error-variable of script-commands "Decode" and "Encode" (optional 4th parameter) was never set. - Chg: RC server: - Support for script files in sub-directories of script's base dir; format for LIST/START is: Path1\Path2\Scriptname.hsc - Path- and file names used with SCRIPT command may only contain the following characters: 'a'..'z', 'A'..'Z', '0'..'9', '_' and '-'. Additionally, '.' is allowed in extension ('.hsc' or '.hsm') and '\' or '/' are allowed as path separators. - Parameters may be "double quoted"; needed if a parameter contains a space (e. g. regular expressions). - Modules (*.hsm) are also accessible. - SCRIPT DIR: Like LIST but with additional info (time/size). - SCRIPT DEL: Delete a script file. - SCRIPT GET: Download a script file. - SCRIPT PUT: Upload a script file. - SERVER LIST: Lists states of all servers. - POLICY LIST: List policy settings for current user. - User's "RemoteControl=" setting in file "Accounts.!!!" now determines his "RC policy group" - a group describing the accessible commands if user connects to the RC server. Two groups are predefined and can't be changed: - "0" or a missing value always means "No access". - "1" enables commands which just send info but do not change anything or start any action. Further groups ("2"..."9") can be defined in Hamster.ini in separate sections named "[RC policy ]". Each command for which access should be granted, must be listed here with the format of allowed command lines. Format: "Command =". Example: A group "2" which only enables adding of new groups/pulls: [RC policy 2] Description=New groups and pulls only Command NEWS=^NEWS\s+(LIST|ADD).*$ Example: A group "9" for administation enabling all commands: [RC policy 9] Description=Administration Command LOG=^LOG\s+(LIST|ROTATE).*$ Command NEWS=^NEWS\s+(LIST|ADD|DEL).*$ Command POLICY=^POLICY\s+(LIST).*$ Command SCRIPT=^SCRIPT\s+(LIST|DIR|START|STOP|GET|PUT|DEL).*$ Command SERVER=^SERVER\s+(LIST|STATE|START|STOP|RESTART).*$ Command TASK=^TASK\s+(LIST).*$ To not accidentially enable the dangerous "SCRIPT PUT" command by an inappropriate regular expression, it additionally has to be confirmed with a 'Confirm SCRIPT PUT=1' line in the policy section. Vr. 1.0.0.65 - 1.0.0.72 (26 Dec 2001) - Fix: SASL challenge never changed while servers were running. - Fix: Script command 'dllcall' failed with exception in THscParsedFunc. - Chg: Logfile lines now contain a marker describing the type of the log line: 'ERR' (Error), 'WAR' (Warning), 'Sys' (System), 'I ' (Info), 'D ' (Detail), 'd ' (Debug), 'f ' (Full). - Fix: Events created by a Hamster running as a service under local system account were not accessible outside of Hamster. - New: Script functions: - Decode( Type, String [, Keyword [, ErrVar] ] ) Returns decoded value for the given string. Supported types are 0 (base64), 1 (quoted printable), 2 (QP/B64 in headers). 3rd parameter is not used so far. 4th parameter can be a variable receiving success of decoding (<>0: ok, =0: failed). - Encode( Type, String [, Keyword [, ErrVar] ] ) Similar to Decode() above, but encodes the given string. Type *2 is not supported here. Note: Decode/Encode of types 1 and 2 can only be used for very simple purposes like making something "readable" for human beings. - New: Simple, 'sub'-based profiler for scripts. Activated by a '#!profiler 1' pre-processor command, it collects usage and timing information while script is running and finally creates a report when script ends (saved to log file). If activated with '#!profiler 2', it also notes the call stack for each sub in the final report. - New: A set of script functions to handle usenet-/mail-messages: $Msg = MsgAlloc( [$Text] ) $ok = MsgFree ( $Msg ) Allocates/frees a message. $Text = MsgGetText( $Msg ) $ok = MsgSetText( $Msg, $Text ) Gets/sets the message text. $Hdrs = MsgGetHeaders( $Msg ) $ok = MsgSetHeaders( $Msg, $Hdrs ) Gets/sets all header lines. $Body = MsgGetBody( $Msg ) $ok = MsgSetBody( $Msg, $Body ) Gets/sets all body lines. $HdrVal = MsgGetHeader( $Msg, $HdrNam [, $Separate] ) Get value of given header, empty string if not found. If header has continuation lines, the values of these lines are either appended to $HdrVal, each separated by a single space ($Separate=false, 0 or missing) or are returned "as they are", i. e. with CRLF separators and indentation left intact ($Separate=true or <>0). $ok = MsgAddHeader( $Msg, $HdrNam, $HdrVal ) Add a header with given name and value, even if there's already one with the given name. $HdrVal may also contain continuation lines separated by CRLF and indented appropriate. $ok = MsgSetHeader( $Msg, $HdrNam, $HdrVal [, $XHdrNam] ) Like MsgAddHeader, but also removes an already existing header with the given name. If 4th parameter is given, the value of such a removed header is saved under the name given here. $ok = MsgDelHeader( $Msg, "Foo:" ) Removes the given header line. Notes on variables used in description above: $Msg: Identifier for an allocated message. If one of the functions is used with an invalid $Msg, the script stops with an error. $ok : Will be 0 on success and <>0 on errors. $HdrNam: Full name of header, e. g. "From:", "Subject:", "Date:". Trailing colon is optional, upper-/lowercase doesn't matter, so "fRoM" is the same as "From:" here. $Text, $Hdrs, $Body: String containing lines ending with CR+LF. - Chg: Optimized GROUP response time, if auto-subscribe is enabled. - Chg: Updated to most current PCRE version (Vr. 3.1 -> Vr. 3.7). - Fix: Password wasn't checked when logging in into RC server by SASL/CRAM-MD5. - Fix: Client threads were not removed from "Threads" window if connection was lost or a server with active connections was stopped. - Chg: A client will now be disconnected from local servers, if something unexpected happens (former: error only, but connection remained). Vr. 1.0.0.43 - 1.0.0.64 (25 Nov 2001) - Fix: Worst case fixed when pulling news, which could lead a pull-thread to look for a news-job a long time. - Fix: HS2's expression cache wasn't case sensitive, so a quoted string in an expression like "a" could become "A" or vice versa. - Chg: Unread group statistics raised to 3 days (friday til monday). - Fix: Initial multiline-reply from remote SMTP-server was not handled yet. - Fix: All Windows 98 versions were reported as being "SE". - Chg: Further optimized and cleaned up script-code. - Fix: Script-command 'for' failed if loop was called recursively. - Fix: If compiled with Delphi 6, script-commands 'inputbox' and 'listbox' caused script to hang and calling a self-defined 'sub' could sometimes lead to a "Variant array index out of bounds"-error. - Fix: 'list active.times' executed 'list active' (NNTP server). - New: Also report 'auth=' on 'ehlo' for mozilla (SMTP server). - New: Script functions: - Random( X ) Returns a random number in range ( 0 <= result < X ). - Digest( Type, String [, AsHex] ) Returns checksum/digest for the given string. Supported types are 0 (CRC32, integer), 1 (MD5, 16 chars), 2 (SHA1, 20 chars). If 3rd parameter is given and true (<>0), the digest is returned as a hex string. - New: "Full log"-option of former versions was integrated again. It can be enabled manually by setting "log.file.mask=" and/or "log.view.mask=" under [Setup] in Hamster.ini to a value of "FFFF". - Fix: AUTH LOGIN (server-side) ignored a username sent with AUTH-line. - New: Plugin-interface for testing purposes. Do not use, as specification is not stable yet. Vr. 1.0.0.0 - 1.0.0.42 (29 Sep 2001) - Chg: Misleading warning changed if a newsserver returned no groups after "LIST". - Fix: Under rare circumstances, the "Purge" function could destroy the data- file of a newsgroup ("damaged data-pointer" effect). - Chg: Faster startup by creating statistics in a separate thread and by an optimized method for determining initial values of article counts. - New: Create statistics not only on startup, but also on day changes. - Fix: Rebuilding of global lists sometimes did not start. - Chg: Misleading error message changed if an undefined value was used as a parameter for return()-function (HS2). - Fix: Commandline parameter "/svc" did not prevent from terminating program yet if user just logged off. - Fix: Quoted usernames and mail-addresses with multiple '@' were not recognized as local users. - Chg: Avoiding of concurrent pulls for the same group was far too weak. - New: Prevent from loading the same article concurrently (similar to Heiko Rosts solution in Future/Classic). - Fix: NNTP-Client now sends "MODE READER" before "AUTH". - New: Limit number of concurrent transfer tasks like the number of threads pulling news. The default value is 8 concurrent tasks, further tasks are suspended until other tasks have finished again (similar to Joern Weber's and Heiko Rost's solution in Future/Classic). Hamster.ini-setting: [Setup] tasks.limit=8 - Chg: Changed start sequence of NewsJobs-threads to minimize number of concurrent connections to a specific server if task-limit is reached (old: A1 A2 A3 A4 B1 B2 B3 ..., new: A1 B1 C1 D1 A2 B2 C2 ...). - New: Local NNTP-server now supports NEWNEWS-command. It has to be enabled per user with a "NewsNewNews=1" line in file "Accounts.!!!". - Fix: Index files of articles were not written to disk immediately after changes, if the group was still open by another thread. - Chg: Put newspull-job back to job-list if connect or newspull fails, so if another thread for same server is more successful, it will be executed. - Chg: Preferred HELO/EHLO-domain used for SMTP is now the configured FQDN. - Chg: Old-style .hsc-Scripts are not supported any more. - Fix: No (unintended) error message any more if RAS is not installed. - Fix: Race condition fixed in local servers, which sometimes caused GPFs when a client connected. - Fix: When loading descriptions for new groups, it was not detected yet if the newsserver really supports the command used by Hamster (Server.ini, [NewGroups], LoadDescs=0, 0=auto-detect/1=load always/2=load never). - New: Local servers can now be bound to a specific local address. By default, all servers are now bound to "127.0.0.1" (="localhost"), which makes them unreachable for external request. Hamster.ini-settings under [Setup]: local.bind.nntp=127.0.0.1 local.bind.pop3=127.0.0.1 local.bind.smtp=127.0.0.1 To open the servers like in previous versions, add these settings with no value or a value of "0.0.0.0". Changed values will take effect after restarting the servers. - New: Limit number of active client connections to local servers. Hamster.ini-settings under [Setup]: local.clients.nntp=10 local.clients.pop3=10 local.clients.smtp=10 - New: Limit number of concurrent connections from a specific client to local servers (fixed: 4). - New: Due to abusive use of periodic news pulls, Hamster now rejects pull requests from a specific server, if the period between last and new request is below 14 minutes. Hamster.ini-setting: [Setup] pull.limit.frequency=14 - Chg: IPAccess.hst will now be reloaded when a server is (re-) started. - Chg: Optional "X-Posting-Agent" header replaced by "User-Agent". - Chg: Optimized .hsc-scripts to run significantly faster. - New: Added support for dynamic memory allocation in .hsc-scripts: - $ptr = MemAlloc( $size ) # allocate memory block of given size - $size = MemSize( $ptr ) # return allocated size of memory block - MemFree( $ptr ) # free memory block - MemForget( $ptr ) # don't free memory block when script ends - MemSetInt( $ptr, $int ) # copy integer value to memory - $int = MemGetInt( $ptr ) # copy integer value from memory - MemSetStr( $ptr, $str [, $len] ) # copy string to memory block - $str = MemGetStr( $ptr [, $len] ) # copy memory block to string - $ptr = MemVarPtr( $variable ) # return a pointer to var's value - New: A set of Dll*-functions was added to invoke functions located in a dynamic link library (*.dll), especially functions of Windows API: - $hdl = DllLoad( "name.dll" ) # LoadLibrary - DllFree( $hdl ) # FreeLibrary - print( DllLastError ) # GetLastError-value of last DllLoad/DllCall If a .dll is (pre-) loaded with DllLoad, this instance is automatically used when calling one of its functions. If a function is called without such pre-loading, the .dll is loaded temporarily for each call. - $result = DllCall( $declaration [, $par1, $par2, ..., par11] ) The declaration for a .dll-function consists of 4 parts separated by a "|" character, e.g. "user32.dll|GetWindowTextA|n|nnn". First part is the name of the .dll-file, second part is the name of the function. Third part is the result type of the function, which can be either "v" (void) for no result or "n" (number) for a 32 bit value (DWORD, Pointer etc.). Fourth part describes the types of each function parameter, either a single "v" (void) for no parameters or a single character for each parameter. Like in third part, a "n" (number) marks any 32 bit parameter (DWORD, LPSTR, INT, WORD - note: smaller types are expanded to 32 bit). There's also (very limited) support for callback-functions, where the callback-function-parameter has to be set to either "1" (cb receives 1 parameter) or "2" (cb receives 2 parameters). See commented example "sub ApiEnumWindowsList()" in hw_windows.hsm for details on these. See also: Windows API examples in hw_*.hsm and hw_demo.hsc. - New: The new .hsc-function 'wait' behaves like an API Wait*-function invoked by DllCall, but also returns if the script is stopped for any reason: - $result = wait( $INFINITE, WaitableObject1, WaitableObject2, ... ) Results: -2=Failed (-> DllLastError), -1=Timeout, 0=Script-Stop, 1=WaitableObject1, 2=WaitableObject2, ... - Chg: Ressources allocated by .hsc-scripts are now guarded by a more flexible ressource-controller. It also guards the new types (allocated memory and loaded libraries) and frees them automatically when script terminates. - Fix: Possible endless-loop when a .hsc-script reports an error. - New: Split large pulls (>300 articles to load from a single group) into more effective, smaller ones (200) (similar to Wolfgang Jaeth's solution in Future/Classic). - New: Added support for CRAM-MD5 and PLAIN mechanisms on SMTP AUTH. The new defaults are now: Server-setting in Hamster.ini under [Setup]: local.smtp.sasl=CRAM-MD5 PLAIN LOGIN Client-setting in .\Servers\(server)\Server.ini under [SMTP]: SASL=CRAM-MD5 PLAIN LOGIN - Chg: GROUP (NNTP server) now reports exact number of articles in group. - New: Mark last server-pull of a group in group's Data.ini ("[Info] LastServerPull="). - New: Once per day, either on startup or when day changes, a thread named "daily maintenance" is started. It executes different tasks, if they are enabled under [Setup] in Hamster.ini: daily.statistics=1 ; create statistics-posting (0=no; 1=yes) daily.buildlists=1 ; like menu-item "Rebuild global lists" (0=no; 1=yes) daily.unsubscribe=0 ; remove pulls/groups, that are not used any more (0=no; 1=yes) ; see new "Auto unsubscribe" function below for more details daily.purge=0 ; purge (same par as HSC-HamPurge: 0=no ... 15=1+2+4+8=all) - New: "Auto unsubscribe". If a group was not read with a newsreader for some time, its pulls and the group itself can now be deleted automatically. Deletion takes place in "daily maintenance", if it's enabled with a "daily.unsubscribe=1" line under [Setup] in Hamster.ini. Furthermore, minimum number of days between last access and deletion has to be given with the following settings (default is 0 days, i.e. don't delete): autounsubscribe.pulls=0 autounsubscribe.groups=0 Notes: - Only groups, that are/were pulled from a remote server, may be removed by this function. Internal or local groups are never affected by it. - It's possible to protect a group from being unsubscribed automatically by adding "autounsubscribe=0" under [Setup] in group's file data.ini. - "Auto unsubscribe" does not delete any groups or pulls, if no groups were read within last two days. This prevents from losing all groups immediately after a long period of non-pulling (e.g. holiday). - A group is not deleted immediately, if it is still pulled from any server. Instead of deleting the group, all pulls are deleted first and the group remains intact until next daily maintenance. - New: "Auto subscribe". If an unknown newsgroup is read with a newsreader, it can be created automatically now if it's available on any of the remote servers. If wanted, this behaviour has to be enabled per user with a "NewsAutoSubscribe=..." line in file "Accounts.!!!". Valid settings are: 0: do not add groups and pulls automatically (default) 1: automatically add group and one pull for preferred or first server 2: automatically add group and pulls for all servers Notes: - If a group is created this way, a short placeholder article is placed in it, giving feedback that articles will be loaded on next pull. - If a group is already pulled from any server, settings 1 and 2 do not add any additional pulls (just because check is very time consuming). - "read with a newsreader" means "selected with NNTP's GROUP command". - New: Users with "auto subscribe" enabled (see above) receive a full list of all available groups of all servers, so they can add groups/pulls just by subscribing it in their newsreader. Notes: - The base for this full list is file alldescs.txt in Hamster's Server- directory. This file is updated when starting menu-item "Rebuild global lists" or (now by default) once a day by "daily maintenance". - When asking for new groups, only new groups in Hamster are reported, not new groups on any of the newsservers. You have to use your news- reader's "Get all groups" function to get an up-to-date list. - Chg: Optimized "Rebuild global lists" function. - New: Highest local article number of a deleted newsgroup is now saved in file .\Groups\savegrp.ini. If such a group is re-subscribed later, this value is used as the starting point for the group, as most newsreaders would not read new articles with already used numbers. - New: It is now checked on startup, that Winsock2 is installed (required by this version). If not, an error-message appears and local servers are not started. This should only affect some Windows 95 systems, which need the Winsock2-update from: http://www.microsoft.com/windows95/downloads/ - Chg: Removed localization routines, so this version is solely in english. - New: A new local server named "Remote control-server" was added, which allows access to some Hamster functions like starting scripts, adding groups, viewing log etc. Connect to it with a telnet-program and enter "HELP" for the list of supported commands and "HELP " for more details on each command. Access to the server has to be enabled per user with a "RemoteControl=1" line in file "Accounts.!!!". The keyword to be used in file IPAccess.hst is "RECO" (the keyword "ALL" also includes it now). The server's settings and defaults under [Setup] in Hamster.ini are: local.port.reco=23 Port number to use (default=23=telnet) local.autostart.reco=0 Automatically start when Hamster is started (0=no, 1=yes) local.bind.reco=127.0.0.1 IP address, the server is bound to. local.clients.reco=10 Max. number of active client connections. - New: AUTH-support for local POP3 server (RFC 1734). - New: CAPA-support for local POP3 server (RFC 2449). - Chg: Sourcecode: - Removed need for RX-library (by removing editor-selection). - Added an include-file named "Compiler.inc" used by all units, which contains mandatory compiler-settings and compiler-specific defines. New default for $WRITEABLECONST changed to OFF (default in D6). - Should also compile now with Delphi6 without errors and warnings. - Fix: Just return '<0>' as Message-ID if article does not contain one on NNTP's ARTICLE/HEAD/BODY/STAT-command. ----------------------------------------------------------------------- | The starting point for this version was: | Hamster Classic Vr. 1.3.22.0 -----------------------------------------------------------------------