OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
How to greylist a recipient ?

From: Alexander Grüner (agruenergmx.de)
Date: Wed Jun 14 2006 - 04:15:10 CDT


Hi :-)

I am running postfix with postgrey.

postfix-2.1.5-3.4 on SuSE Linux and latest postgrey version.

main.cf:
....
greylist = check_policy_service inet:127.0.0.1:10023
....
smtpd_client_restrictions =
         check_client_access hash:/etc/postfix/blocked_ip,
         check_client_access regexp:/etc/postfix/blocked_dialin,
         check_client_access pcre:/etc/postfix/sender_access.pcre
....

Everything works fine so far.

Now I want to greylist ALL mails to certain users. In my company I
cannot greylist all mails.

All mails to user123domain.de should be greylistet but not to all users
. Hope you understand what I mean ;-)

Any ideas ? Perhaps it is obvious but I have not found it yet.

Thanks in advance.

Regards,
Alexander Grüner
Munich, Germany

PS:

The sender_access.pcre looks like this:

/^([0-9]{1,3}-){4}$/ greylist
/^([0-9]{1,3}\.){4}$/ greylist

# everything with 4 or more dots/hyphens in the hostname
/(\-.+){4}$/ greylist
/(\..+){4}$/ greylist

# stolen from http://sqlgrey.bouton.name/dyn_fqdn.regexp
/(^|[0-9.x_-])(abo|br(e|oa)dband|cabel|(hk)?cablep?|catv|cbl|cidr|d?client2?|cust(omer)?s?|dhcp|dial?(in|up)?|d[iu]p|[asx]?dsld?|dyn(a(dsl|mic)?)?|home|in-addr|modem(cable)?|(di)?pool|ppp|ptr|rev|static|user|YahooBB[0-9]{12}|c[[:alnum:]]{6,}(\.[a-z]{3})?\.virtua|[1-9]Cust[0-9]+|AC[A-Z][0-9A-F]{5}\.ipt|pcp[0-9]{6,}pcs|S0106[[:alnum:]]{12,}\.[a-z]{2})[0-9.x_-]/
greylist

# Domains where we do not expect much mail from
/\.ne\.jp$/ greylist
/\.com\.br$/ greylist
/\.com\.tw$/ greylist
/\.ru$/ greylist
/\.net\.ar$/ greylist
/\.com\.ar$/ greylist
/\.net\.au$/ greylist
/\.com\.au$/ greylist
/\.com\.co$/ greylist
/\.com\.sg$/ greylist
/\.com\.py$/ greylist
/\.com\.ec$/ greylist
/\.com\.mx$/ greylist
/\.com\.cy$/ greylist
/\.or\.jp$/ greylist
/\.ac\.jp$/ greylist
/\.co\.za$/ greylist
/\.net\.do$/ greylist
/\.hk$/ greylist
/\.fm$/ greylist
/\.edu$/ greylist
/\.dk$/ greylist
/\.ua$/ greylist
/\.cn$/ greylist
/\.us$/ greylist
/\.cc$/ greylist
/\.biz$/ greylist
/\.ro$/ greylist

/unknown/ greylist

# Some banks with phishing
/postbank\.de$/ greylist
/sparkasse\.de$/ greylist
/apobank\.de$/ greylist
/paypal\.com$/ greylist