First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 36060
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Markus Ullmann <jokey@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Chris Bond <chris@logics.co.uk>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
MailScanner-4.25.ebuild MailScanner-4.25.ebuild text/plain Chetan Sarva 2004-01-29 15:44 0000 2.80 KB Details
mailscanner.initd mailscanner.initd text/plain Chetan Sarva 2004-01-29 15:45 0000 671 bytes Details
mailscanner.initd mailscanner.initd text/plain Chetan Sarva 2004-01-29 20:39 0000 670 bytes Details
MailScanner-4.28.6-r1.ebuild newest stable ebuild text/plain Thierry Carrez (RETIRED) 2004-03-26 02:21 0000 3.16 KB Details
MailScanner-4.28.6-r1.ebuild MailScanner-4.28.6-r1.ebuild text/plain Jeremy Heslop 2004-03-30 10:01 0000 3.33 KB Details
MailScanner-4.28.6-r1.ebuild MailScanner-4.28.6-r1.ebuild text/plain Jeremy Heslop 2004-03-30 10:22 0000 3.32 KB Details
MailScanner-4.28.6-r1.ebuild MailScanner-4.28.6-r1.ebuild revised text/plain Jeremy Heslop 2004-03-30 16:18 0000 5.65 KB Details
mailscanner.initd mailscanner.initd revised text/plain Jeremy Heslop 2004-03-30 16:21 0000 842 bytes Details
postfix.in postfix.in init text/plain Jeremy Heslop 2004-03-30 16:23 0000 720 bytes Details
sendmail.in sendmail.in init text/plain Jeremy Heslop 2004-03-30 16:24 0000 616 bytes Details
MailScanner-4.28.6-r2.ebuild MailScanner-4.28.6-r2.ebuild text/plain Jeremy Heslop 2004-03-30 16:29 0000 5.72 KB Details
MailScanner-4.28.6-r2.ebuild MailScanner-4.28.6-r2.ebuild take two text/plain Jeremy Heslop 2004-03-30 19:48 0000 5.76 KB Details
MailScanner-4.28.6-r3.ebuild Updated MailScanner ebuild text/plain Richard Brown 2004-03-31 03:16 0000 5.74 KB Details
MailScanner-4.28.6-r4.ebuild MailScanner-4.28.6-r4.ebuild text/plain Richard Brown 2004-03-31 08:41 0000 5.77 KB Details
MailScanner-4.29.7.ebuild First 4.29.7 ebuild text/plain Richard Brown 2004-04-03 10:33 0000 7.20 KB Details
confd.mailscanner conf.d/mailscanner text/plain Richard Brown 2004-04-03 10:34 0000 85 bytes Details
confd.sendmail conf.d/sendmail text/plain Richard Brown 2004-04-03 10:35 0000 301 bytes Details
confd.sendmail.in conf.d/sendmail.in text/plain Richard Brown 2004-04-03 10:36 0000 399 bytes Details
cron.check_MailScanner cron.hourly/check_MailScanner text/plain Richard Brown 2004-04-03 10:36 0000 612 bytes Details
cron.update_virus_scanners cron.hourly/update_virus_scanners text/plain Richard Brown 2004-04-03 10:37 0000 552 bytes Details
initd.mailscanner init,d/mailscanner text/plain Richard Brown 2004-04-03 10:37 0000 1.08 KB Details
initd.sendmail init.d/sendmail text/plain Richard Brown 2004-04-03 10:38 0000 556 bytes Details
initd.sendmail.in init.d/sendmail.in text/plain Richard Brown 2004-04-03 10:39 0000 978 bytes Details
mailscanner-mta initd.mailscanner-mta text/plain Kevin Spicer 2004-04-03 11:26 0000 5.62 KB Details
mailscanner-mta confd.mailscanner-mta text/plain Kevin Spicer 2004-04-03 11:28 0000 976 bytes Details
confd.mailscanner-mta confd.mailscanner-mta text/plain Kevin Spicer 2004-04-04 14:45 0000 953 bytes Details
initd.mailscanner initd.mailscanner text/plain Kevin Spicer 2004-04-04 14:46 0000 1.24 KB Details
MailScanner-4.30.1-r1.ebuild 4.30.1-1 [TEST PACKAGE] ebuild text/plain Kevin Spicer 2004-04-04 14:58 0000 9.22 KB Details
MailScanner-4.30.3-r1.ebuild 4.30.3-r1 ebuild text/plain Kevin Spicer 2004-05-01 12:58 0000 9.30 KB Details
initd.mailscanner initd.mailscanner text/plain Kevin Spicer 2004-05-02 04:43 0000 1.24 KB Details
initd.mailscanner-mta initd.mailscanner-mta text/plain Kevin Spicer 2004-05-02 04:43 0000 5.62 KB Details
confd.mailscanner confd.mailscanner text/plain Kevin Spicer 2004-05-02 04:48 0000 147 bytes Details
initd.mailscanner initd.mailscanner text/plain Kevin Spicer 2004-05-02 04:49 0000 1.24 KB Details
MailScanner-4.30.3-r2.ebuild 4.30.3-r2 ebuild text/plain Kevin Spicer 2004-05-02 05:00 0000 9.52 KB Details
MailScanner-portage_dir-4.31.6.tar.gz MailScanner-4.31.6 complete portage dir application/octet-stream Matthias Waechter 2004-06-08 05:38 0000 8.57 KB Details
MailScanner-portage-dir-4.32.5.1.tar.gz MailScanner-4.32.5-1 complete portage dir plus tnef 1.2.3.1 update (tar.gz) application/x-gtar Matthias Waechter 2004-08-25 04:11 0000 9.79 KB Details
MailScanner-portage-dir-4.34.8.1.tar.gz MailScanner-portage-dir-4.34.8.1 application/x-gtar Matthias Waechter 2004-10-03 14:45 0000 9.64 KB Details
MailScanner-portage-dir-4.34.8.1-r1.tar.gz MailScanner-portage-dir-4.34.8.1-r1.tar.gz application/x-gtar Matthias Waechter 2004-10-03 15:12 0000 9.90 KB Details
MailScanner-portage-dir-4.35.11.1.tar.gz MailScanner-portage-dir-4.35.11.1.tar.gz application/x-gtar Matthias Waechter 2004-11-08 13:16 0000 10.93 KB Details
MailScanner-portage-dir-4.38.9-1.tar.gz MailScanner-4.38.9 complete portage dir application/x-gtar Chris Lyon 2005-01-31 19:49 0000 13.21 KB Details
MailScanner-portage-dir-4.39.5-1.tar.gz MailScanner-portage-dir-4.39.5-1.tar.gz application/x-gtar Costas Cavouracis 2005-03-01 07:33 0000 8.66 KB Details
MailScanner-portage-dir-4.43.2-1.tar.gz MailScanner-portage-dir-4.43.2-1.tar.gz application/x-gtar Chris Kimpton 2005-06-04 04:34 0000 8.70 KB Details
MailScanner-portage-dir-4.43.2-1.tar.gz MailScanner-portage-dir-4.43.2-1.tar.gz (better) application/x-gzip Chris Kimpton 2005-06-12 06:31 0000 8.70 KB Details
MailScanner-portage-dir-4.50.15-1.tar.gz Updated for latest version of mailscanner and its dependancies, also fixed gentoo package change of libnet application/x-gzip Chris Kimpton 2006-02-12 13:11 0000 8.96 KB Details
MailScanner-portage-dir-4.50.15-1.tar.gz MailScanner-portage-dir-4.50.15-1.tar.gz application/x-gzip Chris Kimpton 2006-02-12 23:00 0000 8.96 KB Details
MailScanner-portage-dir-4.54.6.1.tar.gz Updated overlay directory application/octet-stream Arjan Schrijver 2006-06-19 05:33 0000 8.70 KB Details
MailScanner-4.54.6.1.ebuild MailScanner-4.54.6.1.ebuild text/plain Markus Ullmann 2006-07-02 08:30 0000 9.60 KB Details
Filesys-Statvfs-Statfs-Df-0.79.ebuild Filesystem::Df support text/plain Kenneth 2006-07-26 05:58 0000 778 bytes Details
MailScanner-4.54.6.1.ebuild MailScanner-4.54.6.1.ebuild text/plain Chan Min Wai 2006-09-09 15:09 0000 9.94 KB Details
MailScanner-4.55.10.3.ebuild Stable Mailscanner 4.55.10-3 ebuild text/plain Chan Min Wai 2006-09-14 11:49 0000 9.76 KB Details
tnef-1.4.3.ebuild tnef-1.4.3.ebuild text/plain Chan Min Wai 2006-09-14 11:50 0000 649 bytes Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 36060 depends on: 46332 46897 Show dependency tree
Show dependency graph
Bug 36060 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2003-12-18 05:39 0000
MailScanner ebuild - you could use this as a starting point:

