procmail
[Top] [All Lists]

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

1999-02-19 08:42:09
Well, the point is to del it off the ISP pop server without downloading as I
have dial-up conection as there is no other way and no ftp server.
-----Original Message-----
From: era eriksson <era(_at_)iki(_dot_)fi>
To: Alikcey A. Kerym <ali(_at_)bbcmon(_dot_)kiev(_dot_)ua>
Cc: procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de 
<procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de>
Date: 19 ôåâðàëÿ 1999 ã. 16:43
Subject: Re: Haw to del. large mail messages of POP server without
downloading them!


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
downloading.

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

   PID=$$

   :0fbw
   * > 1572864
   | ( cat >/var/spool/ftp/$LOGNAME.$PID ; \
       echo "You got a large mail message." ; \
       echo "You can download it from ftp://ftp.host.ua/$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    <http://www.iki.fi/~era/>
I am a resident of the state of Washington.
<http://members.xoom.com/procmail/>