Help with  ermes

 

Configuration

 

The server has four Settings dialogs: General, SMTP Server, POP3 Server and SMTP Agent.  The General Settings dialog, accessed through the Settings menu’s General sub-menu.  General settings are server-wide.  They affect the entire server’s operation.  They include directory locations, logging and other settings.  Here, I’ll go through each one.

 

General Settings

 

General Tab

Server Name: This is the SMTP server name, which the SMTP server reports to connecting clients.  It’s used as part of the server’s return mail address, and must be specified.  It can be a dotted IP address, or a domain name.  It should be a complete and addressable name. 

 

Mailbox Root (Directory): This is the directory (or folder) in which the Server will place incoming mail for it’s mail users.  Each user has a folder within the Mailbox Root.  That folder contains that individual user’s settings and all mail waiting for the user to read.  This path must be specified.  This path should be specified before any users are added, and should not be changed after users are created.

 

Outgoing Queue (Directory): This is the directory (or folder) in which the Server will place mail that it must deliver to foreign users.  The server will check this directory for mail and attempt to send it on to it’s destination.  All mail sent by a local user to a foreign user will be placed here, as well as mail received that’s bound for a foreign user.  This path must be specified.  This path should be specified before any users are added, and should not be changed after users are created.

 

DNS Server: This should be a dotted IP address of a DNS server that the SMTP Server will contact to try to resolve email addresses.  If no address is specified, the server will not be able to resolve addresses, and will not be able to deliver most foreign bound mail.  This should be specified.

 

Startup Tab

Start Minimized: When checked, the Server will minimize to the Windows Tray after it successfully inserts its Icon in the tray (on startup).

 

Auto-Start Smtp Server: Start the Smtp Server on Startup (generally leave this checked).

 

Auto-Start Smtp Agent: Start the Smtp Server on Startup (generally leave this checked).

 

Auto-Start Pop3 Server: Start the Smtp Server on Startup (generally leave this checked).

 

Log Tab

Log File: This is a fully qualified file name (Drive:Path/Name.Extension) where the Server will save log information for later analysis.  This is intended to be used for debugging purposes.  To stop logging, clear the log filename.

 

Log Level: This indicates the quality and quantity of information logged to the main window’s log display and the log file.  There are a number of levels of information.  They are additive.

 

Line Limit: This feature is not yet implemented.

 

SMTP Server Settings

 

Server Bind Address: This is the address the SMTP Server will listen to for SMTP connections.  *** Any *** will bind to all available network interfaces on the computer.  Unless there is a reason not to do this, you should just use “any”.  Note: Any change to the Bind Address or Port will not take effect until the SMTP Server is de-activated and re-activated.

 

Port: This is the port the SMTP Server will listen to for SMTP connections.  25 is the default SMTP port.  The port should be left on “25” unless there is a good reason to change it.  Most SMTP servers assume they will contact other servers on port 25, and expect other servers to contact them on port 25 as well.  Note: Any change to the Bind Address or Port will not take effect until the SMTP Server is de-activated and re-activated.

 

Local Domains: This is a list of domains the SMTP Server should accept mail for.  These can be dotted IP addresses, or complete domain names.  They are not case sensitive.  Right-click to add or delete domains.  If a domain is listed here, the server will assume any mail bound for that domain is local, and will attempt to deliver it locally.  If the mailbox addressed does not exist locally, the server will generate a delivery failure notification.  Be certain that your domain list is accurate.  Although no domains are required, a mail server usually services one or more domains.  Also remember that user accounts are not associated with a domain.  That means that if the Server has a user named Alice and two domains, Square and Rectangle, that Alice@Square and Alice@Rectangle will both be delivered to local user Alice.

 

Access Control

This tab allows controls to deter unwanted mail from getting to your mailboxes, and to deter unauthorized users from using your mail server to send mail to others.  In other words: Anti-Spam.

 

Do NOT relay foreign mail: When checked, mail send to Hermes MUST be either: from a local user, to a local user, or from an “Accepted” domain as listed below the check box.

Accepted Domains:  The Accepted Domains list can contain IP Addresses or domain names, but they will be compaired in the SMTP MAIL FROM command event. 

You can use the * wild card at the end of an entry.   For example: umass.* accepts mail from umass.edu, umass.com, umass.org, etc.

 

Additional Controls: Opens a new dialog box described below

Reject Banned Domains: Check this to reject domains listed below it.  The comparison is in the SMTP MAIL FROM event. You can use the * wild card at the end of an entry.   For example: umass.* rejects mail from umass.edu, umass.com, umass.org, etc.

Reject Banned Mailboxes: Check this to reject mailboxes (regardless of domain) listed below it.  The comparison is in the SMTP MAIL FROM event.

