Changes

Jump to: navigation, search

OPS335 Lab 4c

1,001 bytes added, 14:35, 6 April 2016
no edit summary
=== Installing and Configuring the Local Delivery Agent (LDA) ===
Postfix is capable of performing the function of an LDA, but its LDA capabilities are limited, thus postfix is generally not used for that purpose. Currently, the most popular LDA is ''LMTP'', but we will be installing, configuring , and using an LDA called '''Dovecot''' since it is also popular and we will later be setting up Dovecot as an '''IMAP''' server. Using both Postfix and Dovecot will actually increase the performance of our IMAP server.
'''Perform the following steps:'''
#Dovecott Dovecot is not installed when you installed your Virtual machines in previous labs.
#Install the Dovecot application by issuing the following command:<br>yum install dovecot
#Edit your /etc/postfix/main.cf file and scroll down to (or search for) '''mailbox_command'''. Add the following line:
<pre>mail_location = maildir:~/Maildir</pre>
<ol><li value="5">Restart your postfix service. Note that dovecot-lda is just a program invoked by Postfix, it doesn't have an associated service.</li></ol>
=== Sending a Mail Message from VM2 (Using Thunderbird)===
 
{{Admon/important |Sent messages will not be saved to the sent folder|During this step the messages you send will not be saved to the sent folder and Thunderbird will permanently hang with a message that it is saving the message. It will never succeed, as we have not yet configured the imap server to accept the connection necessary for that to work.}}
'''Perform the following steps:'''
#Use the '''netstat''' and '''telnet''' commands (like you did in lab 4b) to confirm your service is listening on the correct ports/interfaces. You will probably have to open the appropriate firewall port on '''vm3''' to allow incoming '''SMTP''' connections.<br><br>'''Note:''' You should be able to send email to any regular user <u>on</u> '''vm3''' using the email address '''yourusername@yoursenecaid.org''' using the Thunderbird application on your host machine (which is configured to use the account on your vm2 machine).<br><br>
<ol><li value="2">Create a new account on your '''vm3''' machine using only your <u>first</u> name. We will use this account as a one-time "test" if the mail message has been received on your VM3 machine (from your VM2 machine).<br><br>'''Note:''' It is <u>'''important'''</u> that you '''<u>don't</u>''' create this same account name on your vm2 machine, since you want to easily identify the difference between the sending and receiving SMTP servers.<br><br></li></ol>
<ol><li value="3">We still haven't set up IMAP (for reading email) but we can test that the message is being delivered. Use the new account in Thunderbird to send an email to '''firstname@yoursenecaid.org''' and then check the contents of '''/home/firstname/Maildir/new/''' on your '''vm3''' machine. There should be a file there with the contents of your email.</li><li>If there is no file, then check the log file '''/var/log/maillog''' to see what went wrong.</li><li>If you can see a file in the '''/home/firstname/Maildir/new/''' directory, then review the procedures on how you got the email server working (since you have performed many steps and set up many services).</li><li>Refer to the diagram at the top of this lab. Which services have you currently set up? Record your findings in your lab Logbook.</li></ol>
 
{{Admon/important |Encountering error messages when sending email|If you cannot properly receive sent e-mail messages, check the '''/var/log/syslog''' file for errors.<br><br> If you locate an error message in that file such as: '''Fatal: Error reading configuration: Invalid settings...''', then add the following <u>parameter</u> in '''/etc/dovecot/dovecot.conf''':<br>'''postmaster_address at DOMAIN''' (where DOMAIN is actually <u>your</u> domain).<br><br>After you have saved those changes, then '''restart''' your dovecot service.}}
=== Viewing Received Mail Message on VM3 VIA IMAP (Using Thunderbird) ===
#The configuration file for the Dovecot service (which is not the same thing as dovecot-lda) is: '''/etc/dovecot/dovecot.conf'''. Modify the '''protocols''' option so that Dovecot will work with IMAP connections, no POP3 or LMTP.
# Start the dovecot service, and ensure it will always start automatically when the machine boots.
# Use the '''netstat''' command to confirm the service is listening, and use telnet on the host to confirm you can connect to it.
#If you can connect - it's now time to do something wrong, that is connect to our IMAP server using Thunderbird over an unencrypted connection.
# Edit the '''/etc/dovecot/conf.d/10-auth.conf''' file and set '''disable_plaintext_auth''' to '''no'''.
# Then edit the '''/etc/dovecot/conf.d/10-ssl.conf''' file and set '''ssl''' to '''yes'''.<br><br>'''Note:''' This combination of parameters will allow your username and password to be sent over the internet in plain text, for anyone interested to look at. In the following lab we'll set up secure SMTP and IMAP connections, for now this is all we have time for.<br><br>
# Restart dovecot so the changes take effect.
#Try to connect to your IMAP server with Thunderbird by clicking on your '''Inbox'''.
#If nothing happens, then check the Thunderbird Activity Manager for any errors. If the connection is successful, you should see the '''Trash''' box <u>appear</u> below Inbox.
13,420
edits

Navigation menu