procmail
[Top] [All Lists]

Re: Need backup sol. when forwarded mail rejected

2000-07-17 10:32:06
I have a small webhosting business, RH 6.2, Sendmail 8.9.3 (I think)
behind a firewall. I'm having trouble with one account who has a virtual
domain on my server who wants his mail forwarded to his high school's mail
server (he's on staff there) (using Procmail to do the forwarding). 
Problem is that the school's server is frequently down, which generates a
lot of bounced letters and stuck messages in my mail queue (I came home
after a week away on business to find 300+ MAILER_DAEMON letters for him
in mqueue.

Is there some way to have Procmail check the forward address first, and if
it can't deliver it there to have it drop the mail into the local POP3 box
for this account instead?

Why not unconditionally drop the mail into the POP3 account? Encourage the 
client to use fetchmail to get it when it's convenient.

While fetchmail's written by a Linux user on Linux, it's been ported to 
other platforms including OS/2.

Or, have a (let's say, ) Perl script check when he's online (and has mail) 
and then run a mail splitter along the lines of the example in the 
procmail docs to redeliver the mail?

You can check whether he's online by attempting an smtp connexion and 
(maybe) speak a little smtp to the remote site.

The attachment (which I wrote for solving fetchmail problems) may help get 
you started.

If you don't like that, you can also test using telnet and expect. I use 
something like this (as a script) to telnet to a remote system:

#!/usr/bin/expect --
spawn telnet os2
set timeout 60
set DIS $env(DISPLAY)
expect "login: $"
sleep 1
send "summer\r"
expect "Password: $"
send "secret\r"
expect "summer"
send "ls \$MAIL\r"
interact
[summer(_at_)possum summer]$


Attachment: poptest.1
Description: poptest.1

Cheers
John Summerfield
http://www2.ami.com.au/ for OS/2 & linux information.
Configuration, networking, combined IBM ftpsites index.

Cheers
John Summerfield
http://www2.ami.com.au/ for OS/2 & linux information.
Configuration, networking, combined IBM ftpsites index.
<Prev in Thread] Current Thread [Next in Thread>