[Top] [All Lists]

Re: Haw to del. large mail messages of POP server without downloading them!

1999-02-19 08:27:56
On Tue, 19 Jan 1999 04:37:09 +0200, "Alikcey A. Kerym"
<ali(_at_)bbcmon(_dot_)kiev(_dot_)ua> wrote:
I wonder if there is a way to delete large mail messages of POP
server without downloading them. I have a virtual domain and mail
is downloaded by fetchpop and filtered by procmail to 20 different
users . Some of them receiving and sending mail messages with
attachments of 1.5Mb and more and that just stop all mail traffic .
Certainly it is possible to redirect them to /dev/null , but The
most important is to del it without downloading and if possible
send to specified user a warning message with :0 h of original .

Deleting large messages completely sounds like a bad idea to me. 
You can either reject them with a bounce or save them somewhere for
later downloading.

I +hope+ you are talking about running Procmail at the upstream site,
rather than deleting etc. messages you have already spent time

Do your users have ftp access to the upstream? Or can you drop the
huge messages in an anon ftp area (never mind the security
implications -- you could encrypt the attachments if that's an issue).

    :0  # bounce messages larger than 1.5 Mb
    * > 1572864
    { EXITCODE=65 }  # You +could+ generate a more informative bounce

Or for the second solution


    * > 1572864
    | ( cat >/var/spool/ftp/$LOGNAME.$PID ; \
        echo "You got a large mail message." ; \
        echo "You can download it from$LOGNAME.$PID"; ; \
        echo ; \
        echo "--" ; \
        echo "Your fascist administrator" )

You could set up an at job to automatically remove the saved body
after, say, two weeks.

Hope this helps,

/* era */

Please turn off that annoying HTML misfeature in your mail client, and
use US-ASCII if your message doesn't contain any non-ASCII characters.

.obBotBait: It shouldn't even matter whether    <>
I am a resident of the state of Washington. <>