Fwd: postfix-gld: mxgrey not working?

2012-06-20 Thread Loïc
Hi list,

Sorry again for being out-of-subject. Since I posted to this ML in last
resort (as GLD seems to be mainly related to Postfix), I thought that a
few readers using it but not having the clues to answer my question
(since I got no answer) could still be interested.
Other users, feel free to skip my prose and sorry for the pollution :)

AFAIK, it seems that the MXGREY feature of GLD is definitely broken, at
least for my (Debian stable) package. I personaly take it for granted
that it is also broken in the seed release. So you may want to switch to
other greylisting implementations. Most of them, unfortunately, are not
based on C, so they all seem to be a bit slower when it comes to speak
to the underlying DB. But... You may end up with a much smaller
greylisting DB (as my own tests show it so far).
I found sqlgrey to be very satisfying for me (but that is just my
personal experience) : A bit slower to update the DB, but with far less
rows being created. Of course you still have a lot of solutions to
choose from.

Hope this helps.


 Message original 
Sujet:  postfix-gld: mxgrey not working?
Date :  Thu, 31 May 2012 23:00:31 +0200
De :Loïc post...@friendchip.fr
Pour :  postfix-users@postfix.org



Hi Postfix users,

I have to apology: This is not a Postfix problem. But since there seem 
to be not mailing list for GLD, I was thinking that maybe some of you 
may be using postfix-gld and have some clue for me.
BTW, if you know of a mailing list that would be more appropriate for 
this question, let me know :)
I emailed GLD's author, but he didn't reply.

So... I'm using GLD for greylisting and just noticed today that MXGREY 
doesn't seem to work at all with my setup.

My OS is 32bit Debian Squeeze, and I'm using GLD 1.7 (1.7-3 for Debian).

In /etc/gld.conf, I have set: MXGREY=10
In my greylist table, I have this record, among others:

IP sender recipient first last n
74.125.83.0 loicsnip@snip.com l...@somedomain1.tld 1338411795 
1338412124 11

Now I try to send an email from my company email to one of my other pvt
email address.
Here's what GLD says when started in debug mode:
___
5190: New incoming connexion from localhost (127.0.0.1)
5190: Got the following valid data req=(smtpd_access_policy)
sender=(loicsnip@snip.com) recipient=(l...@somedomain2.tld)
ip=(74.125.83.54)
5190: Starting the greylist algo
5190: lightgrey is on, let's remove the last octet of ip
5190: Query=(select first from greylist where ip='74.125.83.0' and
sender='loicsnip@snip.com' and recipient='l...@somedomain2.tld') 
result=0
5190: whitelist is on
5190: Query=(select count(mail) from whitelist where mail in
('loicsnip@snip.com','@snip.com','74.125.83.54','74.125.83'))
result=0
5190: Query=(insert into greylist
values('74.125.83.0','loicsnip@snip.com','l...@somedomain2.tld',1338412124,1338412124,1))
5190: Mxgrey Query=(select count(first) from greylist where
ip='74.125.83.0' and n1) result=3 (minimum needed is 10)
5190: End of the greylist algo
5190: Decision is to greylist
___
Well, I really don't get why email to this new address is greylisted,
since it is sent by 74.125.83.54, which should match 74.125.83.0
(because of lightgrey) for which n  10.

Am I missing something?
Is my GLD binary broken?

Help will be warmly welcomed :)

Cheers






postfix-gld: mxgrey not working?

2012-05-31 Thread Loïc

Hi Postfix users,

I have to apology: This is not a Postfix problem. But since there seem 
to be not mailing list for GLD, I was thinking that maybe some of you 
may be using postfix-gld and have some clue for me.
BTW, if you know of a mailing list that would be more appropriate for 
this question, let me know :)

I emailed GLD's author, but he didn't reply.

So... I'm using GLD for greylisting and just noticed today that MXGREY 
doesn't seem to work at all with my setup.