Reject Banned Addresses: Check this to reject IP Addresses listed below it.  The comparison is in the SMTP MAIL FROM event. You can use the * wild card at the end of an entry.   For example: 192.168.* rejects mail from 192.168.1.1, 192.168.1.2, 192.168.1.3, etc.

Reject mail with more than this many recipients: If you check this box, mail to more than the specified number of recipients (local or not) will be rejected as spam.

 

SMTP Agent Settings

 

Queue Polling Interval (in Minutes): This is the interval (in Minutes) between Queue services by the SMTP Agent.  The Agent services the Queue by looking for mail in the Outgoing Queue Directory.  Each message is comprised of two files, one of routing information, and one that contains the actual message.  Each attempt is recorded for each message.  Note: Any change to the Queue Polling Interval will not take effect until the SMTP Agent is de-activated and re-activated.

 

Retries to Send Mail: This is the number of times the SMTP Agent will try to send a message before it gives up and returns the message as “undeliverable”.  Set this to 0 for no re-trying.  The Agent will re-try each mail in the queue every time the queue is serviced.

 

Forward to Master SMTP Server: Check this if you don’t want Hermes to deliver your mail itself, and would rather have Hermes send all your outbound mail to another SMTP server for it to deliver.  The address must be in dotted-decimal format.

 

POP3 Server Settings

 

Server Bind Address: This is the address the POP3 Server will listen to for POP3 connections.  *** Any *** will bind to all available network interfaces on the computer.  Unless there is a reason not to do this, you should just use “any”.  Note: Any change to the Bind Address or Port will not take effect until the POP3 Server is de-activated and re-activated.

 

Port: This is the port the POP3 Server will listen to for POP3 connections.  110 is the default POP3 port.  The port should be left on “110” unless there is a good reason to change it.  Most POP3 clients assume they will contact servers on port 110.  Note: Any change to the Bind Address or Port will not take effect until the POP3 Server is de-activated and re-activated.

 

Create User on Login Attempt: This will cause the POP3 Server to create a user if one does not exist when a login is made.  For example, if I log in with user name “Tom” and there is no user “tom”, the server will create one with default settings and a blank password.  This and the  “Accept User Password on Login Attempt (if password blank)” option are useful for adding many users quickly.  This will be explained below.  Note: This will not work if the user chooses to log in with the APOP style.

 

Accept User Password on Login Attempt (if password blank): This accepts the user password the user sends if the user’s current password is blank.  This is usually used in conjunction with the “Create User on Login Attempt” as follows. 

 

If you have a bunch of users that already have accounts on your non-Hermes mail server, and you want to create their accounts on Hermes, check “Create User on Login Attempt” and “Accept User Password on Login Attempt (if password blank)” and have each user log in normally (after disabling your old mail server and enabling the Hermes Server).  The Server will create accounts for each.  After they have all logged in, un-check these boxes.  It is not a good idea to leave them checked, as this allows anyone to create their own account on your server.

 


 

Server Management

 

The Server has three parts that can be controlled independently: the SMTP Server, SMTP Agent and the POP3 Server.  Each performs different functions and any one may need to be temporarily disabled or re-activated.  These functions are controlled through the “Active” menu.  The Active menu has four sub-menu options as described below:

 

SMTP Server: The SMTP Server is responsible for accepting mail for delivery.  Both other SMTP servers needing to send mail to local users, and local users needing to send mail to foreign users rely on the SMTP Server to accept mail for later delivery.  You may need to de-activate the SMTP Server and re-activate it when you change it’s bind address or port, or when you want to run a different server.  Generally the SMTP Server should always be active.

 

SMTP Agent: The SMTP Agent is responsible for delivering mail to foreign users.  All mail that cannot be delivered locally is queued for processing by the SMTP Agent, which will find the server it needs to contact to deliver mail, and handle the transmission of the mail to another SMTP Server.  You may need to de-activate the SMTP Agent and re-activate it when you change the Queue Polling Interval.  Generally, the SMTP Agent should be available.

 

POP3 Server: The POP3 Server is responsible for accepting connections from local users and allowing them to read their mail.  Local users rely on the POP3 Server to let them determine how much mail they have, and to give it to them so they can read it.  You may need to de-activate the POP3 Server and re-activate it when you change it’s bind address or port, or when you want to run a different server.  Generally the POP3 Server should always be active.

 

Service Queue Now: This will cause the SMTP Agent to service the Outgoing Queue if it’s not already servicing the Queue.  This is useful if you have a piece of mail in the Queue you want delivered right away and you do not want to wait for the next routine Queue Service.

 

 

Service Notes

 

The Service Version is a full Windows NT/2K service, and it needs to be installed on the command line.  After installing the package, go to the command shell (cmd.exe) and CD to the appropriate path (C:\Program Files\Alixoft\Hermes) and type HermesSvc /install to install the service.  To remove the service (after it is stopped) repeat the process but type HermesSvc /uninstall.

 

The service should be managed with a “console” which exposes the service’s settings and lets you start and stop it.  The service will not automatically start it’s servers unless set to do so in the settings.  After changing settings, the service must be re-started for the settings to take effect. 

 

 

 


 

User Management

 

The Server has users who it will accept mail for.  It will then allow the reading of that mail for it’s users.  These users are usually people, but may be other computers, processes, etc.  To the Server, a user is merely a directory and some settings it uses to store mail.  Users are managed by the “Manage Users” sub-menu on the “Accounts” menu.  You may create, edit, rename and delete users.

 

Each user has the following settings or attributes:

 

Name: This is the user’s name to the system, or mailbox name.  No two users can have the same mailbox name.  This is probably not the user’s real name.  The mailbox name is the part of a user’s e-mail address before the @ sign.  For example, if my address is Alex@impchat.com then my mailbox (and user name) is Alex and the mail domain is impchat.com.  The domain must either be the server’s name or listed in the server’s domains.

 

Password: This is the password the user must send to read their mail.  This must never be blank.  Further, users should use passwords that are hard to guess.  This is the only security a user has to prevent others from reading their mail.

 

Forward To: A user can have their mail forwarded to another mail account.  For example, it you’ll be away for a month, but Bob will read your business mail to take care of your customer needs, you can forward your mail to bob’s address.

 

Real Name: This is the user’s real name, so the Server administrator knows who to talk to when they have a gig of mail in their box that they never read.

 

Do Not Report User Exists (SMTP): This causes the SMTP Server to reply with a “user unknown” error to SMTP VRFY queries about the legitimacy of a user.  This should not be used if the user wants to receive mail.

 

In addition to users, this Server supports User Aliases.  These are not users, but alternative names for users.  User Aliases can be created, edited, renamed and deleted from the “Manage Aliases” sub-menu of the “Accounts” menu.  An Alias is simply a mailbox name and a user to substitute for the mailbox name.  Aliases are not real users, they are pointers to real users.  Using an alias is far faster than forwarding mail.  Aliases are useful for “generic” mailboxes like “sales” if it’ll always be read by the same person.  This way they don’t have to read two accounts (theirs and the sales account) and if they leave, you just point the sales alias to a different user.

 


 

List Management

 

The Server also supports Mail Lists.  Mail lists are like users in that they represent a mailbox address to which people may send mail.  Unlike users, no mail is delivered to a “mailbox” when a Mail List receives mail.  Instead, the mail list is consulted for a list of addresses that need to be sent a copy of the mail.  The Server will then prepare copies of the mail and send it to the addresses on the mail list.  Mail lists are complicated things that require a lot of explanation, but they are easy to manage.  They can be created, edited, renamed and deleted from the “Manage Mail Lists” sub-menu of the “Accounts” menu.  A mail List is actually a configuration file generally stored with the user folders.

 

Mail Lists have the following attributes.

 

Name: This is the list’s name to the system, or mailbox name.  No two lists can have the same mailbox name. The mailbox name is the part of a list’s e-mail address before the @ sign.  For example, if a list address is hermes@impchat.com then the mailbox (and list name) is hermes and the mail domain is impchat.com.  The domain must either be the server’s name or listed in the server’s domains.

 

Members: The list is comprised of members.  Each member must have a complete e-mail address but in addition, they can be “Active” meaning that they are receiving mail from the list, and they can be a “Manager”  Managers are list members with special privileges.

 

Welcome, Signature and Farewell: These are text messages send to a list member on special occasions.  For example, the Welcome message is sent on a member’s subscription to the list (joining the list) and the Farewell message is sent on the member’s un-subscription from the list.  These are only sent when the member is removed or added through the list server, not when they are manipulated by the Server Administrator through the Manage Mail Lists Dialog.  The Signature is attached to the end of every list message.  It is usually used to identify the list and provide un-subscribe information.

 

General: This is general information about the list, such as the location of a file to archive list messages to.  It includes the following:

 

Allow Public Subscription: Check this to allow non-list members to subscribe themselves to the list.

 

Force Replies to List: Check this to have messages sent to the list to be mailed to members with a “Reply-To” of the list address.

 

Do Not Report Lists Members (SMTP): Check this to suppress a list membership response from the SMTP server to the EXPN command.

 

Do Not Report Lists Members: Check this to suppress a list membership response from the list server.

 

Member Submission Only: Check this to allow only list members to send to the list.

 

