Tom's Gravity Pages
[ HOME ] [ SITE INDEX ]

Hamster Hamster and Gravity Gravity

Updated for Vr.2 scripts - November 2001
Based on Hamster version 1.3.23.1
Hamster Copyright © 1999, Juergen Haible
Thanks to Heiko Studt for helping translate Vr.2 scripts

Looking for the Old Hamster Page?


This page was last updated Sept 28, 2003


Introduction

This page shows how to set up a Windows news reader to read threaded e-mail with Hamster. It was written for Gravity, but the information is the same for any Windows news reader. It was written for beginners and is not intended to be an advanced text. Hamster can do much more than read e-mail. If you are serious about using Hamster you should look at the other Hamster help sources. You should also be aware of the limitations.


What is Hamster?

According to the license, Hamster is "... a free news- and mail server for personal, family and workgroup use." Hamster runs as an application on your computer and connects to the Internet. Gravity (or any news reader or mail client) connects to Hamster. Hamster plays the middle man. Hamster is most often associated with Usenet news.

Hamster can pull from multiple news servers and keeps the articles in one list, which is an advantage for readers that cannot handle multiple servers. If you read several newsgroups on different servers you could consolidate them into one list and read them without switching servers.

Hamster can enable an on-line news reader to act like an off-line reader by retrieving and storing the article bodies.

Hamster can connect to multiple mail servers and distribute the incoming mail to user accounts or to local newsgroups. This is how you can read threaded e-mail within Gravity, or any news reader. You can apply Gravity's rules, scoring, and filters to the mail just as if it they were usenet articles. But, be aware there are limitations.

A screen shot of threaded e-mail in Gravity (45k)


Why would I use it when I already have Gravity?

Most Gravity users will have no need for Hamster. Gravity handles both multiple news servers and off-line reading quite well. One practical use is for threading e-mail, especially for large mail lists (plain text).

Another practical use is to keep groups from multiple NNTP news servers in one list. In fact, I think you can have Hamster fetch the same group from several different servers. Hamster won't duplicate and will fill in any article gaps. You can also post to different servers.

I use Hamster for testing Usenet regular expressions and filters with Gravity. I can post all the stuff I want and I don't even need to go online.

Some Europeans like to use Hamster with compatible helper applications like Morver and Korrnews to correct umlauts and character sets.


Limitations and Negatives

Hamster has to fetch the article bodies. This means you will need a lot of disk space if you want to work with multiple groups of any size, or with binary groups. If you are using an offline reader, like Gravity, you should probably set it to NOT store article bodies.

I should note that you can get articles based on score, but this method may be impractical to the casual user.

Regarding MIME, HTML and char sets, remember that Gravity has limitations. So, if you rely on mail with a lot of rich text and HTML you will be disappointed. The same goes for any news reader. You are limited to what your reader can translate. However, some Europeans use Helper Applications to overcome some of these character set limitations and display umlauts.


Download Hamster

There are now different flavors of Hamster (Hamster Classic and Hamster Playground). Hamster Classic is now maintained by Thomas G. Liesner.

UPDATED LINK: http://www.tglsoft.de/

These are old:
German Page: http://home.t-online.de/home/juergen.haible/
English Page: http://home.t-online.de/home/juergen.haible/english.htm


More Hamster help sources


Helper Applications (Morver and Korrnews)

Korrnews - Also available on Thomas G. Liesner's Page

Morver by Werner Jakobi: http://www.morver.de (German)
http://www.morver.de/english.htm (English)


CONFIGURATION: Setup

The following instructions are only to get you started. Hamster has lots of configuration doo-dad thingeys. We will set up a newsgroup for threaded e-mail.

Hamster's address is 127.0.0.1 or "localhost". It is the same for local NNTP or SMTP or POP servers. However, newer versions allow you to bind to another IP address, which allows you to create your own networked server.

If you did not download the zip file, get it now.


Configuration: Filtering with MailFilt.hst

Filtering and routing is done with the MailFilt.hst file. All unassigned mail will go to admin. To post mail to a news group you use the "postto()" command. You can edit MailFilt.hst with any text editor.

