apaulh wrote:
> Hello,
>    I am having trouble getting smail to deliver
> mail between my local machines.  I have a private
> network setup with a debian box running as the
> news and mail server. 
> 
> What I am unable to do is get the debian box (daffy) 
> to send mail to another box (tweety).  The /etc/hosts
> file has the correct ip# and names for all my local
> machines, but smail tries to do a dns lookup on tweety
> and when it cannot find one it sends the mail to
> the smart host, my ISP.  
> 
> How can I get smail to use the /etc/hosts file before
> trying to do a dns lookup?

I'm sure the is another way but you can install a special
pathalias router for your local machines.  To do this put the
following router *before* any internet router in /etc/smail/routers

# paths - route using a paths file, like that produced by the pathalias program
#
# SMTP mail routing - local machines that can receive Mail
#
paths.smtp:
        driver=pathalias,               # general-use paths router
        always,
        transport=smtp;                 # for matches, deliver over SMTP

        file=maps/smtp,         # sorted file containing path info
        proto=lsearch,                  # use a linear search
        optional,                       # ignore if the file does not exist
        -required,                      # no required domains

After that put the following into your /etc/smail/maps/smtp file:

tweety                  tweety.domain!%s
tweety.domain           tweety.domain!%s
daffy                   daffy.domain!%s
daffy.domain            daffy.domain!%s

To test if this setup works try the following command

/usr/sbin/smail -d10 -bv [EMAIL PROTECTED]

Regards,

        Joey

-- 
Experience is a useful thing.  Unfortunately it is only acquired
just after one could have used it.

Reply via email to