This ebuild will install milter-greylist along with config files and startup scripts. I've tested it on x86 and amd64. On amd64, it segfaults when you enter "milter-greylist -D". Otherwise it seems to work fine. No reply yet from milter-greylist mailing list on why this is so. Maybe a problem with libspf2. Note - if this is compiled with libspf2-1.2.5-r1 it crashes on amd64 after running for a few hours. I haven't had this problem with the -r2 version - after about 5 day's continuous running. Note - I'm not an ebuild guru - there may be more elegant ways of doing this. It needs to make use of /etc/conf.d/milter-greylist - which it doesn't at the moment. It could also do with some "einfo" messages on sendmail configuration. $ cat mail-filter/milter-greylist/milter-greylist-3.0.ebuild #--------8><--------8><--------8><--------8><--------8><--------8><-------- # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit eutils DESCRIPTION="milter-greylist is a stand-alone milter written in C that implements the greylist filtering method" SRC_URI="ftp://ftp.espci.fr/pub/milter-greylist/${P}.tgz" HOMEPAGE="http://hcpnet.free.fr/milter-greylist" DEPEND="virtual/libc mail-filter/libspf2 mail-mta/sendmail spf? ( >=mail-filter/libspf2-1.2.5-r2 )" SLOT="0" LICENSE="BSD" KEYWORDS="~x86 ~amd64" IUSE="spf dnsrbl" pkg_setup() { if [ ! -e /usr/lib/libmilter.a ] ; then ewarn "Sendmail must be compiled with milter support -" ewarn "recompile sendmail with milter USE flag enabled" die "need milter-enabled sendmail" fi } src_compile() { local myconf use spf && { myconf="${myconf} --with-libspf2=/usr/lib" } use dnsrbl && { myconf="${myconf} --enable-dnsrbl" } sed "18s/^/DESC\=\"milter-greylist\"\n/; s|DAEMON=/usr/local/bin/$NAME|DAEMON=@BINDIR@/$NAME|" rc-gentoo.sh.in > rc-gentoo.sh.in.tmp mv rc-gentoo.sh.in.tmp rc-gentoo.sh.in econf ${myconf} --with-user=smmsp || die emake || die "build error" } src_install () { newinitd rc-gentoo.sh milter-greylist emake DESTDIR=${D} install || die "install error" dodoc ChangeLog README diropts "-o smmsp -m 755" into / keepdir /var/milter-greylist
Please, don't inline ebuilds, use attachments. Thanks.
A few improvements. Adds a file in /etc/conf.d. Some instructions at the end of the emerge. The ebuild has now been uploaded as an attachment. This is a very useful package - it hugely reduces the amount of spam that I get - especially if dynamic IP addresses are greylisted - see http://tech.groups.yahoo.com/group/milter-greylist/message/2994.
Created attachment 104734 [details] Ebuild for milter-greylist-3.0
Created attachment 116870 [details] Ebuild for milter-greylist-3.1.8 Here is an ebuild for the last of the 3.1 series. It works on x86 and amd64.
i've problems with the geoip-support: dev-libs/geoip is emerged on the system, but i get a lot of lines similar like this on my mailserver: May 29 12:21:49 laokoon milter-greylist: GeoIP is not available May 29 12:21:55 laokoon milter-greylist: GeoIP is not available May 29 12:21:56 laokoon milter-greylist: GeoIP is not available May 29 12:22:35 laokoon milter-greylist: GeoIP is not available May 29 12:22:36 laokoon milter-greylist: GeoIP is not available May 29 12:24:16 laokoon milter-greylist: GeoIP is not available May 29 12:24:19 laokoon milter-greylist: GeoIP is not available May 29 12:24:43 laokoon milter-greylist: GeoIP is not available May 29 12:25:11 laokoon milter-greylist: GeoIP is not available May 29 12:26:21 laokoon milter-greylist: GeoIP is not available May 29 12:26:25 laokoon milter-greylist: GeoIP is not available May 29 12:26:57 laokoon milter-greylist: GeoIP is not available Any idea what's missing?
Try adding this to /etc/mail/greylist.conf geoipdb "/usr/share/GeoIP/GeoIP.dat"
(In reply to comment #6) > Try adding this to /etc/mail/greylist.conf > > geoipdb "/usr/share/GeoIP/GeoIP.dat" > Ok, this seems to help. BTW: What do You think about adding a "curl" USE flag? It is just an idea...
Personally I don't have a use for it - I haven't sussed out URL checks. It would be very easy to do.
I do use milter-greylist on some mailservers with Postfix, and it runs fine. So better set the dependency to mail-filter/libmilter. libspf2 should only be polled when spf useflags is set. Please see my ebuilds at https://svn.ossdl.de/all/ossdl/mail-filter/milter-greylist/ . If you're searching for a maintainer just drop me a line.
Is possible to say when the ebuild is in the portage tree? If you need help I can spend some time with this. Thank you, Henrique Dias
Created attachment 132788 [details] Ebuild for milter-greylist 4.0beta4 Upgraded to latest version, added curl USE flag
Created attachment 145791 [details] milter-greylist-4.0.ebuild file ebuild for milter-greylist-4.0 release version.
Oops, on my new server both versions (3.1.8 and 4.0) fails to compile: checking for select... no checking for socket... no checking for initgroups... no checking for strlcat... no checking for vsyslog... no checking for pthread_create in -lpthread... no checking for pthread_create in -lc_r... no checking for pthread_create in -lpthreads -lpthread... no Required libpthread not found. Use --with-libpthread !!! Please attach the following file when seeking support: !!! /var/tmp/portage/mail-filter/milter-greylist-4.0/work/milter-greylist-4.0/config.log * * ERROR: mail-filter/milter-greylist-4.0 failed.
Created attachment 161006 [details] config.log the config.log mentonied above
Created attachment 161007 [details] output from emerge --info output from emerge --info of the failing server
I had this problem a lot initially - especially on other distros (eg. Debian). Its usually a dependency problem. The "Required libpthread not found. Use --with-libpthread" message is often misleading. Have you installed GeoIP? You could try turning off some of the USE flags (geoip/curl/dnsrbl/spf) to find out what the offending feature is.
(In reply to comment #16) > I had this problem a lot initially - especially on other distros (eg. Debian). > Its usually a dependency problem. The "Required libpthread not found. Use > --with-libpthread" message is often misleading. Have you installed GeoIP? You > could try turning off some of the USE flags (geoip/curl/dnsrbl/spf) to find out > what the offending feature is. Ok, the missing dev-libs/geoip leads to this. But shouldn't there be an entry like "geoip? ( dev-libs/geoip )" in the DEPEND section off the ebuild?
Created attachment 161088 [details] Modified ebuild with correct dependencies I've modified the ebuild. Its been tested on a pristine gentoo install. Note that there is a problem with package collisions between ssmtp and sendmail. I've put a comment into the ebuild to deal with this. If ssmtp is installed you should do: # emerge -C ssmtp # echo mail-mta/ssmtp >> /etc/portage/package.mask before building this ebuild - as per http://bugs.gentoo.org/167952. Changes are: Added missing geoip and curl dependencies Fixed startup script to remove .pid file on shutdown Anyone interested in maintaining this package? I don't have enough in-depth knowledge to do this.
(In reply to comment #18) [...] > Anyone interested in maintaining this package? I don't have enough in-depth > knowledge to do this. You did a great work! As of Comment #9 From W-Mark Kubacki was interested to do this, but he isn't (any longer?) in the CC section of this bug. Should we ask him by mail?
Created attachment 216308 [details] milter-greylist-4.3.4.ebuild This ebuild place in rion overlay
(In reply to comment #20) > Created an attachment (id=216308) [details] > milter-greylist-4.3.4.ebuild > > This ebuild place in rion overlay > when i use the ebuild from http://rion-overlay.googlecode.com/hg/mail-filter/milter-greylist/milter-greylist-4.3.4.ebuild to install mail-filter/milter-greylist-4.3.4 then there is no file /etc/init.d/milter-greylist installed to start and stop the deamon. Is this intended?
Created attachment 216548 [details] ebuild for milter-greylist-4.3.4 (development version) This ebuild is a slight modification of my previous one and creates the appropriate init.d file. I haven't looked at the 4.3.* versions at this stage as I'm planning to stick to the stable version.
(In reply to comment #21) > (In reply to comment #20) > > Created an attachment (id=216308) [details] [details] > > milter-greylist-4.3.4.ebuild > > > > This ebuild place in rion overlay > > > when i use the ebuild from > http://rion-overlay.googlecode.com/hg/mail-filter/milter-greylist/milter-greylist-4.3.4.ebuild > to install mail-filter/milter-greylist-4.3.4 then there is no file > /etc/init.d/milter-greylist installed to start and stop the deamon. Is this > intended? > The attached ebuild has the necessary lines commented out. However it seems to be OK in the overlay mentioned earlier. You should take care of copying the files to their proper place if not using the whole overlay. Regards: Dw.
Created attachment 217508 [details] milter-greylist-4.3.4.ebuild fixed ebuild.
Created attachment 217510 [details] init script for milter-greylist
Created attachment 217512 [details] gentoo.confd file for milter-greylist ebuild
Created attachment 218473 [details] fixed ebuild
This bug depend on #262919 Owner's, please ad depend
Created attachment 237533 [details] bump version
Created attachment 239139 [details] Modified conf file There are a number of problems with 4.3.7. When you compile it with the "curl dnsrbl geoip p0f sendmail ssl" USE flags it does not compile: x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -Iyes/include -Iyes/include -Iyes/include -DUSE_CURL -Iyes/include -DUSE_GEOIP -DUSE_P0F -DHAVE_DATA_CALLBACK -DUSE_DNSRBL -DCONFFILE=\"/etc/mail/milter-greylist.conf\" -DDUMPFILE=\"/var/lib/milter-greylist/milter-greylist.db\" -D_BSD_SOURCE -I. -I. -c -o conf.o conf.c mv y.tab.c conf_yacc.c mv: cannot stat `y.tab.c': No such file or directory make: *** [conf_yacc.c] Error 1 make: *** Waiting for unfinished jobs.... milter-greylist.c: In function ‘fstring_expand’: milter-greylist.c:2698: warning: dereferencing pointer ‘addr.85’ does break strict-aliasing rules milter-greylist.c:2698: warning: dereferencing pointer ‘addr.85’ does break strict-aliasing rules milter-greylist.c:2698: note: initialized from here milter-greylist.c:2489: warning: ‘last’ may be used uninitialized in this function * ERROR: mail-filter/milter-greylist-4.3.7 failed: etc. This can be overcome by replacing "econf" with "./configure --prefix=/usr" and adding "make" at the bottom of src_configure(). Not very elegant but works. Also in the file gentoo.confd the variable $USER is not defined and milter-greylist won't start on initial boot. It seems to start after the system has been booted. For cosmetic reasons I've put `DESC=milter-greylist' at the bottom of the conf file.
Created attachment 246081 [details] milter-greylist-4.3.8.ebuild
(In reply to comment #31) > Created attachment 246081 [details] > milter-greylist-4.3.8.ebuild it needs to have openldap in the IUSE line - otherwise the command ebuild milter-greylist-4.3.8.ebuild manifest fails