Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 15931
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Nick Hadaway <nick@capital-internet.net>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Kevin Williams <kevwil@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
xmail-ebuild.tar.gz xmail 1.12 ebuild script and patch application/gzip Kevin Williams 2003-02-18 11:53 0000 1.78 KB Details
xmail-1.12.ebuild Updated ebuild script for secure config files text/plain Kevin Williams 2003-02-19 10:38 0000 943 bytes Details
xmail.diff new diff to patch xmail start/stop script without killing it patch sergey ivanov 2003-03-11 13:34 0000 2.97 KB Details | Diff
xmail.diff corrected patch patch sergey ivanov 2003-03-11 16:21 0000 3.00 KB Details | Diff
xmail_cmdline.diff Change to command line options patch Kevin Williams 2003-03-11 17:24 0000 2.86 KB Details | Diff
xmail-1.12.ebuild new ebuild which incorporates Debian's xmail folder stucture text/plain sergey ivanov 2003-03-13 15:49 0000 4.00 KB Details
xmail.diff start/stop xmail script patch sergey ivanov 2003-03-13 15:53 0000 3.12 KB Details | Diff
xmail-1.12.ebuild latest ebuild script with path structure from sergey text/plain Kevin Williams 2003-03-21 11:56 0000 2.39 KB Details
15xmail ENV.D file for MAIL_ROOT variable text/plain Kevin Williams 2003-03-21 11:57 0000 21 bytes Details
xmail.confd CONF.D file for XMail configuration text/plain Kevin Williams 2003-03-21 11:58 0000 234 bytes Details
xmail.initd INIT.D script greatly simplified, uses CONF.D file variables text/plain Kevin Williams 2003-03-21 11:59 0000 1.19 KB Details
xmailwizard automated configuration script - separated from ebuild text/plain Kevin Williams 2003-03-21 11:59 0000 2.06 KB Details
ChangeLog ChangeLog text/plain Kevin Williams 2003-03-22 11:28 0000 451 bytes Details
xmail.patch patch for xmail-1.14 patch sergey ivanov 2003-04-08 10:43 0000 824 bytes Details | Diff
xmail-1.15.ebuild latest version (1.15) text/plain Kevin Williams 2003-05-07 14:19 0000 2.89 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 15931 depends on: Show dependency tree
Bug 15931 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

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


Not eligible to see or edit group visibility for this bug.






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


Description:   Opened: 2003-02-18 11:53 0000
Hi!

Please find attached xmail-ebuild.tar.gz containing xmail-1.12.ebuild and a
patch to reconfigure the init.d script for Gentoo.

XMail is a small, fast, and highly configurable SMTP/POP3/Finger server for
Win32 and Linux. Tests have shown it to be about 50% faster than qmail.

I suggest net-mail/xmail.

Kevin

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From Kevin Williams 2003-02-18 11:53:59 0000 -------
Created an attachment (id=8431) [details]
xmail 1.12 ebuild script and patch

------- Comment #2 From Kevin Williams 2003-02-19 10:38:30 0000 -------
Created an attachment (id=8484) [details]
Updated ebuild script for secure config files

I forgot to secure the config files in the original script.

------- Comment #3 From Kevin Williams 2003-02-19 10:40:22 0000 -------
I also strongly suggest adding "/var/MailRoot -/var/MailRoot/bin
-/var/MailRoot/docs" to 
the CONFIG_PROTECT variable in /etc/make.globals. 

------- Comment #4 From sergey ivanov 2003-03-11 13:34:51 0000 -------
Created an attachment (id=9261) [details]
new diff to patch xmail start/stop script without killing it

XMail server has a way to stop it by placing .shutdown file in its $MAIL_ROOT
folder. Killing it by signal may cause problems and misbehavior.

------- Comment #5 From sergey ivanov 2003-03-11 16:21:19 0000 -------
Created an attachment (id=9265) [details]
corrected patch

results of testing and debugging runscript and XMail interaction

