Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 59691

Summary: ebuild for postgrey 1.17 (Postgrey - Postfix Greylisting Policy Server)
Product: Gentoo Linux Reporter: steveb <steeeeeveee>
Component: New packagesAssignee: Net-Mail Packages <net-mail+disabled>
Status: RESOLVED FIXED    
Severity: enhancement CC: anders, jaervosz, jmaynard, rockoo
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 90775    
Bug Blocks:    
Attachments: postgrey-1.14.ebuild
postgrey.conf
postgrey.rc
postgrey.conf
postgrey.rc
postgrey-1.14.ebuild
postgrey-1.17-r2.ebuild
postgrey.rc
postgrey.conf
postgrey-1.17-r3.ebuild
postgrey-1.17-r4.ebuild

Description steveb 2004-08-07 06:25:42 UTC
see: http://isg.ee.ethz.ch/tools/postgrey/

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 steveb 2004-08-07 06:27:36 UTC
Created attachment 36947 [details]
postgrey-1.14.ebuild
Comment 2 steveb 2004-08-07 06:28:18 UTC
Created attachment 36948 [details]
postgrey.conf

copy this to files/postgrey.conf
Comment 3 steveb 2004-08-07 06:28:59 UTC
Created attachment 36949 [details]
postgrey.rc

copy into files/postgrey.conf
Comment 4 steveb 2004-08-07 06:32:20 UTC
sorry! have made a typo for one file. anyway... to install do:
mkdir -p /usr/local/portage/mail-filter/postgrey/files
-- copy postgrey-1.14.ebuild to /usr/local/portage/mail-filter/postgrey
-- copy postgrey.conf to /usr/local/portage/mail-filter/postgrey/files
-- copy postgrey.rc to /usr/local/portage/mail-filter/postgrey/files
ebuild /usr/local/portage/mail-filter/postgrey/postgrey-1.14 digest

then enable portage overlay directory and install postgrey ;)

cheers

SteveB
Comment 5 steveb 2004-08-07 07:09:11 UTC
Created attachment 36952 [details]
postgrey.conf

fixed problems with restarting or stoping the /etc/init.d/postgrey script
Comment 6 steveb 2004-08-07 07:09:32 UTC
Created attachment 36953 [details]
postgrey.rc

fixed problems with restarting or stoping the /etc/init.d/postgrey script
Comment 7 steveb 2004-08-07 07:10:38 UTC
Created attachment 36954 [details]
postgrey-1.14.ebuild

removed the automatic creating of postgrey_whitelist_clients.local file
Comment 8 Tuan Van (RETIRED) gentoo-dev 2004-08-09 14:56:16 UTC
SteveB, do you have a good howto for greylisting other than in the package itself? I want to test it first.
Comment 9 Jukka Palko 2004-09-07 10:58:31 UTC
postgrey 1.15 available now at:
http://isg.ee.ethz.ch/tools/postgrey/pub/
Comment 10 Anders Bruun Olsen 2004-09-11 11:03:49 UTC
1.16 is now available.
Comment 11 Michael Glauche (RETIRED) gentoo-dev 2004-09-28 04:57:28 UTC
There is a howto at http://home.coming.dk/amavis.html, which includes postgrey. I'm using it on my main mail server for quite some time now, and it helps to cut the load to SA quite down a bit :)
Comment 12 steveb 2005-02-06 14:16:10 UTC
Created attachment 50561 [details]
postgrey-1.17-r2.ebuild

Well... after long time of no activity on this bug. Here is Postgrey 1.17
Comment 13 steveb 2005-02-06 14:16:52 UTC
Created attachment 50562 [details]
postgrey.rc
Comment 14 steveb 2005-02-06 14:17:15 UTC
Created attachment 50563 [details]
postgrey.conf
Comment 15 steveb 2005-02-06 14:22:53 UTC
Tuan Van (comment 8):
Have a look at http://projects.puremagic.com/greylisting/
Comment 16 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-02-07 10:51:14 UTC
Tuan pointed me to this. Here go some comments and questions:

