# 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-plist # greyfix/files # greyfix/files/pkg-message.in # 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 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 XSUB_FILES= pkg-message 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 Xpost-patch: X @${REINPLACE_CMD} 's|-ldb|-l${BDB_LIB_NAME}|g' ${WRKSRC}/configure X @${REINPLACE_CMD} 's|$$(localstatedir)/lib|$$(localstatedir)/db|' ${WRKSRC}/Makefile.in X Xdo-install: X @${INSTALL_PROGRAM} ${WRKSRC}/greyfix ${PREFIX}/sbin X @${INSTALL} -o nobody -m 700 -d /var/db/greyfix X Xpost-install: X @${CAT} ${PKGMESSAGE} X X.include 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-plist sed 's/^X//' >greyfix/pkg-plist << '73d4793b3f93aa79ed265862eaadd5e2' X@exec mkdir -m 700 -p /var/db/greyfix && chown nobody /var/db/greyfix Xsbin/greyfix X@cwd / X@dirrmtry /var/db/greyfix 73d4793b3f93aa79ed265862eaadd5e2 echo c - greyfix/files mkdir -p greyfix/files > /dev/null 2>&1 echo x - greyfix/files/pkg-message.in sed 's/^X//' >greyfix/files/pkg-message.in << 'e5a28f2196ba65ac5be1213cd5887ffd' XEdit Postfix's master configuration file, master.cf, and add the following: X X greyfix unix - n n - - spawn X user=nobody argv=%%PREFIX%%/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 %%PREFIX%%/etc/rc.d/postfix reload e5a28f2196ba65ac5be1213cd5887ffd exit