Sendmail MTA decides whether the mail has to be delivered locally or remotely. if locally it will place to the mail box or uses the SMTP protocol.And if the destination of the mail is remote then it delivers through the SMTP protocol.
Local Mail Delivery:
Locally sendmail MTA places mails to /var/spool/mail/$USER
now the MUA (mutt/mail) (mail clients) will spool the mail from the /var/spool/mail/$USER and will place in the users home directory, either mbox or Maildir/
Route of Local mail delivery:
sendmail -> MSP (MSP sends to Clientmqueue directory) -> MTA -> sends the message described as in local mailer sends to procmail -> /var/spool/mail -> MailClient -> $user home
Sendmail injects msgs to MSP which moniters the clientmqueue then msgs is taken by MTA which checks whether the mail is for local delivery or not. if so the MTA will invoke procmail which puts the msgs in the users mail box /var/spool/mail/$user according to procmail filter rules. Then the mail client copies the mail to users home directory. Usually the msg client reads the mail from /var/spool/mail/$user.
mbox is the traditional way of saving messages in users home directory,Nearly all MTA's and POP/IMAP daemons know how to deliver to mbox. This format simply appends each received message into a file called "inbox". Out of the box, nearly all MTA's will come configured this way, and it does have decent performance for a lightly loaded mailserver.
This sets up a directory structure whereby each message that is received is it's own file. This is how most major mail hosting providers run their infrastructure. The reason being is that when a user checks their email, or the MTA has to deliver a newly received message, it does not have to open up a single file and append/read to/from it. This comes into play when a user has a lot of stored mail on the server.
Sending mail from shell
#sendmail -v kiran
will send the mail to user kiran.this will show the details in verbros.
Analyze the verbose output.
the out put which starts with ">>>" indicates that the command is issued by local sendmail command
"250" "any 3 digit number" indicates that the command is done by MTA.
if the 3 digit is ending without "-", this is the indication to the local mail client saying that the MTA server has finished its output.