| View previous topic :: View next topic |
| Author |
Message |
Shark1
Joined: 16 Nov 2007
Posts: 3
|
| Posted: Fri Nov 16, 2007 11:17 am Post subject: PHP XMAIL SENDMAIL Formmail |
|
|
I have set up PHP XMAIL and all works fine I am trying to set up formmail and I keep getting the error :
Application Error
An error has occurred in the program
close sendmail pipe failed, mailprog=[/opt/bin/sendmail -oi -t] at (eval 8) line 108.
When I run /opt/bin/sendmail -oi -t as a command line I get :
cannot find enviroment variable: MAIL_ROOT
I have set up xmail on a synology DS-207 using IPKG from what I have read I have to change the sendmail PGM this is currently located in /opt/bin.
Can anyone help with this configuration.
Shark1 :? :? :? |
|
| Back to top |
|
below_zero
Joined: 08 Apr 2005
Posts: 130
Location: Italy
|
| Posted: Thu Nov 22, 2007 9:26 am Post subject: Re: PHP XMAIL SENDMAIL Formmail |
|
|
Hello,
I do not know your system, anyway it seems that there is something wrong in the starting script (XMAIL_ROOT is not exposed).
In my Ubuntu test machine it is located in
Code: /etc/init.d/xmail
for other system it may be in something as ..init.rc..
In /etc/init.d/xmail file you must find the line starting with
Code: XMAIL_ROOT=<your XMAIL directory> (for Ubuntu is XMAIL_ROOT=/var/lib/xmail): check that the path respects your installation path; remember to restart Xmail if you made changes in that file.
ANOTHER ISSUE may be the content of your SENDMAIL script, it should contain something as:
Code: ..
export MAIL_ROOT=/var/lib/xmail
..
where /var/lib/xmail should respect your effective installation path for XMAIL.
le me know if you solved it. |
|
| Back to top |
|
Shark1
Joined: 16 Nov 2007
Posts: 3
|
| Posted: Thu Nov 22, 2007 12:15 pm Post subject: Send Mail / Autostart xmail |
|
|
Hi,
Thanks for your help I am running xmail on a synology DS-207 NAS server it works fine the only two problems I have is the send mail issue and it will not auto start.
My set up details are as follows: xmail is located at /opt/var/MailRoot
The start up files (ie .sh files) are located at /usr/syno/etc/rc.d
I have copied the file xmail to this location (/usr/syno/etc/rc.d) and renamed it S43xmail.sh a vi of this file reads as follows: XMAIL
My sendmail script confuses me it reads as follows : SENDMAIL.jpg sceenshot
Any help would be greatly appreciated:
Shark1
XMAIL
Quote:
#!/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=/opt/var/MailRoot
XMAIL_CMD_LINE="-Pl -Sl -Ql -Yl -Fl -Cl -Ll -SX 1 -Qn 1 -Yt 1 -Yi 300 -Ln 1 -PX 1 -CX 1"
PATH=$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/opt/bin/XMail
NAME=XMail
DESC="XMail server"
test -f $DAEMON || exit 0
set -e
ulimit -c 10000
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
}
stop_xmail()
{
if [ -f /var/run/$NAME.pid ]
then
echo `date` > $XMAIL_ROOT/.shutdown
kill -INT `cat /var/run/$NAME.pid`
while [ -f $XMAIL_ROOT/.shutdown ]
do
sleep 1
done
fi
}
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
exit 0 |
|
| Back to top |
|
below_zero
Joined: 08 Apr 2005
Posts: 130
Location: Italy
|
| Posted: Thu Nov 22, 2007 2:01 pm Post subject: Re: Send Mail / Autostart xmail |
|
|
At a first view it seems ok.
I have the suspect that Xmail is not the direct responsable for the error.
I think that
a) you should work on 'sendmail'
b) the one you find is not the true sendmail script.
Anyway may be you will find something usefull in this forum:
http://xmailforum.homelinux.net/
(chose the server related topic) |
|
| Back to top |
|
| |