pattern matching trouble

I am having trouble using the pattern matching rules to white-list entire domains. I have added:
^r=.*@domain\.com.+$
to my mysql table; I am not getting any errors but the messages are still greylisted.

Config:
mode=normal
dbtype=mysql
#dbtype=pgsql
db_host=XXX
db_username=XXX
db_password=XXX
db_dbname=XXX
#set the timeout between wait and ok in seconds
timeout=3000
#timeout=3600
#timeout=60
wl_network=dbcached
wl_recipient=dbcached
wl_pattern=dbcached

Is my expression correct? Am I missing something else?

Thanks...
Mitch

Forums: 

Hi Mitch

I think it's a tiny mistake in the regex. Instead of
^r=.*@domain\.com.+$

use something like this:

> insert into pattern values(".+^r=.*@someorg\.org.+$","someorg want all spam" ) ;

I am not a regex pro but from my testing it seems that since the recipient is in the second line of what gps matches againt you have to put .+ in front of everything but the sender match. I think

.+^r=.*@domain\.com.+$

should work for you.

I changed the expression to read:
.+^r=.*@domain\.com.+$
and it's still not matching the pattern. Still no errors. I just upgraded to 1.004 from .92 and both versions are behaving the same.

Mitch

Hi!

I also have this problem.

Running on a FreeBSD 6.2, compiled from ports. Everything else works well. Anybody else that experience this problem ??

Running the following config:

#mode=init
mode=reverse
#mode=weak
#mode=normal
dbtype=mysql
#dbtype=pgsql
db_host=xxxxxxxxxxxxx
db_username=greylist
db_password=zzzzzzzzz
db_dbname=greylist
#set the timeout between wait and ok in seconds
#timeout=3600
timeout=900
wl_pattern=dbcached
wl_network=dbcached
wl_recipient=db

I have this

.+^r=.*@domain.org

and it works according to the logs.

Do you get a log entry saying New, Wait, Ok etc?

H!

I get a "new" post in the maillog on the server yes, and the triplet from the server is inserted into the triplet table, and the message is rejected with the standard 450 message.

I have tried the following combinations without luck
.+^r=.*@domain\.com.+$
.+^r=.*@domain\.com
.+^r=.*@domain.com.+$
.+^r=.*@domain.com

We also have a couple of network tables whitelisted, and from these we get lines staring with wl network: that shows that these work. The same with recipients witch we get wl recipient: lines in the log. Messages that get these entries gets inserted directly into the postfix queue, and is processed without delay.

Could this be related to the caching of the tables, or is there anything else i have missed ??

Hi

can you post a mysql dump - something like SELECT * FROM pattern WHERE pattern LIKE '%domain%';

Hi!

This is the dump of two of our records.

.+^r=.*@biolifenaturals.com.+$ Whitelist for biolifenaturals.com
.+^r=.*@viking-shipping.no Whitelist for Viking-shipping.no

This is want I get in response from the server:

220 virus-wall1 ESMTP Postfix
helo mail
250 virus-wall1
mail from:test@test.com
250 2.1.0 Ok
rcpt to:test1@viking-shipping.no
450 4.7.1 : Recipient address rejected: Service is unavailable
rcpt to:test1@biolifenaturals.com
450 4.7.1 : Recipient address rejected: Service is unavailable

Both of the entries are written to the triplet table.

My gps.conf file are as follows:
#mode=init
mode=reverse
#mode=weak
#mode=normal
dbtype=mysql
#dbtype=pgsql
db_host=localhost
db_username=greylist
db_password=xxxxxxxxxxxx
db_dbname=greylist
#set the timeout between wait and ok in seconds
#timeout=3600
timeout=900
wl_pattern=dbcached
#cached
wl_network=dbcached
wl_recipient=db

Any help would be appreciated.

Hi
For example if you want trust all Gmail sender you can try

^s=.*\@gmail\.com

I find the document is some wrong.