Sendmail

[client]

Turn off the sendmail daemon and configure as client only

client# vi /etc/sysconfig/sendmail

>> DAEMON=no

client# vi /etc/mail/submit.mc

>> FEATURE(`msp', `[mail.server.net]')dnl

client# m4 -D_CF_DIR_=/usr/share/sendmail-cf/ /etc/mail/submit.mc > /etc/mail/submit.cf

Fix the domain of system mail

client# vi /etc/mail/submit.mc

>> define(`confDOMAIN_NAME',`yourhost.yourdomain.net')dnl

>> define(`always_add_domain')dnl

[server]

Command to generate a cf file from an mc file

server# m4 -D_CF_DIR_=/usr/share/sendmail-cf/ /etc/mail/cf/mda.mc > /etc/mail/sendmail.cf.new

Generate db files

server# makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable

[troubleshoot]

$ telnet localhost 25

> HELO your.hostname.com

> MAIL FROM: from.mail@addr.com

> RCPT TO: to.mail@addr.com

> DATA