1.1     Install Sendmail<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

1.2     Configure Sendmail

1.2.1     Sendmail files:

/etc/mail: configuration files

/etc/mail/sendmail.mc: sendmail configuration file, m4 to sendmail.cf

/etc/mail/sendmail.cf: sendmail running using configuration file

/etc/mail/access: accessabled clients

/etc/mail/local-host-names: local host names.

/etcr/mail/domaintale:

/etc/mail/mailertable:

 

/usr/mail:

 

/var/spool :

/var/spool/mqueue: email queues

/var/log/maillog : running logs

/var/log/messages : running logs

 

1.2.2     Configue /etc/mail/sendmail.mc

Sendmail macs defination :

Divert(n)

For m4 buffer, n=-1 :removed ; n=0 : new a buffer.

OSTYPE

Using operate system

Domain

Which domain for MTA

Feature

A special functions

Define

Define a special option

MASQUERADE_AS

Other host names

MAILER

Mail transfer type

dnl

comments

 

 

 

In most Linux configuration files a # symbol is used at the beginning of a line convert it into a comment line or to deactivate any commands that may reside on that line.

The sendmail.mc file doesn't use this character for commenting, but instead uses the string "dnl". Here are some valid examples of comments used with the sendmail.mc configuration file:

These statements are disabled by dnl commenting.

modify these lines to:

TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

...

DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl

...

This configuration just allow smtp authentication for external domain relay only. If you also need to authentication for local domain, please modify it like this:

TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

define(`confAUTH_MECHANISMS', ` GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl

...

DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA,M=Ea')dnl

...

Allowed vrfy expn commands

# define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl

define(`confPRIVACY_FLAGS', `authwarnings')dnl

After modified, run this command to general the sendmail.cf:

[root@host mail]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

Then restart the sendmail, the new configuration will be using.

1.2.3     Configue /etc/mail/local-host-names

Added these lines in /etc/mail/local-host-names :

[root@host spool]# cat /etc/mail/local-host-names

# local-host-names - include all aliases for your machine here.

host.com

mail.host.com

 

1.3     Restart sendmail and test

Restart sendmail :

[root@host spool]# service sendmail restart

Shutting down sm-client:                                   [  OK  ]

Shutting down sendmail:                                    [  OK  ]

Starting sendmail:                                         [  OK  ]

Starting sm-client:                                        [  OK  ]

1.4     Running logs:

/var/log/maillog

/var/log/messages