RETMAIL v2.0 A util for F6FBB BBSes which returns undelivered messages. (c) 1995,1996 Mathijs Maassen (PE1NTP) As of version 5.15 of the FBB BBS the EPURMESS program returns messages which cannot be forwarded due to a bad or unknown route. (Or sysop laziness :-) Local messages however are simply killed after expiring, without notifying the sender of the message. I wrote RETMAIL to address this problem. RETMAIL returns two types of messages: o Messages for known users which are about to expire. o Messages for unknown users which are about to expire. RETMAIL also sends a warning to the sender of a message for an unknown user before returning it. The expiry of unread pmail is handled by RETMAIL itself, not by EPURMESS. RETMAIL scans the message database (DIRMES.SYS) for messages with type 'P', status 'N' and no @BBS field. (i.e. local unread p-mail) It then checks if the callsign for whom the message is has an entry in the users database. (INF.SYS). If the message is expired it will be returned to the originator, and the message-status will be changed to 'K'. (i.e. killed) The locations of the various files are taken from INIT.SRV. RETMAIL should be started from the directory where the INIT.SRV file resides. RETMAIL takes three option: The first argument is the number of days after which a message for an unknown user will expire. The second argument is the number of days for a message to a known user. The third argument is the number of days after which a warning is sent to the sender of a message for an unknown user. For example: RETMAIL 7 100 0 This will return messages for unknown users after 7 days, and unread messages for known users after 100 days. Warning messages will be sent immediately. If RETMAIL is given a fourth argument it will operate in test mode. It doesn't matter what the fourth argument is. In test mode no messages are killed, and the output is written to the file RETMAIL.DBG instead of the MAIL.IN file. I recommend testing RETMAIL in test mode before using it in Real Life Situations (tm). RETMAIL should be started from within your APPEL.BAT (or whatever name it has on your system). Don't use RETMAIL while the BBS is running! It's safe to run it in test mode though. Returned messages look like this (with the default RETMAIL.LNG): # SP PE1XYZ @ PI8ABC Returned mail: Message expired Your message for PE1HPV entitled 'Re: tmail' was about to expire after being unread for 50 days. PE1HPV's last login was on Mon 12 Jun 1995, 02:42:00 GMT ----------------------------------------------------------------------------- Path: !PI8XYZ!PI8ABC! --message-- ./EX # SP PA3XYZ Returned mail: User unknown Your message for PA0AAA entitled 'Example' cannot be delivered: User is not known at this BBS. ----------------------------------------------------------------------------- --message-- ./EX # SP PE1FOO @ PI8BAR Warning: User unknown You sent a message to PE0NTP entitled 'Blah blah'. User PE0NTP is not known at this BBS. The message will be returned in a couple of days if it remains unread. ./EX Changing the language --------------------- All strings that RETMAIL uses in its return messages are defined in the file RETMAIL.LNG: line 1: 1st part of subject of returned mail. line 2: 1st part of subject of a warning message. line 3: 2nd part of subject for an expired message. line 4: 2nd part of subject for an unknown-user message. line 5: 1st part of body for an expired message. line 6: 1st part of body for an unknown-user message. line 7: body for warning messages. The following variables may be used: $D - the number of days after which a messages expires. $U - destination of the message. $X - last login of the message destination (only makes sense for expired messages) $S - subject of the returned message. $W - a newline. $$ - the $ character. How to install RETMAIL on your system ------------------------------------- o Copy RETMAIL.EXE to a directory which is in your DOS path (e.g. \FBB\BIN) o Copy RETMAIL.LNG to the directory where the INIT.SRV file resides. o Run RETMAIL in test mode to check if it works OK. For example: C:\FBB>retmail 7 100 0 x Check the file RETMAIL.DBG. If it's empty no messages were returned. Try a lower expiry limit instead. (Just for testing purposes) o Add RETMAIL to APPEL.BAT, *before* EPURMESS. For example: CD \FBB RETMAIL 7 100 0 EPURMESS o Change EPURMESS.INI so that EPURMESS' expiry limit for unread pmail is larger than the limit of RETMAIL. For example: ... # PARAMETERS FOR PERSONAL MESSAGES: # # PN -> PX (days after message is written) 110 ... The DOS version of RETMAIL was tested with FBB 5.15c. It should work with WFBB v7 too I guess. If you have any questions or suggestions feel free to mail me. Source files (in C) are available on request, and on my website (see below). There's also a Linux version available. It's not yet included in this package because XFBB is still in beta stage, and there probably aren't many people using it yet. RETMAIL and other stuff I wrote is also available at http://www.xs4all.nl/%7Etyz/fbb/ Regards, Mathijs Packet: PE1NTP @ PI8DAZ.#TWE.NLD.EU Internet: tyz@xs4all.nl