[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delivery refusal (DNS not listed)
On Sat, Mar 06, 1999 at 10:14:48PM +0200, David Resnick wrote:
> ... while talking to zc.mx.aol.com.:
> >>> MAIL From:<dmr@localhost.localdomain> SIZE=849
> <<< 550 <dmr@localhost.localdomain>... Sender domain not found in DNS (see RFC
> 1123, sections 5.2.2 and 5.2.18).
> 554 xyz@aol.com... Service unavailable
>
> --------------------------------------------
>
> The problem is obvious, the solution is just a little bit trickier ;).
Actually it's not at all trivial :-)
I'm assuming a pretty standard RH system, with sendmail. YMMV greatly!
> Should I be sending my mail via the same (POP) server that sends my
> mail? There is no place that I've found where I need to put the name of
> my outgoing mail server, like there is in the netscape mail client. Or do
> I need to somehow change my domain name to something that is true?
You may either send mail yourself, or relay it through your ISP's
mail server. Some people prefer the first option because it's easier
to set up and because it offers a little more privacy; some will say
it's more "correct" to relay your mail, because you aren't a constantly
connected host (are you?), and therefore won't be available to receive
errors and bounces when they arrive. Obviously, choosing the latter
means you have a little less control over how your mail is dealt with.
Let's go for the second approach. First, give your machine a qualified
name. It doesn't have to be something that DNSes around the world know
about, since we'll not be using it on our mail envelope, but you need
one anyway. Your best choice will be
whateveryoulike.your.isp.com
that is, you only get to choose the hostname bit.
Now, tell your sendmail you'll be relaying your mail through your ISP.
Edit /etc/sendmail.cf (make a backup please!).
1. Find the line that says "DS". It's probably empty, make it
DSmailgw.isp.com
or whatever your ISP wants you to put there (line must start with DS,
and no space between the DS and the host name).
2. Also, find the line "O HoldExpensive" and change the value to "true",
thus allowing your server not to attempt to dequeue messages all the
time.
3. Now, in the line with "DM" put
DMyour.isp.com
for example, if you're with Netvision put "DMnetvision.net.il".
4. restart sendmail with "/etc/rc.d/init.d/sendmail restart".
Do several test messages. YOU MAY HAVE PROBLEMS NOW. Especially
important in this stage is to (a) keep a backup of all your config
files first and (b) add "-k" (keep) to your fetchmail options, since
incoming mail may be munged too (fetchmail uses your local sendmail).
Here are several things that may or may not be needed, depending on
your ISP etc.
5. allow your mail clients to control the "From: " header. You can
do this by adding your userid (and that of other users) to the sendmail
trusted users: find the section and add a line like
Tuserid
(and restart sendmail)
6. tell your sendmail what its official domain name is (don't do this
unless you have to):
Dj$w.isp.com
7. If your mail gateway refuses to accept your mail because it doesn't
believe you when you say you are "foo.isp.com", you'll have to masquerade
your envelope as well as your headers. This is a little more tricky, and
works like this:
a) install the package sendmail-cf*rpm
b) cd /usr/lib/sendmail-cf/cf
c) cp redhat.mc my.very.own.mc
d) echo "MASQUERADE_AS(your.isp.com)" >> my.very.own.mc
e) echo "FEATURE(masquerade_envelope)" >> my.very.own.mc
f) take a very deep breath. consult your local deity.
g) m4 ../m4/cf.m4 my.very.own.mc > my.very.own.cf
h) edit the resulting file, and manually apply any changes
you had made to your previous /etc/sendmail.cf .
i) put this file as your new /etc/sendmail.cf, restart sendmail
(if you must forget one of these steps, don't let it be step f).
That should be it. Please don't believe the previous sentence, and
test and retest your mail config. Losing mail is painful. Make
backups of everything. Don't remove messages from the POP server
till you're done.
As a final note, when you upgrade your sendmail, apply any changes
you've made to /etc/sendmail.cf . This may mean regenerating the
file as illustrated in step 7, especially if it's a major sendmail
upgrade.
Hope this helps,
Gaal
--
believing is seeing
gaal@forum2.org
http://www.forum2.org/gaal/