Dependencies according to postgrey homepage:
Perl (version &#8805; 5.6.0)
Net::Server
IO::Multiplex
BerkeleyDB (Perl module) 
Berkeley DB (Library, version &#8805; 4.1)

Any reason for specific versions in the attached ebuild?

	>=dev-perl/net-server-0.85
	>=dev-perl/IO-Multiplex-1.08
	>=dev-perl/BerkeleyDB-0.25

Any reason for creating /etc/postfix this should be handled by Postfix?

	# postgrey data in /etc/postfix
	dodir /etc/postfix
	keepdir /etc/postfix
	insinto /etc/postfix

Like wise with /etc/conf.d?

	# postgrey config for gentoo
	dodir /etc/conf.d
	keepdir /etc/conf.d
	insinto /etc/conf.d

On the postive side this ebuild seems to be more userfriendly with configuration . I'm a bit short on time now so I have't actually tested it yet but will do so later.
Comment 17 steveb 2005-02-07 12:11:34 UTC
Created attachment 50651 [details]
postgrey-1.17-r3.ebuild

To: Sune Kloppenborg Jeppesen (Comment #16):
I am just to carefull ;) Anyway... I took out the additional creation of
/etc/postfix, /etc/init.d and /etc/conf.d
The versioning of the 3 packages you mentioned are gone as well. And I added
the creation of /etc/postfix/postgrey_whitelist_clients.local (if it does not
exist. Since this is the best place to add your own servers into).

cheers

Steve
Comment 18 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-02-10 14:08:34 UTC
Ok, got a bit more time to check out this one. Comments follow:

SRC_URI also seems to differ from the official download link. Any reason?

enewuser, enewgroup, newins, newexe, dosbin transparently handles error conditions and ${S} always exist. At least many ebuilds use them without catching errors.

I don't think the empty src_compile is needed.

SLOT="0" is missing.

In pkg_postinst do s/durig/during/

Also I think the einfo is too long. I guess users should know how to add postgrey to a run level and perhaps point users to a doc file describing the whitelist syntax.

Still not actively tested though.
Comment 19 steveb 2005-02-11 02:32:00 UTC
Created attachment 50989 [details]
postgrey-1.17-r4.ebuild

SRC_URI is not diffrend then the original download link. I only included a link
to the /tools/postgrey/pub/old directory, because if the ebuild would stay long
in portage and postgrey would get updated then the ebuild could still download
the tar.gz file from the /old directory. That's all.

About the transparent handling of errors: I am just to carefull. That's all.

The empty src_compile: Same as with the transparent error handling.

SLOT: Yes! It is missing. Sorry ;)

About the einfo: I know that it is long. I made it shorter now.


cheers

SteveB
Comment 20 Jay Maynard (RETIRED) gentoo-dev 2005-04-17 16:47:07 UTC
Should be updated to 1.21. 1.18 and below have a DoS vulnerability, documented
in http://lists.ee.ethz.ch/postgrey/msg00627.html and
http://lists.ee.ethz.ch/postgrey/msg00647.html .
Comment 21 Andrej Kacian (RETIRED) gentoo-dev 2005-04-28 14:54:47 UTC
The ebuild looks like it works for 1.21 without changes (I haven't tested functionality of installed postgrey yet).

Some questions though - why do you handle whitelist files installing so awkwardly?

Also, where are whitelist .local files coming from? Your ebuild tries to install them from portage's temp. directory for postgrey ($T), but how do they get there?
Comment 22 Andrej Kacian (RETIRED) gentoo-dev 2005-04-28 15:10:31 UTC
Ok, it seems to work, but there's a missing runtime dep - dev-perl/Net-DNS. postgreyreport needs it.
Comment 23 Andrej Kacian (RETIRED) gentoo-dev 2005-04-29 01:42:22 UTC
Ok, postgrey-1.21 ebuild is in portage, based on latest attachment here, with some modifications.

Thanks a lot.
Comment 24 steveb 2005-04-29 02:06:42 UTC
Thank you Andrej!

If you have some time, then please have a look at SQLgrey ( http://bugs.gentoo.org/show_bug.cgi?id=71535 ). It is another Greylisting service, but it uses SQL to store the data.

I would be very happy if you could have a look at it and if you could push that one to portage CVS as well.

Kind Regards

SteveB