My OS is 32bit Debian Squeeze, and I'm using GLD 1.7 (1.7-3 for Debian).

In /etc/gld.conf, I have set: MXGREY=10
In my greylist table, I have this record, among others:

IP sender recipient first last n
74.125.83.0 loicsnip@snip.com l...@somedomain1.tld 1338411795 
1338412124 11


Now I try to send an email from my company email to one of my other pvt
email address.
Here's what GLD says when started in debug mode:
___
5190: New incoming connexion from localhost (127.0.0.1)
5190: Got the following valid data req=(smtpd_access_policy)
sender=(loicsnip@snip.com) recipient=(l...@somedomain2.tld)
ip=(74.125.83.54)
5190: Starting the greylist algo
5190: lightgrey is on, let's remove the last octet of ip
5190: Query=(select first from greylist where ip='74.125.83.0' and
sender='loicsnip@snip.com' and recipient='l...@somedomain2.tld') 
result=0

5190: whitelist is on
5190: Query=(select count(mail) from whitelist where mail in
('loicsnip@snip.com','@snip.com','74.125.83.54','74.125.83'))
result=0
5190: Query=(insert into greylist
values('74.125.83.0','loicsnip@snip.com','l...@somedomain2.tld',1338412124,1338412124,1))
5190: Mxgrey Query=(select count(first) from greylist where
ip='74.125.83.0' and n1) result=3 (minimum needed is 10)
5190: End of the greylist algo
5190: Decision is to greylist
___
Well, I really don't get why email to this new address is greylisted,
since it is sent by 74.125.83.54, which should match 74.125.83.0
(because of lightgrey) for which n  10.

Am I missing something?
Is my GLD binary broken?

Help will be warmly welcomed :)

Cheers


Re: conditional body_checks

2012-05-29 Thread Loïc
Hello,

Thank you for your response.
Indeed, in my case it's not a good idea to go through a header_checks.
I resolved my problem using maildrop.

Loïc


On Thu, May 24, 2012 at 4:22 AM, Bill Cole
postfixlists-070...@billmail.scconsult.com wrote:
 On 23 May 2012, at 7:59, Loïc Latreille wrote:

 Hello,

 I would check if a string is present in the message body only if the
 To field is equal to j...@example.org.


 Read the man page for header_checks. Note the first bullet point in the
 BUGS section.

 Alternatively, read $readme_directory/BUILTIN_FILTER_README, particularly
 the section on limitations.



 I tried to use IF...ENDIF but it doesn't work because the pattern
 between IF and ENDIF doesn't match the same input string that the IF
 pattern.

 A part of the body :
 ...
 To: JDOE j...@example.org
 From: t...@otherexample.org t...@otherexample.org
 X-Email-Type-Id: TT123MM
 ...

 My pcre table for the body_checks :
 IF /To: JDOE jdoe@example\.org/
 /X-Email-Type-Id: TT123MM/ REDIRECT m...@example.org
 ENDIF

 I need some help to run my filter, I can not seem to find a solution
 to this problem :(



 The solutions you could use do not include the built-in body_checks and
 header_checks features of Postfix, but rather to use one of the available
 interfaces to external filters.


conditional body_checks

2012-05-23 Thread Loïc Latreille
Hello,

I would check if a string is present in the message body only if the
To field is equal to j...@example.org.
I tried to use IF...ENDIF but it doesn't work because the pattern
between IF and ENDIF doesn't match the same input string that the IF
pattern.

A part of the body :
...
To: JDOE j...@example.org
From: t...@otherexample.org t...@otherexample.org
X-Email-Type-Id: TT123MM
...

My pcre table for the body_checks :
IF /To: JDOE jdoe@example\.org/
/X-Email-Type-Id: TT123MM/ REDIRECT m...@example.org
ENDIF

I need some help to run my filter, I can not seem to find a solution
to this problem :(

Thanks in advance.


Loïc