Franske ITC-2480 Lab 8
Introduction
In this lab you will setup a basic email server on your Debian Linux server including both MTA and MDA software.
The MTA to be installed is Postfix. MTA software listens for incoming connections from other MTA servers on port 25 and accepts mail on behalf of users on the system. Once the mail is received it is stored locally for users to retrieve. The most common methods for storing messages is in an .mbox file, where all messages are stored in a single file, or in a Maildir, which is a directory where each message is stored in a separate file. The MTA also listens for connections from client software (MUA) and accepts outbound messages from them and forwards them on to the destination domain's mail server. Advanced configuration of MTA software can allow for anti-spam filtering, mailing list support or other programs to intercept and manipulate mail as it passes through the server.
Local users accessing their mailbox with MUA software can read and write to the .mbox file or Maildir directly. If a user not locally logged on to the system wants to access their mailbox the server runs MDA software which typically uses the POP3 or IMAP protocol for accessing the .mbox file or Maildir remotely.
Lab Procedure
Prerequisites
- Open an SSH console to your Linux system using the PuTTY software, login with your standard user account
- Make sure that webmin is installed on your system.
Install the Postfix MTA
- Install the postfix package using a package management program
- Use the telnet command to connect to your SMTP server on port 25 (telnet localhost 25)
- Type quit and press enter after verifying Postfix is running.
- Because the Courier IMAP and POP3 server software only supports Maildir style message stores and Postfix stores in mbox files by default you must edit the /etc/postfix/main.cf file and set the "home_mailbox = Maildir/" parameter.
- Restart the postfix service to apply your change
- Install the mailutils package to test your setup by sending and receiving mail directly from the command line.
- Try sending a message:
sendmail "yourusername@localhost" "Sample Subject" "Hello World!"
- Check to see if the message was received using the mail command, press q to return to the command line.