6 messages in net.sourceforge.lists.courier-usersRe: [courier-users] BLOCK2 from withi...
FromSent OnAttachments
Arturo 'Buanzo' BusleimanFeb 26, 2007 4:41 am 
Jay LeeFeb 26, 2007 5:12 am 
Arturo 'Buanzo' BusleimanFeb 26, 2007 5:20 am 
Gordon MessmerFeb 26, 2007 8:46 am 
Arturo 'Buanzo' BusleimanFeb 26, 2007 9:44 am 
Sam VarshavchikFeb 26, 2007 3:13 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] BLOCK2 from within pythonfilterActions...
From:Gordon Messmer (yiny@eburg.com)
Date:Feb 26, 2007 8:46:51 am
List:net.sourceforge.lists.courier-users

Arturo 'Buanzo' Busleiman wrote:

Why? because I'm writing a pythonfilter. The problem is that neither using os.getenv or os.environ the BLOCK2 env var (which i know should be set, because dnsbl.sorbs.net IS blocking my IP).

Well... the machine doesn't look up its own IP in the DNSBL, so you wouldn't expect to see BLOCK2 set when you are, yourself, listed.

Probably the env var is not available to courierfilters, or pythonfilter is not forwarding it to my environment, I don't know,

That's correct. Courierfilters can not read or modify the environment of the SMTP process, since they aren't children. couriertcpd looks up the connecting IP address in DNS lists given on its command line, then executes courieresmtpd, which then executes submit. Submit connects to the filters via unix sockets.

but the Courier docs for esmtpd.BLACKLIST state that:

# The BLOCK environment variable is automatically enforced by submit. # Nobody really does anything about BLOCK2, this is mainly for use by # plug-in mail filters. If you want Courier to unilaterally block # mail from IP addresses listed on the RBL and RSS, and you have a separate # filter that keys off BLOCK2, uncomment the following.

I'm not as familiar with maildrop's embedded mode, but I believe that is what is referred to in that paragraph.

Sam, do you think you could reword that bit of documentation to be more explicit about which filtering method you mean?