http://cvs.berlios.de/cgi-bin/viewcvs.cgi/gentoo-deutsch/ebuilds/net-mail/MailScanner/

------- Comment #1 From Thierry Carrez (RETIRED) 2003-12-22 09:04:00 0000 -------
I need this too. I will test the ebuild provided here and report
success/failure
Note the 35078 is a dupe.

------- Comment #2 From Thierry Carrez (RETIRED) 2004-01-23 03:01:22 0000 -------
Add to modify a few things post-emerge to get it to work (using mcafee as an
antivirus) :

* incorrect bindir in /opt/MailScanner/bin/check_mailscanner
* directory in /opt/MailScanner/lib/mcafee-autoupdate is incompatible with
where the "vlnx" package installs its stuff (/opt/vlnx)
* /opt/MailScanner/lib/mcafee-* must be executables (as should probably be all
/opt/MailScanner/lib files).

Hope this helps.

------- Comment #3 From Chetan Sarva 2004-01-28 15:32:56 0000 -------
Did you create an updated ebuild? If so, can you attach it?

------- Comment #4 From Thierry Carrez (RETIRED) 2004-01-29 08:11:14 0000 -------
Sorry I didn't.

I can learn ebuild syntax and submit one if needed. On vacation next week though, so it will have to wait a little...

Note:
about the mcafee-autoupdate incompatibility, in fact it's not a problem since the directory can be specified as an argument.

------- Comment #5 From Chetan Sarva 2004-01-29 15:44:00 0000 -------
Created an attachment (id=24603) [edit]
MailScanner-4.25.ebuild

------- Comment #6 From Chetan Sarva 2004-01-29 15:45:46 0000 -------
Created an attachment (id=24604) [edit]
mailscanner.initd

an init script for MailScanner. I forgot to mention that the ebuild also
requires the Net-CIDR perl module. Ebuild can be found here:

http://bugs.gentoo.org/show_bug.cgi?id=35795

------- Comment #7 From Chetan Sarva 2004-01-29 20:39:46 0000 -------
Created an attachment (id=24614) [edit]
mailscanner.initd

