The following is a VERY brief overview of sendmail. Sendmail is very complex to configure and run correctly and securely. The following is largely only relevant to configuring sendmail as a SMTP client.
m4 sendmail.mc>sendmail.cf
)m4 submit.mc>submit.cf
)