View previous topic :: View next topic |
Author |
Message |
Praxxus Apprentice


Joined: 26 Nov 2002 Posts: 193 Location: Indiana, US
|
Posted: Tue Jul 05, 2005 4:37 am Post subject: [UPDATED: March 2006] A new (working) qmail-ldap ebuild |
|
|
It has been almost a year since the most recent qmail-ldap ebuild has had anything of substance done to it. The qmail-ldap patch it installs turned one year old this past April.
Searches for "qmail-ldap" in the forums and on bugs show that there are lots of problems with the most recent version (1.03-r4). Some of these problems are inherent in the ebuild (files not installed), and some are due to its age (not finding the right compiler version). So I took the most recent stable qmail ebuild (1.03-r15) and qmail-ldap-ified it.
This ebuild adds six new USE flags over the 1.03-r4 ebuild, to allow greater compile-time flexibility. I think it actually manages to install all the executables that are supposed to be installed with qmail-ldap. I added a script for genererating the cdb files for tcpserver (qmail-rulesupdate). I managed to use, almost without modification, the conf/run/supervise layout from the more recent qmail-1.03 ebuild(s).
Everything I remembered that I did I put in the changelog: Code: | qmail-ldap-1.03-r5.ebuild:
Updated to use qmail-ldap-20050401a patch.
Added support for "zlib" and "debug" USE flags.
Added "notlsbeforeauth" USE flag, a-la "qmail-1.03-r15" ebuild.
Added "vmail" USE flag to support setup for virtual mail accounts.
Added "customerror" USE flag to include qmail-queue-custom-error patch,
used by simscan.
Added "mailcluster" USE flag for compiling in clustering support.
Added numerous missing docs (QLDAP*, for instance) to docs.
Added "qmail-rulesupdate" script for updating tcp rules.
Incorporated qmail-1.03-r15 run/conf/supervise scripts and settings
-EXCEPT: Changed authentication apps to qmail-ldap appropriate
-ones (auth_pop, auth_smtp)
Added Makefile to /var/qmail/control for updating locals.cdb and
rcpthosts.cdb
Removed checpassword/cmd5checkpssword dependency
Took a stab at a "dirmaker" script for setting up new accounts
automagically
Added "fix-ldflags" for setuid/lazy bindings warning
Attempt to base some LDAP config files on OpenLDAP configurations
. . . probably some more stuff was done. |
To test, I converted my home mail server over to this ebuild, and aside from a few things you can't really do in a "new" ebuild installation, it worked. Which I think is the first time it's been running an ebuild of qmail-ldap.
So now I think it's ready for public scrutiny. It can be downloaded from the bugzilla page for bug #97957, or from my homepage.
Constructive feedback welcome! I'm sure there's more that can be done to improve it.
On Edit: Changed subject to better reflect message content _________________ My glaucoma just got worse!
Last edited by Praxxus on Tue Mar 07, 2006 10:25 pm; edited 1 time in total |
|
Back to top |
|
 |
nabbed n00b


Joined: 20 Nov 2004 Posts: 12 Location: Australia
|
Posted: Sat Jul 09, 2005 2:35 pm Post subject: |
|
|
There was a problem creating the vmail user if it didn't exist.
I added the user manually and ran the emerge again and it worked.
The following was the error i received. I noticed that the group existed already but the user was not.
Code: | * Adding user 'vmail' to your system ...
* - Userid: 10000
* - Shell: /bin/bash
* - Home: /vmail
* - Groups: vmail
* - Extra: virtual mail user added for qmail-ldap
Usage: useradd [-u uid [-o]] [-g group] [-G group,...]
[-d home] [-s shell] [-c comment] [-m [-k template]]
[-f inactive] [-e expire]
[-p passwd] name
useradd -D [-g group] [-b base] [-s shell]
[-f inactive] [-e expire]
|
|
|
Back to top |
|
 |
Praxxus Apprentice


Joined: 26 Nov 2002 Posts: 193 Location: Indiana, US
|
Posted: Thu Jul 14, 2005 9:12 pm Post subject: |
|
|
nabbed wrote: | There was a problem creating the vmail user if it didn't exist.
I added the user manually and ran the emerge again and it worked. |
Yeah, part of that was ignorance, part of it was stupidity. Thanks for the heads up. I've made some tweaks to the ebuild, but kept it at r5 for now. It's updated on my home server and at bugs.gentoo.org.
Changelog over previous version: Code: | 13 Jul 2005; Ed Cates <[REDACTED]>
qmail-ldap-1.03-r5.ebuild:
Fixed "vmail" user account creation. Thanks to "nabbed" on the forums for
pointing that out.
Got rid of:
-files/1.03-r5/Makefile-ssl.patch
-files/1.03-r5/Makefile-zlib.patch
-files/1.03-r5/Makefile-debug.patch
-files/1.03-r5/qmail-ldap.h.vmail.patch
-temporary file to add LDAPFLAGS to Makefile
and replaced them with sed commands
Got rid of:
-files/control/rbllist
-files/control/dirmaker
-files/control/ldaplocaldelivery
-files/control/smtpcert
and replaced them with `cat` or `echo` commands in ebuild.
Added support for Kristof Bajnok's "Virtual domain support" patch.
See: http://www.sztaki.hu/~bajnokk/qmail-ldap-virtual.html
For this to work, "vmail" has to be set as a USE flag, and the
"VDOMAINS" environment variable must be properly set. See the ebuild
for details.
Allowed LDAPFLAGS to be passed as an environment variable, and added
a list of LDAPFLAGS to the ebuild
Added SPP support;
see: http://qmail-spp.sourceforge.net/
Thanks to Andre Celso Zaiats for the patch!
Added dns fix for ppc-macos . . . in case it ever works on ppc-macos
Made the "queue custom error" patch included by default; removed
"customerror" use flag |
_________________ My glaucoma just got worse! |
|
Back to top |
|
 |
Praxxus Apprentice


Joined: 26 Nov 2002 Posts: 193 Location: Indiana, US
|
Posted: Fri Jul 15, 2005 3:44 am Post subject: |
|
|
. . . except the SPP stuff doesn't seem to work so well.
I'll fix the ebuild tomorrow. Bleah. _________________ My glaucoma just got worse! |
|
Back to top |
|
 |
Falador n00b


Joined: 18 Jan 2004 Posts: 60
|
Posted: Fri Sep 30, 2005 10:06 am Post subject: |
|
|
This is awesome, worked great on my test system. The qmail-reply program is built properly now meaning you can use the mailReplyText in the ldap directory.
Your right about the SPP stuff, I had to disable it. I'm going to take a deeper look this weekend and switch my main server. That's if my partner doesn't make my jobs list to long.  |
|
Back to top |
|
 |
Praxxus Apprentice


Joined: 26 Nov 2002 Posts: 193 Location: Indiana, US
|
Posted: Tue Mar 07, 2006 10:24 pm Post subject: UPDATED: New qmail-ldap ebuild for latest version |
|
|
On Edit: Added information about update/patch for ebuild at bottom of the post.
Now with working SPP!
I finally got around to reading the Qmail-LDAP mailing list, and saw that a new version of qmail-ldap was released. I have updated my mostly functional ebuild to use the latest patch, and thanks to Scott Ryan, the qmail-spp plugin.
I also read the feedback posted here and on bugs.gentoo.org. Hopefully I addressed most concerns about the previous ebuild.
IMPORTANT: The first time you try to emerge this ebuild, you will probably get a long informational message regarding environment variables you can set that will effect how the ebuild is compiled. Please read it carefully before asking any questions. Thanks.
Lest anyone become overwhelmed by all the variables, most people won't need to worry about them anyway. So a setting of: Code: | USE="ssl readvars zlib" emerge qmail-ldap | will be just fine. Or if you want simple virtual mail hosting (have user mail accounts without giving them shell accounts on your mail server): Code: |
USE="ssl readvars zlib vmail" emerge qmail-ldap | will be just fine. And of course if you like that, don't forget to add the settings to /etc/portage/package.use!!
Here's the changelog vs. 1.0.3-r5: Code: | qmail-ldap-1.0.3-r6.ebuild
Updated to use qmail-ldap-20060201 patch
Fixed qmail-spp plugin (http://qmail-spp.sourceforge.net) to
work with qmail-ldap, thanks to Scott Ryan (see:
http://sourceforge.net/mailarchive/forum.php?thread_id=9823259&forum_id=41276
)
Added "spp" use variable
Fixed/added Makefile for tcprules in /etc/tcprules.d
Updated Kristof Bajnok's "Virtual domain support" patch to at least
compile and run cleanly. **UNTESTED**
Fixed a redundancy in tcp.smtp rule
Fixed a redundancy in tcp.smtp rule ;-)
A couple of URL updates
Fixed setup for ldapuid, ldapgid, and ldapmessagestore
in /var/qmail/control
Added "readvars" use flag and associated informational
text about environment variables and compile-time options |
This can be downloaded from my homepage, and I'll upload it soon to the aforementioned bugs.gentoo listing.
Thanks.
UPDATE: I realized last night that I had hard-coded VMAILUSER's UID, GID, and HOME directories into the script when setting up relevant control files in /var/qmail/control. I've fixed that now. If you haven't downloaded the ebuild yet, the updated version is on my homepage. If you have downloaded it already, I've posted a patch over at bugs.gentoo. Something like: Code: | patch -d ${PORTDIR_OVERLAY}/mail-mta/qmail-ldap < /path/to/qmail-ldap-1.03-r6.diff |
should work nicely. _________________ My glaucoma just got worse! |
|
Back to top |
|
 |
Falador n00b


Joined: 18 Jan 2004 Posts: 60
|
Posted: Thu Mar 09, 2006 12:47 pm Post subject: |
|
|
It appears the qmail and alias users are no longer part of the standard passwd file that ships with Gentoo, Can anyone confirm this? On a fresh install (2006.0) the installation fails when it checks for the 'alias' user. Adding all the qmail and alias user solves the problem.
I guess we'll have to add user creation to the ebuild.
Thanks for your work Ed, much appreciated here  |
|
Back to top |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
Praxxus Apprentice


Joined: 26 Nov 2002 Posts: 193 Location: Indiana, US
|
Posted: Thu Mar 09, 2006 3:57 pm Post subject: |
|
|
Falador wrote: | It appears the qmail and alias users are no longer part of the standard passwd file that ships with Gentoo, Can anyone confirm this? On a fresh install (2006.0) the installation fails when it checks for the 'alias' user. Adding all the qmail and alias user solves the problem. |
D'oh! D'oh! D'oh! Though I'm glad to see them out by default, it means back to the ol' command line for me! Thanks for bringing this to my attention.
Falador wrote: | Thanks for your work Ed, much appreciated here  |
You're welcome! The nonfunctional official qmail-ldap was an itch that I just finally had to scratch.  _________________ My glaucoma just got worse! |
|
Back to top |
|
 |
Praxxus Apprentice


Joined: 26 Nov 2002 Posts: 193 Location: Indiana, US
|
Posted: Thu Mar 09, 2006 7:59 pm Post subject: Updated again |
|
|
I've updated the ebuild to add the Qmail System IDs, if necessary. You can freshen your entire e-build from my homepage, or I've created a diff against the original 1.03-r6 ebuild, which can still be downloaded from the bugs.gentoo.org listing _________________ My glaucoma just got worse! |
|
Back to top |
|
 |
|