------- Comment #6 From Kevin Williams 2003-03-11 17:18:48 0000 -------
I don't know for sure what signal "start-stop-daemon --stop --quiet --exec
$DAEMON --name $NAME --pidfile=/var/run/$NAME.pid" sends out, I just plugged in
the executable, name, and pid file. According to
http://www.xmailserver.org/Readme.html#server%20shutdown it is perfectly
acceptable to use "kill -INT `cat /var/run/XMail.pid`" to shutdown XMail on
Linux. Either will probably work. I was just trying to do things "the Gentoo
way" as best I can. I'm glad someone has looked at this - I posted it weeks
ago!

------- Comment #7 From Kevin Williams 2003-03-11 17:24:14 0000 -------
Created an attachment (id=9267) [details]
Change to command line options

Please don't create an "issue" concerning what options to run under. The
author, Davide Libenzi, distributes with no options and leaves that to the end
user. This should obsolete attachment (id=9265) [details] but I guess I don't have
permissions to do that.

------- Comment #8 From sergey ivanov 2003-03-13 15:49:44 0000 -------
Created an attachment (id=9366) [details]
new ebuild which incorporates Debian's xmail folder stucture

This ebuild moves configuration files to /etc, and creates symlink to
/var/spool, /var/cache and /var/log xmail subdirectories. Also it contains
configure script to run manually after emerge, which fill ctrlaccount.tab from
user input and also create first mail domain and it's mail users. Relaying
closed by default, clients should use smtpauth.

------- Comment #9 From sergey ivanov 2003-03-13 15:53:34 0000 -------
Created an attachment (id=9367) [details]
start/stop xmail script

Kevin, thank you, you are right. Sending XMail server signal INT is the correct
way to stop it. If you do not provide --signal parameter to start-stop-daemon,
it may cause misbehavior. 
This new patch also incorporates changes to directory structure I've take from
Debian's XMail build.
     Sergey

