Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

‭Assignment‬

‭Installing‬
‭Install Postfix (SMTP server):‬

‭ ‬ ‭sudo apt-get update‬



‭●‬ ‭sudo apt-get install postfix‬
‭●‬ ‭sudo apt--fix-broken install‬
‭●‬ ‭sudo apt-get install postfix‬

‭Install Dovecot (IMAP and POP3 server):‬

‭●‬ ‭sudo apt-get install dovecot-imapd dovecot-popзd‬

‭Configure Postfix:‬

‭sudo nano/etc/postfix/main.cf‬

‭ odify the hostname‬


M
‭sudo systemctl restart postfix‬

‭Configure Dovecot:‬

‭ ‬ ‭sudo nano /etc/dovecot/conf.d/10-mail.conf‬



‭●‬ ‭sudo nano/etc/dovecot/conf.d/10-auth.conf‬
‭sudo systemctl restart dovecot‬

‭Send Mail to Yourself:‬

‭‬s
● ‭ udo apt-get update‬
‭●‬ ‭sudo apt-get install bsd-mailx‬

‭ cho "This is the body of the email" | mail-s "Subject"‬


e
‭anaghary@gmail.com‬

‭sude nano/etc/postfix/main.cf‬

‭Edit‬

r‭ elayhost = [smtp.gmail.com):587‬
‭smtp_use_tis yes‬
‭smtp_sasl_auth_enable yes‬
‭smtp_sasl_password_maps hash:/etc/postfix/sasi passwd‬
‭smtp_sasl_security_options=noanonymous‬

‭sudo nano/etc/postfix/ssl_passwd‬

‭Edit‬

[‭smtp.gmail.com]:587‬
‭your-email@gmail.com.your-app-password‬

‭4. Secure the sast passwd File‬

‭●‬ ‭sudo chmod 600 /etc/postfix/sasl_passwd‬


‭●‬ ‭sudo postmap /etc/postfix/sas_passwd‬

‭sudo systemctl restart postfix‬

‭ cho "This is the body of the email" I mall -s "Subject"‬


e
‭nischithalbion@gmail.com‬

‭sudo cat /var/log/mail.log | nischithalbion@gmail.com‬

‭nslookup smtp.gmail.com‬

‭ping smtp.gmail.com‬

t‭elnet smtp friendmailserver.com 25‬


‭EHLO your-domain.com‬
‭MAIL FROM: <nischithalbion@gmail.com>‬
‭RCPT TO: <friend-vnischithvnisschai5240@gmail.com>‬
‭DATA‬
‭Subject: Test Email‬

‭This is the body of the email QUIT‬

‭ etting up POP3 or IMAP to connect to your friend's mail server‬


S
‭typically involves configuring your email client with the correct server‬
‭settings. Here are the general steps:‬

‭For IMAP:‬
‭Open your Gmail account settings:‬
‭‬C
● ‭ lick on the gear icon in the top right corner of Gmail‬
‭●‬ ‭Select "See all settings"‬

‭G‬‭o to the "Forwarding and POP/IMAP" tab.‬


‭●‬ ‭Enable "Enable IMAP"‬

‭Configure your email client‬

‭‬
● I‭ncoming Mail Server (IMAP): Imap.gmail.com‬
‭●‬ ‭Port: 993‬
‭●‬ ‭Use SSL/TLS for a secure connection‬
‭●‬ ‭Uhername: Your full Gmail address.‬

‭Configure Outgoing Mall Server (SMTP):‬

‭‬
● ‭ utgoing Mail Server (SMTP): smtp.gmail.com‬
O
‭●‬ ‭Port: 587‬
‭●‬ ‭Use TLS for a secure connection.‬
‭●‬ ‭Enable authentication with your Gmail address and password.‬

You might also like