Bug 47106 - mail-filter/sa-exim (new ebuild)
|
Bug#:
47106
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: All
|
Status: NEW
|
Severity: enhancement
|
Priority: P2
|
|
Resolution:
|
Assigned To: net-mail@gentoo.org
|
Reported By: bauer@dmsb.de
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: mail-filter/sa-exim (new ebuild)
|
|
Keywords: EBUILD
|
|
Status Whiteboard:
|
|
Opened: 2004-04-07 08:22 0000
|
Hi,
as I was modifying my exim-ebuild to additionally patch exim for sa-exim I found a typo in line 68
-e "s:# SUPPORT_MAILSTOR=yes:SUPPORT_MAILSTORE=yes:" \
should be
-e "s:# SUPPORT_MAILSTORE=yes:SUPPORT_MAILSTORE=yes:" \
In addition to this, I'd like to request a update for the ebuild to support exim build with sa-exim. Unfortunatly I don't have any experience in writing ebuild so I give some short instructions, what needs to be done to have exim build with sa-exim-support.
(sa-exim homepage http://marc.merlins.org/linux/exim/sa.html)
1. 3 Files from the source of http://marc.merlins.org/linux/exim/files/sa-exim-current.tar.gz are needed
sa-exim.c
- I modified my sa-exim.c in line 74 and modified SPAMASSASSIN_CONF manually
but that can be done with an additional parameter to make (see INSTALL))
sa-exim.h (If sa-exim.h is rebuild "version" and the makefile are also needed, but that could be done if a patch is build once, as it stays the same)
sa-exim.conf
2. "overiron" ${S}/src/local_scan.c with sa-exim.c
3. move/copy sa-exim.h to to ${S}/src/
4. start src_compile
5. in src_install copy the sa-exim.conf file to the right location (/etc/exim ?)
well, I guess that should be all. Make sure to read the INSTALL and README in the distribution. sa-exim provides a couple of really good features which exiscan-acl do not support for spam-scanning but the combination of both is probably the best solution (IMHO).
thx
-fe
Created an attachment (id=28944) [details]
exim-4.21 ebuild with sa-exim support
This ebuild worked on different hosts for me. It builds exim with sa-exim
support.
Please add this small update to the exim-ebuilds.
SA-exim is a spamassassin-implementation for exim with a lot of good features
which exiscan-acl's do not support (greylisting, tarpits, different
drop-mail-but-save-here features which are good for sa-learn for example and of
course report_safe and rewrite_subject do work with sa-exim).
For more infos have a look at
http://marc.merlins.org/linux/exim/sa.html
Thx
Added typo fix, working on the sa option
What happened to this one?
I don't know...seems pretty frozen... anyway, since I keep using this setup
I've got working ebuilds with exim-dlopen-patch and sa-exim. I add my
exim-4.43-r1 and sa-exim-4.1 ebuild here which are working for me
dlopen patch will be in the next release of the exim ebuild (4.43-r2),
I need to find someone to test the sa-exim ebuild before it goes in the tree.
I've done some quick tests, because I don't have the time for more at the
moment.
The sa-exim ebuild compiles quite fine, *if* you have got lynx installed on
your box, because the upstream Makefile depends on it (it's downloading
acknowledgements and changelog files). Solutions that came to my mind:
1) DEPEND on lynx (any version should suffice)
2) Create a patch for the Makefile, to make it use wget instead
3) Squeeze the Makefile through sed and convert it to wget
4) Get the required files before running the Makefile, so make won't rebuild
them.
I couldn't test whether sa-exim itself works afterwards, since (if I understood
that right) that would need the dlopen patched exim, and I've got some trouble
creating the digests for the 4.43-r1 ebuild (and that's where I decided, okay,
no time, stop it for today).
But I'd suggest adding the sa-exim ebuild to the official tree, because it
works (if you maybe add a dependency for spamassassin ;) and there are much
worse ebuilds in the tree.
you had problems with the digests for -r1? how did you retrieve it?
(could you test with -r2, it's already patched with dlopen, and should be available in the tree.)
Ah, my fault.
I was using the bugzilla attachment from #9. Didn't even look into the tree. Stupid.
Now it works fine, although sa-exim should put a default configuration to /etc/exim/sa-exim.conf (the upstream one seems to fit).
*** Bug 98116 has been marked as a duplicate of this bug. ***
Mass re-assign, maintainer to whom this bug was assigned seems inactive.
I renamed the mail-filter/sa-exim-4.2.ebuild to
mail-filter/sa-exim-4.2.1.ebuild and successfully installed and used it with my
ancient mail-mta/exim-4.50-r1 install. I assume newer releases of exim work
too.
Are there any reasons why sa-exim is not accepted in the portage tree? Is it
the crazy requirement for lynx (or links in case of sa-exim-4.2.1)?
This ebuild does not compile for me. I'm using x86_64, perhaps that has
something to do with it?
>>> Emerging (1 of 1) mail-filter/sa-exim-4.2.1 to /
* sa-exim-4.2.1.tar.gz MD5 ;-) ...
[ ok ]
* sa-exim-4.2.1.tar.gz RMD160 ;-) ...
[ ok ]
* sa-exim-4.2.1.tar.gz SHA1 ;-) ...
[ ok ]
* sa-exim-4.2.1.tar.gz SHA256 ;-) ...
[ ok ]
* sa-exim-4.2.1.tar.gz size ;-) ...
[ ok ]
* checking ebuild checksums ;-) ...
[ ok ]
* checking auxfile checksums ;-) ...
[ ok ]
* checking miscfile checksums ;-) ...
[ ok ]
* checking sa-exim-4.2.1.tar.gz ;-) ...
[ ok ]
>>> Unpacking source...
>>> Unpacking sa-exim-4.2.1.tar.gz to /var/tmp/portage/sa-exim-4.2.1/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sa-exim-4.2.1/work/sa-exim-4.2.1 ...
echo "char *version=\"`cat version` (built `date -R 2>/dev/null || date`)\";" >
sa-exim.h
Building sa-exim-4.2.1.so
gcc -I../../src -I./eximinc -DDLOPEN_LOCAL_SCAN
-DSPAMASSASSIN_CONF=\"/etc/exim/sa-exim.conf\ "
-DSPAMC_LOCATION=\"/usr/bin/spamc\" -O2 -Wall -shared -o sa-exim-4.2.1.so
sa-exim.c
sa-exim.c: In function 'get_header':
sa-exim.c:165: warning: pointer targets in passing argument 1 of 'string_copyn'
differ in sig nedness
sa-exim.c:165: warning: pointer targets in assignment differ in signedness
sa-exim.c: In function 'savemail':
sa-exim.c:203: warning: pointer targets in passing argument 1 of
'expand_string' differ in si gnedness
sa-exim.c:203: warning: pointer targets in assignment differ in signedness
[... truncated ...]
sa-exim.c:1478: warning: pointer targets in assignment differ in signedness
sa-exim.c:1507: warning: pointer targets in assignment differ in signedness
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld:
/var/tmp/porta ge/sa-exim-4.2.1/temp/ccrFy7Oq.o: relocation R_X86_64_32 against
`a local symbol' can not be used when making a shared object; recompile with
-fPIC
/var/tmp/portage/sa-exim-4.2.1/temp/ccrFy7Oq.o: could not read symbols: Bad
value
collect2: ld returned 1 exit status
make: *** [sa-exim-4.2.1.so] Error 1
!!! ERROR: mail-filter/sa-exim-4.2.1 failed.
Call stack:
ebuild.sh, line 1546: Called dyn_compile
ebuild.sh, line 937: Called src_compile
sa-exim-4.2.1.ebuild, line 23: Called die
!!! (no error message)
!!! If you need support, post the topmost build error, and the call stack if
relevant.
!!! This ebuild is from an overlay: '/usr/local/portage'
Portage 2.1.1-r1 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r3,
2.6.17-gentoo-r8-phauna.org20061015 x86_64)
=================================================================
System uname: 2.6.17-gentoo-r8-phauna.org20061015 x86_64 Intel(R) Core(TM)2 CPU
T5600 @ 1.83GHz
Gentoo Base System version 1.12.5
Last Sync: Wed, 25 Oct 2006 23:30:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python: 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: [Not Present]
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.59-r7
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils: 2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -msse -msse2 -msse3 -mfpmath=sse -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/texmf/dvipdfm/config/
/usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -msse -msse2 -msse3 -mfpmath=sse -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 aalib alsa apache2 bash-completion berkdb bitmap-fonts bzip2 cli
cracklib crypt cups dga dlloader dri dvd dvdr elibc_glibc exif firefox flac gd
gdbm gnome imap innodb input_devices_keyboard input_devices_mouse isdnlog jpeg
kernel_linux libg++ logrotate maildir mpm-prefork ncurses nptl nptlonly
nsplugin offensive ogg opengl pam pcre pdf png ppds pppd readline reflection
sdl session spl sse3 ssl svg tiff truetype-fonts type1-fonts udev userland_GNU
vhosts video_cards_i810 video_cards_vesa vorbis xorg xsl zlib"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
I managed to get this to build by adding -fPIC like the compiler error
suggested..
Does anyone know if this still works with exim-4.67?
(In reply to comment #25)
> Does anyone know if this still works with exim-4.67?
Yes it does. I've been using the ebuild locally from this post for several
years on several corporate sites - x86 only though and no x86_64. Two of them
are at 4.67 with SA 3.1.8-r1.
Cheers
Jon
As I'm not going to get a chance to get this tested (as I have nothing to
really test it against), I'm going to have to re-assign this to the net-mail
herd, hopefully someone there will take it on.
The source for SA-Exim doesn't seem to be in many places:
ebuild sa-exim-4.2.1-r1.ebuild digest
>>> Downloading 'http://distfiles.gentoo.org/distfiles/sa-exim_4.2.1-11.diff.gz'
--2009-08-13 11:52:12--
http://distfiles.gentoo.org/distfiles/sa-exim_4.2.1-11.diff.gz
Resolving distfiles.gentoo.org... 149.20.20.135, 140.211.166.134, 130.239.17.6,
...
Connecting to distfiles.gentoo.org|149.20.20.135|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://mirrors.kernel.org/gentoo/distfiles/sa-exim_4.2.1-11.diff.gz
[following]
--2009-08-13 11:52:13--
http://mirrors.kernel.org/gentoo/distfiles/sa-exim_4.2.1-11.diff.gz
Resolving mirrors.kernel.org... 204.152.191.39, 149.20.20.135
Reusing existing connection to distfiles.gentoo.org:80.
HTTP request sent, awaiting response... 404 Not Found
2009-08-13 11:52:13 ERROR 404: Not Found.
>>> Downloading 'http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/sa-exim_4.2.1-11.diff.gz'
--2009-08-13 11:52:13--
http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/sa-exim_4.2.1-11.diff.gz
Resolving distro.ibiblio.org... 152.46.7.109
Connecting to distro.ibiblio.org|152.46.7.109|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2009-08-13 11:52:13 ERROR 404: Not Found.
>>> Downloading 'ftp://linux.csua.berkeley.edu/debian/pool/main/s/sa-exim/sa-exim_4.2.1-11.diff.gz'
--2009-08-13 11:52:14--
ftp://linux.csua.berkeley.edu/debian/pool/main/s/sa-exim/sa-exim_4.2.1-11.diff.gz
=> `/usr/portage/distfiles/sa-exim_4.2.1-11.diff.gz'
Resolving linux.csua.berkeley.edu... 128.32.112.230
Connecting to linux.csua.berkeley.edu|128.32.112.230|:21... failed: Connection
timed out.
Retrying.
------- cut ---------
--2009-08-13 11:56:24--
ftp://linux.csua.berkeley.edu/debian/pool/main/s/sa-exim/sa-exim_4.2.1-11.diff.gz
(try: 5) => `/usr/portage/distfiles/sa-exim_4.2.1-11.diff.gz'
Connecting to linux.csua.berkeley.edu|128.32.112.230|:21... failed: Connection
timed out.
Giving up.
>>> Downloading 'http://ftp.lug.udel.edu/debian/pool/main/s/sa-exim/sa-exim_4.2.1-11.diff.gz'
--2009-08-13 11:57:24--
http://ftp.lug.udel.edu/debian/pool/main/s/sa-exim/sa-exim_4.2.1-11.diff.gz
Resolving ftp.lug.udel.edu... 128.175.60.43
Connecting to ftp.lug.udel.edu|128.175.60.43|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2009-08-13 11:57:25 ERROR 404: Not Found.
>>> Downloading 'http://ftp.freenet.de/debian/pool/main/s/sa-exim/sa-exim_4.2.1-11.diff.gz'
--2009-08-13 11:57:25--
http://ftp.freenet.de/debian/pool/main/s/sa-exim/sa-exim_4.2.1-11.diff.gz
Resolving ftp.freenet.de... 67.215.65.130, 2001:748:100:50::3,
2001:748:100:50::5, ...
Connecting to ftp.freenet.de|67.215.65.130|:80... failed: Connection timed out.
Connecting to ftp.freenet.de|2001:748:100:50::3|:80... failed: Network is
unreachable.
Connecting to ftp.freenet.de|2001:748:100:50::5|:80... failed: Network is
unreachable.
Connecting to ftp.freenet.de|2001:748:100:50::4|:80... failed: Network is
unreachable.
Connecting to ftp.freenet.de|2001:748:100:50::6|:80... failed: Network is
unreachable.
>>> Downloading 'http://debian.csie.ntu.edu.tw/debian/pool/main/s/sa-exim/sa-exim_4.2.1-11.diff.gz'
--2009-08-13 11:58:26--
http://debian.csie.ntu.edu.tw/debian/pool/main/s/sa-exim/sa-exim_4.2.1-11.diff.gz
Resolving debian.csie.ntu.edu.tw... 140.112.30.75
Connecting to debian.csie.ntu.edu.tw|140.112.30.75|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18574 (18K) [application/x-gzip]
Saving to: `/usr/portage/distfiles/sa-exim_4.2.1-11.diff.gz'
I've been using 4.2.1 for years (~4.5) now on >20 systems that route something
like 10,000 emails per day (all x86).
I can confirm that it at least compiles on amd64 with -r1.
ok, who is willing to maintain this ebuild through me as proxy?
It seems like exim-4.71 should be pretty much in shape (dlopen patch is in
there) to just handle this for people that prefer more control than exiscan_acl
can give them.