The following was part of my old MailFilt.hst file. It routes mail from three different email addresses to the local newsgroup called "hamster.email." I also have two other groups set up for two e-mail lists.

[*]
postto(hamster.email) Any-Recipient: "email-1@mediaone.net"

postto(hamster.email) Any-Recipient: "email-2@mediaone.net"

postto(hamster.email) Any-Recipient: "nfn03862@naples.net"

postto(hamster.gimp-win) Any-Recipient: "gimpwin-users@egroups.com"

postto(hamster.gimp-user) Any-Recipient: "gimp-user@xcf.berkeley.edu"

The last two entries are different mail lists sent to their own local news groups. Mail that does not have a destination is sent to admin.


If you want to send all mail to one group, you could use the next script. But I don't know why you would want to do this.

[*]
postto(mail)	Any-Recipient:

Remember, to connect to Hamster to read your mail or news you must start the local server(s) under the menu "Local". Start the NNTP server to use Gravity or start the local POP3 server to get mail from an account. (And/or start SMTP to send mail if you are using Hamster for a local outgoing mail server). You can set Hamster to automatically start the local servers upon startup in Configuration - Local Servers.

To tell Hamster to get or send mail you (or news) you use the online menu, unless you use scripts.


Configuration: Scripts

Hamster now uses the Version 2 script language. Scripts are plain text files and placed in the Hamster home directory. Scripts will appear in the Scripts menu or by right-clicking the icon in the system tray. You can have several scripts to do different things. All Vr.2 scripts begin with #!hs2. You should read about the syntax in the help file to avoid problems.


The following simple script gets the mail, which is distributed according to MailFilt.hst. (Note that you can do the same the same thing by using the online menu). It gets mail from the fictitious server pop.isp.com. The server is one of the POP servers already configured in Hamster. I can leave the user name and password empty ("") because these are already set up in Hamster.

#!hs2

HamFetchMail( "pop.isp.com", "pop3", "", "", "admin")
quit

Next is a script to get mail from two accounts.

#!hs2

HamFetchMail( "pop.isp.com", "pop3", "", "", "admin")
HamWaitIdle
HamFetchMail( "another.isp.com", "pop3", "", "", "admin")
quit

The next script is more useful. It gets mail repeatedly, from 2 servers every 20 minutes.

#!hs2
#
# Get mail from 2 accounts all day, every day, every 20 minutes
# Use more 'AtAdd' statements to schedule other jobs

AtClear
AtAdd (getMail, "00:00", "24:00", "1111111", 20, true)
AtExecute
quit

sub getMail()
    print( "Getting mail - account 1 ..." )
    HamFetchMail( "mail", "pop3", "", "", "admin")
    HamWaitIdle
    print( "Getting mail - account 2 ..." )
    HamFetchMail( "mail/2", "pop3", "", "", "admin")
endsub

HOWTO set Gravity to post Message IDs with a FQDN

(FQDN = Fully Qualified Domain Name)

You must let Hamster (the server) generate the Message ID.

In Gravity, first connect to Hamster, then (in Gravity) go to Server - Properties - Posting and do NOT check "When posting Gravity should generate the message-id for the article"

NOTE: Gravity tracks replies with its own IDs. If you let the server generate the ID Gravity will not be able to identify replies to your messages.

Server - Properties - Posting

Of course, you must have a real FQDN configured in Hamster in Configuration - Local Servers - General


HELP - Gravity does not see Gateway news groups

Gravity can not see a local group set up in Hamster as a gateway group. The solution is to set the group type to posting allowed "y," then subscribe to the group in Gravity. After subscribing, change the configuration in Hamster to type Gateway "g"

UPDATE: Gravity Version 2.6 (super) Build 2057 and later fixes this behavior.

Techically Gravity doesn't "fix" anything. RFC-977 says that the LIST command should return

group_name last_article_number first_article_number [y|n]

However, as of Build 2057 Gravity accepts "y" "n" "m" "g"

- Top of Page -