[TriLUG] Another Stupid Sendmail Trick?
Aaron S. Joyner
aaron at joyner.ws
Tue Jul 6 10:00:36 EDT 2004
Brian Henning wrote:
><some bits snipped>
>... I thought I would ask if
>there's a way to smart-relay only the mail @ a certain domain (i.e.
>smart-relay @strutmasters.com to us, but not anything else; that way I can
>smart-relay our outbound mail back through the same server without creating
>an endless loop ...
>
Yes, it's possible to do what your describing. I'm not entirely sure
why you're attempting to do it, so take this information with a grain of
salt. There may be a better way to accomplish your end goal than what
you're doing, but I don't have enough information from your message to
make that determination, so I'll just answer your question. :)
You can direct all mail for Doma.inx to be handled by HostY.doma.inx via
Sendmail's mailertable feature. An entry something like this, should
accomplish what you're looking for:
# /etc/mail/mailertable
# For all mail destined for doma.inx, send it through hosty.doma.inx
# The brackets instruct sendmail not to perform an MX lookup on the host,
# and to address it directly
doma.inx smtp:[hosty.doma.inx]
Don't forget that the mailertable is a hash, and will need to be
makemap'd (`make` in /etc/mail will usually do the trick, depending on
your distro/setup).
For you to smarthost all mail back to the external mail server, you can
use the smarthost entry in sendmail.mc:
define(`SMART_HOST',`smtp.your.provider')
What's that? You're hacking the sendmail.cf directly? You poor soul.
Check out the DS directive. And may god be with you.
>... thereby avoiding possible problems with our lack of
>reverse-DNS[our ISP refuses to provide this service, and our registrar
>insists that it's the ISP's jurisdiction --- Aaron, expect an e-mail from me
>off-list about Intrex's DSL services..])
>
>
Reverse DNS is always handled by who ever owns the IP addresses. Since
those addresses aren't owned by you (they're owned by your provider),
then your provider has to handle setting the proper reverse DNS
entries. It also technically shouldn't be handled by you unless you are
allocated at least a /24 (Class C, 256 addresses) - although this is
often cheated by using CNAME records for the reverse DNS entries (an RFC
no-no, but it's quite common, and works just fine).
Yes, of course, at Intrex we'll be glad to set your reverse DNS entry
for your static IPs to what ever you'd like. :) I'll respond to your
other email off-list.
Aaron S. Joyner
More information about the TriLUG
mailing list