Bug 157052

Summary: New port: mail/greyfix Lightweight greylistinig daemon for Postfix
Product: Ports & Packages Reporter: Keith Gaughan <k>
Component: Individual Port(s)Assignee: Sahil Tandon <sahil>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Keith Gaughan 2011-05-15 05:10:07 UTC
Greyfix is the greylisting policy daemon for Postfix, and uses Postfix's policy
mechanism to enable greylisting with Postfix.

Fix: ---- Start of greyfix.shar ----


---- End of greyfix.shar ------87KPsI3iTRvoPGkHvHN05kb2BRup0v9sHGLnLW6q8Em7Lnij
Content-Type: text/plain; name="file.shar"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.shar"

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	greyfix/
#	greyfix/Makefile
#	greyfix/pkg-descr
#	greyfix/distinfo
#	greyfix/pkg-message
#
echo c - greyfix/
mkdir -p greyfix/ > /dev/null 2>&1
echo x - greyfix/Makefile
sed 's/^X//' >greyfix/Makefile << 'fb30b0644405cabe75790ad93ae12067'
X# New ports collection makefile for: greyfix
X# Date created:        2011-05-14
X# Whom:                Keith Gaughan <k@stereochro.me>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	greyfix
XPORTVERSION=	0.3.9
XCATEGORIES=	mail
XMASTER_SITES=	http://www.kim-minh.com/pub/greyfix/
X
XMAINTAINER=	k@stereochro.me
XCOMMENT=	A greylisting policy daemon for Postfix
X
XRUN_DEPENDS=	postfix:${PORTSDIR}/mail/postfix
X
XUSE_BDB=	yes
XGNU_CONFIGURE=	yes
XCONFIGURE_ARGS=	--with-berkeleydb-libdir=${BDB_LIB_DIR} \
X		--with-berkeleydb-includedir=${BDB_INCLUDE_DIR} \
X		--localstatedir=/var
X
XPLIST_FILES=	sbin/greyfix
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's/-ldb/-l${BDB_LIB_NAME}/g' ${WRKSRC}/configure
X	@${REINPLACE_CMD} -e 's|datastatedir = \$$(localstatedir)/lib|datastatedir = $$(localstatedir)/db|g' ${WRKSRC}/Makefile.in
X
Xdo-install:
X	@${INSTALL_PROGRAM} ${WRKSRC}/greyfix ${PREFIX}/sbin
X	@${INSTALL} -d -onobody -m700 /var/db/greyfix
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
fb30b0644405cabe75790ad93ae12067
echo x - greyfix/pkg-descr
sed 's/^X//' >greyfix/pkg-descr << 'e92dde751ff6cc3610cb3d545b9fa46d'
XGreyfix is the greylisting policy daemon for Postfix written by Kim Minh
XKaplan. Greyfix uses Postfix policy mechanism to enable greylisting with
XPostfix.
X
XWWW: http://www.kim-minh.com/pub/greyfix/
e92dde751ff6cc3610cb3d545b9fa46d
echo x - greyfix/distinfo
sed 's/^X//' >greyfix/distinfo << '83acf6fa36202283a32340f28e0c1f36'
XSHA256 (greyfix-0.3.9.tar.gz) = dee4428aef9b248b68799a640a85b44ffee0e9a3b2d2f16eed1bb41edad5f204
XSIZE (greyfix-0.3.9.tar.gz) = 79883
83acf6fa36202283a32340f28e0c1f36
echo x - greyfix/pkg-message
sed 's/^X//' >greyfix/pkg-message << '068f2620ac6420192ff63224221a31aa'
XEdit Postfix's master configuration file, master.cf, and add the following:
X
X    greyfix    unix  -       n       n       -       -       spawn
X      user=nobody argv=/usr/local/sbin/greyfix -/ 24
X
X(The -/ argument specifies how much of the IP address to consider significant,
Xin this case the first 24 bits.)
X
XEdit Postfix's main configuration file, main.cf and add the following:
X
X    smtpd_recipient_restrictions = permit_mynetworks,
X      reject_unauth_destination,
X      check_policy_service unix:private/greyfix
X
XIf there is already a smtpd_recipient_restrictions configuration line you
Xshould edit it rather than add a new one. The important part for Greyfix is
Xthat you should add check_policy_service unix:private/greyfix to it.
X
XFinally have postfix reload its configuration with:
X
X    /usr/local/rc.d/postfix reload
068f2620ac6420192ff63224221a31aa
exit
Comment 1 Sahil Tandon freebsd_committer freebsd_triage 2011-05-16 02:06:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sahil

Take.
Comment 2 Sahil Tandon freebsd_committer freebsd_triage 2011-05-18 02:52:17 UTC
State Changed
From-To: open->feedback