Fixed a small typo in the previous version.

------- Comment #8 From Thierry Carrez (RETIRED) 2004-03-04 02:47:23 0000 -------
Modifications needed on the latest posted ebuild to have it work with the
net-mail/vlnx package (McAfee antivirus) :

----------------------
diff MailScanner-4.25.ebuild.orig MailScanner-4.25.ebuild.forvlnx
53a54,56
>       # Correct mcafee package location
>       sed -i "s/PREFIX=\/usr\/local\/uvscan/PREFIX=\/opt\/vlnx/" ${S}/lib/mcafee-autoupdate
>
83c86,91
<
---
>
>       # mcafee-wrapper and mcafee-autoupdate must be executables
>       exeinto ${BASE}/lib
>       doexe   lib/mcafee-wrapper
>       doexe   lib/mcafee-autoupdate
>
----------------------------

You also have to change the mcafee line in /etc/MailScanner/virus.scanners.conf
to :

mcafee          /opt/MailScanner/lib/mcafee-wrapper     /opt/vlnx

but I'm not too sure the ebuild has to do that.
I bumped the version to 4.28.4-1 with success.

Hope this helps

------- Comment #9 From FieldySnuts 2004-03-04 07:27:59 0000 -------
Any idea if we'll get an ebuild into portage? I notice it was a month between
any postings and the last one. I know of many people who would like this.

------- Comment #10 From Chetan Sarva 2004-03-05 12:34:10 0000 -------
re: mcafee changes, it's a good idea to do it in the ebuild since it doesn't
affect any other features. As far as permissions, everything under /lib should
be 755.

------- Comment #11 From Thierry Carrez (RETIRED) 2004-03-26 02:21:43 0000 -------
Created an attachment (id=28047) [edit]
newest stable ebuild

New ebuild (using 4.28.6-1) with the following improvements :
- wrappers and autoupdate scripts in lib are now all executables
- virus.scanners.conf is compatible with net-mail/vlnx package location
- include the mailscanner.initd startup script as provided here
- dev-perl/Net-CIDR is now a prerequisite (emerge inject it if you installed it
by hand)

