On Tue, 18 Jul 2000, John Summerfield wrote:
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.
The security setup at his school doesn't allow remote logins for any
reason from the school computers - fetchmail won't work. His office is at
the school, and this is his business account through the school, so mail
needs to be forwarded to this account at the school.
Personally I agree with you - it would make life easier on this end. But
I need some way when mail addressed to him comes in to have my system
check to see if his MTA is online *and* working; if it is then send the
mail through, if not then hold it until it is - kind of like a backup MX
setup but for just this one email account.
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?
As I understand it the server is always online, it just isn't always
working! I need some way to test if it's working and consequently will
accept the mail, or if I can't do that, if the mail is rejected have my
system hold it somewhere other than in the mail queue and without
generating all those bounced letter messages, until the server is back
online.
The attachment (which I wrote for solving fetchmail problems) may help get
you started.
Thanks, I'll check it out.
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]$
I use a perl script and Expect to ssh into my server and to update
/etc/mail/access with my new dynamic IP address so I can send out mail
from this Linux box. I hardly have a good grasp on Expect, but it's made
life easier on this end.
Glen
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail