[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Disabling IMAP - FIXED.



Ok.

This thing drove me crazy... and the thing I hate the most is to go and
find out what's wrong in other's job.

Here's what I did, to find out where this problem originates from.

I went to /etc/cobalt/swatch/services, and listed the contents of the
directory.
I noticed that some services have not been modified for month, while some
were modified today.
Here:
-rw-------   1 root     root          205 Dec  5 02:25 ahttp
-rw-r--r--   1 root     root          138 Apr 11 02:54 dns
-rw-r--r--   1 root     root          247 Apr 11 02:54 ftp
-rw-------   1 root     root          202 Dec  5 02:25 http
-rw-r--r--   1 root     root          248 Apr 11 02:54 imap
-rw-------   1 root     root          215 Dec  5 02:25 mgmt-httpd
-rw-r--r--   1 root     root          216 Apr 11 02:54 pop3
-rw-r--r--   1 root     root          205 Apr 11 02:54 smtp
-rw-r--r--   1 root     root          121 Apr 11 02:54 snmp
-rw-r--r--   1 root     root          141 Apr 11 02:54 telnet

So I was thinking... what the heck? Uhm.. we all noticed it happens once
in a while, so I decided to check the cronjobs.
No luck, no cronjob is doing that.

So I thought... no cronjob does it... no process is running on the machine
that does it - so it must be something that *I* manually did.

But I didn't DO anything. I haven't logged into root for at least two
weeks. couldn't be.

So I looked at the time of the file creation, and did "uh-uh" hmm what
happend in that time?

And then it flashed!  I've modified a DNS record! And then I understood
everything in 5 seconds :)

Quite simple. When you do "save changes", the admserv updates all the
configuration files, right? Well it have to update the active monitor too,
to reflect the changes, so the active monitor will only monitor the
services that SHOULD be monitored. From there, the path was short. Mail
services are marked up. Of course it'll copy the desired file (IMAP should
be on, because mail is) to the active monitor.

So simple :)

So, what we should do, is just make the file he's taking the data from to
hold an "off" value for imap.

How do we do that?

[WARNING! THIS HAS BEEN TESTED ONLY ON RAQ3.!!! REMEMBER WHAT YOU'RE
CHANGING, SO YOU CAN CHANGE IT BACK IF SOMETHING FAILS.  ALSO, IF THE FILE
I MENTION DOES NOT EXIST, OR DOES NOT CONTAIN *EXACTLY* THE TEXT I'VE
SHOWN - DON'T MODIFY, UNLESS YOU KNOW WHAT YOU'RE DOING!!!!]

We edit (logged as root) the file:
/usr/admserv/cgi-bin/.cobalt/services/services.cgi

This part:
    if( $emailOn=~/on/o ) {
        $ret=Cobalt::Services::set_mail_server_on( 1 );
        if( $ret!~/^2/o ) {
            $result.=substr( $ret, 4 ).'<BR>';
            $err=1;
        }
        $ret=Cobalt::swatch::swatch_set_service_on("smtp");
        $ret=Cobalt::swatch::swatch_set_service_on("pop3");
        $ret=Cobalt::swatch::swatch_set_service_on("imap");
    } 

Now we see how simple it is... if "mail" is set on, the cgi script sets
all the 3 services as on...

So we should make him NOT set IMAP ON :)
We'll change the line 

        $ret=Cobalt::swatch::swatch_set_service_on("imap");  

into

        $ret=Cobalt::swatch::swatch_set_service_off("imap");  


That's it. Just note that you do exactly as I said, coz you might brake
something up :-)

In order to have the cobalt recheck what services it should monitor now,
you need to go to "Control Panel" and hit the "Save Changes" button.

This *worked* for me :)

  Best regards,
     shimi [mailto:shimi@xxxxxxxxxxxxxxxx]


----

Some quotes:

   "Outlook is a massive flaming horrid blatant security violation, that
    also happens to be a mail reader."                                   

   "There are two major products that come out of Berkeley: LSD and BSD.     
    We don't believe this to be a coincidence."
          -- Jeremy S. Anderson

 Windows: "Where do you want to go today?"
   Linux: "Where do you want to go tomorrow?"
     BSD: "Are you guys coming or what?"