1 / 19

COP 4343 Unix System Administration

Learn how to send, receive, filter, and manage emails on Unix systems. Explore Mail Transfer Agents, User Agents, and Mail Delivery Agents, configuring Sendmail, Dovecot, and Procmail, creating mailing lists with Mailman and managing them effectively.

borisr
Download Presentation

COP 4343 Unix System Administration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COP 4343Unix System Administration Unit 14: email send and receive mail mail filtering mail server mailing lists

  2. Understanding Email

  3. Understanding Email • Mail Transfer Agent • moves email from one server to another • new: Mail Sending Agent • Mail Delivery Agent • places email in a user’s mailbox • Mail User Agent • manages email for user

  4. Mail User Agent • mail • pine • modern GUI-based email readers • thunderbird, mozilla mail • outlook, evolution • Kmail • WebMail

  5. Mail User Agent • mail • pine • read email from system mailbox • /var/mail/userid • send email via MTA directly

  6. GUI-based Mail User Agent • read email from mail server via • Internet Mail Access Protocol (IMAP) • Post Office Protocol (POP3) • send email to MTA via • Simple Mail Transport Protocol (SMTP) • new: authenticate/send email via MSA

  7. Mail Delivery Agent: procmail • filters email based on user-defined criteria • typical use • virus scan • www.clamav.net • spam scan • www.spamassassin.org

  8. Mail Transfer Agent • sendmail • Simple Mail Transport Protocol (SMTP) • TCP port 25 • new: TCP port 587 for MSA

  9. configuring a mail server • packages • sendmail • dovecot • for imap and pop3 • procmail • open firewall • imap: 143, pop3: 110, smtp: 25

  10. sendmail configuration • chkconfig sendmail on • configuration directory: /etc/mail • edit file: sendmail.mc dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') LOCAL_DOMAIN(`instructor.ege.com') MASQUERADE_AS(`instructor.ege.com') • install package sendmail-cf • make • service sendmail start • open firewall port 25

  11. sendmail MSA configuration • convention: • users send email via their ISP • possible: • allow sendmail to be RELAY • /etc/mail/access file • new: sendmail configured as MSA • requires authentication • sendmail MSA port: 587

  12. dovecot configuration • chkconfig dovecot on • service dovecot start • add ports 110 and 143 to iptables • /etc/dovecot.conf • example setting: first_valid_uid = 500

  13. procmail configuration • configuration • /etc/procmailrc • per user .procmailrc • also define environment variables • lists recipe to filter email :0 [flags] [ : [locallockfile] ] <zero or more conditions (one per line)> <exactly one action line>

  14. procmail examples :0 * ^Subject: .*scuba.* scubafile :0 * < 1000 ! myname@home :0 * ^^%! | lpr :0fw | processMailFilter

  15. spamassassin recipe • yum install spamassassin • chkconfig spamassassin on • service spamassassin start • /etc/procmailrc DROPPRIVS=yes :0fw | /usr/bin/spamc

  16. Mailing lists • establish alias to send bulk email • enable membership management • package: mailman

  17. mailman configuration • /etc/httpd/conf.d/mailman.conf • set domain name • restart httpd • set mailman passwd • /usr/lib/mailman/bin/mmsitepass password • Set the values for DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST in /usr/lib/mailman/Mailman/mm_cfg.py

  18. mailman configuration • Update Mailman list files: /usr/lib/mailman/bin/update • Create a "site-wide" mailing list /usr/lib/mailman/bin/newlist mailman • you will need to add lines to /etc/aliases and then run newaliases • chkconfig mailman on • service mailman start • visit: http://instructor.ege.com/mailman

  19. mailman list management • select administrative interface from web page • follow prompt to create new list • email is sent to list administrator with instructions: • add lines to /etc/aliases file • run newaliases

More Related