Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: sendmail question



Scott Stone <sstone@example.com> writes:

> > What is "SMART_HOST"?
> 
> I don't know, but how is this relevant to my question?

Sorry, Scott; it was a Jeopardy answer.  Have a look in
sendmail/cf/README and search for SMART.  I think this is the
declaration that you need; it sets a host to which Sendmail will
send any mail that it can't make out.  Better might be
RELAY_HOST, which (if memory serves me correctly) defines a host
for unconditional relay forwarding of all external addresses.  If
your firewall sendmail is defined to be strict on spammers (8.9.1
is tight by default), it will need to be be told that relaying is
permitted for your friendly machine.  I just set this up
yesterday for a student on a subnet spur that pokes into our
faculty from the Economics department.  It's poorly documented,
and it took me about 6 tries over three days to get it right.
What you need is to set an entry like this in /etc/mail/access on
the firewall machine:

  my.royal.host		RELAY

Then do something like:

  makemap hash /etc/access.db < /etc/access

This will open the firewall sendmail to relay requests from
my.royal.host.  The README says this about relaying outbound
mail.  It was too dense for me, but the bottom lines should solve
your problem:

*****

For example, if you are on machine mastodon.CS.Berkeley.EDU and you have
FEATURE(stickyhost), the following combinations of settings will have the
indicated effects:

email sent to....       eric                      eric@example.com

LOCAL_RELAY set to      mail.CS.Berkeley.EDU      (delivered locally)
mail.CS.Berkeley.EDU      (no local aliasing)       (aliasing done)

MAIL_HUB set to         mammoth.CS.Berkeley.EDU   mammoth.CS.Berkeley.EDU
mammoth.CS.Berkeley.EDU   (aliasing done)           (aliasing done)

Both LOCAL_RELAY and    mail.CS.Berkeley.EDU      mammoth.CS.Berkeley.EDU
MAIL_HUB set as above     (no local aliasing)       (aliasing done)

If you do not have FEATURE(stickyhost) set, then LOCAL_RELAY and
MAIL_HUB act identically, with MAIL_HUB taking precedence.

If you want all outgoing mail to go to a central relay site, define
SMART_HOST as well.  Briefly:

        LOCAL_RELAY applies to unqualified names (e.g., "eric").
        MAIL_HUB applies to names qualified with the name of the
                local host (e.g., "eric@example.com").
        SMART_HOST applies to names qualified with other hosts.

However, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY,
DECNET_RELAY, and FAX_RELAY) take precedence over SMART_HOST, so if you
really want absolutely everything to go to a single central site you will
need to unset all the other relays -- or better yet, find or build a
minimal config file that does this.

*****

Add this to the *.mc source of your config file, and do the
usual:

  m4 ../cf/cf.m4 <name_of_master.mc> > sendmail.cf

Put sendmail.cf where it belongs (/etc/sendmail.cf or
/etc/mail/sendmail.cf) and kill and restart your daemon.

Should work ... YMMV

Cheers,
-- 
-x80
Frank G Bennett, Jr         @@
Faculty of Law, Nagoya Univ () email: bennett@example.com
Tel: +81[(0)52]789-2239     () WWW:   http://rumple.soas.ac.uk/~bennett/
---------------------------------------------------------------
Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Meeting: 12 December, 12:30 Tokyo Station Yaesu central gate
---------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links