procmail
[Top] [All Lists]

Re: sendmail

2001-02-23 03:54:43
Rui Luís Pires wrote:

This is my .procmail

You must have meant .procmailrc
                             ^^
Try this now, there might have been a few syntax problems...

:0
* ^Content-type:.(multipart|application)
{
  :0 hb
  # al posto di attachment a volte c'e' inline, pero' non sono exe
  * ^Content-Disposition:.(attachment|inline)
  *(file)?name="?.*\.(exe|hta|pif|scr|shs|vbs|vbe|wsf|gz)"?
  {

      # what do you want to do here, run a program?
      :0
      {
         unique=`$HOME/inc_unique`
      }

      :0 fhw   # you need no lock file here
      | (formail -r \
        -I"From: $OWNER " \
        -I"To: $OWNER \
        -I"Subject: [Virus Alert]"; \
        echo "E' stata individuata una email con un probabile virus";\
        echo "Inviata da:$SENDER" ) \
        | $SENDMAIL $SENDMAILFLAGS -t

      # this one is probably going to fail, see above.
      :0
      $HOME/antivirus/$unique
  }
}

I didn't try this overhere, it's a bit messy, so I don't garantee
everything works.

Make sure you do not have spaces at the end of the lines and that
variables you use are properly set before you use them (such as those
$OWNER or $SENDER)

I believe you to, kind of, mail yourself a warning message of possible
virus. Did I get it right?

A few more comments...
First, you must explain a bit more what you want to achieve, otherwise you
will get difficult to point you out the possible errors.
Second, what do you have against the GZIP extension?!

I think you should have a look at the mailing list archive, there is a
nice thread about a similar topic. Here's the link:

http://www.xray.mpe.mpg.de/mailing-lists/procmail/2001-02/msg00006.html

If you have problems with the sendmail call, you will also find some good
examples there. I remember a discussion about it some days ago.

I hope it helps.

--Rui

Yes, The goal of this code is:
If I received a mail with attachment, I save the original mail in a
unique file.
Then I post me a new mail to advise me that there is a mail with
attachment.

I've seen the topic about " blocking certain attachments", but my
problem that is I can't undestand how to send a new mail , with a new
sender , subject and a new body. 

I've nothing about .gz extension; I work on Linux and to test procmail
for my collegues (they use win),
I insert this exestension.

Thanks.

Michele
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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