9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] how to deal with mail delivery problems
@ 2004-11-19 15:20 Robert Raschke
  2004-11-19 15:47 ` Russ Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Raschke @ 2004-11-19 15:20 UTC (permalink / raw)
  To: 9fans

Hi,

increasingly over the last couple of weeks, I am becoming a victim of
"we don't accept mail from that IP address, go away" mail servers.
This is due to vast swathes of IP addresses given out by ISPs being
blacklisted.

Now, the usual approach to fix this is to use the ISPs smtp server.
Unfortunately, these beasts (at least for my ISP, but I hear for
others as well) appear to be under constant attack and go up and down
like yo-yos.  This leaves you with quite an unreliable service.

Just as an example, if I send email directly from my Plan 9 box at
home to my work address, it takes under a second, but going via my
ISPs smtp server takes anywhere from 30 seconds to 3 days.

So, I can also pay for some other forwarding service, which hopefully
results in more stable conditions.

My question is this: Is it possible to come up with a mail
configuration that will first attempt to deliver directly, and only if
that fails will it attempt to use an external smtp server (and inform
me of that somehow)?

I am vaguely guessing that there is a problem here, in that I can't be
sure that any acceptance of a message by an external entity will
actually result in a reliable delivery of the message to the end
recipient. If that is the case, would I be best of by shopping for a
reliable smtp service and use that exclusively (even if it is on the
other side of the planet)?

Apologies for only being tangentially on topic for Plan 9.

Robby



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] how to deal with mail delivery problems
  2004-11-19 15:20 [9fans] how to deal with mail delivery problems Robert Raschke
@ 2004-11-19 15:47 ` Russ Cox
  2004-11-22  8:55   ` Robert Raschke
  0 siblings, 1 reply; 3+ messages in thread
From: Russ Cox @ 2004-11-19 15:47 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

If you change the last part of the line in your /mail/lib/rewrite to

| "/mail/lib/qmail '\s' 'net!\1'" "'\1!\2'"

and then change the last line of /mail/lib/remotemail to say:

if(upas/smtp -h $fd $addr $sender $*)
    exit 0
exec upas/smtp -h $fd net!your.gate.way $sender $*

then I think you'll get the behavior you describe.
Whether it's useful is of course another matter altogether.

Russ


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] how to deal with mail delivery problems
  2004-11-19 15:47 ` Russ Cox
@ 2004-11-22  8:55   ` Robert Raschke
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Raschke @ 2004-11-22  8:55 UTC (permalink / raw)
  To: 9fans

Hi,

Russ wrote:
> If you change the last part of the line in your /mail/lib/rewrite to
> 
> | "/mail/lib/qmail '\s' 'net!\1'" "'\1!\2'"
> 
> and then change the last line of /mail/lib/remotemail to say:
> 
> if(upas/smtp -h $fd $addr $sender $*)
>     exit 0
> exec upas/smtp -h $fd net!your.gate.way $sender $*
> 
> then I think you'll get the behavior you describe.
> Whether it's useful is of course another matter altogether.

C Forsyth also recommended setting up SPF for my domain
(spf.pobox.com).  I did that first, but that did not solve all my
problems.  Sending mail to web.de just won't work unless I go via my
ISP's smtp server.

With the solution by Russ above, I now have a setup where I fall back
onto my ISP's smtp server if direct delivery did not work.  I also add
a line to a log file that I can check when I send "important" mail:

today=`{date}
if (upas/smtp -h $fd $addr $sender $*) {
	exit 0
}
echo $today : upas/smtp -h $fd net!smtp.blueyonder.co.uk $sender $* >>/sys/log/remotemail
exec upas/smtp -h $fd net!smtp.blueyonder.co.uk $sender $*

I think it's useful for me at the moment.  This way I can at least
check and instantly see if a mail went via a potentially very slow
route.  I know that I can't really be sure either way, but it gives me
a workaround for otherwise unreachable addresses.

I will have to keep watching this space for a while to see if I can't
find a better way.

Thank you for your help,
Robby



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-22  8:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-19 15:20 [9fans] how to deal with mail delivery problems Robert Raschke
2004-11-19 15:47 ` Russ Cox
2004-11-22  8:55   ` Robert Raschke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).