Current time: 12-22-2024, 10:51 PM Hello There, Guest! (LoginRegister)


Post Reply 
Postgrey questions
Author Message
robbo007 Offline
Junior Member
*

Posts: 136
Joined: Apr 2009
Reputation: 0
Post: #1
Postgrey questions
Hello,
I'm using the default config for postgrey and ISPCP. Some clients are complaining certain emails getting blocked.

1. Is there a way to create a whitelist for domains? If so what file do I need to edit?

2. Is there a way to pass all email and mark it with SPAM in the subject?

Thanks,
Rob
01-12-2012 10:30 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: Postgrey questions
1) man postgrey:
Quote:Note that the --whitelist-x options can be specified multiple times, and that per default /etc/postgrey/whitelist_clients.local and /etc/postgrey/whitelist_recipients.local are also read, so that you can put there local entries.

2) why do you want to mark *all* e-mails with "SPAM" in the subject??? I would not want to be a customer of your hosting...

Remember: postgrey is only a greylisting service (which slows down the mail transfer in the beginning - after a few weeks/months it will be ok (when postgrey knows the normal mail partner of the customers). It keeps away the mails which are not send twice (-> normally spam).

/J
01-13-2012 10:01 AM
Visit this user's website Find all posts by this user Quote this message in a reply
robbo007 Offline
Junior Member
*

Posts: 136
Joined: Apr 2009
Reputation: 0
Post: #3
RE: Postgrey questions
Thanks for the reply.

I've been reading a little more as I was no up to date. What I'm finding is some emails are getting "delayed" but the client does not receive them. Its been a couple of weeks are nothing. I see the logs and its getting postgreyed.

Jan 23 09:22:27 sosaria postgrey[2269]: action=greylist, reason=new, client_name=x.x.x.x, client_address=87.x.x.x, sender=x@sender.com, recipient=myclient@theirdomain.com

Is there anywhere I can have this sending domain bypass the postgrey checks? Whitelist or something? Seems their server is not configured correctly and all email gets really delayed.

(01-13-2012 10:01 AM)joximu Wrote:  1) man postgrey:
Quote:Note that the --whitelist-x options can be specified multiple times, and that per default /etc/postgrey/whitelist_clients.local and /etc/postgrey/whitelist_recipients.local are also read, so that you can put there local entries.

2) why do you want to mark *all* e-mails with "SPAM" in the subject??? I would not want to be a customer of your hosting...

Remember: postgrey is only a greylisting service (which slows down the mail transfer in the beginning - after a few weeks/months it will be ok (when postgrey knows the normal mail partner of the customers). It keeps away the mails which are not send twice (-> normally spam).

/J
01-23-2012 07:47 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: Postgrey questions
man postgrey
/etc/postgrey/whitelist_clients.local
01-23-2012 08:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
robbo007 Offline
Junior Member
*

Posts: 136
Joined: Apr 2009
Reputation: 0
Post: #5
RE: Postgrey questions
ok thanks found that in-between posts Smile

I've added the the entries and testing it.
I'm still getting a "Recipient address rejected: Greylisted." error and the emails are rejected.

The address being rejected:

Jan 23 12:22:41 sosaria postgrey[26376]: action=greylist, reason=new, client_name=20.mo3.mail-out.ovh.net, client_address=178.33.47.94, sender=sender@domain.com, recipient=myclient@domain.com
Jan 23 12:22:41 sosaria postfix/smtpd[11006]: NOQUEUE: reject: RCPT from 20.mo3.mail-out.ovh.net[178.33.47.94]: 450 4.2.0 <myclient@domain.com>: Recipient address rejected: Greylisted, see http://postgrey.schweikert.ch/help/myclient.com.html; from=<sender@domain.com> to=<myclient@domain.com> proto=ESMTP helo=<mo3.mail-out.ovh.net>

I have in my /etc/postgrey/whitelist_clients file the follow entry for that sender domain:

/^.*-out-.*\.ovh\.net$/
mx3.ovh.net
mx4.ovh.net
mxb.ovh.net

Any ideas? Is my whitelist entry correct?

Thanks,
Rob
(This post was last modified: 01-23-2012 10:07 PM by robbo007.)
01-23-2012 09:09 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #6
RE: Postgrey questions
Hi

hm, 20.mo3.mail-out.ovh.net is not within /^.*-out-.*\.ovh\.net$/ - the - after out is to much....

I think the problem is not a missconfigured send server (seems to be a postfix) but maybe changing sending hostnames for the same mail... Postgrey should recognize sending servers if they are in the same /28 subnet - but it seems that ovh has many such servers spread over all their networks...

If it's always the same recipient and this recipient doesn't wish greylisting at all - then you can use the other white list... (see man postgrey).

/J
01-23-2012 10:24 PM
Visit this user's website Find all posts by this user Quote this message in a reply
robbo007 Offline
Junior Member
*

Posts: 136
Joined: Apr 2009
Reputation: 0
Post: #7
RE: Postgrey questions
ok. Can you confirm that the correct whitelist file is:

/etc/postgrey/whitelist_clients

And the syntax should cover their domain range?

*.mo*.mail-out.ovh.net

The rest I will research to see if postfix is doing anything else.

Thanks,
Rob
01-23-2012 10:41 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #8
RE: Postgrey questions
Hi Rob

the correct path/filename for your postgrey should be ststed in "man postgrey" - in Debian th path is either /etc/postgrey/whitelist_clients or /etc/postgrey/whitelist_clients.local (the first one alredy has some entries... - the second one is for your own entries (update safe).
In other distros it may be different...

The regexp may look like this?
/^\d+\.mo\d+\.mail-out\.ovh\.net$/

\d+ -> 1 or more integer number.

you agree?

/Joxi
01-23-2012 11:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
robbo007 Offline
Junior Member
*

Posts: 136
Joined: Apr 2009
Reputation: 0
Post: #9
RE: Postgrey questions
Ok thanks. I run Debian Lenny. I've just created the /etc/postgrey/whitelist_clients.local as it did not exist. I've used your syntax which looks correct. Fingers crossed its not rejected now. I need to test it further.
Much appreciated,
Rob
Think I got it working:

As I did a few things I'm not really sure which one it was. I changed the following:

1. Copied the /etc/postgrey/whitelist_clients and /etc/postgrey/whitelist_clients.local to /etc/postfix/whitelist_clients /etc/postfix/whitelist_clients.local

2. Added the email address of the client who was having problems to the /etc/postgrey/whitelist_recipients file

3. Added in /etc/defaults/postgrey the --delay=300 --auto-whitelist-clients" to the POSTGREY_OPTS="--inet=127.0.0.1:60000 entry

I'll keep watching my log files to see if the other domains are all looking good.

thanks,
Rob
(This post was last modified: 01-24-2012 12:00 AM by robbo007.)
01-23-2012 11:27 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)