Hi, I'm using this software for years now, and it's a very powerfull spam / ham / virus / regular mail tool, that let user administer their mail scannign pref. This is my 1st attempt to submit an ebuild, I've done my best to keep in Gentoo's guidelines. Also, some details : o You can build the package without any web related files, let you split your install on webservers / scanning engines. o Support webapp-config o Support MySQL / PostgreSQL backends Comments are welcome. Regards --Alexandre
Created attachment 84719 [details] maia-1.0.1.ebuild My ebuild
You forgot to add the file postinstall file. Adm note: should be assigned to net-mail team
Created attachment 84724 [details] postinstall Here is the missing postinstall file, sorry
Updated the ebuild as follow : o removed SLOT, since emerge complain about o Added missing PEAR dependencies . dev-php/PEAR-Log . dev-php/PEAR-Net_SMTP . dev-php/smarty o Added detection of WDDX in PHP (required) o Touch config.php file to change Smarty path to Gentoo default o Added a hook script to change themes subdir to let Smarty write compiled templates
Created attachment 84784 [details] maia-1.0.1.ebuild
Created attachment 84785 [details] reconfig
Created attachment 85471 [details] maia ebuild New ebuild ! Changes are : o Added DEPEND : . sys-apps/sed-4 . >=dev-lang/perl-5.8.2 o Added dependencies from amavis . app-arch/gzip . app-arch/bzip2 . app-arch/arc . app-arch/cabextract . app-arch/freeze . app-arch/lha . app-arch/unarj . app-arch/unrar . app-arch/zoo . dev-perl/Data-UUID . >=dev-perl/MailTools-1.58 . >=virtual/perl-libnet-1.16 o Added patch to issue 298 (still bugged ATM) o Creating missing directories o Changed $smarty_path to match Smarty 2.6.13 ebuild o Added init.d script (see another attachement called maia.rc)
Created attachment 85472 [details] init.d script From amavisd-new Modified to match maia requirement do a /etc/init.d/maia-amavis start to start it
Created attachment 85473 [details] reconfig This file is used at webapp-config stuff. Changed the file to create compiled directories for each template to let smarty put compiled files.
This ebuild doesn't seem to work for me. I downloaded the ebuild, the init.d script, the reconfig and the postinstall files, Put them into my overlay as net-mail/maia, I tried to emerge maia with the following use flags: +apache +crypt +mysql -postgres +vhosts. It emerged a number of dependancies and after I remerged php twice (once to add sqlite use flag for smarty, once to add wddx use flag for maia), it started to emerge maia... which got as far as: Using dev-lang/php-5.1.2 Checking for required PHP feature(s): >>> Unpacking source... >>> Unpacking maia-1.0.1.tar.gz to /var/tmp/portage/maia-1.0.1/work At which point it returned me to the command prompt, no additional output was generated, nothing extra was output the portage log files. I tried adding an einfo line to the ebuild before and after then 'unpack ${A} && cd "${S}"' line, but it only outputs the one before it, so i'm pretty certain that's the line it's failing on. Any ideas?
Probably missing the patch file (in files subdir). I'll post one ASAP
Created attachment 86263 [details, diff] smarty-plugins.patch This is a patch from ticket 298 https://secure.renaissoft.com/maia/ticket/298 This patch allow correct $smarty_path definition. Save this file under files/ subdir and name it "smarty-plugins.patch"
After adding the smarty-plugins.patch file and then renaming postinstall to postinstall-en.txt, the ebuild seems to have installed fine. I then followed the instructions and eventually went to the admin/configtest.php page. File Permissions FAILED: Cannot write to: ../themes/desert_sand/compiled Cannot write to: ../themes/dgm/compiled Cannot write to: ../themes/ocean_surf/compiled Please set your file permissions so that the web server user can write to the above directories. PHP OK: 5.1.2-pl0-gentoo register_globals OK Smarty Template Engine FAILED: Not installed. The Smarty templating engine is required. See this page for more information about downloading and installing Smarty. MySQL Support OK: MySQL support available PostgreSQL Support SKIPPED: PostgreSQL support not available Database Support OK: Database support is ok PEAR OK PEAR::Mail_Mime FAILED: Not installed. This PHP extension is required to decode MIME-structured e-mail. Use pear install Mail_Mime to install this. PEAR::DB FAILED: Not installed. This PHP extension is required in order to provide database abstraction. Use pear install DB to install this. PEAR::DB_Pager FAILED: Not installed. This PHP extension is required in order to paginate the list of mail items in the quarantines and the ham cache. Use pear install DB_Pager to install this. PEAR::Net_Socket FAILED: Not installed. This PHP extension is required for Net_SMTP to send mail when rescuing email PEAR::Net_SMTP FAILED: Not installed. This PHP extension is required to send mail when rescuing email PEAR::Auth_SASL SKIPPED: Not installed. Optional package. If it is available, the Net_SMTP package will be able to support the DIGEST-MD5 and CRAM-MD5 SMTP authentication methods. Otherwise, only the LOGIN and PLAIN methods will be available. PEAR::Net_IMAP SKIPPED: Not installed. This PHP extension is required to authenticate maia against IMAP. PEAR::Net_POP3 SKIPPED: Not installed. This PHP extension is required to authenticate maia against POP3. PEAR::Log FAILED: Not installed, but only required if you want to be able to log user and administrator activity. Use pear install Log to install this PHP extension. IMAP library FAILED: Not installed, but only required if you want to be able to authenticate with IMAP or POP3. See this page for more information about downloading the IMAP extensions to PHP, and instructions for recompiling PHP with the --with-imap flag. LDAP library FAILED: Not installed, but only required if you want to be able to authenticate with LDAP. See this page for more information about downloading the LDAP extensions to PHP, and instructions for recompiling PHP with the --with-ldap flag. MCrypt library OK: 2.5.7 with Blowfish and CBC BC math library FAILED: Not installed. This PHP extension is required in order to decode certain types of URLs. See this page for more information about recompiling PHP with the --enable-bcmath flag. gd graphics library OK: bundled (2.0.28 compatible) The file permissions seem to be because webapp-config defaulted to installing the files as root, so everything is owned by root, changing ownership of just the themes directory to apache solved that problem, Is there a proper way I should do this? Should I run webapp-config with -u apache or something? For everything else, I've checked things, like the Pear modules, they're all installed according to Portage, So any ideas why Maia can't see them?
(In reply to comment #13) > After adding the smarty-plugins.patch file and then renaming postinstall to > postinstall-en.txt, the ebuild seems to have installed fine. I then followed > the instructions and eventually went to the admin/configtest.php page. ... > The file permissions seem to be because webapp-config defaulted to installing > the files as root, so everything is owned by root, changing ownership of just > the themes directory to apache solved that problem, Is there a proper way I > should do this? Should I run webapp-config with -u apache or something? Yes, the hook script change directory owner to {VHOST_SERVER_UID}, so -u apache should be better, depending if apache run as apache user. > For everything else, I've checked things, like the Pear modules, they're all > installed according to Portage, So any ideas why Maia can't see them? Maia's developper have worked to make a better detection of installed Pear Modules. I hav'nt yet added their work into a patch, since this will be released in 1.0.2. Dont trust PEAR::xxx output when testing install ATM. Connect to login.php and this should work. But, you still have to install PEAR:DB_Pager manually : pear install DB_Pager Also, 1.0.2 will remove PEAR:DB_Pager (deprecated) in favor to PEAR:Pager (more geneirc pager class)
(In reply to comment #13) > After adding the smarty-plugins.patch file and then renaming postinstall to > postinstall-en.txt, the ebuild seems to have installed fine. I then followed > the instructions and eventually went to the admin/configtest.php page. ..snip.. If you relly want a woring configtest.php, please consult this bug report, and use the proposed patch. https://secure.renaissoft.com/maia/ticket/336 Il will show you installed pachage, but cannot by now determine PEAR::xx package version. Seems so be caused by the way how Gentoo handle PEAR::xxx packages.
Created attachment 92015 [details] maia-1.0.1 ebuild New ebuild : o added french locale o forced Smarty 2.6.14 version o Corrected amavis user creation o Added patches for tickets 336, 341, 342 (https://secure.renaissoft.com/maia/ticket/336) o Added templates for non web based installation (now in /var/amavis/templates) If you install this ebuild, dont forget button-htmlentities.patch, configure-detection.patch and maia-fr-060614.patch (in /files subdir). You can also get the full tarball : http://www.ghisoli.ch/run/?q=node/30
Created attachment 92016 [details, diff] configure-detection.patch This will help the config check and the PEAR detection module. See bug 336 https://secure.renaissoft.com/maia/ticket/336
Created attachment 92017 [details, diff] maia-fr language pack This will convert your fr lang pack with full HTML chars (no more UTF-8 encoded). Check bug 341 https://secure.renaissoft.com/maia/ticket/341
Created attachment 92018 [details, diff] button-htmlentities.patch While using HTML special chars, buttons will not work anymore. This patch will use htmlentities() to make translations works. See bug 342 https://secure.renaissoft.com/maia/ticket/342
Two small bugs with the ebuild: - missing dep: dev-perl/BerkeleyDB - the scripts in /usr/bin are installed as root, not as amavis user. I don't know why, haven't found out how to do it.
Starting from Smarty 2.6.12, the directory structure has changed from being /usr/share/php/Smarty to /usr/share/php/smarty (lower case smarty). Maia is expecting a capitalized Smarty so to keep from modifying maia I just symlinked the two: > cd /usr/share/php > ln -s smarty Smarty Hopefully either maia will be ammended (if this isn't a gentoo specific smarty change) or the instructions somewhere could be adjusted to include this small required action. Cheers, JPD
(In reply to comment #20) > Two small bugs with the ebuild: > - missing dep: dev-perl/BerkeleyDB > - the scripts in /usr/bin are installed as root, not as amavis user. I don't > know why, haven't found out how to do it. > Why a BerkleyDB depency ? This is a spamassassin one, I think maia did not use berkley for itself. About ownership of script, I'll change that.
Created attachment 101924 [details, diff] button-htmlentities.patch New version of the patch, that correct a forgotten button in white / black list management.
(In reply to comment #21) > Starting from Smarty 2.6.12, the directory structure has changed from being > /usr/share/php/Smarty to /usr/share/php/smarty (lower case smarty). Maia is > expecting a capitalized Smarty so to keep from modifying maia I just symlinked > the two: > > cd /usr/share/php > > ln -s smarty Smarty > > Hopefully either maia will be ammended (if this isn't a gentoo specific smarty > change) or the instructions somewhere could be adjusted to include this small > required action. It's in the ebuild ! Take this one : http://bugs.gentoo.org/attachment.cgi?id=92015 If you look at comment #16, the ebuild is updated, and smarty version required is 2.6.14 ! to avoid this problem.
Hi I am going to try this, but under what do I need to put it before I actually add it to my system with the ebuild digest option? under mail-filter/? thanks. also what files do I need.. are all those patch need to be inside etc.. thanks
(In reply to comment #25) > Hi I am going to try this, but under what do I need to put it before I > actually add it to my system with the ebuild digest option? > under mail-filter/? thanks. > also what files do I need.. are all those patch need to be inside etc.. > thanks > Hum, if you dont know how to install overlays, you should probably read docs. http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds
any one going to bump to 1.0.2? it just came out today.. and for what they say is 100% compatible with 1.0.1 so the ebuild should work.. can someone try it? thanks.
I am having trouble with the ebuild... !!! ERROR: mail-filter/maia-1.0.1 failed. Call stack: ebuild.sh, line 1546: Called dyn_unpack ebuild.sh, line 708: Called src_unpack maia-1.0.1.ebuild, line 91: Called epatch '/usr/local/portage/mail-filter/maia/files/maia-fr-060614.patch' eutils.eclass, line 341: Called die !!! Failed Patch: maia-fr-060614.patch! !!! If you need support, post the topmost build error, and the call stack if relevant. !!! This ebuild is from an overlay: '/usr/local/portage' and here is some of the output from that log file: ***** maia-fr-060614.patch ***** ================================ PATCH COMMAND: patch -p0 -g0 -E --no-backup-if-mismatch < /usr/local/portage/mail-filter/maia/files/maia-fr-060 614.patch ================================ can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -ru 06-05-15/admindex.php html-2006-06-14/admindex.php |--- 06-05-15/admindex.php 2006-06-14 14:06:21.000000000 +0200 |+++ html-2006-06-14/admindex.php 2006-06-14 14:09:32.000000000 +0200 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored can't find file to patch at input line 25 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -ru 06-05-15/admindomains.php html-2006-06-14/admindomains.php |--- 06-05-15/admindomains.php 2006-06-14 14:06:21.000000000 +0200 |+++ html-2006-06-14/admindomains.php 2006-06-14 14:09:32.000000000 +0200 -------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored can't find file to patch at input line 66 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -ru 06-05-15/adminhelp.php html-2006-06-14/adminhelp.php |--- 06-05-15/adminhelp.php 2006-06-14 14:06:21.000000000 +0200 |+++ html-2006-06-14/adminhelp.php 2006-06-14 14:09:32.000000000 +0200 and goes ...
(In reply to comment #27) > any one going to bump to 1.0.2? > it just came out today.. and for what they say is 100% compatible with 1.0.1 > so the ebuild should work.. can someone try it? > thanks. > Yes, I've a version, but need more tests before releasing that. Sounds like we need less patching :)
Created attachment 105567 [details, diff] ebuild patch the new french lang pack on maia website is up to date and the patch is not needed anymore. So, this ebuild patch remove relevant code.
(In reply to comment #28) > I am having trouble with the ebuild... > !!! ERROR: mail-filter/maia-1.0.1 failed. > Call stack: > ebuild.sh, line 1546: Called dyn_unpack > ebuild.sh, line 708: Called src_unpack > maia-1.0.1.ebuild, line 91: Called epatch > '/usr/local/portage/mail-filter/maia/files/maia-fr-060614.patch' > eutils.eclass, line 341: Called die > > !!! Failed Patch: maia-fr-060614.patch! > !!! If you need support, post the topmost build error, and the call stack if > relevant. This is because the language pack on server is now up to date, and you didnt not need anymore to patch it (related to maia ticket 341 - https://secure.renaissoft.com/maia/ticket/341) Please apply patch provided in comment #30 to your ebuild, it will remove the corresponding lines.
Created attachment 105935 [details] maia-1.0.2.ebuild New ebuild for maia 1.0.2. Changes are : o Updated copiright to 2007 o Fixed a typo on mysql dependecy o PHP required >= PHP o Added PEAR-Pager dep o Version >=dev-php/PEAR-Image_Graph-0.7.2 o Version >=dev-php/PEAR-Mail_Mime-1.3.0 o Depend on libpq only, not postgres itself, need more testers on it o Removed double dep on DBD-Pg You need also my new fr-070107.patch for the latest french locale. This version is not on production on my servers, because I need to change our own themes.
Created attachment 105937 [details, diff] fr-070107.patch This is the new french locale patch.
(In reply to comment #33) > Created an attachment (id=105937) [edit] > fr-070107.patch > > This is the new french locale patch. > do anyone have a tar with all the files of the new ebuild? when I download using the browser bugzilla screws up the name of the file and other sort of interesting stuff. thanks.
(In reply to comment #34) > (In reply to comment #33) > > Created an attachment (id=105937) [edit] > > fr-070107.patch > > > > This is the new french locale patch. > > > > > do anyone have a tar with all the files of the new ebuild? when I download > using the browser bugzilla screws up the name of the file and other sort of > interesting stuff. I've updated the package here : http://www.ghisoli.ch/run/node/30 It's a snapshot of my svn trunk, hope it's ok :)
(In reply to comment #35) > (In reply to comment #34) > > (In reply to comment #33) > > > Created an attachment (id=105937) [edit] > > > fr-070107.patch > > > > > > This is the new french locale patch. > > > > > > > > > do anyone have a tar with all the files of the new ebuild? when I download > > using the browser bugzilla screws up the name of the file and other sort of > > interesting stuff. > > I've updated the package here : > http://www.ghisoli.ch/run/node/30 > > It's a snapshot of my svn trunk, hope it's ok :) > much Thanks! it installed great. now my other question for gentoo.. do I configure postfix,etc.. as normal? or should I be careful with anything in particular?
(In reply to comment #36) > much Thanks! it installed great. > now my other question for gentoo.. do I configure postfix,etc.. as normal? > or should I be careful with anything in particular? > I'm not familar with postfix, since I only use sendmail on relays, but reading docs about amavisd-new could be helpfull, since this is the only part of maia that interact with your mail server (except for releasing mail in quarentine, but it use regular PEAR SMTP socket to communicate with any port 25 mail server).
(In reply to comment #37) > (In reply to comment #36) > > > much Thanks! it installed great. > > now my other question for gentoo.. do I configure postfix,etc.. as normal? > > or should I be careful with anything in particular? > > > > I'm not familar with postfix, since I only use sendmail on relays, but reading > docs about amavisd-new could be helpfull, since this is the only part of maia > that interact with your mail server (except for releasing mail in quarentine, > but it use regular PEAR SMTP socket to communicate with any port 25 mail > server). > hi thanks for the reply, hmm for what I read in maia site is that with postfix you dont need that.. since postfix can use other mechanism it half on the configuration files to pipe emails inside to like amavis etc. if anyone here uses maia with gentoo and postfix I will really will thank any tips you have before I do my install.
Hi I am having some problems with the php/apache front end of maia PEAR::Mail_Mime FAILED: Not installed. This PHP extension is required to decode MIME-structured e-mail. Use pear install Mail_Mime to install this. and so on for all the PEAR stuff.. but it is installed...for example: ebuild R ] dev-php/PEAR-Net_IMAP-1.0.3-r1 26 kB whats im I missing?
(In reply to comment #39) > Hi I am having some problems with the php/apache front end of maia > PEAR::Mail_Mime FAILED: Not installed. This PHP extension is required > to decode MIME-structured e-mail. Use pear install Mail_Mime to install this. > > and so on for all the PEAR stuff.. but it is installed...for example: > ebuild R ] dev-php/PEAR-Net_IMAP-1.0.3-r1 26 kB > > whats im I missing? > You just missing reading the start of the configtest.php page. Gentoo is one of the distrib where PEAR_registry is not updated when a new PEAR package is installed. In short, dont trust configtest.php about PEAR packages installed. The ebuild take care of all dependencies needed (except mistakes .. but in this case, please report here :) Relevant configtest.php : "(Note: some distros do not update pear's registry correctly and these tests may appear inaccurate. Please contribute to this ticket if you have any insight!)" And the link to the ticket is : http://www.maiamailguard.com/maia/ticket/306
Hmmm, seems the exeopts -oamavis -gamavis -m0700 Does not work quite as expected, as right after installation I get: -rwx------ 1 root root 715619 Feb 21 12:03 /usr/sbin/amavisd-maia* and same for the support scripts in /usr/bin...
Created attachment 127049 [details] maia-1.0.2a Security patch ! Please use this ebuild, it's same as version 1.0.2 but correct a potential security hole : http://www.maiamailguard.org/maia/ticket/479 You can get the full ebuild tarball from here : http://www.ghisoli.ch/run/node/30
Created attachment 127071 [details] maia-1.0.2a.ebuild Corrected ebuild that protect your php configuration file. Thanks to Michiel van den Berg to point it out.
Just installed the 1.0.2a ebuild and the only things i ran into were that i had to recompile php with bcmath, gd and wddx USE flags, and i got the following messages from webapp-config: * mkdir: cannot create directory `./desert_sand/compiled': File exists * * mkdir: cannot create directory `./dgm/compiled': File exists * * mkdir: cannot create directory `./ocean_surf/compiled': File exists * Also, for importing maia-mysql.sql into MySQL the amavis db user also needs INDEX privileges. And because Gentoo doesn't update the PEAR registry when emerging PEAR modules, admin/configtest.php will report a bunch of failures about PEAR modules not being installed while they are, and function correctly. http://www.maiamailguard.com/maia/ticket/336 contains an old patch that adresses this issue. Applying the patch required me to do one chunk by hand. Everything else seems ok, thanks for your efforts!
Some of the perl dependencies have changed location in portage. To fix the ebuild, you need to make the following changes: replace dev-perl/Archive-Tar with perl-core/Archive-Tar replace dev-perl/IO-Zlib with perl-core/IO-Zlib
(In reply to comment #45) > replace dev-perl/Archive-Tar with perl-core/Archive-Tar > replace dev-perl/IO-Zlib with perl-core/IO-Zlib Depend on the virtual: replace dev-perl/Archive-Tar with virtual/perl-Archive-Tar replace dev-perl/IO-Zlib with virtual/perl-IO-Zlib
Created attachment 175372 [details, diff] ebuild 1.0.2a patch This patch applies to attachement #127071: maia-1.0.2a.ebuild to address comment #45 and comment #46 and do some ebuild cleanups. I still not very happy with the ebuild. Maybe I've to split the web frontend and the backend.