Email hosed - bet I'm not the only one!

Lynn David Newton plug-discuss@lists.plug.phoenix.az.us
Tue, 17 Jun 2003 13:28:53 -0700


I'm extremely grateful for the swift replies, but I'm
not quite there yet. I need just a little more hand holding.

  D> Stuff this in /etc/mail/sendmail.mc

  D> define(`SMART_HOST', `smtp.west.cox.com')

Ok, found where that goes and did that.

  D> and run the m4 listed at the top of the file.

Ok, did that.

No difference. Stopped and started sendmail. Still no
difference.

  D> or try

"Or"? Meaning back out the change above?

  D> /sbin/iptables -t nat -A OUTPUT -d !127.0.0.1 -p tcp --dport 25 \
  D>            -j DNAT --to-destination  smtp.west.cox.net

That gives me an error message:

  iptables v1.2.6a: Bad IP address `smtp.west.cox.net'

Going way out on a limb here, I tried this:

  nslookup smtp.west.cox.net
  ... blah blah ...
  68.6.18.4

Then

  /sbin/iptables -t nat -A OUTPUT -d !127.0.0.1 -p tcp --dport 25 -j DNAT
--to-destination 68.6.19.4

which gives me the error:

  iptables v1.2.6a: host/network `!127.0.0.1' not found

Oh really? Never heard of the localhost? How interesting.

  D> Although given that smtp.west.cox.net probably has
  D> multiple addresses you probably want something
  D> with dig and xargs. Hmm. Appears
  D> smtp.{west|east}.cox.net is single ip'd. That'll
  D> stuff all outbound port 25 connections into cox's
  D> mail server, regardless of original intent.

"Something with dig and xargs", eh? Well, well. I certainly
Know xargs, and am familiar with dig but don't know what to do to use the
output of dig to send it to xargs to send it to something that iptables
might be able to grok. At least not without probably bringing my system off
the net for the next three weeks at the same time.

I live
behind a router, and have never had to deal with
iptables.

  D> The !127.1 allows for local procmail and fetchmail
  D> to work as you might expect.

Both of which I use. But what !127.1 are you talking
about? All I see above is !127.0.0.1. Is that an
equivalent syntax? Somehow I've never known that
before.

  D> Me, I went with a variant of the iptables rule.

I'd love to go with something, but I'm still stuck.

On to the next message:

  >> This morning I just happened to notice that my
  >> mail queue was backing up.

  J> You should check your mail logs to see why.

Of course. All I see in /var/log/maillog regarding
outbound messages is stuff like this example:

Jun 17 12:50:41 bela sendmail[25460]: h5HJneFS025458:
to=<dwight@oriscus.com>, ctladdr=<lnewton@bela.interhack.net> (30274/30274),
delay=00:01:01, xdelay=00:01:00, mailer=esmtp, pri=30909,
relay=mail.oriscus.com. [199.231.150.33], dsn=4.0.0, stat=Deferred:
Connection timed out with mail.oriscus.com.

I don't know how to interpret that. Other than to say I know it means it
ain't gonna ship my mail.

  J> I am guessing that your sendmail wasn't really
  J> sending out via smtp.west.cox.net.

Good guess. That's exactly what I concluded as well.

  J> This was just discussed on this list a few days
  J> ago. Several suggestions were provided. Check the
  J> archives for this list.

Fortunately I still have the mail in my folder, because
I also got bit by the AOL problem and haven't had time
to deal with it yet. Now I'm forced to.

  J> In one posting (subject of "Re: AOL blocking Cox
  J> IPs), Thomas Cameron showed an example:

  J>    cat /etc/mail/mailertable:

  J>    targetdomain.com        smtp:gateway.hostname.com

It's not clear to me if this is a model or what? I'm
not familiar with this file, and don't see any
documentation on it. As it exists, it's a zero-byte
file.

My wild guess, given no further information that this
is a file where the left hand is something that gets
set to whatever is on the right hand, so I left the
left part literal and made a guess at what the right
hand should be. The file now says:

     targetdomain.com         smtp:smtp.west.cox.net

I have no idea if that's the intent. Did I do that right?

  J> Do make all outbound emails to use cox's mail
  J> server use something like the following in your

"Something like"? Assuming that everyone among us is
fluent in m4, whereas the truth is that in 20 years of
Unix experience, I've never played with an m4 file to
my recollection, except maybe to tinker with a kernel
configuration file now and then. However,

  J> sendmail macro file (and rebuild sendmail.cf):

You're assuming I know what you mean by "my sendmail
macro file", but I would not have known if it were not
for the previous message from David saying to put this
in sendmail.mc.

  J>  define(`SMART_HOST', `smtp.west.cox.net')

I have to assume that those stray backward quoation
marks are correct, because that's the sort of syntax I
see throughout the file. Interesting. Never seen that
before, and have no idea what it means.

In summary:

  o I've put exactly the line both responders suggested
    in /etc/mail/sendmail.mc

  o I've run the command found at the top of that file

    m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

  o This did not result in anything recognizeable to me
    being done to sendmail.cf, but as we all know,
    sendmail.cf was written by a Martian on steroids,
    and is not intended to be groked by ordinary
    mortals.

  o Ran two or three iterations of iptables according
    to the guesses shown above and got nothing but error
    messages in return.

  o I stopped and started sendmail.

  o I ran sendmail -q and checked the queue. The stuff
    is still there.
    
  J> Good luck,

Apparently I'll need it, since I'm still hosed.

And now in order to send this reply I have to save it
to a file, copy it over to my iMac, and suck it into my
despicable but functioning Entourage mail client, which will
Probably send it out in HTML. Apologies for that part.

-- 
Lynn David Newton
Phoenix, AZ