------- Comment #10 From sergey ivanov 2003-03-15 08:40:39 0000 -------
(From update of attachment 9367 [details])
>--- xmail-1.12/xmail	2003-01-17 20:01:36.000000000 -0500
>+++ xmail	2003-03-12 16:34:54.000000000 -0500
>@@ -1,93 +1,47 @@
>-#!/bin/sh
>-#
>-# skeleton	example file to build /etc/init.d/ scripts.
>-#		This file should be used to construct scripts for /etc/init.d.
>-#
>-#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
>-#		Modified by Davide Libenzi <davidel@xmailserver.org>
>-#
>-# Version:	@(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
>-#
>-
>-XMAIL_ROOT=/var/MailRoot
>-XMAIL_CMD_LINE=""
>-PATH=$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
>-DAEMON=$XMAIL_ROOT/bin/XMail
>+#!/sbin/runscript
>+# Copyright 1999-2002 Gentoo Technologies, Inc.
>+# Distributed under the terms of the GNU General Public License, v2 or later
>+# $Header $
>+
>+XMAIL_ROOT=/etc/xmail
>+XMAIL_CMD_LINE=" -Ms $XMAIL_ROOT -Sl -Pl -Ql -Fl -Cl"
>+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
>+DAEMON=/usr/bin/XMail
> NAME=XMail
> DESC="XMail server"
> 
>-test -f $DAEMON || exit 0
>-
>-set -e
>-ulimit -c 20000
>-
>-start_xmail()
>-{
>-    MAIL_ROOT=$XMAIL_ROOT
>-	export MAIL_ROOT
>-    MAIL_CMD_LINE=$XMAIL_CMD_LINE
>-	export MAIL_CMD_LINE
>-    $DAEMON
>-    while [ ! -f /var/run/$NAME.pid ]
>-    do
>-        sleep 1
>-    done
>+depend() {
>+	need net
>+	use dns
> }
> 
>-stop_xmail()
>-{
>-	if [ -f /var/run/$NAME.pid ]
>-	then
>-    	echo `date` > $XMAIL_ROOT/.shutdown
>-    	while [ -f $XMAIL_ROOT/.shutdown ]
>-    	do
>-        	sleep 1
>-   		done
>+checkconfig() {
>+	if [ ! -f $DAEMON ] ; then
>+		eerror "XMail binary not found!"
> 	fi
>-}
> 
>+	set -e
>+	ulimit -c 20000
>+	
>+}
> 
>-case "$1" in
>-  start)
>-      echo -n "Starting $DESC: "
>-      start_xmail
>-      echo "$NAME.[" `cat /var/run/$NAME.pid` "]"
>-	;;
>-  stop)
>-      echo -n "Stopping $DESC: "
>-      stop_xmail
>-      echo "$NAME."
>-	;;
>-  #reload)
>-	#
>-	#	If the daemon can reload its config files on the fly
>-	#	for example by sending it SIGHUP, do it here.
>-	#
>-	#	If the daemon responds to changes in its config file
>-	#	directly anyway, make this a do-nothing entry.
>-	#
>-	# echo "Reloading $DESC configuration files."
>-	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
>-	#	/var/run/$NAME.pid --exec $DAEMON
>-  #;;
>-  restart|force-reload)
>-	#
>-	#	If the "reload" option is implemented, move the "force-reload"
>-	#	option to the "reload" entry above. If not, "force-reload" is
>-	#	just the same as "restart".
>-	#
>-	echo -n "Restarting $DESC: "
>-	stop_xmail
>-	sleep 1
>-	start_xmail
>-        echo "$NAME.[" `cat /var/run/$NAME.pid` "]"	
>-	;;
>-  *)
>-	N=/etc/init.d/$NAME
>-	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
>-	echo "Usage: $N {start|stop|restart|force-reload}" >&2
>-	exit 1
>-	;;
>-esac
>+start() {
>+	checkconfig || return 1
>+	ebegin "Starting $NAME"
>+	start-stop-daemon --start --startas $DAEMON \
>+		--quiet --pidfile=/var/run/$NAME.pid -- $XMAIL_CMD_LINE
>+	while [ ! -f /var/run/$NAME.pid ]
>+	do
>+		sleep 1
>+	done
>+	eend $? "Failed to start XMail"
>+}
> 
>-exit 0
>+stop() {
>+	ebegin "Stopping xmail"
>+	if [ -f /var/run/$NAME.pid ] ; then
>+		start-stop-daemon --stop --quiet --pidfile=/var/run/$NAME.pid --name=$NAME --retry 120 \
>+			--oknodo --signal 2 --quiet
>+	fi
>+	eend $? "Failed to stop XMail"
>+}

------- Comment #11 From sergey ivanov 2003-03-18 17:54:33 0000 -------
Hi, I've arranged page http://www.spectr.org/sergey/ for xmail-1.12.ebuild and
accomplishing it files with short description how to use it. So all my
submitted attachments here should be considered as out of use. 
    Sergey Ivanov <seriv@parkheights.dyndns.org>

------- Comment #12 From Kevin Williams 2003-03-21 11:56:46 0000 -------
Created an attachment (id=9660) [details]
latest ebuild script with path structure from sergey

------- Comment #13 From Kevin Williams 2003-03-21 11:57:39 0000 -------
Created an attachment (id=9661) [details]
ENV.D file for MAIL_ROOT variable

------- Comment #14 From Kevin Williams 2003-03-21 11:58:16 0000 -------
Created an attachment (id=9662) [details]
CONF.D file for XMail configuration

------- Comment #15 From Kevin Williams 2003-03-21 11:59:03 0000 -------
Created an attachment (id=9663) [details]
INIT.D script greatly simplified, uses CONF.D file variables

------- Comment #16 From Kevin Williams 2003-03-21 11:59:53 0000 -------
Created an attachment (id=9664) [details]
automated configuration script - separated from ebuild

------- Comment #17 From Kevin Williams 2003-03-22 11:28:49 0000 -------
Created an attachment (id=9697) [details]
ChangeLog

------- Comment #18 From sergey ivanov 2003-04-08 10:43:48 0000 -------
Created an attachment (id=10375) [details]
patch for xmail-1.14

