Open main menu

CDOT Wiki β

Changes

OPS345 Lab 7

404 bytes added, 03:33, 30 November 2021
no edit summary
root@p51:~# cp /etc/letsencrypt/live/email.asmith15.ops345.ca/privkey.pem ~andrew/prog/seneca/ops345/new/keys/email.asmith15.ops345.ca.key.pem
root@p51:~# chown andrew ~andrew/prog/seneca/ops345/new/keys/email.asmith15.ops345.ca.*
</source>
* Put keys on the email server:
<source>
scp -P 2212 -i keys/ssh/ops345-all-aws-machines.pem keys/email.asmith15.ops345.ca.* andrew@34.202.103.43:~
[root@email andrew]# cp email.asmith15.ops345.ca.cert.pem /etc/pki/tls/certs/
[root@email andrew]# cp email.asmith15.ops345.ca.key.pem /etc/pki/tls/private/
</source>
* configure postfix to enable encrypted connections from client software. add this to the bottom of main.cf:
<source># Settings to enable secure SMTP via STARTTLS using my key and self-signed certificate:
smtpd_tls_auth_only = no
smtpd_use_tls = yes
smtp_use_tls = yes
smtpd_tls_key_file = /etc/sslpki/tls/private/vm2asmith15.andrewsmithops345.opsca.key.pemsmtpd_tls_cert_file = /etc/sslpki/tls/certs/vm2asmith15.andrewsmithops345.opsca.crtsmtpd_tls_CAfile = /etc/ssl/certs/cacertcert.pem
tls_random_source = dev:/dev/urandom
smtpd_tls_loglevel = 1</source>
* test with telnet/EHLO: should say 250-STARTTLS
* complete test will be done with thunderbird later
* dovecot installed in previous lab, it needs very little configuration for our simple setup
* /etc/dovecot/dovecot.conf:
* Modify the protocols option so that Dovecot will work with IMAP connections, no POP3 or LMTP.
* 10-ssl.conf:
** <source>ssl_cert = </etc/pki/tls/certs/email.asmith15.ops345.ca.cert.pem** ssl_key = </etc/pki/tls/private/email.asmith15.ops345.ca.key.pem</source>
* ss should show port 993, no 995 or 110
* there's no iptables running on email, so just open port 993 in ops345sgemail
* configure thunderbird:
** IMAP: email.asmith15.ops345.ca, SSL 993, normal password, username without @domain** SMTP: email.asmith15.ops345.ca, STARTTLS 25, normal password, username without @domain