Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24923 - /etc/init.d/xmail does not run
Summary: /etc/init.d/xmail does not run
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-20 15:38 UTC by sergey ivanov
Modified: 2003-07-23 20:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for xmail start script to eliminate xargs calls (xmail.initd.patch,878 bytes, patch)
2003-07-22 09:34 UTC, sergey ivanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sergey ivanov 2003-07-20 15:38:14 UTC
The same thing as in bug 24620: since lines end with <CR>/<LF> I got "bad interpreter" 
trying to start XMail.
Comment 1 sergey ivanov 2003-07-20 16:40:38 UTC
The same about file files/xmail.confd. Should I enter this as a separate bug?
     Sergey
Comment 2 sergey ivanov 2003-07-20 16:43:54 UTC
I am sorry, but file files/15xmail also has line ending <CR><LF> and this prevents XMail server from starting.
    Sergey Ivanov
Comment 3 Nick Hadaway 2003-07-21 00:17:59 UTC
xmail-1.16 is now in portage.  files/* have the cr-lf stuff removed.  Also xmailwizard is now executable.  Please test.
Comment 4 sergey ivanov 2003-07-22 09:34:53 UTC
Created attachment 14872 [details, diff]
patch for xmail start script to eliminate xargs calls
Comment 5 sergey ivanov 2003-07-22 09:36:05 UTC
Thank you, I have synced to xmail-1.16 and tested. 
/etc/init.d/xmail does not start. It says:
===
# /etc/init.d/xmail start
 * Starting XMail...
xargs: environment is too large for exec
===
I have not managed with xargs, so I propose patch for files/xmail.initd eliminating xargs call
Comment 6 sergey ivanov 2003-07-22 09:43:59 UTC
Comment on attachment 14872 [details, diff]
patch for xmail start script to eliminate xargs calls

>--- /usr/portage/net-mail/xmail/files/xmail.initd	2003-07-21 03:40:20.000000000 -0400
>+++ /usr/local/portage/net-mail/xmail/files/xmail.initd	2003-07-22 07:52:56.000000000 -0400
>@@ -60,19 +60,17 @@
> 	
> 	if [ ! -c ${CHROOT}/dev/null ]
> 	then
>+		mknod ${CHROOT}/dev/null c `\
> 		ls -Ll /dev/null |\
>-		awk '{print sub(",","",$5) " " $6}' |\
>-		xargs mknod ${CHROOT}/dev/null c
>+		awk '{print sub(",","",$5) " " $6}'`
> 	fi
> 		
> 	chown -R xmail.xmail ${CHROOT}
> 
> 	cp -R -u /etc/xmail/* ${CHROOT}${MAIL_ROOT}
> 
>-	cd ${CHROOT}
>-	ldd var/MailRoot/bin/XMail |\
>-		sed -n 's/[[:blank:]][^>]\+>[[:blank:]]\([[:graph:]]\+\).*/\1 lib\/ /p'\
>-		|xargs -n 2 cp -u
>+	cp `ldd ${CHROOT}${MAIL_ROOT}/bin/XMail |\
>+	sed -n 's/[[:blank:]]*[^=]*=>\([^(]*\).*/\1/p'` ${CHROOT}/lib/
> 	start-stop-daemon --start -c xmail -r ${CHROOT} \
> 		--startas ${MAIL_EXEC} --pidfile=${MAIL_PID} -- \
> 		${MAIL_CMD_LINE}
Comment 7 sergey ivanov 2003-07-22 12:14:23 UTC
Also, please, change order of lines 
	chown -R xmail.xmail ${CHROOT}
and
 	cp -R -u /etc/xmail/* ${CHROOT}${MAIL_ROOT}
in files/xmail.initd, otherwise it takes two or three attempts to chown all necessary for XMail files.

   Sergey
Comment 8 sergey ivanov 2003-07-22 12:20:57 UTC
And the last correction from bug 15931, XMail SMTP needs /tmp in it's chrooted jail, so line 
===
   for subdir in dev lib var/run var/MailRoot
=== 
should be changed to
===
   for subdir in dev lib var/run var/MailRoot tmp
===

      Sergey
Comment 9 sergey ivanov 2003-07-23 15:36:27 UTC
Hi, 
this bug has status "resolved" and resolution "fixed" but this is not the real status! /etc/init.d/xmail as it is in portage can not be used! It "runs" but does not "works". It does not start XMail server! 
What should I do? Should I open new bug? 

   Sergey

Comment 10 Nick Hadaway 2003-07-23 15:49:42 UTC
reopening bug
Comment 11 Nick Hadaway 2003-07-23 20:09:09 UTC
I have updated the initd file with your changes.  I haven't changed the CTRL port though as there shouldn't be a problem with that port.  Please test.

I also added a warning in postinst so that users are sure to have iptables enabled in their kernels before they expect things to work.
Comment 12 Nick Hadaway 2003-07-23 20:18:33 UTC
xmail-1.16 appears to work good :)