Monday, July 13, 2009

Sendmail MTA Features

Default configuration runs Sendmail
Runs as 2 daemons
1. queue runner - submits jobs into queue(PHP script/mailx/sendmail/etc.)
a. it runs as a non-privileged user called 'smmsp'
b. places messages into queue directory: /var/spool/mqueue
c. mailq command dumps the current status of the queue(s)

2. MTA mode - message delivery to local/remote recipients
b. it runs as root - to bind to well-known TCP:25

Note: Sendmail works with SMF
svcadm restart sendmail
svcs -l sendmail

Typical Mail Components in distributed mail environments:
1. MTA - Message Transfer Agent (Sendmail/Postfix/qmail)
2. MUA - Mail User Agent (mail, mutt, mailx, MS Outlook, Eudora, etc.)
3. MDA - Mail Delivery Agent (mail.local, procmail, etc.)


Config files:
1. /etc/mail/sendmail.cf - primary config file for Sendmail MTA
2. /etc/mail/submit.cf - primary config file for Sendmail MSP (smmsp)

Config files macros using m4 language:
1. /etc/mail/cf/cf/sendmail.mc
2. /etc/mail/cf/cf/submit.mc

Note: Sendmail does NOT understand m4 files. Use m4 to generate updated .cf files if necessary


####/etc/aliases - used for local mail delivery###
Contains key aliases for 'postmaster' & system daemons

unixcbt:unixcbt@linuxcbtsun1

unixcbt@localhost
unixcbt@linuxcbtsun1
unixcbt@linuxcbtsun1.linuxcbt.internal
/etc/mail/local-host-names
unixcbt.internal
unixcbt@linuxcbtsun1.unixcbt.internal

newaliases - generates updated DB for aliases


###per-user mail###
1. Sendmail stores mail using the older mbox format, which stores all mail in 1 potentially huge ASCII text files
2. /var/mail/username - flagged with the STICKY bit

###Mail delivery using local tools###
sendmail is monolothic - 1 program does it all (client/server/MSP/MTA)

sendmail -v unixcbt

Note: MSP submits to: /var/spool/clientmqueue

###Virtual Domains/Users Support###
/etc/mail/relay-domains
/etc/mail/local-host-names
unixcbt.internal

Virtual Users:
Create: /etc/mail/virtusertable
Populate with mappings: virtual_email_address local_mailbox|remote_email
unixcbt@unixcbt.internal unixcbt

Configure /etc/mail/sendmail.cf via /etc/mail/cf/cf/sendmail.mc
- FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')
makemap hash virtusertable - creates the DB file:
/etc/mail/virtusertable.db

###Relay Domains###
/etc/mail/relay-domains
Houses domains that sendmail should relay; local and/or remote
linuxcbt.com
192.168.1.100


###IMAP/POP2|3 Support###
Differences between IMAP & POP
1. IMAP stores messages on server
2. POP downloads messages to client

Note: IMAP server must support mbox mail storage format and optionally Maildir mail storage format

Download IMAP2004g from sunfreeware.com

###Configure INETD control of IMAP & POP3 services###
/etc/inetd.conf
pop3 stream tcp nowait root /usr/local/sbin/ipop3d ipop3d
imap stream tcp nowait root /usr/local/sbin/imapd imapd

Note: use 'inetconv' to convert INETD entries in /etc/inetd.conf to SMF

###Evolution MUA - Connect to POP3 & IMAP Service###
Installed openssl-0.9.8 to support IMAP2004g
Configure Evolution
Note: Retrieving & Sending messages are distinct functions
1. SMTP - Sending
2. IMAP/POP3/MS Exchange/etc. - Retrieval













Readers who read this page, also read:




Bookmark and Share My Zimbio http://www.wikio.com

0 comments: