|
Mail Server Overview
The Sambar Mail Server was created to efficiently support a
WebMail interface designed by Sambar Technologies.
What started as a simple web-based interface to remote POP3 and IMAP4
mail servers evolved into a light-weight mail server to accomodate
all the features and performance goals of the web interfaces.
Ideally, the tight integration between WebMail and the mail server
will will result is a much easier to configure and use mail server
and web-based reader (outweighing the downside to the tight-coupling).
The Mail Server consists of the following components:
SMTP Server |
A basic SMTP server for receiving mail and
queuing to either local or remote delivery. |
POP3 Server |
A POP3 server for access to local mailboxes via
common mail readers such as Eudora, Microsoft Outlook or Netscape. |
Mail Fetcher |
A background thread for retrieving local mail from remote
POP3 and IMAP4 mail servers. |
WebMail |
A web-based mail reader for local mailboxes. |
IMAP4 Server |
Planned for a future release. |
Quick Start Guide
After purchasing a Sambar Server Pro License and installing the
license, the following steps will guide you through the Mail Server
configuration:
Initialization
- From the System Administration -> Server Configuration
form set the Act as Mail Server parameter to Yes and then
update the server configuration.
- If you plan on relaying non-local mail via your ISP's SMTP Server,
configure the SMTP Server from the
System Administration -> Proxy Configuration
- Restart the Sambar Server.
Two System Administration panels should appear:
Mail Configuration and Mail Aliases & Forwarding.
In addition, the User Management forms should now contain
a field for creating user mailboxes.
Use the System Administration -> User Management
forms, to create user mailboxes. Usernames may not contain the
period (.) character, however, aliases can be used to support this
functionaliaty. The user mailbox is created
automatically when the Mailbox box is checked in the User Management
forms. In addition, there are also user mailbox create/delete
forms on the Mail Configuration pages.
(Note: The only action associated with creating a user mailbox is
to create a directory for the user in the mail/mbox directory
(e.g. mail/mbox/billy-bob) and then creating a zero-length file,
inbox.fld. If this file does not exist, the the user is
determined not to have a local mailbox. You do not need to manually
create these files/directories if you use the configuration pages.)
User Mailboxes
- Select an existing user, "check" the Mailbox field
at the bottom of the user form and update the user.
- Create a new user and "check" the Mailbox field at
the bottom of the user form.
After configuring your mail client to use the Sambar Mail Server
as the SMTP and POP3 server, you should be able to send mail to
the local mailboxes you created using the default domain foobar.com
(e.g. billy-bob@foobar.com).
Finally, customize the the Mail Server using the
System Adminstration -> Mail Configuration forms.
Features you will wish to customize include: Mail Server and
Local Domains. You may also wish to setup a Mail Fetcher
to retrieve mail from one or more POP3 mailboxes.
mail.ini Configuration File
If Act As Mail Server is set to true in the
config.ini the Mail Server is initialized at startup.
The parameters of the mail.ini configuration file (below)
guides the Mail Server operation.
[mail]
Mail Server |
The domain of the mail server (i.e. sambar.com).
This symbolic name is used for identifying local mail. This must be
a fully-qualified domain name; if not set, the system name is used
which is typically not acceptable for relaying mail. |
Mail Directory |
The directory in which user mailboxes are created
(default mail/mbox).
|
Maximum Users |
The maximum simultaneous mail users.
|
Maximum MTA Routers |
The maximum simultaneous mail router threads used to deliver mail
messages. By default, only a single thread is used; for heavily used
mail servers, several MTA routers can be configured. Important!
This feature is still under development.
|
Maximum Mailbox Size |
The maximum size of any individual mailbox. This parameter
applies to all mailboxes.
|
Run SMTPD |
A boolean, true or false, indicating whether the local
SMTP Server should be run;
|
Enable WebMail |
A boolean, true or false, indicating whether the
WebMail browser-based mail interface should be
enabled.
|
Trace SMTP |
A boolean, true or false, indicating whether to trace
SMTP activity.
|
Trace POP3 |
A boolean, true or false, indicating whether to trace
POP3 activity.
|
Trace Router |
A boolean, true or false, indicating whether to trace
MTA activity.
|
Trace Fetcher |
A boolean, true or false, indicating whether to trace
Mail Fetcher activity.
|
Backup Mailboxes |
A boolean, true or false, indicating whether user mailboxes
should be backed up daily. If enabled, mailboxes are backed up daily
for a one week interval, enabling a rolling one-week backup of user mail.
|
[smtpd]
Relay Delivery |
An identifier: ondemand, never, hourly or daily
that indicates how often remote mail delivered to the local SMTP Server should
be relayed to your ISP's SMTP Server for internet delivery. If set to
never only local mail (mail destined for a local mailbox) will be
accepted by the SMTP Server for delivery.
|
Relay FROM User |
The user mail address (i.e. tod@sambar.com) that should be use
when relaying mail to the remote server. By default the SMTP router
uses the mailbox sender as the FROM address to the relay SMTP server.
However, if the relay SMTP server does not permit relay of anonymous or
unknown users, the mail may be rejected. This parameter ensures that
all remote mail is delivered using a valid address. (Note: This does
not affect the "From:" address the mail recipient sees).
|
Local Domains |
A space separated list of mail servers that should be treated as
"local" to the SMTP Server. When mail is received by the SMTP Server,
the Mail Server, Local Domains and Relay Domains
are compared with the mail recipients to determine whether the recipient
is "local" or "remote". The wild-card star (*) character may be used
for pattern matching, i.e. *sambar.com
|
Relay Domains |
A space separated list of mail servers that should be treated as
peer SMTP Servers. Mail destined for servers in the "relay domains"
list are accepted by the server and forwarded. This directive allows
for the creation of multiple mail servers that act in a peering relationship
with one another for receiving and forwarding mail.
The wild-card star (*) character may be used for pattern matching,
i.e. *sambar.com
|
Maximum Message Size |
This parameter restricts the maximum size of any single message
accepted by the SMTP server. For WebMail use, the Sambar WWW Server
parameter Maximum Content-Length determines the maximum
WebMail attachment that can be uploaded to the server. To allow
large mail attachments via WebMail, both the Maximum Message Size
and Maximum Content-Length must be increased.
|
Spool Directory |
The directory in which all incoming mail is spooled by the SMTP
server before delivering to either local mailboxes or the remote ISP
mail server. An internal "Mail Router" runs periodically to deliver
mail in the spool directory. In the event of a server crash, files in
the spool directory are delivered at startup.
|
Failures Directory |
The directory in which mail that cannot be delivered is deposited.
|
Require AUTH |
A boolean, true or false, indicating whether mail
from users other than those with local accounts must FROM an
authenticated SMTP user in order to be relayed.
This is an anti-spam feature that over-rides the Restrict Relay IPs
to ensure that only "valid" mailbox users can use the SMTP server to
send outgoing mail.
|
Restrict Relay |
A boolean, true or false, indicating whether mail
from users other than those with local accounts should be relayed. This is
an anti-spam feature that should be used in conjunction with the
Restrict Relay IPs to ensure that only "valid" mailbox users
can use the SMTP server to send outgoing mail. If set to true
the FROM address must be a valid local account, or mail must be destined
for local users only.
|
Restrict Relay IPs |
The host(s) who are allowed to send mail via the SMTP server
to outside mail addresses. This is an anti-spam feature
(Restrict Relay must be set to true) which restricts
internet users from using the SMTP server to relay their mail.
You may provide a space separated list of IP addresses which
identify valid SMTP users. If left blank, an SMTP user may login from
any host. The wild-card star(*) character may be used for pattern
matching, i.e. 140.175.165.*
Important! To allow mailit.exe to send mail via
the local server without SMTP AUTH, set this field to 127.0.0.1.
|
Use MTA |
A boolean, true or false, indicating whether mail
should be sent via the internal mail transfer agent (MTA), or the
users ISP SMTP server. If set to true, the internal MTA
is used (this requires access to internet MX records for direct
mail delivery). Important! When the MTA is used, the
DNS Primary and DNS Secondary from the config/config.ini
are used for MX record resolution. These entries must point to DNS
servers that accept and respond to MX record lookup requests.
|
Unknown Mailbox |
The mailbox that all "unknown" mail is deposited into. This mailbox
is used if mail is directed to the Mail Server or a Local Domain
for which there is no corresponding local mailbox (similar to the "catch all"
email address available in sendmail.) If this paramenter is
not set, mail is rejected if a local mailbox does not exist.
|
Maximum Recipients |
The maximum recipients (including alias expansion) that any single message
can be directed to.
|
Maximum Received Hops |
The maximum mail server hops that a message can traverse before being
deemed in a loop. An improperly configured mail agent might forward mail
in a cycle until the maximum hops are achieved and the message is removed
from the system.
|
Maximum Retry |
The maximum number of 4 hour intervals that the server should attempt
to retry message delivery upon server delivery failure.
By default this is 12, or 2 days.
|
Help Stop Mail Abuse!
If possible, the Require AUTH parameter in the [smtpd]
section should be set to true. This is the surest way to
protect your mail server from being used as a mail relay by spammers.
User aliases
The mail.ini file may contain user aliases. Aliases is
used to identify a local mailbox by different names or to
direct mail sent to a single account to multiple mailboxes.
The following example illustrates how aliases are used to
direct mail to a LAN with two local accounts: tod and stacia:
[aliases]
Tod.Sambar = tod
Stacia.Sambar = stacia
all = tod stacia
webmaster = stacia
support@microsoft.com = null
The last alias above demonstrates two "special" features. The first
is the ability to alias complete mail addresses, and the second is the
null mailbox. The null mailbox does not actually exist;
any mail directed to this mailbox is quietly disgarded. So any mail
sent to, aliased to, or forwarded to null is dropped by the
server.
The System Administration forms have a graphical interfaces for configuring
mail aliases.
Forwarding accounts
The mail.ini file may contain mail forwarding accounts.
Mail forwarding is useful when people leave an organization, are temporarily
located at another site, or for sending mail to a group of people.
The following example illustrates how mail forwarding is used at
Sambar Technologies:
[forward]
chuck = sambar@earthlink.net
mirrors = niclas@skyweb.se sirjames@jalyn.com stacia
The System Administration forms have a graphical interfaces for configuring
mail forwarding accounts.
Port 25 Blocked
Many ISPs including Earthlink, MSN and Prodigy have recently blocked
all outbound port 25 traffic in an attempt to prevent spam from being
sent by people who gain access to the internet via their lines.
With port 25 blocked, every attempt that is made to contact any e-mail
server outside the ISP's own network failes without explanation.
If you are in this situation and must configure the Sambar Mail server
to route outgoing mail via the ISPs SMTP server, you must set Use MTA
in the [smtpd] section to false and configure the
SMTP Server in the config.ini file to your ISPs SMTP Server.
|