Are you OK with my revisions to your shar? 
http://people.freebsd.org/~sahil/shars/greyfix.shar
Comment 3 Keith Gaughan 2011-05-18 16:24:32 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18/05/11 02:52, sahil@FreeBSD.org wrote:

> Synopsis: New port: mail/greyfix Lightweight greylistinig daemon for Postfix
>
> State-Changed-From-To: open->feedback
> State-Changed-By: sahil
> State-Changed-When: Wed May 18 01:52:17 UTC 2011
> State-Changed-Why:
> Are you OK with my revisions to your shar?
> http://people.freebsd.org/~sahil/shars/greyfix.shar
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=157052

Not 100%. Most of the changes are fine and I've no argument with them
as their either cosmetic or are things I ought to have done but forgot
to do. However, there's one issue I have involving the introduction of
the pkg-plist file: it contains a redundant line to create the
/var/db/greyfix directory, which is something that the 'do-install'
rule is already doing. My preference would be to delete the redundant
line from pkg-plist, but I'll leave that decision up to you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3T5K0ACgkQaC1DzM+fZHNDyACgkVvWG2kfWDChcuQOS3yhM8er
QuEAn17ppIVD9/cz/NUhl0l2SYTwcBOt
=d1oS
-----END PGP SIGNATURE-----
Comment 4 Sahil Tandon freebsd_committer freebsd_triage 2011-05-19 00:57:26 UTC
On Wed, 2011-05-18 at 15:50:12 +0000, C=EDat =D3 G=E1ibhtheach=E1in wrote=
:

> Most of the changes are fine and I've no argument with them as their
> either cosmetic or are things I ought to have done but forgot to do.

What you consider cosmetic I think of as style, and I believe it is
important to get right when new ports go into the tree.  However, this
is *your* port, so if you have any objections, please raise them.

> However, there's one issue I have involving the introduction of the
> pkg-plist file: it contains a redundant line to create the
> /var/db/greyfix directory, which is something that the 'do-install'
> rule is already doing. My preference would be to delete the redundant
> line from pkg-plist, but I'll leave that decision up to you.

In the Porter's Handbook, see section 7.2.2 to understand proper
protocol when creating empty directories.  If you're OK after reading
that part of the PH, let me know and I will commit.

--=20
Sahil Tandon <sahil@FreeBSD.org>
Comment 5 Keith Gaughan 2011-05-19 01:36:27 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19/05/11 00:57, Sahil Tandon wrote:

> On Wed, 2011-05-18 at 15:50:12 +0000, Cíat Ó Gáibhtheacháin wrote:
> 
>> Most of the changes are fine and I've no argument with them as their
>> either cosmetic or are things I ought to have done but forgot to do.
> 
> What you consider cosmetic I think of as style, and I believe it is
> important to get right when new ports go into the tree.

Style *is* a cosmetic issue. An important cosmetic issue, but still a
cosmetic issue. If it seemed that I was being dismissive of the changes,
I wasn't. I was simply stating that I was fine with the stylistic
changes made.

> However, this
> is *your* port, so if you have any objections, please raise them.

As I said, I've absolutely none.

>> However, there's one issue I have involving the introduction of the
>> pkg-plist file: it contains a redundant line to create the
>> /var/db/greyfix directory, which is something that the 'do-install'
>> rule is already doing. My preference would be to delete the redundant
>> line from pkg-plist, but I'll leave that decision up to you.
> 
> In the Porter's Handbook, see section 7.2.2 to understand proper
> protocol when creating empty directories.

I'd read the porter's handbook, but missed that. That's fine by me, as
I said, but my main concern was the presence of the redundant directory
creation lines.

> If you're OK after reading
> that part of the PH, let me know and I will commit.

Commit away, but please remove the redundant directory creation line
from the 'do-install' rule first. That is and was my only real concern.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAk3UZgcACgkQaC1DzM+fZHP4KgCYiiAs4mOEAdYSWVr2dnoPUKVP
wwCeNpVNNd6wIpYOPXH4FXR/FEbzGQM=
=G4tF
-----END PGP SIGNATURE-----
Comment 6 Sahil Tandon freebsd_committer freebsd_triage 2011-05-19 02:35:37 UTC
On Thu, 2011-05-19 at 01:36:27 +0100, C=EDat =D3 G=E1ibhtheach=E1in wrote=
:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>=20
> On 19/05/11 00:57, Sahil Tandon wrote:
>=20
> > On Wed, 2011-05-18 at 15:50:12 +0000, C=EDat =D3 G=E1ibhtheach=E1in w=
rote:
> >=20
> >> Most of the changes are fine and I've no argument with them as their
> >> either cosmetic or are things I ought to have done but forgot to do.
> >=20
> > What you consider cosmetic I think of as style, and I believe it is
> > important to get right when new ports go into the tree.
>=20
> Style *is* a cosmetic issue. An important cosmetic issue, but still a
> cosmetic issue. If it seemed that I was being dismissive of the changes=
,
> I wasn't. I was simply stating that I was fine with the stylistic
> changes made.

