Friday, September 25, 2009

SENDMAIL Notes 10: Sendmail SMARTHOST & Null Client

Sendmail Smart Host
      Smarthost is a smtp server that forwards the non local mails to another server that has proper DNS resolution.


    Define this derivative in the Host mail configuration where we have to forward the mail to another server.

define(`SMART_HOST', `')
define(`SMART_HOST', `')

      The Smart host entry can be either IP address or with Hostname

#recompile the and restart the sendmail service in hosts

Now go to main mailserver (
Permit the host in Relay

#vi /etc/mail/access
add the ip address of the smarthost
#makemap hash acess < access

Now if we send mail from the Host to internet the message will be Relayed through to internet.Verify the logs on each servers. All the details of the mail relays will be found in the msg headers(through which hosts the mail has be relayed).


      In contrast with SMARTHOST, NULL CLIENT CONFIGURATION will redirect all mails including local msgs, not just the remote mails to the defined server.This is used where in the situation that need to make the server to just send the msgs and not to receive any msgs.

Define the Following in the HOST that needed to be configured as NULL CLIENT.
first comment the SMART_HOST definition. Add the following in

FEATURE(`nullclient', `')
#recompile the and restart the mail service

      This will make the host to forward all the mails to the server Test this by running sendmail in debugging mode

#sendmail -d -i

Note:- In server ( has to define the access to relay this host.
       Now try sending msgs from host, this will make all the mail to relay through
      As we are defining the Null client, since it is not setup to receive mail we have to make sure that the mail envelop will be re-written.Because in case of any reply or bouncing the host will not be accepting the mail.

No comments:

Post a Comment

tag ur valuable ideas below