Gossamer Forum
Home : Products : Gossamer Mail : Development, Plugins and Globals :

server reboot necessitates pop server restart?

Quote Reply
server reboot necessitates pop server restart?
Is it normal for a server reboot to make it necessary to restart the popserver plugin? Anyway to set this up to be done automatically?

Thanks,

BOb


.:SEAWEAD:.
Quote Reply
Re: [baidarkabob] server reboot necessitates pop server restart? In reply to
Then when I do the restart I am getting this message:

Error: GMail (2472): Unknown method 'touch' called at /home/cribob/public_html/crittermail/admin/Plugins/GMail/Pop_Server.pm line 216.

This message has occured only since upgrading to 2.2. Should I reinstall the popserver?

Thanks,

BOb


.:SEAWEAD:.
Quote Reply
Re: [baidarkabob] server reboot necessitates pop server restart? In reply to
Argh, we renamed the function touch to clobber (as it doesn't touch the file, but clobbers it). If you open up /home/cribob/public_html/crittermail/admin/Plugins/GMail/Pop_Server.pm and edit line 216, as well as 242, change the GMail->touch(...) calls to GMail->clobber(...).

Adrian
Quote Reply
Re: [baidarkabob] server reboot necessitates pop server restart? In reply to
No a server reboot is not necessary, but how you restart it depends on how you have it installed. If you have it setup in inetd mode, then a `killall -HUP inetd` will restart gpopd. In daemon mode, killing it and starting it again will do the job.

Adrian
Quote Reply
Re: [brewt] server reboot necessitates pop server restart? In reply to
Thanks Adrian, I replace the lines as you suggested and the restart appears to work correctly again.

How do I find out how the plugin is installed? For me, If I reboot the server, the popserver stops delivering mail and I must go to the admin panel and restart it. It is a bit of an annoyance because I do not normally track every time the server reboots (for maintenance or whatever). Please let me know how I can adjust things so the server rebooting does not necessitate popserver restarts.

bob


.:SEAWEAD:.
Quote Reply
Re: [baidarkabob] server reboot necessitates pop server restart? In reply to
You need to put it in your boot up scripts so that it starts up with your server.

Adrian
Quote Reply
Re: [brewt] server reboot necessitates pop server restart? In reply to
Thanks again Adrian,

What exactly do I need to put in the boot up scripts area? popserver.pm? Do i need to modify the file since it will be in a different directory?

Bob


.:SEAWEAD:.
Quote Reply
Re: [baidarkabob] server reboot necessitates pop server restart? In reply to
I'm guessing you're running gpopd.pl in daemon mode. On startup, just execute /path/to/gpopd.pl

Adrian
Quote Reply
Re: [brewt] server reboot necessitates pop server restart? In reply to
Thanks again.Smile


.:SEAWEAD:.
Quote Reply
Re: [baidarkabob] server reboot necessitates pop server restart? In reply to
Adrian,

We were attempted putting
/home/cribob/public_html/crittermail/batch/tools/gpopd.pl in the
bootup, but when we run the file, the following error displays:
>Can't redirect stderr into /Plugins/GMail/Pop_Server/logs/access.log: No
such file or directory
at >/home/cribob/public_html/crittermail/admin/Plugins/GMail/Pop_Server.pm
line 189.


Is this a permissions issue? The file is where it says it should be. Line 187 and 195 of Pop_Server.pm reads like so:

# Write to the log file any stderr
my $log_file = "$CFG->{location}->{path}->{admin}/Plugins/GMail/Pop_Server/logs/access.log";
open LOG, ">>$log_file" or die "Can't redirect stderr into $log_file: $!";
select((select(LOG), $|++)[0]);


if (defined $ret->{server_pid}) {
$ret->{error} .= "The POP Server is already running with pid $ret->{server_pid}";
return $ret;
}


Please advise.

Thanks,

Bob


.:SEAWEAD:.
Quote Reply
Re: [baidarkabob] server reboot necessitates pop server restart? In reply to
Can you take a look at your gpopd.pl and check that the 'use lib' and 'GMail::init' lines have the correct path to your admin directory in them. I have a feeling that the GMail::init('/path/to/admin') line isn't being setup right by the installer.

Adrian
Quote Reply
Re: [brewt] server reboot necessitates pop server restart? In reply to
I did my best Adrian but this stuff is over my head. uselib looked right but i did not find anywhere in the code a GMail::init line. Of course I do not know what that would look like.

I attached for you to have a look.


.:SEAWEAD:.
Quote Reply
Re: [baidarkabob] server reboot necessitates pop server restart? In reply to
Hah, well I guess the pop server plugin wasn't updated in the plugin manager. That or the installer removed the line. To fix it, just add in:
Code:
GMail::init('/path/to/admin');
Right after the use Getopt::Long line.

I'll have to get the plugin updated. Sorry about that.

Adrian
Quote Reply
Re: [brewt] server reboot necessitates pop server restart? In reply to
Thanks Adrian, should I stick a "use" in front of that line?

bob


.:SEAWEAD:.
Quote Reply
Re: [baidarkabob] server reboot necessitates pop server restart? In reply to
Nope, leave the use line as is.

Adrian