Sambar Server Documentation
|
SMTP Server
Pro Server Only |
Overview The Sambar Server includes an SMTP server for receiving and routing mail. Local mail delivery, alias expansion, sender verification, and mail forwarding are supported, the server includes a mail transfer agent MTA for remote mail delivery via SMTP transport. For speedier mail delivery, you may configure your ISPs sendmail server in place of the internal MTA. To use the MTA, the Sambar Server must have access to internet MX record facilities (i.e. full DNS access). The MTA forwards mail directly to the recipients' mail server(s). If the internal MTA is not enabled, a remote SMTP server must be configured in the config.ini (this should point to your ISP's SMTP server). If a remote SMTP server is not configured only mail destined for a locally configured user will be received (all other mail will be rejected). Local mail is determined by using the Local Domains configuration entry of the [smtpd] section. When receiving mail, the SMTP server examines the destination address to determine if it is in the "local domain" of the mail server; so even if your ISP holds all mail for your domain (i.e. sambar.com), the Sambar SMTP server can be configured to route all local mail into the user mailboxes rather than sending to your ISP (and then fetching via the Fetcher). With a Remote SMTP server configured, the mail server acts just like the SMTP proxy for remote mail with the following differences:
It is important to understand that the SMTPD component of the Mail Server need not be configured to run if you do not wish to use the local-mail delivery. If the SMTP proxy is configured instead, all mail is routed to your remote mailer (i.e. your ISPs mail server) where it is delivered. The Fetcher daemon will retrieve mail queued for local users from their respective ISP accounts. The advantage of using the Sambar SMTPD server is that local mail is not routed to your ISP, resulting in much quicker delivery.
MTA Important! To use the Sambar Server MTA, the DNS Primary and DNS Secondary must be properly configured in the config.ini file. These entries indicate the DNS servers that should be used for MX-Record lookup.
Unknown Mailbox One of the commonest ways to handle "unknown" mail is to setup an auto-responder which returns a standard message to the sender indicating that they have used an incorrect address. The Sambar Server is able to reject such mail in real-time, eliminating the need for an auto-responder. The other option is to accept mail from the client and place the mail in a "special" mailbox for later review. To operate in this mode, create a mailbox, e.g. uknown, and configure the Uknown Mailbox as unknown.
Message Size Limits
Features
Anti-spam filters are planned for a future release, as are mailbox "folder" routing based on sender, subject or body content. SMTPD contains no header re-writing functionality and none is planned at this time. Lastly, VRFY, EXPN and ETRN are not supported, and presently, there are no plans to add this functionality.
Operation When SMTPD receives a message, it writes the message to the Spool Directory along with expanded/verified RCPT lists and mail contents. The RCPT lists are designated as local or remote and updated upon successful delivery. Mail aliases and .forward handlers are evaluated as the RCPT commands are processed; in order to avoid loops, the recipient-expansion funcitonality ignores any addresses which have an identically-named ancestor that was processed previously. The maximum number of recipients (after alias expansion) defaults to 1000, but can be specified in the mail.ini configuration file. Mail messages with more than 100 hops ("Received:" headers) are presumed to be undeliverable, and are placed directly in the Failures Directory; no attempt is made to notify to the sender of the message. A message remains in the spool directory until it is completely delivered to its recipients or to an error address. If the message contains non-local addresses, it is passed to a SMTP-forwarding routine which uses the remote SMTP server configured in the config.ini for delivery. In the event that the remote STMP server cannot be contacted, the message is deferred for later delivery. After a failure, remote delivery is retried every 5 minutes if on-demand delivery is specified. If one or more local addresses have full mailboxes, the sender is notified that the message could not be delivered to the adressee. Only a single delivery attempt is and the In cases when delivery cannot proceed (i.e. the message can't be delivered or returned to its sender), the message is moved to the Failures Directory for administrator intervention. Upon successful delivery of the message to all recipients, the spool file is removed from the machine. When forwarding remote messages via the remote SMPT server, the message recipients are broken into blocks of at most 50 (RCPT) at one time. The remote SMTP server connection is kept open until all remote recipients of a message are delivered to; in fact, the remote SMTP connection is kept open until either all spooled messages are delivered, or 100 messages are transmitted (at which time the remote SMTP connection is terminated and a new connection is attempted). Local mail delivery is processed individually by appending the mail message onto the user's inbox.new mbox file which is appended to the inbox folder (inbox.fld) the next time mail is checked by the user. In the event of a server restart, message in the spool directory are re-queued for delivery automatically. All message system failures and internal errors are logged to either the server.log or mail.log files in the log directory where the Sambar Server is installed. The SMTP Server implements the SMTP protocol defined in RFCs 821 & 1123. The following SMTP commands are supported:
Authenticated SMTP The SMTP Daemon supports a subset of the SMTP Service Extension for Authentication (RFC 2554). The extension allows the client to authenticate prior to sending messages. (Note: The AUTH=authinfo parameter is not added to the FROM line of outgoing email. AUTH support is only used for client verification.) Authenticated clients bypass the anti-spam restrictions used to limit unauthorized mail relay. The Sambar Server supports the "AUTH LOGIN" extension which uses a base64 encoding of the username and password. Future releases will support stronger authentication methods. The following is a sample dialog between a client and server:
SMTP Server & SMTP Proxy If the SMTP Daemon is active, the SMTP proxy is not used. You can set the SMTP Proxy to true or false and it will have no effect because all SMTP traffic is routed to the SMTP daemon for delivery. (Note: Make sure SMTP remote delivery is enabled or mail to non-local accounts will get bounced with a 501 error message).
SMTP Issues
Receiving mail via the Internet If you'd like to put the SMTP server on the internet to receive mail, you will need access to the primary and secondary DNS servers for your domain (and you need to have a registered domain name). There are DNS records called MX records which indicate what SMTP server to connect to for mail to a particular domain. Presently, your ISP has likely configured the MX record for your domain to their mail server. You would need to have your ISP setup this MX Record to point to your SMTP server. You also need to have your SMTP server running full-time or you risk losing mail. The Sambar Server supports using MX records for outgoing mail (so the SMTP relay server can connect directly to remote SMTP servers). There is also minimal anti-relay functionality in the server. I recommend using your ISPs mail server for incoming mail and configuring the Mail Fetcher to load mail into your local accounts.
Relay Domains
mail destined for the unavailable server will be queued to the backup server until the unavailable server is back online. |
© 1998-2000 Sambar Technologies. All rights reserved. Terms of Use.