procmail
[Top] [All Lists]

Re: Bouncing email shows contents of .forward

1997-08-01 07:51:00

Yes, for the "do it yourself" part. Eli has created a Perl script
which purports to do this better than formail. It was announced on
this list recently. 
 $ lynx -dump http://www.iki.fi/~era/procmail/links.html | 
 > fgrep proc-util. | head -1
   69. ftp://ftp.netusa.net/users/eli/proc-util.tgz
 
 I'll have a look at it, but I'm not too keen on running perl. Our
 mailhost is quite  busy as it is.

It's perfectly okay to use single quotes around the -A parameter
instead of double quotes. But the double quotes around the boundary

 Stupid me, of course! I was testing so many different things at the
 same time that it wasn't exactly clear where the real error was ...

 >     echo "from {USER(_at_)HOST [IP]}" ; echo "" ; \
 > # The second problem: how do I get USER(_at_)HOST [IP]?

You might try to glean the IP address from the Received: lines but it
might not necessarily always work ... Do you really need to include

 Nope, won't. Apart from the fact that spammers forge Received headers.

this information? I don't think you have to look exactly like a
Sendmail bounce -- there are so many variations of bounce messages out
there that I doubt anyone will even notice.

 Well then, I'll leave it out.

 > # I tried FROM=`formail -rt -xTo:` from procmailex(5) for the USER
 > # part, but it doesn't seem to work. Ideas? 

How does this not work?

 FROM is empty. I have also tried

:0hc
FROM=| formail -rt -xTo:

 but then I get "formail: syntax error at line 1: `(' unexpected"

 Weird.