On Mon, 5 Feb 2001, Enrico Payne spewed into the bitstream:

EP>I need to do the following with my e-mail server...
EP>
EP>a) Block all e-mails that have .exe, .vbx, .ocx extensions

Put this in /etc/procmailrc

:0
*^Content-type: (multipart/mixed|application/octet-stream)
{
    :0 HB
    *^Content-Disposition: (attachment|inline);
    *filename=".*\.(ocx|vbs|wsf|shs|exe|chm|pif|vbe|hta)"
    {
       SHELL=/bin/sh
       :0 fhbw
       |/usr/bin/sed -e
's/\([nN][aA][mM][eE]=".*\.[oO][cC][xX]\)"/\1.txt"/' \
                     -e
's/\([nN][aA][mM][eE]=".*\.[vV][bB][sS]\)"/\1.txt"/' \
                     -e
's/\([nN][aA][mM][eE]=".*\.[wW][sS][fF]\)"/\1.txt"/' \
                     -e
's/\([nN][aA][mM][eE]=".*\.[sS][hH][sS]\)"/\1.txt"/' \
                     -e
's/\([nN][aA][mM][eE]=".*\.[eE][xX][eE]\)"/\1.not"/' \
                     -e
's/\([nN][aA][mM][eE]=".*\.[cC][hH][mM]\)"/\1.txt"/' \
                     -e
's/\([nN][aA][mM][eE]=".*\.[pP][iI][fF]\)"/\1.txt"/' \
                     -e
's/\([nN][aA][mM][eE]=".*\.[hH][tT][aA]\)"/\1.txt"/' \
                     -e
's/\([nN][aA][mM][eE]=".*\.[vV][bB][eE]\)"/\1.txt"/'

       :0 c
       /tmp/vbs
    }
}

EP>b) Put in a footer (disclaimer) on all e-mails sent from the server.
EP>
EP>I currently use sendmail 8.9.3, but do not know how to write the necessary
EP>recipes to do these things. I looked at sendmail.org, but the solution
EP>offered by them for the disclaimer is not an easy one.

They never are.

--
Chuck Mead, Owner, MoonGroup.com
[EMAIL PROTECTED] (Note: all html email sent to me is deleted unread)
GnuPG Public Key Available: http://wwwkeys.us.pgp.net



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to