------- Comment #12 From Thierry Carrez (RETIRED) 2004-03-26 02:28:24 0000 -------
We still have the following problems :
- /opt/MailScanner/bin/* should probably be /usr/sbin/*
- /opt/MailScanner/lib/* should probably be /usr/lib/mailscanner/*
- /etc/MailScanner/* should probably be /etc/mailscanner
- dev-perl/Net-CIDR still not in portage
- feedback from other antivirus users for package location compatibility (I use mcafee)
- the MIME-Tools problem (which should probably be solved on Julian's side by including a modified copy of the module in his own package)

comments ? shoot

------- Comment #13 From Chris Bond 2004-03-26 03:02:34 0000 -------
Path changes would be a good idea to follow gentoo standard - also clamav as an
alturnative av package as its free.

------- Comment #14 From Jeremy Heslop 2004-03-30 10:01:19 0000 -------
Created an attachment (id=28381) [edit]
MailScanner-4.28.6-r1.ebuild

This ebuild patches files for clamav. Changes virus.scanners.conf clamav to
point to /usr instead of /usr/local

Would this be better handled as a USE flag? like USE="clamav" emerge
MailScanner?
Just a thought. If this would be a good idea I cna do it.

------- Comment #15 From Jeremy Heslop 2004-03-30 10:19:25 0000 -------
Koon,

Why did we change the ebuild to change the pid location in MailScanner.conf from /var/run/MailScanner.pid to /var/run/MailScanner/MailScanner.pid? this breaks the supplied mailscanner.initd file. Not a big problem but I'll just change it in the ebuild I submitted.

------- Comment #16 From Jeremy Heslop 2004-03-30 10:22:12 0000 -------
Created an attachment (id=28382) [edit]
MailScanner-4.28.6-r1.ebuild

Changed MailScanner.pid location back as to not break mailscanner.initd
start/stop.

------- Comment #17 From Jeremy Heslop 2004-03-30 10:24:26 0000 -------
Also noted is this ebuild works on ~amd64 so I added that keyword to ebuild I
submitted.

------- Comment #18 From GamesBond 2004-03-30 12:56:39 0000 -------
I would personally prefer to see MailScanner use the same paths as they are for
redhat distro's and to keep the directories and casing of MailScanner identical
with the majority. If there would, at any point, a path hardcoded into the code
it would work instead of fail :) and also it would be easier to use someone
else's add-ons

These are the paths when using the rpm:
The docs go here:
/usr/share/doc/mailscanner-4.29.2

The rest of the paths / files of the things that matter:
/var/run/MailScanner.pid
/var/spool/MailScanner
/etc/sysconfig/MailScanner
/etc/rc.d/init.d/MailScanner
/etc/MailScanner
/usr/lib/MailScanner
/usr/sbin/MailScanner
/usr/sbin/check_MailScanner
/usr/sbin/upgrade_MailScanner_conf

I'd like to go along with the majority of users, but this is just my $0.02 :)


Also Convert-BinHex  was added recently as a dependency of MailScanner, we
should include that perl module too.

------- Comment #19 From Jeremy Heslop 2004-03-30 16:18:13 0000 -------
Created an attachment (id=28416) [edit]
MailScanner-4.28.6-r1.ebuild revised

I made a couple of big changes so I should make this -r2 but I'm not :P

- Added clamav vlnx(mcafee) postfix sendmail USE options
- will change MailScanner.conf based on USE options
- made [postfix|sendmail].in files to be put into /etc/init.d
- cleaned up directory names almost to GameBond's specs more to gentoo specs.

Please test and let me know if you guys have any issues.

Jeremy

------- Comment #20 From Jeremy Heslop 2004-03-30 16:21:02 0000 -------
Created an attachment (id=28417) [edit]
mailscanner.initd revised

Another mailscanner init script.

This one has corrected pid name for new ebuild and a reload function, plus it
depends on mta and mta.in which allows it to restart if the mail server gets
restarted.

------- Comment #21 From Jeremy Heslop 2004-03-30 16:23:15 0000 -------
Created an attachment (id=28418) [edit]
postfix.in init

postfix.in init file for those who use postfix with mailscanner.

- has reload functionality
- provides mta.in and depends on mta

so to start mailscanner all you need to do is /etc/init.d/mailscanner start to
stop all you need to do is /etc/init.d/postfix stop

if I'm way of base someone please let me know.

------- Comment #22 From Jeremy Heslop 2004-03-30 16:24:27 0000 -------
Created an attachment (id=28419) [edit]
sendmail.in init

not sure if this one works 100% because I don't use sendmail. Can someone
please test and let me know.

So how can we get this ebuild into portage?

------- Comment #23 From Jeremy Heslop 2004-03-30 16:29:40 0000 -------
Created an attachment (id=28420) [edit]
MailScanner-4.28.6-r2.ebuild

ok I forgot to add check for adding postfix.in or sendmail.in based on USE
flag. So I decided to bump up the revision. Silly me.

------- Comment #24 From MATSUU Takuto 2004-03-30 19:28:51 0000 -------
*** Bug 35078 has been marked as a duplicate of this bug. ***

------- Comment #25 From Jeremy Heslop 2004-03-30 19:48:09 0000 -------
Created an attachment (id=28428) [edit]
MailScanner-4.28.6-r2.ebuild take two

Once again I forgot to add a line.

Needed to change /usr/sbin/ to /usr/bin in check_mailscanner.linux

Hopefully the last one for today. I'm tired.

Jeremy

------- Comment #26 From Richard Brown 2004-03-31 01:28:08 0000 -------
I've added an ebuild for Convert-BinHex here:
http://bugs.gentoo.org/show_bug.cgi?id=46332

------- Comment #27 From Richard Brown 2004-03-31 03:16:26 0000 -------
Created an attachment (id=28437) [edit]
Updated MailScanner ebuild

Added dependency on COnvert-BinHex ebuild and removed pkg_postinst () and it's
no longer necessary
Added use dependencies
Changed setup virus scanner section so that if you have use clamav and vlnx
then both will be used by default.

------- Comment #28 From Jeremy Heslop 2004-03-31 04:42:57 0000 -------
(From update of attachment 28428 [edit])
Made my ebuild obsolete. Nice changes Richard. 

------- Comment #29 From Richard Brown 2004-03-31 08:41:05 0000 -------
Created an attachment (id=28454) [edit]
MailScanner-4.28.6-r4.ebuild

Added USE flag and dependecy for f-prot
the sed command for virus.scanners.conf for clamav wasn't updating the path so
I've combined all the updates for virus.scanners.conf to one command.

I'm not sure why MailScanner has been renamed mailscanner in the /etc and
/usr/lib directories, as this is inconsistent with the program and ebuild name?


I haven't checked if update_virus_scanners works, or check_Mailscanner, but if
they don't they need to be fixed and installed in /etc/cron.hourly not
/usr/bin. and the same with clean.quarantine, except that goes in .daily

------- Comment #30 From GamesBond 2004-03-31 11:34:26 0000 -------
>>so to start mailscanner all you need to do is /etc/init.d/mailscanner start >> to stop all you need to do is /etc/init.d/postfix stop

Wouldn't it be more logical if the MailScanner init.d script would stop postfix
too? I think this is what the RatHead version of the init.d script with
MailScanner does. Just a thought :)

------- Comment #31 From Jeremy Heslop 2004-03-31 13:41:51 0000 -------
Richard,

I was trying to stick with gentoo standards on the bin files. At least I thought.  The names can go back to capitals if that is gentoo practice. check_mailscanner and update_virus_scanners works on my amd64 system just fine. I don't think check_mailscanner should be in cron.daily if someone doesn't want it to keep going (check_mailscanner will start MailScanner if it isn't already) This is the functionality of the init.d file. update_virus_scanners gets run automatically by the MailScanner daemon nightly (by config flag I think) so it doesn't need to be in cron. check.quarantine I could not find in the default distro. Is this a new file? Everything else is awsome. I'm glad this is a team effort.

GamesBond,

I thought about having that functionality in the mailscanner init.d file. I actually had that functionality originally when building mailscanner from scratch on a gentoo box recently, but I would forsee that some people would want to restart/reload/stop/start one of the postfix processes or mailscanner independently of themselves. Maybe I'm complicating things? Anyone have any imput into this?

------- Comment #32 From Kevin Spicer 2004-04-02 12:09:30 0000 -------
Hi, bit late to the game on this one but hopefully I can be of some help [I'm a
new Gentoo user, but a long time MailScanner user and the maintainer of
MailScanner-MRTG which I'll look at doing an ebuild for once the MailScanner
ebuild makes it into portage]

update_virus_scanners isn't called by MailScanner, it needs to be run from cron
- however don't get confused there are two update_virus_scanners files, both
bash scripts.  One goes in /usr/sbin, the other is a wrapper script that goes
in cron.hourly and calls the one in /usr/sbin.

There are also two check_MailScanners, the one in cron.hourly serves to restart
MailScanner if it has stopped for some reason (the init script should create
/var/lock/subsys/MailScanner.off when MailScanner is stopped to prevent it
being restarted)

There is only one clean_quarantine and that should go in cron.daily.

Anyone made any progress on the MIME tools issue?  I understand that someone
involved with MIMEDefang has taken over as maintainer of MIME-tools and some
people are trying to get Julian's patches included.  As an interim measure I
have one idea.  As part of the MailScanner ebuild download, patch and install
MIME-tools in the MailScanner libs directory.  Because directories indicated by
the lib pragma are checked first MailScanner would always use the customised
version without affecting the unpatched MIME-tools if that is also installed. 
If others agree that is a good idea I will be happy to work on implementing it.

------- Comment #33 From Jeremy Heslop 2004-04-02 12:21:53 0000 -------
Kevin,

Thanks for clearing up any confusion. I have never used the "other" bash scripts that get put into cron. I will have to make sure I do that for increased reliability. Thanks for your input and for helping with any ebuild modifications. I am still new to the ebuild process, but will help where I can.

------- Comment #34 From Richard Brown 2004-04-03 00:43:14 0000 -------
Hi Kevin, I've just did this yesterday in an ebuild I made for 4.28.7, it
downloads Julian's patched MIME::Tools and installs it into the same libs
folder. I just want to make a couple of other changes to the build and I'll
post it up so every can have a look at it.

------- Comment #35 From Richard Brown 2004-04-03 10:33:57 0000 -------
Created an attachment (id=28626) [edit]
First 4.29.7 ebuild

------- Comment #36 From Richard Brown 2004-04-03 10:34:49 0000 -------
Created an attachment (id=28627) [edit]
conf.d/mailscanner

------- Comment #37 From Richard Brown 2004-04-03 10:35:36 0000 -------
Created an attachment (id=28628) [edit]
conf.d/sendmail

------- Comment #38 From Richard Brown 2004-04-03 10:36:05 0000 -------
Created an attachment (id=28629) [edit]
conf.d/sendmail.in

------- Comment #39 From Richard Brown 2004-04-03 10:36:38 0000 -------
Created an attachment (id=28630) [edit]
cron.hourly/check_MailScanner

------- Comment #40 From Richard Brown 2004-04-03 10:37:09 0000 -------
Created an attachment (id=28631) [edit]
cron.hourly/update_virus_scanners

------- Comment #41 From Richard Brown 2004-04-03 10:37:47 0000 -------
Created an attachment (id=28632) [edit]
init,d/mailscanner

------- Comment #42 From Richard Brown 2004-04-03 10:38:24 0000 -------
Created an attachment (id=28633) [edit]
init.d/sendmail

------- Comment #43 From Richard Brown 2004-04-03 10:39:08 0000 -------
Created an attachment (id=28634) [edit]
init.d/sendmail.in

------- Comment #44 From Richard Brown 2004-04-03 11:08:35 0000 -------
Sorry, forgot to add this as a comment to the new ebuild. And just realised
that i've given the wrong names to all the other files. the correct names are
cron.update_virus_scanners, cron.check_MailScanner, initd.sendmail etc. and
confd.sendmail etc. and they all belong in the files subdirectory

This is an ebuild for MailScanner 4.29.7-1 - changes are:

Creates custom config directory and copies over example file (new in this
version of MailScanner)

Checks for the existence of an /etc/mailscanner/MailScanner.conf and if it
exists runs upgrade_mailscanner_conf on it, and the latest packaged version of
the conf file. This new file is that one that is installed, so hopefully there
will be few or no changes to MailScanner.conf for etc-udpate to complain about.

Sendmail actually runs as root by default on gentoo (or at least it did on
mine) 
so I've stopped changing the default RUNAS for that, and also the regexp were
removing the trailing whitespaces for some variables, confusing 
upgrade_mailscanenr_conf.

I've added a new use flag portage-mimetools, using it will cause MailScanner to
use whatever version of MIME::tools is stable in portage, not using it will
cause Julian's patched version to be installed into /usr/lib/mailscanner/MIME
and this will then be used by MailScanner, before any version that may be
intsalled from portage.

Looking at my redhat install MailScanner executables are installed to sbin not
bin, so i've changed that.

The default gentoo init script for sendmail uses killall to stop sendmail, this
meant that stopping sendmail to stop sendmail out would also kill sendmail in.
So i've created a new initscript for sendmail and sendmail.in. Postifx may need
similar changes, but I've not tried it yet.

The tar distribution of MailScanner doesn't include cron scripts that I can
see, so I've re-created then here. upgrade_virus_scanners uses a delay variable
from conf.d/mailscanner

KNOWN PROBLEMS:

The ebuild should refuse to install if neither sendmail or postfix is
specified, instead it installs as sendmail without depending on it, and it
installs differently from when you do specify sendmail at the moment.

check_MailScanner: the ebuild currently uses check_MailScanner.linux, however
the provided check_MailScanner is newer and functionally different. The .linux
version doesn't understand the -q tag used in the cron script that calls it, so
outputs the PID of MailScanner to STDOUT every hour. Also, when starting, both
check_MailScanner and the initscript echo "starting mailscanner"

TNEF: We currently default to using the Convet-TNEF perl module. There's also
an ebuild for a non-perl version (net-mail/tnef). MailScanner can be configured
to use this, so this ebuild should probably also present that option.

I haven't added a clean.quarantine cron script yet.

Still not convinced about uncapitalizing MailScanner and check_MailScanner is
capitalized at the moment.

That's all I can think of at the moment, it's probably going to be a quite a
few days before I have time to do anymore work on this, so if someone else
wants to move the ebuild further please do, I wouldn't have been able to do
this if it hadn't been for others working on the build.

use.local.desc
net-mail/MailScanner:postfix - Configure with postfix as mta
net-mail/MailScanner:sendmail - Configure with sendmail as mta
net-mail/MailScanner:clamav - Use clamav as one of the virus scanners
net-mail/MailScanner:vlnx - Use Mcafee vlnx as one of the virus scanners
net-mail/MailScanner:f-prot - Use f-prot as one of the virus scanners
net-mail/MailScanner:spamassassin - Configure to use Mail::SpamAssassin
net-mail/MailScanner:portage-mimetools - Use current portage version of
MIME::Tools (defaults to own copy)

------- Comment #45 From Kevin Spicer 2004-04-03 11:26:43 0000 -------
Created an attachment (id=28637) [edit]
initd.mailscanner-mta

------- Comment #46 From Kevin Spicer 2004-04-03 11:28:38 0000 -------
Created an attachment (id=28638) [edit]
confd.mailscanner-mta

------- Comment #47 From Kevin Spicer 2004-04-03 11:38:20 0000 -------
Damn, looks like we've been working on similar things!

I've just added two attachments init.d/mailscanner-mta and conf.d/mailscanner-mta, these do job of starting whichever mta is installed (both incoming and outgoing), either sendmail, postfix or exim (I ignored zmailer as there isn't an ebuild for it.
I've essentially reimplemented the functionality of the init script supplied with MailScanner (except for starting/stoping mailscanner itself), including the ability to start or stop only the incoming or outgoing process.

Richard, I haven't looked at your new init scripts yet (and I'm not trying to start a competition!) but it strikes me that one potential problem is that your sendmail or postfix script will collide with the script of the same name from the respective MTA ebuild.  Is /etc/init.d a protected area?  if it is that means we would have to reply on people doing the right thing with etc-update (including when they update their MTA) this could cause some support issues.
On the other hand the problem with my script is it needs to provide mta which makes depscan.sh complain.

------- Comment #48 From Richard Brown 2004-04-03 12:01:53 0000 -------
Kevin, you're right. All of /etc/ should be protected so yes, although an
upgrade won't break my sendmail init script, using etc-udpate after it the
wrong way would. I had a look around and I can't see anyway to get out of the
fact that having sendmail installed will install a sendmail initscript that
provides "mta", so I decided to replace it. If we can get around the dependency
thing I would also prefer a monolithic init script, especially as I see you've
added start and stop in and out. 

If we were having a competition (which we're not :-)) you'd win, you've nabbed
more from the RedHat init script and improved on it. I hadn't finished doing
that yet.

I'll wait a while before I do anythin initscript related, see if we can get
round the dependcy problem. If you've got time you could try a post to
gentoo-dev, or I might when I get back to work on Monday.

------- Comment #49 From Kevin Spicer 2004-04-03 12:13:18 0000 -------
From a little testing it appears that if depscan.sh finds two packages with the
same provide it picks the name that is alphabetically first, so mailscanner-mta
will win ahead of sendmail and postfix (but not exim).  Maybe a nice name early
in the alphabet is the answer!

I'm working on a list of files in the rpm that are missing in the tarball, once
I have them I'll drop Julian a line and see if I can persuade him to include
them  (he is usually pretty accomodating) 

------- Comment #50 From Kevin Spicer 2004-04-03 14:58:20 0000 -------
Progress on the three missing cron scripts!  Julian has kindly agreed to add
them to the tarball and has even put up an unofficial tarball for us to test
with.  Note that this tarball is not a full public release and at some point it
will be replaced by the next beta with the same name/ release number.
www.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/MailScanner-4.30.1-1.tar.gz

The scripts can be found in bin/cron

------- Comment #51 From Kevin Spicer 2004-04-04 14:45:36 0000 -------
Created an attachment (id=28703) [edit]
confd.mailscanner-mta

Changes to confd.mailscanner-mta to correct the settings for exim

------- Comment #52 From Kevin Spicer 2004-04-04 14:46:43 0000 -------
Created an attachment (id=28704) [edit]
initd.mailscanner

Revised mailscanner init script with following changes

Replaced mta and mta.in dependency with mailscanner-mta
Don't use start-stop-daemon as check_MailScanner isn't a daemon (the pidfile
was no use as this reflects the pid of check_MailScanner, not the MailScanner
processes themselves)
when starting & stopping return status based on check_MailScanner/ killall, not
on the final rm or touch, which may fail.
Reload return status based on success of kill command (or bad status if no
processes found)
Add restart action with sleep statement

------- Comment #53 From Kevin Spicer 2004-04-04 14:48:06 0000 -------
(From update of attachment 28703 [edit])
Forgot to mention that my guess earlier that the choice of which init script
that provides mta was based on its name is wrong.  I can't work out how it
selects it!

------- Comment #54 From Kevin Spicer 2004-04-04 14:58:38 0000 -------
Created an attachment (id=28705) [edit]
4.30.1-1 [TEST PACKAGE] ebuild

THIS EBUILD IS AGAINST A TEST PACKAGE (which Julian added the missing files to
for us) NOT FOR PRODUCTION USE, CONTENTS OF THE TARFILE MAY CHANGE!

This now builds and works on my system (sendmail, clam, f-prot, SpamAssassin). 
I think I  have addressed several of Richards outstanding issues.  Outstanding
issues I have...
1) MIMEtools turns out to be a dependency of some of the other perl modules, so
is installed anyway [even though it won't be used].  I presume the lib pragma
in the MailScanner script is globally significant so used perl modules will use
the version of MIMEtools we install - anyone know for sure?  I also think we
should remove the option of not installing the MIMEtools patches, since its not
a good idea to give the option of something that will break MailScanner in
subtle ways.
2) conflicts with both sendmail and mailscanner-mta init scripts providing mta.


Several of the changes I've made are to make it more like the rpm installation
(esp the capitalisation).  My reason is that there are currently two default
layouts (rpm and tar) to install MailScanner, adding another different layout/
filenames will only complicate things for users when they try and get support
on the MailScanner list.
Heres my full list of changes...
Combined elsif 'use sendmail' and defaults as sendmail is default
If not virus scanner in USE then deault to Virus Scanners=none leaving Virus
Scanning=yes so that filename checks etc are still done.
Added three cron jobs from Julians package
use check_MailScanner rather than check_MailScanner.linux, as that is the
correct one.
Don't chown /var/spool/MailScanner to mail:mail for sendmail
Necessary changes to MailScanner.conf for clamav
Correct $BASEBIN to ${BASE}/sbin
make and make install mime tools, much easier
add MIMEWORKDIR variable, so it only needs to be changed in one place
Make lib directory and etc directory MailScanner not mailscanner (so as not to
confuse things when people try and follow howto's or ask for  help on the
MailScanner list etc.)
Redirect STDERR of upgrade_MailScanner_conf to /dev/null
Escaped ? id sed RE's so they work.
Generate a sensible %org-name% from the dns domain
Added exim support to ebuild
Ebuild now requires one of postfix, sendmail or exim.  If none given in use
flags then it will require sendmail by default (requiring mta isn't sufficient)

Separated DEPENDS and RDEPENDS
uild.

------- Comment #55 From Kevin Spicer 2004-04-05 14:51:18 0000 -------
I have submitted a bug report on the problem caused by multiple init scripts
providing the same virtual dependency.  I've also created some patches which
provide a possible solution to it (by allowing the user to specify a preferred
real package to satisfy a virtual dependency).
Bug #46897

------- Comment #56 From Remco Barendse 2004-04-20 10:49:41 0000 -------
I tried to install the test package ebuild, when I try to install I get : 
test mailscanner # ACCEPT_KEYWORDS="~x86" emerge -uDav net-mail/mailscanner-4.30.1-r1 

These are the packages that I would merge, in order: 
Calculating dependencies 
!!! Problem in net-mail/mailscanner-4.30.1-r1 dependencies. 
!!! "Specific key requires an operator (net-mail/mailscanner-4.30.1-r1) (try adding an '=')" 

The system is an almost clean install, probably none of the perl packages are installed yet. Did I goof up somewhere or is it complaining about deps in the ebuild?

------- Comment #57 From Chetan Sarva 2004-04-20 14:09:33 0000 -------
Remco, the problem is in your command line. It should be as follows:
# ACCEPT_KEYWORDS="~x86" emerge -uDav =net-mail/mailscanner-4.30.1-r1 

Notice the = before net-mail. Or you can simply do:
# ACCEPT_KEYWORDS="~x86" emerge -uDav mailscanner

which should work just the same.

------- Comment #58 From Kevin Spicer 2004-04-20 15:32:11 0000 -------
Its worth pointing out at this stage, further to my previous remarks about this
being a test package that Julian did specifically for us to test, Julain has
now released a real (unstable) package with this number.  Therefore the ebuild
I uploaded will now build that package.  There have been some (fairly serious)
bugs reported with the real 4.30.1-1, so I would urge not to install this
ebuild on a production system.  Once Julian gets a new package out I'll revise
this (unless someone beats me to it!).  This ebuild also still needs a fair bit
of work to met the Gentoo guidelines, not to mention resolving the dependency
issue.

------- Comment #59 From Remco Barendse 2004-05-01 11:22:33 0000 -------
4.30 final has been released :)

How can i emerge the mailscanner ebuild from bugzilla? Could not find any pointers to documents describing how to emerge ebuilds from here

------- Comment #60 From Kevin Spicer 2004-05-01 12:58:25 0000 -------
Created an attachment (id=30474) [edit]
4.30.3-r1 ebuild

Updated (single line change only) for the new stable version.  I'll try and
find time soon to go through the ebuild and make sure it conforms to Gentoo
standards (which I'm sure it doesn't right now)

------- Comment #61 From Kevin Spicer 2004-05-01 13:12:37 0000 -------
Remco,
I'm not sure if this is the correct way to do it, but it worked for me...

I did it by creating a local portage tree.
Create a directory /usr/local/portage
Add the following single line to /etc/make.conf
PORTDIR_OVERLAY="/usr/local/portage"
That creates the portage tree, now create the following directories
/usr/local/portage/net-mail
/usr/local/portage/net-mail/MailScanner
/usr/local/portage/net-mail/MailScanner/files
Grab the most recent) confd.mailscanner, confd.mailscanner-mta, initd.mailscanner, initd.mailscanner-mtam scripts from here and put them in the files directory you just created
Grab the ebuild and save it to /usr/local/portage/net-mail/MailScanner/MailScanner-4.30.3-r1.ebuild

Now you're ready to build MailScanner, remember that the package is currently masked so...
ACCEPT_KEYWORDS="~x86" emerge MailScanner

You WILL get this error
!!! No package digest file found: /usr/local/portage/net-mail/MailScanner/files/digest-MailScanner-4.30.3-r1
!!! Type "ebuild foo.ebuild digest" to generate it.

So...
ebuild MailScanner-4.30.3-r1.ebuild digest

Then (again)
ACCEPT_KEYWORDS="~x86" emerge MailScanner

Job done!  Obviously you still need to deal with the rc-update stuff and (re)starting MailScanner.  If this is an upgrade it is worth noting that the ebuild calls upgrade_mailscanner_conf for you to produce the new config file, but you still need to run etc-update to copy the updated config over the old one.

------- Comment #62 From Remco Barendse 2004-05-02 02:59:02 0000 -------
The ebuild did install properly now, thanks for the clear howto :)

When checking the installation with a running redhat box i found some differences / issues:
/etc/init.d/mailscanner doesn't have caps, the default seems to be /etc/init.d/MailScanner

TNEF decoder (and this is important, it's required to decode rich text mails) is missing:
The perl module is installed by the ebuild but not the tnef decoder itself, we could use the ebuild as it is in portage:
net-mail/tnef

The default settings for ClamAV (workdir and permissions) need only be set if ClamAV is used with external unzip etc programs, I believe this is not the default configuration for MailScanner. It might open a security hole according to the info in MailScanner.conf

The MailScanner config file upgrade script upgrade_MailScanner_conf is not installed by the ebuild.

Then a small typo at the bottom of the ebuild: The directory /var/spool/MailScanner/archiv is created, I believe it should read archive unless we are installing in German :)

I will do some further testing, this setup will go into production later today.

------- Comment #63 From Remco Barendse 2004-05-02 03:25:44 0000 -------
Sorry forgot to add 2 other bugs:
/var/spool/mqueue.in/  is not created by the ebuild

The init.d script for mailscanner fails to restart complaining about something missing after the sleep command.

------- Comment #64 From Kevin Spicer 2004-05-02 04:43:12 0000 -------
Created an attachment (id=30508) [edit]
initd.mailscanner

Capitalise MailScanner

------- Comment #65 From Kevin Spicer 2004-05-02 04:43:51 0000 -------
Created an attachment (id=30509) [edit]
initd.mailscanner-mta

Capitalise MailScanner

------- Comment #66 From Kevin Spicer 2004-05-02 04:48:16 0000 -------
Created an attachment (id=30510) [edit]
confd.mailscanner

Adds missing RESTART_DELAY variable, so that 
/etc/init.d/MailScanner restart
works correctly

------- Comment #67 From Kevin Spicer 2004-05-02 04:50:00 0000 -------
Created an attachment (id=30511) [edit]
initd.mailscanner

Fixed a typo I managed to introduce into the one I uploaded a few minutes ago. 
Sorry!

------- Comment #68 From Kevin Spicer 2004-05-02 05:00:55 0000 -------
Created an attachment (id=30512) [edit]
4.30.3-r2 ebuild

Updated ebuild to address points raised by Remco, and a couple of other
points..

Capitalised names of both init scripts (and associated conf.d files)
Added runtime dependency on net-mail/tnef
Installed upgrade_MailScanner_conf [although it isn't actually requiried since
the ebuild runs it, its absense may cause some confusion]
Corrected the archiv typo
Create /var/spool/mqueue.in [NOTE: need to look at queue requirements, and
configuration for exim and postfix]
Installed Sophos.install as that was missing
Changed all the 'touch /some/path/.keep' to use the keepdir command as that is
the correct way to do it.

The one thing I havn't changed is the clam permissions.  The default clam
configuration with MailScanner will use external unpackers if the internal one
fails (which I have seen happen with some viruses), so these settings do need
to be set like this (the comment at the top of the clam wrapper explains this,
although its hardy independant confirmation as I wrote it!).  The warning in
the conf file is just a get out in case someone sets them to something stupid
(like 777)

------- Comment #69 From Arno 2004-05-05 02:19:28 0000 -------
I've tried the ebuild. It seems to work just nicely, but I get these warnings
when I env-update now:

 * Caching service dependencies...
 *  Service 'sendmail' already provide 'mta'!;
 *  Not adding service 'MailScanner-mta'...
 *  Service 'sendmail' already provide 'mta'!;
 *  Not adding service 'postfix'...

Is this a problem with the ebuild maybe? Can it be fixed?

------- Comment #70 From Kevin Spicer 2004-05-05 10:13:42 0000 -------
Those messages are what Bug #46897 is about.

------- Comment #71 From Remco Barendse 2004-05-10 05:50:38 0000 -------
MS 4.30.3-2 is released! This release fixes some issues with TNEF, pretty
important.

Also I installed the latest ebuild on another system, and found the following.
The MailScanner.conf file contains this line:
SpamAssassin Site Rules Dir = /etc/mail/spamassassin
But this directory does not exist on a newly installed gentoo box. Maybe we
should create it.

Also for some reason the 2 virusscanners I had installed on the box before were
not recognized by the ebuild and, consequently, not put in the MailScanner.conf
file virus scanners was set to none as opposed to clamav f-prot

Then there is a small bug in MailScanner.conf the pid file is capitalised but
the pid name in MailScanner.conf was not. The correct line should be:
PID file = /var/run/MailScanner.pid

I'll keep testing :)

------- Comment