Re: Perl Module: libnet-smtp-server-perl
Joerg Delker <[email protected]> Mon, 29 May 2006 10:40:01 +0200
| Newsgroups | gmane.comp.isp.ispman.devel |
|---|---|
| Message-ID | <[email protected]> |
Andreas John wrote:
> Maybe I forgot to mention that I went the Debian-provides-the-perl
> modules way. The strange thing is that I did not change anything else,
> the process lingered around and I simply restarted ispman-agent. The
> agent stop'd when reaching the point of error and I had to restart it.
> I dont use daemontools at the time and I don't think daemontools is the
> good way to go, as would supress such errors ... I daemon should simply
> not crash/stop, that's the better option ;)
I agree, but this would require proper exception handling in entire
ISPMan code.
Unfortunately, that is currently not the case and probably would require
significant effort to achieve (which I'm currently not willing to invest
in).
That leaves you with the option to use something like daemontools, or
make the code fail save ;)
>>The package "libnet-smtp-server-perl" on the other hand provides
>>Net::Server::Mail, which isn't used here.
>>From your reported error message above, I rather get the impression that
>>you provided a bogus/empty mailhost, that led to a undefined $smtp
>>variable, which would explain that error.
>
> Now that I re-read the above error-msg again, it really reads as if the
> not the function is missing but rather the value of the agrument.
>
> Reading line 21 of MailMan.pm: $hash->{'from'}. The $hash is taken from
> the 1st argmnent of ARGV, right? (shift ... ; my $hash = shift)... Or
> does the error above not necessarily have to do with the hash, but one
> of the other values that are initialised before?
It's either $smtp or $hash undefined. In fact, I would guess the latter.
> There comes the following line to my mind:
> $mailhost = $self->getConfig("mailhost") || "localhost";
>
> But localhost is definitely defined in /etc/hosts. I reads like there
> should be a variable "mailhost" set in the ispman.conf.example, which
> should be defaulted to localhost, nor? If so, could you add such to cvs?
I don't suspect the problem with the $mailhost, it's probably the
missing $hash.
From where did you call the sendmail function again?
Regarding the mailhost config, I'll add that to ispman.conf.
Joerg
smime.p7s
(application/x-pkcs7-signature, 3.2 KB) - not displayed