MLUG: [MLUG] clean postfix queue and more
[MLUG] clean postfix queue and more
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hi all

a few weeks ago I asked for (and was told) a method to kill messages 
from the postfix message queue.
I was happy to be at last able to do so. But there is a broader problem 
behind this.
I reject all email from invalid domains (reject_unknown_sender_domain), 
i.e. spamers need to give me a valid address. But there are a lot who 
don’t like bounce messages, so they give a bogus return address. This is 
what causes the mails I want to get rid of.

But to prevent it from happening over and over again, I also like to 
block the originator at all. Problem is, this is a very tedious task.

Another event happened: I wanted to see, what python can do as a scrip 
language, because I don’t like shell (bash) scripts too much.

This now resulted is a python2 script that does the following:

It analyses the output of mailq and find the correct log in maillog. 
Then it lists all the info, prints lines I can include into my firewall 
setup script and prints the remove commands (it can even delete itself)

Is anyone interested in such a script?

Available as always @:
ftp://ftp.receptec.net/download/mailclean.py

Caution:

The script does what it should, but not in a optimal way!

/sven


_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members