web site hosting

In order to send and receive e-mail across the Internet, an SMTP server must meet the following requirements:

  • The server should have a continuous Internet connection and be prepared to receive mail at all times, because incoming mail can arrive at any time of day or night.
  • The server should be able to deliver outgoing messages on behalf of a computer that does not have complete SMTP capabilities.
  • The server should be able to perform send mail on behalf of other servers that do not have e-mail server software.

The VPS v2 Virtual Server system uses Sendmail, a popular UNIX-based SMTP server software package.

Sendmail Processes
Sendmail requires that two processes be running at all times in order to accept and deliver mail:
  • The Sendmail daemon accepting connections
  • The Sendmail queue process that delivers mail

To view these processes, connect to your VPS v2 Virtual Server and type:

# ps –aux | grep sendmail
sendmail: accepting connections (sendmail)
sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail)

The first process, owned by root, controls the connections to Sendmail. You can be configure Sendmail to deny or defer connections if the server load becomes high.

The second process delivers messages that have been received by the server to local users and to remote servers; this process redelivers outbound messages periodically. The process is owned by the system user smmsp (Sendmail Mail Submission Program).


Sendmail Files
UNIX file names and commands are case sensitive; use only lower case, unless otherwise specified.

Configuration File

File Description

/etc/mail/sendmail.cf

This file contains the master Sendmail configuration files. The sendmail.cf lists file locations and configuration items that the Sendmail program uses. Do not alter this file unless you are an experienced e-mail administrative user.

/etc/mail/freebsd.submit.mc

Source file for generating the submit.cf file. This file should not be modified.

/etc/mail/freebsd.mc

Source file for generating the sendmail.cf file. This file should not be edited. Instead, type make to generate the <hostname>.mc file, and make sendmail configuration changes to that file (<hostname>.mc).

/etc/mail/aliases

This file contains the alias list (or forwarding addresses) used to distribute incoming mail messages.

/etc/mail/aliases.db

This is the binary version of the /etc/mail/aliases file that Sendmail uses. Do not manually edit this file. To rebuild /etc/mail/aliases.db, edit /etc/mail/aliases and then type newaliases.

/etc/mail/virtusertable

This file contains the virtual e-mail address mappings used by Sendmail when you have more than one domain name associated with a VPS v2 Virtual Server.

/etc/virtusertable.db

This is the binary version of the /etc/mail/virtusertable file that Sendmail uses. Do not manually edit this file.

To rebuild /etc/mail/virtusertable.db, edit /etc/mail/virtusertable, and type makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable.

/etc/relayers.db

Deprecated file. Use SMTP_ AUTH instead.

/var/log/maillog

The master log file that records transactions that occur on the VPS v2 Virtual Server system. This file is used as a diagnostic tool to trace server problems. See “Maintenance” in Chapter 9

/var/mail

When the VPS v2 Virtual Server e-mail system receives incoming mail, the mail is stored in this directory. As new messages arrive, they are appended to a file in this directory. The file is named after the recipient of the message (based on user names).

/var/spool/clientmqueue and /var/spool/mqueue

The /var/spool/mqueue and /var/spool/clientmqueue directories are temporary locations to hold incoming or outgoing mail. The VPS v2 Virtual Server e-mail system is programmed to clear this queue automatically on a periodic basis.

/etc/mail/access

This file contains e-mail addresses, hostnames, and IP addresses of users whose mail should be rejected or allowed when sent to your server. To rebuild /etc/mail/access.db, edit /etc/mail/access and type makemap hash /etc/mail/access < /etc/mail/access.

/etc/mail/access.db

Binary version of /etc/mail/access. Do not edit this file.


Modifying Sendmail
Never modify the following files /etc/mail/sendmail.cf and /etc/mail/submit.cf. Instead, edit the .mc files.
    1. To copy the default freebsd.mc file to hostname.mc for editing, type:
      % cd /etc/mail/
      % make  
    2. Edit the hostname.mc file with the desired changes.
    3. To generate the hostname.cf file from the hostname.mc file, type:
      % make
    4. To copy the hostname.cf file to the sendmail.cf, type:
      % make install
    5. To restart the Sendmail process type:
      %make restart

Sendmail is now running with the updates you made. For more information about modifying the sendmail configuration, go to: http://www.sendmail.org/m4/readme.html.


SMTP Authentication
Unauthorized SMTP relaying is used by individuals or groups of individuals to send large amounts of unsolicited commercial e-mail.

An SMTP relay incident occurs when an SMTP server is used to deliver an e-mail message from another server that is not destined to any of its local users. The SMTP server relays the message to another SMTP server. The second SMTP server in turn routes the message to the eventual recipient.

SMTP relaying enables the injection of legitimate e-mail messages into the mail system from client machines that do not offer full SMTP server capabilities. Unprotected or "open" SMTP servers can be used as SMTP relays for unsolicited e-mail (spam) campaigns. (Unscrupulous individuals target an unprotected SMTP server, send the SMTP server a single copy of a message, and then request that the SMTP server relay the message to recipients. Servers crash from the excessive load of handling bounced e-mail from invalid e-mail addresses. )

In the default configuration, the VPS v2 Virtual Server SMTP server is closed to all users except those with a valid username and password. This eliminates relaying and protects VPS v2 Virtual Server resources. To do this, the VPS v2 Virtual Server system uses a technique called SMTP AUTH, which allows relaying once authorized. The SMTP server receives the username and password from the e-mail client software. If the user ID or password is incorrect, relaying is denied.

Most current e-mail clients can specify that the outgoing SMTP server require authentication. By specifying the VPS v2 Virtual Server username and password in the client setting or preferences, relaying e-mail through the VPS v2 Virtual Server becomes transparent to the user.

The previous version of the VPS v2 Virtual Server used a method called POP-before_SMTP. This method required users to retrieve their mail using POP or IMAP and the client’s IP address was then authenticated as a valid relay. This method did not allow for complete security; any user with an authenticated IP address could relay mail through the server. SMTP AUTH provides better security for relaying.

The username and passwords used for SMTP AUTH are obtained from the /etc/passwd file. Therefore, if the mail user has a POP e-mail account, no additional configuration is required server-side to authenticate the user.

Hosting  ::  Web Design  :: Server Administration  ::  Tech Support  ::  Contacts
Data Centers  ::  Tier I Global IP Network  ::  SLA/Contracts  ::  Search  ::  Account Login