XMailforum is a readonly knowledge archive now.

Registering as a new user or answering posts is not possible anymore.

Might the force be with you, to find here what you are looking for.

2019-09-20 - hschneider, Admin

Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.

XMail Forum -> How Do I Enable Logging?

Reply to this topicStart new topicStart Poll

> How Do I Enable Logging?
SydneyGuy
Posted: Sep 24 2008, 01:24 AM
Quote Post


Newbie
*

Group: Members
Posts: 15
Member No.: 2603
Joined: 17-July 07



A couple of weeks ago I did an "ipkg upgrade" on my NAS box. Someone had updated the xmail binaries for my server and it was upgraded. Unfortunately the upgrade overwrote all of my xmail configuration files!!!

After a couple of hours work I did manage to get xmail running again and all has been OK since then. However, I just went to look at the log files and found that no logs have been created since I had the above problem. I looked in the server.tab file but can't see anything about enabling log files.

So, where do I enable logging?
PMEmail Poster
Top
SydneyGuy
Posted: Sep 24 2008, 02:49 AM
Quote Post


Newbie
*

Group: Members
Posts: 15
Member No.: 2603
Joined: 17-July 07



I've done a little more digging and found out about the command line switches. In S43xmail I have set the command line switches to

XMAIL_CMD_LINE="-Pl -Sl -Ql -Yl -Fl -Cl -Ll -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX 1"

which I believe should have enabled logging for just about everything. But still no joy. When I check the logs with PHPXmail I still only see the logs up to the day when I did the upgrade. If I manually check the logfile directory it confirms that there are only logfiles up to that date.

What am I missing or doing wrong?
PMEmail Poster
Top
hschneider
Posted: Sep 24 2008, 08:24 AM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 6631
Member No.: 195
Joined: 19-June 02



Please check: l is a lowercase L, nothing else.


-- Harald



--------------------
Bye,
Harald


-- Download XMail Queue Manager 1.46 NOW: XMail Server Tools
-- Cross platform remote queue management!
-- Message analyzing on the fly!
-- Builtin diagnostics knowledge base!
-- Manages multiple mail queues!

Sponsored by
CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg
PMEmail PosterUsers Website
Top
SydneyGuy
Posted: Sep 24 2008, 11:27 PM
Quote Post


Newbie
*

Group: Members
Posts: 15
Member No.: 2603
Joined: 17-July 07



Yes they are all lower case with the exception of the one that is supposed to be an L.

It's quite strange because everything is working fine apart from the logging. Logging was all working fine before I did the upgrade.

When are the dated log files created? If it is when xmail starts is there some way I can tell it to show me what it is doing during startup so that I might see an error message? If not then I suppose I will just have to live without the logs but I did like taking a look at them from time to time to ensure that nothing untoward was happening on my server.
PMEmail Poster
Top
hschneider
Posted: Sep 25 2008, 07:26 AM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 6631
Member No.: 195
Joined: 19-June 02



Maybe XMAIL_CMD_LINE is not regogniced for some reason.
Pls start XMal from command line with

cd /var/MailRoot/bin
export MAIL_ROOT=/var/MailRoot
./xmail --debug -Md -Pl -Sl -Ql -Yl -Fl -Cl -Ll -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX 1




--------------------
Bye,
Harald


-- Download XMail Queue Manager 1.46 NOW: XMail Server Tools
-- Cross platform remote queue management!
-- Message analyzing on the fly!
-- Builtin diagnostics knowledge base!
-- Manages multiple mail queues!

Sponsored by
CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg
PMEmail PosterUsers Website
Top
SydneyGuy
Posted: Sep 26 2008, 06:37 AM
Quote Post


Newbie
*

Group: Members
Posts: 15
Member No.: 2603
Joined: 17-July 07



OK I just tried that. I had to modify your commands a little as everything is under /opt and the xmail executable is in /opt/var/MailRoot and not in the bin subdirectory (there is nothing in there at all). I also needed to add start before the command line switches.

It worked! I now have log files for today. So I wonder why starting it with "/opt/etc/init.d/S43xmail start" doesn't work properly anymore? It definitely starts the server OK but just no logs.

Maybe the debug switch will give me some clues. Does that do some additional logging and if so where?
PMEmail Poster
Top
hschneider
Posted: Sep 26 2008, 01:19 PM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 6631
Member No.: 195
Joined: 19-June 02



Some output goes to /var/logs/messages

Pls post your init.d script. Looks like XMAIL_CMD_LINE is not exported correctly.


--------------------
Bye,
Harald


-- Download XMail Queue Manager 1.46 NOW: XMail Server Tools
-- Cross platform remote queue management!
-- Message analyzing on the fly!
-- Builtin diagnostics knowledge base!
-- Manages multiple mail queues!

Sponsored by
CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg
PMEmail PosterUsers Website
Top
SydneyGuy
Posted: Sep 27 2008, 08:51 AM
Quote Post


Newbie
*

Group: Members
Posts: 15
Member No.: 2603
Joined: 17-July 07



I checked the /var/log/messages file and there didn't seem to be anything of relevance.

The script that is used to start xmail is /opt/etc/init.d/S43xmail The relevant part (I think ) is below. This script runs at system startup and I also use it to restart xmail if I manually stop it for some reason. It definitely starts xmail OK but just doesn't do any logging.


XMAIL_ROOT=/opt/var/MailRoot
XMAIL_CMD_LINE="-Md -Pl -Sl -Ql -Yl -Fl -Cl -Ll -SX 1 -Qn 1 -Yt 1 -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
ulimit -s 128

start_xmail()
{
MAIL_ROOT=$XMAIL_ROOT
export MAIL_ROOT
MAIL_CMD_LINE=$XMAIL_CMD_LINE
export MAIL_CMD_LINE
rm -f /var/run/$NAME.pid
$DAEMON
while [ ! -f /var/run/$NAME.pid ]
do
sleep 1
done
}
PMEmail Poster
Top
hschneider
Posted: Sep 27 2008, 05:28 PM
Quote Post


No - I'm not an answering script ...
Group Icon

Group: Admin
Posts: 6631
Member No.: 195
Joined: 19-June 02



Looks good, but for some reason it cannot read then env variable MAIL_CMD_LINE. Maybe you run it chrooted ?

You also have this in your script, do you ?

CODE

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."
;;
......




However changing this line
$DAEMON
to
$DAEMON $XMAIL_CMD_LINE

should work as well.


--------------------
Bye,
Harald


-- Download XMail Queue Manager 1.46 NOW: XMail Server Tools
-- Cross platform remote queue management!
-- Message analyzing on the fly!
-- Builtin diagnostics knowledge base!
-- Manages multiple mail queues!

Sponsored by
CD-Produktion und DVD-Produktion and Homestaging Saarland - Immobilien schneller verkaufen in der Region Saarland, Rheinland-Pfalz und Luxembourg
PMEmail PosterUsers Website
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | XMail Server | Next Newest »

Reply to this topicStart new topicStart Poll