procmail
[Top] [All Lists]

Re: Bouncing email shows contents of .forward

1997-08-01 07:25:00
On Fri, 1 Aug 1997 13:22:10 +0100 (BST),
lhecking(_at_)nmrc(_dot_)ucc(_dot_)ie (Lars Hecking) wrote:
era eriksson writes:
On Mon, 26 May 1997 15:12:06 -0700,
Bill Moseley <moseley(_at_)netcom(_dot_)com> wrote:
If I bounce email from Procmail using EXITCODE = 67 the sender
receives the bounced message back, but the message also contains
the contents of my .forward file. For example, they will see:
This comes up from time to time. I think the consensus was to simply
generate your own bounce message. 
 (Or use procmail as MDA in sendmail.cf).
 Does this translate to: if you want to bounce a message without exposing
 .forward, you have to do it yourself with formail?

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 seem unable to put in the "'s. formail called with
-A"Content-Type: multipart/mixed; boundary=\"SAA09016.870370791/host\""
 doesn't work, ie. the \" in the argument to -A. The logs tell me

It's perfectly okay to use single quotes around the -A parameter
instead of double quotes. But the double quotes around the boundary
string are optional anyway; just use a boundary which doesn't contain
any "magic" characters. (I don't think slash is magical, but don't
quote me [pun! pun!] on that; check out the MIME spec which I believe
will direct you back to RFC822.)

# BOUNCEDATE=`${GnuDate} '+%a, %d %b %Y %T +0100'`
    echo "The original message was received at ${BOUNCEDATE}" ; \
    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
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.

# 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?

Hope this helps,

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>