How to ... distribute received mails?

The default account named "admin" will receive all mail messages by default, so if you are the only user of your Hamster, there is no need to configure something special - just read your mails from this "admin" account.

But if there are different user accounts on your Hamster, you have to tell Hamster, which user mailbox should receive which messages. There are different approaches to achieve this, below you find the most easy ones in detail and some hints on the more complicated ones for special purposes.

Change default account

As mentioned above, there is a default account "admin", which will receive all mails by default. This default account can be changed per POP3 mailserver under "Configuration -> Remote Server Settings -> POP3":

By selecting a different account here, the selected account will receive all mails fetched from this server by default now, not the "admin" account. If all users have separate external mailboxes, you're done just by changing the default accounts.

Please be aware, that this "by default" is not a fixed assignment, it can be overridden by the settings discussed below. It just means, that this account will receive a mail, if no other rules or settings choose a different recipient.

Automatic distribution

If mail messages fetched from an external mailbox might belong to different accounts, Hamster can automatically look for known recipients in the headers of the mail, and then place the message in the mailboxes of all recognized accounts.

To enable this automatic distribution for an external mailserver, you have to mark the associated option under "Configuration -> Remote Server Settings -> POP3":

With this option turned on, Hamster now examines the headers of every mail message for any recipient mail addresses. What's left is to associate mail addresses with user accounts, so Hamster knows, which mail addresses belong to which account.

To do this, just enter the mail addresses of a user under "Configuration -> Accounts -> Mail". If an account has multiple mail addresses, just enter them all, each separated by a single space character:

Above example means: If a mail with a recipient address of either "jane.doe@provid.er" or "jane@mydomain.zz" arrives, place it in account "jane". If the mail also contains recipient addresses of other accounts, all of these accounts will get a copy of the mail.

Note: POP3 recipients are not reliable

A problem with mails fetched from external POP3 mailservers is, that they do not always contain reliable recipient mail addresses. The real recipient addresses are in general not available by POP3 (though some providers add them in special header lines), they may differ from the addresses you finally see in your mail client.

For private mails, this is rarely a real problem (why should a friend "fake" the mail addresses?), but mails sent to you by "BCC" (blind carbon copy) will suffer from this problem. More significant are mailing lists, where mails are normally sent out without containing specific addresses available by POP3. Finally, as always, most "spam" mails do not contain any reliable recipient information.

If mails come in this way with just "unknown" addresses, Hamster is naturally unable to select the correct recipient. In this case, the "default" account mentioned above will receive the mail, so the mail is at least not lost.

Local mail distribution

Whenever you send a new mail from your mail client to Hamster (i. e. Hamster's SMTP server), Hamster has to decide, if the mail belongs to an external address and has to be sent out or if it belongs to a local account and can therefore be immediately placed in the mailbox of the account.

Like with mails fetched from external accounts described above, Hamster checks the "Local mail addresses" given under "Configuration -> Remote Server Settings -> POP3" in this case. Every recipient that it finds in this setting will get the mail immediately without involving any external mailserver:

For completeness, there is another setting that controls local mail delivery under "Configuration -> Hamster Settings -> Local Mail":

It is a regular expression, that describes the domain part of a mail address, i. e. the part after the "@" character.

If the domain part of a recipient address matches this expression, the mail is always kept local. If the part left of the "@" character is the name of an user account, this user will receive the mail, otherwise user "admin" will get it.

Special distribution

Other distribution options are available under "Configuration -> Accounts -> Mail", although it's strongly suggested not to "play" with them until you are somewhat familiar with your Hamster and really know, that you need it:

Catch-All Account

If you have a so called "catch-all" mail domain, that accepts all mail addresses, regardless what's on the left side of the "@" character, you can assign one (!) account a "catch-all" address for the domain. This "catch-all" address has to be a single star ("*"), followed by "@" and the domain name (e. g. "*@mydomain.zz").

This account will then receive all mails for the given domain, unless another account has assigned a specific address for this domain.

Forward options

Mails for an account can also be forwarded, either to a different account, an external mail address or one of Hamster's Distribution Lists.

In the example above, all unspecific mails for the "catch-all" account are forwarded to the Distribution List "jane-and-john", that contains both user accounts "jane" and "john".

Very special distribution

Just for completeness, distribution of mails can also be controlled by appropriate settings under "Configuration -> File -> Mail Filters", but in most cases there is no need to bother with it, it's just there for compatibility with former Hamster versions:

[www.elbiah.de Hamster Playground Documentation]