procmail
[Top] [All Lists]

Re: puzzled by echo behaviour...

1996-09-06 00:54:57
OK, you were correct there was a space.

I have a question.

I want access to the entire header block from the rule pipe that's building
the body of message... How I get the header block. I want to include
the headers in the body.. I'll probably need to quote them too.

This rule is designed to catch people who mail a bogus user at my site.

There doesn't appear to be a way to get a To: header because I don't think
sendmail passes it through. But as I said. I want access to the header lines
from within the rule that's building the body. 

I don't want to use formail to extract them because there can be multiple
_arbitary_ header lines.

:0
{
 
    :0 c
    ! postmaster
 
    :0fh
    | formail -rt -I"From: Mail Delivery Subsystem 
<Mailer-Daemon(_at_)elastica(_dot_)com>"
 \
                  -I"Subject: Returned mail: User unknown"; \
    cat -
 
    :0fb
    | echo "----- Transcript of session follows -----"; \
      echo "Connected to justine.elastica.com"; \
      echo ">>> RCPT To:<undetermined>"; \
      echo "<<< 550 <undetermined>... User unknown"; \
      echo "550 undetermined... User unknown"; \
      echo ""; \
      echo "----- Unsent message follows -----"; \
      cat -
 
    :0
    ! -oi -t
}

-- 
Art is prostitution of the mind.

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