This patch make xmail ebuild and xmail.diff independent of XMail version
number. The only thing to do with new version of XMail (tested on 1.14) is to
rename ebuild s/12/14/ and make new digest.
     Sergey

------- Comment #19 From Kevin Williams 2003-05-07 14:19:53 0000 -------
Created an attachment (id=11652) [details]
latest version (1.15)

fixes permissions problems, sendmail problems

------- Comment #20 From sergey ivanov 2003-05-26 14:34:00 0000 -------
I've modified Kevin's ebuild and it's files to run XMail in chrooted
environment from unprivileged user. Should I place ebuild and start/stop and
conf. files here or it is sufficient to place it at
http://www.spectr.org/sergey/XMail_for_Gentoo.html ?

   Sergey

------- Comment #21 From Nick Hadaway 2003-06-09 13:31:24 0000 -------
I have added the ebuild to portage with some minor changes.
Please check it out and let me know if you find any problems with my submission.
I removed the interactive portion and changed the useradd/groupadd functions.

------- Comment #22 From Kevin Williams 2003-06-09 18:24:55 0000 -------
Nick,

That should be fine. The wizard just speeds up the initial setup process for those who have at least read the readme file.

I read http://freshmeat.net/projects/xmail/?topic_id=32%2C33%2C34%2C30%2C88 a long time ago concerning XMail performance, and that's what convinced me to try it. I haven't tested the claims, but they aren't from XMail's author, so I don't suspect too much exaggeration.

Kevin

------- Comment #23 From sergey ivanov 2003-06-09 19:20:16 0000 -------
   My test results: ebuild succeeds at second attempt. The first attempt fails,
xmail user and group unavailable at install stage of ebuild. But they created
and are available for second emerge.
   The original ebuild with groupadd and useradd in install also does not work,
I think the portage has changed and I failed to manage to chown installed files
to new user by ebuild.
   Sergey.

------- Comment #24 From Nick Hadaway 2003-06-10 00:01:19 0000 -------
I have moved the useradd/groupadd routines to pkg_setup... which should fix the
aforementioned problem

------- Comment #25 From sergey ivanov 2003-06-10 18:24:49 0000 -------
I have four corrections. 
First: remove CR/LF line ending in files/xmail* 
Second: move line : 
--- 
        cp -R -u /etc/xmail/* ${CHROOT}${MAIL_ROOT} 
--- 
before line: 
--- 
        chown -R xmail.xmail ${CHROOT} 
--- 
in files/xmail.initd, else xmail will not start the first time, it's control tab files remains 
root's owned. 
And third, :%s/6017/29617/g in files/xmailwizard. XMail starts after two first 
corrections, but xmailwizard wait for him in a wrong port. 
And the last - XMail server needs also /tmp in it's chrooted jail. This may be added as 
dodir /chroot/xmail/tmp in ebuild or into files/xmail.initd into line: 
--- 
       for subdir in dev lib var/run var/MailRoot tmp 
--- 
 
Sincerely, 
   Sergey 
 

------- Comment #26 From Kevin Williams 2003-06-10 21:03:14 0000 -------
I hope someone (not me) is going to patch the documentation to reflect all the
deviation from the readme file. Sergey's build is advanced from my point of
view - I don't know any Linux users who actually run anything in a chroot
environment. The novice won't be able to follow the readme file with the way
things are now. My build reflects the readme file and everything runs without
modification, including sendmail. I've even got Courier-IMAP running against
the user's mailboxes without hassle.

I may be a novice in the Linux world, but I feel the ebuild should not take
such a simple build and make it so complicated. I'm happy that XMail in finally
in portage, but I'll stick with my ebuild because it works for me.

------- Comment #27 From sergey ivanov 2003-06-30 07:14:49 0000 -------
I think it's worth while accept Kewin's suggestion and roll back to his ebuild
version or accept my last corrections. Both produce ebuild creating working
XMail. While existing gentoo's XMail can not produce working XMail.
      Sergey

------- Comment #28 From Nick Hadaway 2003-10-17 21:48:40 0000 -------
xmail-1.16 has been marked stable for x86

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug