In this project you will build and use a SOHO Mail server. Your mail service will include SMTP service with the postfix MTA, and POP3/ IMAP service with the Dovecot MAA. (Web mail access will be added in the next (and last) project.) Your email service will use the Maildir mail storage system rather than the more traditional mbox format.
Actually Dovecot supports
Maildir++ format, an extension that adds sub-folders and mail
Most systems (MUAs and MDAs) that claim
Maildir actually mean they support
(Note while the author of the format spells it with a lowercase
m most of the world uses
A proper mail service (as with most services) generally requires a static IP setup and additional DNS records. However you would need to learn more about networking to do this properly, so we will save this for another project.
(Mail service configuration continues in a CTS-2311 (Unix/Linux Security) course project to add full functionality, including virus and spam scanning and authentication, and in CTS-2333 (Unix/LInux Networking) to add static IP and network support.)
Fedora may not have correct SELinux policy rules for
Dovecot or other servers.
It is strongly suggested you make sure SELinux is run
in permissive mode for this project.
One way to always boot up in permissive mode is to edit
/etc/selinux/config and follow the
comments to change the mode.
Install, configure, and test a mail service suitable for SOHO use. Unlike some previous projects the steps will not include specific commands to run. At this point you are expected to be able to locate relevant commands and documentation using the skills you have learned. (But don't panic! The resources section includes a copy of email lecture notes you can use, and the Internet resources for email setup are very good.)
Perform the following tasks and answer the following questions
(optional steps appear
in italics in a gray box and
start with the phrase
alternativescommand to switch all shared commands to your chosen MTA (if set to, say, sendmail). If there was no
alternativessystem (or some equivalent) what would you do if you need to switch MTAs (or another subsystem that uses conflicting pathnames)?
alternativescommand and the Postfix MTA. (You can install other software as needed later.) Be sure to install the alternatives system first. What packages are needed? How did you determine this?
/etc/postfix/main.cfto accept email from other hosts (or at least the others in our class network). Use the system default mailbox (an mbox) for now. Check the syntax, and then start (or reload) the MTA and test the result. What changes did you make (show
diffoutput comparing the original and modified file(s))? How do you check that the email service is working correctly (be specific)?
muttto send and read email to your non-root account on your host, from your host. Then try to send and read email to your non-root account on your host, from a different host. (You should ask a fellow student or your instructor to send you the email; note that sending email from the wireless network or other hosts not connected to the classroom LAN may not work.) Examine the log files for any problems. What extra steps, if any did you need to perform? What log entries were generated, and in which log files?
aliasesfile, there may be several on the system! Read the Postfix configuration file to see which file gets used.) What email-related aliases should always be present? Why is it important to set
rootas an alias to a real person on a server?
. Now reload the mail server and test the changes. Send email to some user and check their home directory (and the log files) to verify this works (the new mail files and folders were created). What changes did you make?
pine, but there is a patch if you have the source). Configure the
muttMUA to use Maildirs. (Sample configurations for MUAs can be found in the lecture notes found on-line in the email resources.)
Make sure you can send and receive emails with
What changes did you make to your
mailx(formally known as
nail) replacement package for
mailxMUA to use Maildirs and test the result. Finally, repeat for any other MUAs you use including GUI MUAs. Report any changes made.
telnet localhost pop3(or
alpinecan read email from IMAP if you change the (incoming) mailbox to this URL (instead of the normal pathname):
imap://userName@localhost/INBOX. You can set this as the default by
syslogfacilities for logging, and that you have configured
syslogto save email related log messages in the proper log file(s). What changes (if any) did you make for this?
getenforcecommand ot see, and
setenforce 0command to set to
Permissive. To make the change permanent, edit the file
/etc/selinux/config; the comments in there explain what to change.
NetworkManagerservice and are using the
networkservice, as explained in class. Use
chkconfigto ensure the correct service only will run at boot time.
nscd(hopefully you're not running both at once!).
to make sure you are really using Postfix and not Sendmail.
alternatives --config mta
, or at least make a backup copy of the original. (I use
.) Then you can use
cp foo foo-orig
to see what you changed, and that can be copied into your system journal.
diff foo-orig foo
A copy of your journal pages and the answers to the questions asked above. You can send as email to (preferred). If email is a problem for some reason (!), you may turn in a hard-copy. In this case the pages should be readable, dated, and stapled together. Your name should appear on the first page.
Don't turn in your whole journal, you will need to add to it every day in class! It is common in fact to keep the journal as a text file on the system (with a paper backup of course).
Please see your syllabus for more information about submitting projects.