procmail
[Top] [All Lists]

Re: Really preserving "From " when forwarding....

1997-06-11 01:54:00
Responding To:  era eriksson <era(_at_)iki(_dot_)fi>
Original Date:  Wed, 11 Jun 1997 10:45:54 +0300 (EET DST)
Message-ID:     
<199706110745(_dot_)KAA02624(_at_)kontti(_dot_)Helsinki(_dot_)FI>

Without quoting them, let me just comment that I don't think pinging
the new host makes a lot of sense -- when it fails, it's awfully slow,
and when the host you want to forward to is down, sendmail and any
other sensible MTA will queue the mail and wait for the target host to
come back up.

Pinging on this host seems to very quick.... a second or two if it is up,  
maybe 3 or 4 if it isn't....


Tangentially, you can find out how ping works WRT
exit codes and such by pinging a nonexistent host,
no?

ping exits with exit = 1 on a host which is not found, yes .. but when it is  
given a valid hostname and that does not respond, does it respond with 1  
(for "the host is not alive") or with "0" (for "I successfully told you it  
was down, so I'm going to exit nicely)

Yes it does seem like mail will be Queued on my ISP's machine if the forward  
does not work...




If you want to do this unconditionally, just put the address to
forward to in the .forward file and that's it. (Yes, this will in
fact preserve the From_ line, at least on the system where I tried
it.) The systems I've seen will allow you to have several lines in
your .forward file, so it should be possible to also run Procmail
on the "old" host for additional processing (such as maintaining
a backup of the last 48 hours' mail on the "old" host, for example).

OK, I did this but now my .forward is not executed on my local machine!  Any  
clues why?

If on my localhost I do

echo "hi" | Mail -s test luomat

procmail runs

if on my isp I run

echo "hi" | Mail -s test luomat

it goes to my localhost (ie it is being forwarded) but it never hits my  
procmail script at localhost!


TjL

ps - On a related note:  when sendmail starts on my system, it shows up in 'ps' 
as 

(sendmail)

and I have to do a 'kill -1 <pidsendmail>' to get it to:

sendmail: accepting connections on port 25

how can I tell it to go right to the 'accepting connections' part?


--
TjL <luomat(_at_)peak(_dot_)org>   / http://www.peak.org/~luomat/next/
NeXT bookmarks: http://www.peak.org/~luomat/next/bookmarks.html
sed 's/End\ of\ sig/pithy\ quotation/g'

<Prev in Thread] Current Thread [Next in Thread>