Open main menu

CDOT Wiki β

Changes

OPS535-online-L5

1,806 bytes added, 17:28, 9 March 2021
Completing the Lab
* Issue the command /usr/sbin/sendmail -bp and compare the output to the command mailq.
* Remove both "./defer/B/B75BF20A6D85" "./deferred/B/B75BF20A6D85" and run the mailq command again.
 
= Investigation 5: Appends mail to files =
The Postfix aliases file supports an option to append mail message addressed to a real user or virtual user to an external file. In this investigation, we are going to use a real email user named "rchan", and a virtual email user named "ops535" as the email recipients. The following are the steps to configure Postfix to append email addressed to these two email users to the file 'tmp/ops535.mail' and 'tmp/rchan.mail'.
* First, confirm that your system has the real user 'rchan' (replace with the real user name on your system) only:
<pre>
[instructor@pri-dns lab5]$ id rchan
uid=1002(rchan) gid=1002(rchan) groups=1002(rchan)
[instructor@pri-dns lab5]$ id ops535
id: ‘ops535’: no such user
</pre>
* Add the following two lines to the /etc/aliases files:
<pre>
rchan: "/tmp/ops535.mail"
ops535: "/tmp/rchan.mail"
</pre>
* Run the newaliases command to update the aliases database file.
* The above steps create a virtual email user (or mail alias) "ops535", and all the email messages addressed to "ops535" will be appended to the file "/tmp/ops535.mail".
* As a regular user on your VM2, create a file named "test.mesg" with the following contents:
<pre>
Postfix is a Mail Transport Agent (MTA),
supporting LDAP, SMTP AUTH (SASL), TLS
</pre>
* Run the following two commands to send the same message to both the real email user "rchan" and virtual email user "ops535":
<pre>
/usr/sbin/sendmail -v ops535 < test.mesg
/usr/sbin/sendmail -v rchan < test.mesg
</pre>
* Go to the /tmp directory, and search for the files named "ops535.mail", and "rchan.mail". [Hint: you have to look deeper into the /tmp directory]
* Get the locations (i.e. path names), owners, permission settings, and contents of two files for lab submission.
= Completing the Lab =
1,760
edits