milter-regex is a libmilter-based (sendmail/postfix/exim) mail filter which allows you to accept or reject mail depending on regular expression matches in any stage from helo to the body of the message, before it is queued. See: http://www.benzedrine.cx/milter-regex.html milter-regex is available for the BSDs, but I can't find it in portage or in another bug here, so I created an ebuild and am submitting it for inclusion into Gentoo. I'd be okay with being a proxy maintainer for the ebuild.
Created attachment 142068 [details] The milter-regex ebuild with files Attaching the ebuild along with the rc and config scripts...
Comment on attachment 142068 [details] The milter-regex ebuild with files Please, do NOT attach tarballs with ebuilds. http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=3#doc_chap2
Created attachment 142242 [details] the ebuild Oookay, so here's the ebuild then...
Created attachment 142243 [details] init script, goes in files/ Here's the init.d script, goes in files/
Created attachment 142244 [details] conf script, goes in files/ Here's the conf.d file, goes in files/
Created attachment 142247 [details, diff] patch, goes in files/ This patch is needed to fix a small bug in the example rules that come in the distribution.
Created attachment 142249 [details] tabbed version Here's a tabbed (not spaced) version. Sorry.
I tried to adapt your ebuild but it cannot be build with bison (the younger and better version of yacc, not to mention the fact that it is part of the system packages). Today I enter in a mini-vacation, so I will not be able to work till Feb the 11th. Maybe you could patch the parse.y till I return...
I could not build it with bison, either. It builds just fine with yacc, which is what the upstream uses. It's (obviously) easier to just have yacc as a dependency. I honestly don't have enough knowledge about bison/yacc nuances or I don't even know even enough about what they're even doing to be able to patch the parse.y on my own. I am, however, able to take a bison-generated C code and patch that to make it work. I'll give it a shot, but I'm not sure I'll be too successful in making it work.
Created attachment 142304 [details] milter-regex-1.7.ebuild try 3 fixed for bison, fixed DEPENDS, added comments for postfix, added enewuser/enewgroup for "milter" user like sid-milter.
Created attachment 142305 [details] conf script, goes in files/ added comments, changed user to "milter"
Created attachment 142307 [details, diff] parse.y-1.7.patch, goes in files/ added version number to patch
Created attachment 142308 [details, diff] rules-1.7.patch goes in files/ rules patch with version number
Created attachment 142309 [details, diff] Makefile.linux-1.7.patch makefile patch, to make bison output y.tab.* as other parts of the Makefile expects.
Okay, with those changes, we should be good with bison and don't depend on yacc anymore. We're also more tolerant to non-sendmail users who use libfilter, and we use our own "milter" user, which other milter ebuilds use. The files directory should contain these files now, which are attached to the bug: files/parse.y-1.7.patch files/rules-1.7.patch files/milter-regex-conf files/milter-regex-init files/Makefile.linux-1.7.patch Thanks!
Fixed in cvs, although not exactly in your way. Thanks!