Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 207985 - mail-filter/milter-regex-1.7 (new ebuild)
Summary: mail-filter/milter-regex-1.7 (new ebuild)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement
Assignee: Default Assignee for New Packages
URL: http://www.benzedrine.cx/milter-regex...
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2008-01-29 01:50 UTC by Troy Bowman
Modified: 2008-02-18 10:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The milter-regex ebuild with files (milter-regex-ebuild.tgz,2.54 KB, application/octet-stream)
2008-01-29 01:52 UTC, Troy Bowman
Details
the ebuild (milter-regex-1.7.ebuild,1.46 KB, text/plain)
2008-01-31 02:56 UTC, Troy Bowman
Details
init script, goes in files/ (milter-regex-init,910 bytes, text/plain)
2008-01-31 02:58 UTC, Troy Bowman
Details
conf script, goes in files/ (milter-regex-conf,86 bytes, text/plain)
2008-01-31 03:00 UTC, Troy Bowman
Details
patch, goes in files/ (rules.patch,351 bytes, patch)
2008-01-31 03:02 UTC, Troy Bowman
Details | Diff
tabbed version (milter-regex-1.7.ebuild,1.38 KB, text/plain)
2008-01-31 03:15 UTC, Troy Bowman
Details
milter-regex-1.7.ebuild try 3 (milter-regex-1.7.ebuild,2.06 KB, text/plain)
2008-01-31 17:42 UTC, Troy Bowman
Details
conf script, goes in files/ (milter-regex-conf,226 bytes, text/plain)
2008-01-31 17:43 UTC, Troy Bowman
Details
parse.y-1.7.patch, goes in files/ (parse.y-1.7.patch,448 bytes, patch)
2008-01-31 17:44 UTC, Troy Bowman
Details | Diff
rules-1.7.patch goes in files/ (rules-1.7.patch,349 bytes, patch)
2008-01-31 17:46 UTC, Troy Bowman
Details | Diff
Makefile.linux-1.7.patch (Makefile.linux-1.7.patch,314 bytes, patch)
2008-01-31 17:51 UTC, Troy Bowman
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Troy Bowman 2008-01-29 01:50:55 UTC
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.
Comment 1 Troy Bowman 2008-01-29 01:52:43 UTC
Created attachment 142068 [details]
The milter-regex ebuild with files

Attaching the ebuild along with the rc and config scripts...
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-01-29 08:31:05 UTC
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
Comment 3 Troy Bowman 2008-01-31 02:56:40 UTC
Created attachment 142242 [details]
the ebuild

Oookay, so here's the ebuild then...
Comment 4 Troy Bowman 2008-01-31 02:58:29 UTC
Created attachment 142243 [details]
init script, goes in files/

Here's the init.d script, goes in files/
Comment 5 Troy Bowman 2008-01-31 03:00:18 UTC
Created attachment 142244 [details]
conf script, goes in files/

Here's the conf.d file, goes in files/
Comment 6 Troy Bowman 2008-01-31 03:02:26 UTC
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.
Comment 7 Troy Bowman 2008-01-31 03:15:00 UTC
Created attachment 142249 [details]
tabbed version

Here's a tabbed (not spaced) version.  Sorry.
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2008-01-31 03:21:15 UTC
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... 
Comment 9 Troy Bowman 2008-01-31 04:45:47 UTC
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.
Comment 10 Troy Bowman 2008-01-31 17:42:00 UTC
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.
Comment 11 Troy Bowman 2008-01-31 17:43:15 UTC
Created attachment 142305 [details]
conf script, goes in files/

added comments, changed user to "milter"
Comment 12 Troy Bowman 2008-01-31 17:44:49 UTC
Created attachment 142307 [details, diff]
parse.y-1.7.patch, goes in files/

added version number to patch
Comment 13 Troy Bowman 2008-01-31 17:46:10 UTC
Created attachment 142308 [details, diff]
rules-1.7.patch goes in files/

rules patch with version number
Comment 14 Troy Bowman 2008-01-31 17:51:46 UTC
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.
Comment 15 Troy Bowman 2008-01-31 18:07:58 UTC
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!
Comment 16 Alin Năstac (RETIRED) gentoo-dev 2008-02-18 10:35:41 UTC
Fixed in cvs, although not exactly in your way. Thanks!