james-server-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric MacAdie <e...@MacAdie.net>
Subject Re: Config under Debian Linux 2.6
Date Sun, 11 Jan 2009 18:12:15 GMT
Here is a script that I use. Copy it to /etc/init.d/james.sh


#!/bin/sh
# update-rc.d james.sh start 50 0 1 2 3 4 5 6 .
# update-rc.d james.sh stop 50 0 1 2 3 4 5 6 .
# description: Apache James Server

export JAVA_HOME=/path/to/java
export 
PATH=$JAVA_HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar



case "$1" in
'start')
/path/to/james/james-2.3.1/bin/phoenix.sh start
;;
'stop')
/path/to/james/james-2.3.1/bin/phoenix.sh stop
;;
'restart')
/path/to/james/james-2.3.1/bin/phoenix.sh restart
;;

*)
echo "Usage: $0 { start | stop | restart }"
;;
esac
exit 0

-------------
Adjust the paths to whatever is on your machine. You can copy and paste 
the two "update-rc.d" lines and run them as root to get the script to 
run James automatically upon startup.

Eric MacAdie



Sunil Kidambi wrote:
> Hi all
>
> Thanks for the replies. Following them I have removed (commented out) the line from the
inetd.conf file and that freed up my ports 110 and 25. Let me explain what I am trying to
do - it is simply that I want James to start up as a daemon when the system starts. After
abandoning inetd.conf I was looking at how to invoke run.sh from rc?.d - is that the right
direction? What do I need to do to get it right? Thanks again for your help..
>
> Sunil
>
>
>
>
> --- On Sun, 1/11/09, Pavlos Georgiadis <jpg@freemail.gr> wrote:
>
>   
>> From: Pavlos Georgiadis <jpg@freemail.gr>
>> Subject: Re: Config under Debian Linux 2.6
>> To: "James Users List" <server-user@james.apache.org>
>> Date: Sunday, January 11, 2009, 6:31 AM
>> I don't think I understand what exactly you are trying
>> to do. You have
>> configured inetd to start james? It doesn't look like a
>> good idea.
>>
>> Can you please show us the line from your inetd.conf where
>> you have
>> configured james? Also any other lines from inetd.conf that
>> start with
>> pop or smtp.
>>
>>
>> Sunil Kidambi wrote:
>>     
>>> I have already de-selected the default server and am
>>>       
>> running my james server from inetd.conf.. the netstat gives
>> this line:
>>     
>>> tcp        0      0 0.0.0.0:110             0.0.0.0:* 
>>>       
>>              LISTEN     2670/inetd
>>     
>>> how to tell inetd to leave that port alone?
>>>
>>> Thanks
>>> Sunil
>>>
>>>
>>>
>>> --- On Sun, 1/11/09, Pavlos Georgiadis
>>>       
>> <jpg@freemail.gr> wrote:
>>     
>>>   
>>>       
>>>> From: Pavlos Georgiadis <jpg@freemail.gr>
>>>> Subject: Re: Config under Debian Linux 2.6
>>>> To: "James Users List"
>>>>         
>> <server-user@james.apache.org>
>>     
>>>> Date: Sunday, January 11, 2009, 3:24 AM
>>>> Hi Sunil,
>>>>
>>>> Login as root to your system and run the command
>>>> "netstat -pan | grep
>>>> ":110" | grep LISTEN". It will show
>>>>         
>> you
>>     
>>>> which pid/programm name is using
>>>> the port 110.
>>>>
>>>> Probably the default installation of your system
>>>>         
>> has a
>>     
>>>> mailer already
>>>> running. You will have to disable it from the init
>>>>         
>> scripts
>>     
>>>> of your system.
>>>>
>>>> --
>>>> Pavlos Georgiadis
>>>>
>>>>
>>>> Sunil Kidambi wrote:
>>>>     
>>>>         
>>>>> Sorry this might be a newbie question - i
>>>>>           
>> searched in
>>     
>>>>>       
>>>>>           
>>>> google for days but found nothing that helped ok
>>>>         
>> straight to
>>     
>>>> the point:
>>>>     
>>>>         
>>>>> I downloaded james 2.3.1 and it runs just
>>>>>           
>> great when i
>>     
>>>>>       
>>>>>           
>>>> disable the default mail/pop server and run james
>>>>         
>> from the
>>     
>>>> command. However I am stuck while trying to make
>>>>         
>> james as
>>     
>>>> the default. I put the run command in inetd.conf
>>>>         
>> and when I
>>     
>>>> telnet port 110 it shows me the startup messages -
>>>>         
>> hardly
>>     
>>>> what you expect from a pop3 server - before
>>>>         
>> finally dumping
>>     
>>>> java stack for bind error. So it looks like some
>>>>         
>> program is
>>     
>>>> watching 110 and invoking my server each time. Now
>>>>         
>> what kind
>>     
>>>> of OS does things like that
>>>>     
>>>>         
>>>>> Anyway I am hoping this is already a pretty
>>>>>           
>> familiar
>>     
>>>>>       
>>>>>           
>>>> problem so I will wait for a solution thanks to
>>>>         
>> all in
>>     
>>>> advance
>>>>     
>>>>         
>>>>> Sunil
>>>>>           

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Mime
View raw message