Well people, this looks interesting. How can I make this kind of thing
transparently active throughout the entire mail server, no matter how many
aliases and mailing lists and virtualdomains I throw in? Better yet, deliver a
bounce message to the sender saying something like, "This kind of attachment
is not welcome here. Go complain to the ACLU if you don't like it."

Thanx,

Noel Mistula wrote:

> Hi,
>
> I have a _very_ small script on filtering mails with file attachment.
> This will work only on single attachment. However, you can extend
> this script to filter multiple attachments
>
> As I have said this is a quick and dirty way to filter attachments.
> I'm not a good hack, you can write your own script much much
> better than this.
>
> I wrote this because I've been searching the qmail archive and I couldn't
> find a single _example_ script for this subject. This posting is directed
> to qmail beginners like me. I hope this will be kept in the archive for
> future reference.
>
> Thanks,
>
> Noel Mistula
>
> ==========================================
> #!/bin/bash
> #
> # qmail -- checkattach
> # Author: Noel G. Mistula
> # Date: 28 June 1999
> #
> # This is release under the GNU/GPL.
> # This is a very crude program. Use at your own risk.
> # This will delete incoming email with executable,
> # video and other attachments.
> # Just comment/uncomment/add whichever is required.
> #
> # I use this in a user's .qmail file
> # by adding the line
> # |/usr/local/bin/checkattach
> # before the ./Maildir/
> #
> # Save this script in /usr/local/bin as checkattach
> #
>
> # Check for executable, application and other attachment.
> ATTACHTYPE=`grep "Content-Description:" - | gawk {'print $3'} | cut -c 2-`
> if [ $ATTACHTYPE != "" ]; then
>         case $ATTACHTYPE in
>                 Application)
>                         exit 100;;
>                 MS-DOS)
>                         exit 100;;
>                 Video)
>                         exit 100;;
>                 Movie)
>                         exit 100;;
>                 RealAudio)
>                         exit 100;;
>                 Bitmap)
>                         exit 100;;
>                 MP3)
>                         exit 100;;
>                 Wave)
>                         exit 100;;
>                 *)
>                         exit 0;;
>         esac
> fi
> exit 0
> =============================================
begin:vcard 
n:Castro;Juan
tel;work:540-9100 Ramal 46
x-mozilla-html:FALSE
url:http://www.appi.com.br/~jcastro
org:APPI Inform�tica;Desenvolvimento
adr:;;Av. Ataulfo de Paiva, 135/1410 - Leblon;Rio de Janeiro;RJ;22499-900;Brasil
version:2.1
email;internet:[EMAIL PROTECTED]
title:Consultor
note;quoted-printable:One man alone cannot fight the future. USE LINUX!=0D=0A=0D=0A        -- The X Racer
fn:Juan Carlos Castro y Castro
end:vcard

Reply via email to