Ok, it seems we're on the same page.

> >> However, there's one issue I have involving the introduction of the
> >> pkg-plist file: it contains a redundant line to create the
> >> /var/db/greyfix directory, which is something that the 'do-install'
> >> rule is already doing. My preference would be to delete the redundan=
t
> >> line from pkg-plist, but I'll leave that decision up to you.
> >=20
> > In the Porter's Handbook, see section 7.2.2 to understand proper
> > protocol when creating empty directories.
>=20
> I'd read the porter's handbook, but missed that. That's fine by me, as
> I said, but my main concern was the presence of the redundant directory
> creation lines.

The lines are not redundant; more on this below.

> > If you're OK after reading that part of the PH, let me know and I
> > will commit.
>=20
> Commit away, but please remove the redundant directory creation line
> from the 'do-install' rule first. That is and was my only real
> concern.

Your concern is misplaced.  If you do not create '/var/db/greyfix'
during do-install:, but leave the @exec line in pkg-plist, then that
empty directory is ONLY created when the PACKAGE is installed.  That
directory is NOT created if the port is installed via 'make install'.

--=20
Sahil Tandon <sahil@FreeBSD.org>
Comment 7 Keith Gaughan 2011-05-19 23:44:30 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19/05/11 02:35, Sahil Tandon wrote:

> On Thu, 2011-05-19 at 01:36:27 +0100, Cíat Ó Gáibhtheacháin wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 19/05/11 00:57, Sahil Tandon wrote:
>>
>>> On Wed, 2011-05-18 at 15:50:12 +0000, Cíat Ó Gáibhtheacháin wrote:
>>>
>>>> Most of the changes are fine and I've no argument with them as their
>>>> either cosmetic or are things I ought to have done but forgot to do.
>>>
>>> What you consider cosmetic I think of as style, and I believe it is
>>> important to get right when new ports go into the tree.
>>
>> Style *is* a cosmetic issue. An important cosmetic issue, but still a
>> cosmetic issue. If it seemed that I was being dismissive of the changes,
>> I wasn't. I was simply stating that I was fine with the stylistic
>> changes made.
> 
> Ok, it seems we're on the same page.

Definitely! I'm usually the person attempting to enforce style and the
like, so I definitely don't mind having issues like this pointed out.

>>> If you're OK after reading that part of the PH, let me know and I
>>> will commit.
>>
>> Commit away, but please remove the redundant directory creation line
>> from the 'do-install' rule first. That is and was my only real
>> concern.
> 
> Your concern is misplaced.  If you do not create '/var/db/greyfix'
> during do-install:, but leave the @exec line in pkg-plist, then that
> empty directory is ONLY created when the PACKAGE is installed.  That
> directory is NOT created if the port is installed via 'make install'.

Ok, I haven't checked myself, and the closest I remember to that being
mentioned in the porter's handbook was S7.3, but I'll take your word on
that; after all, you've more experience with this than I! I'll take a
read through the commentary in the 'Mk' directory to see what I missed.

As I said before, I'm happy to have it committed.

K.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3VnUsACgkQaC1DzM+fZHNjyQCgkHYFeKDgbr0NVk2NWROXKv6s
+B8An2QuD6MhX1TzQ1NNywoy/okgI68q
=FEoH
-----END PGP SIGNATURE-----
Comment 8 dfilter service freebsd_committer freebsd_triage 2011-05-21 04:02:10 UTC
sahil       2011-05-21 03:01:54 UTC

  FreeBSD ports repository

  Modified files:
    mail                 Makefile 
  Added files:
    mail/greyfix         Makefile distinfo pkg-descr pkg-plist 
    mail/greyfix/files   pkg-message.in 
  Log:
  Greyfix is the greylisting policy daemon for Postfix written by Kim Minh
  Kaplan. Greyfix uses Postfix policy mechanism to enable greylisting with
  Postfix.
  
  WWW: http://www.kim-minh.com/pub/greyfix/
  
  PR:             ports/157052
  Submitted by:   Keith Gaughan <k@stereochro.me>
  
  Revision  Changes    Path
  1.1069    +1 -0      ports/mail/Makefile
  1.1       +35 -0     ports/mail/greyfix/Makefile (new)
  1.1       +2 -0      ports/mail/greyfix/distinfo (new)
  1.1       +21 -0     ports/mail/greyfix/files/pkg-message.in (new)
  1.1       +5 -0      ports/mail/greyfix/pkg-descr (new)
  1.1       +4 -0      ports/mail/greyfix/pkg-plist (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Sahil Tandon freebsd_committer freebsd_triage 2011-05-21 04:03:19 UTC
State Changed
From-To: feedback->closed

New port added, with minor changes. Thanks!