Archive Messages to File: Specify a fully qualified file name to place a copy of each list message in the file for archiving purposes.

 

Send Delivery Failures To: Enter an email address for undeliverable replies to be sent to.  If a list member is unreachable, the error will be sent to this address.  If no address is entered, “listmaster” will be used.  To get these notifications, you need a user or alias called listmaster.

 

The List Server supports commands sent to a list, not to a majordomo.  Commands must be send in the subject of the mail, and start with an explanation (!).  The following commands are valid: subscribe, unsubscribe, list and help.  Subscribe can include an e-mail address to subscribe after the command.

 

Alias Management

 

The Server also supports Mail Aliases.  Mail aliases are like users in that they represent a mailbox address to which people may send mail.  Unlike users, no mail is delivered to a “mailbox” when an alias receives mail.  Instead, the alias is consulted for the real Mail User mailbox and the mail is placed in the user’s mail box.  Aliases are able to be fully qualified by domain.  For example, info@site1.com can point to User1 and info@site2.com can point to user2.  Aliases can be created, edited, deleted from the “Manage Aliases” sub-menu of the “Accounts” menu. 

 

Discussion

 

An E-mail server is a program, service, process, whatever, that runs on a computer which sends messages between users.  This sending of messages is not immediate.  It can take time to find a user and pass a message on.  Further, there are often two or more servers involved in a single message delivery.  If you want instant message transmission, you want my free chat system (shameless plug!).  Check it out at http://www.impchat.com.

 

Anyway, E-mail servers use a number of protocols, but there are two basic kinds: ones used for inter-server communication (SMTP, ESMTP) and ones used for server to client communication (POP3, IMAP4).  Strictly speaking, this is not true.  Clients send mail to servers with SMTP or ESMTP.  But other than that, this is a handy way to think about mail servers.  All of these protocols are used to exchange mail message information between computers.

The Hermes server supports only SMTP and POP3 protocols.  This means your IMAP4 client will not work with Hermes.  Very few clients or servers demand that a server support ESMTP, so you should have no trouble there.  IMAP4 is a complicated protocol that places a heavy processing burden on the server that I simply didn’t feel like dealing with.  My impression is that the vast majority of people use POP3, and only a small minority use IMAP4, primarily for mobility reasons (the protocol may be better for people who read the same mail on several different computers).  If anyone is interested in assisting me in an IMAP4 extension to Hermes, I’d be interested… but mainly as an academic exercise.  I don’t use IMAP4.

Anyway, an E-mail server must respond to two types of demands.  It must let people send it mail, and it must let people get their mail from it.  Mail is sent to the server with the SMTP (or ESMTP) protocol, weather the sender is an individual person using a popular e-mail client, or another mail server somewhere on the internet.  Once the server receives some mail, it must decide what to do with it…

The server has some users who are people it will accept mail for.  If the mail is addressed to one of these users, the server will hold on to the mail for the user.  If the mail is not for a local user, then the mail is considered non-local, or foreign.  In this case, the server must try to determine where it should send the mail so that it will eventually get delivered.  The server will then send the mail on to another email server that either will hold that mail for it’s user, or pass it along until eventually the mail gets to the mail recipient’s server.

 

When the server receives mail (via SMTP) for a local user, it places it in a special place for the user.  This allows the server to know that that piece of mail is for that user and that user alone.  The (SMTP) server has done it’s job once it places the mail in the user’s “mailbox”, now it’s up to the user to check their mailbox and read their mail.  Now, when the user wants to see if they have any mail, and read it… they actually need the server again.  This time, however, they will use the POP3 protocol to ask the (POP3) server if they have any mail, how much and what it is.  The server will verify that the person asking for mail is really allowed to read that mail, and then it will send the mail to the user.  The user can delete the mail from the server, or leave it on there indefinitely… it’s up to them.

 

When the server receives mail for a user that is not local, the server puts the mail in a special place with all the mail that needs to be sent along to other mail servers.  This is the Mail Queue.  The server will later attempt to deliver the mail in the queue to which-ever server each piece of mail is addressed to.  It works this way.  The server opens a piece of mail and checks it’s address.  It then asks the Domain Name Server you told it to use what are the mail server (or servers) it can send the mail to.  It then tries the server (or servers) to see if it will accept the mail.  It so, then it sends it and is all done.  It not, then it tries again.  It will try for as long as you tell it to.  If it can’t deliver the mail, then it’ll send back a message to the sender that it could not deliver the sender’s mail, but it tried.

 

So that’s the mile high overview.  If that worked for you, you should read the slightly redundant, but highly informative “Design and Implementation Notes” where I discuss the in-depth workings of the server mechanisms.  This will help you to properly configure the server, track down configuration, implementation and software bugs, and really get something from it.