LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   clever email filter (https://www.linuxquestions.org/questions/linux-networking-3/clever-email-filter-383603/)

Ygrex 11-16-2005 04:36 AM

clever email filter
 
Hello!

I use exim4/fetchmail system. I am afraid of email flood. What will happen if one send me 100M of mail? It ALL will be fetched to my poor machine! Of course it is impossible for I have limited Internet traffic, which will be consumed entirely on fetching these damned mails :( Is there any way to avoid this possibility? Does anyone else use exim4/fetchmail and what is you opinion in this question?

Thank you.

theYinYeti 11-16-2005 06:56 AM

I also use fetchmail, and back when I was on dialup, I used to NOT download any mail bigger than 800kB.

I'm not @home right now, but I'll try and give more details when I am. Meanwhile, you'll find the information you need in the fetchmail manpage.

Yves.

Ygrex 11-16-2005 09:56 AM

Quote:

Originally posted by theYinYeti
I also use fetchmail, and back when I was on dialup, I used to NOT download any mail bigger than 800kB.
Please, it is not a solution. Any baddy can send 1 million messages by 800 kbytes each.

Quote:

Originally posted by theYinYeti
Meanwhile, you'll find the information you need in the fetchmail manpage. [/B]
Of course I have looked thru the manpage. It offers 'fetchlimit', well, but "An explicit --fetchlimit of 0 overrides any limits set in your run control file." But is it possible to use at least 'fetchlimit' and 'limit' at the same time (and how)? It would be great.

Thank you for help, I am waiting for further information.

theYinYeti 11-16-2005 10:32 AM

I'm still not home, but it seems you've found it all by yourself :)
But indeed, this fetchmail feature doesn't help if someone sends thousands of mails.

I've got an idea: why not have a cronjob checking the incoming mail spool directory size, and kill the fetchmail process if this size is bigger than some limit? If you want, you could even have this same cronjob restart the fetchmail process when the spool directory size is down to, say, 50% the limit.

Yves.

Ygrex 11-16-2005 10:44 AM

Huh, good idea! But it would be better such script will be invoked by fetchmail itself whenever it retrieves anything or, what is IMHO equal, exim4, when it is asked for to recieve anything. Don't anybody know is this script possible? Where to place it?

But I feel it is impossible...

theYinYeti 11-17-2005 02:48 AM

It is impossible for fetchmail, but maybe not for exim4. I don't know this MTA because I use Postfix at home.

With Postfix, you can choose the delivery program. This is usually some variation around procmail, but the default delivery program could be called from inside a custom wrapper script that does some sanity checks after having performed the delivery itself.
The same is probably possible with exim4 too.

Yves.


All times are GMT -5. The time now is 08:16 AM.