Development info?
Julian Field
MailScanner at ecs.soton.ac.uk
Sun Aug 24 21:28:19 IST 2008
Hugo van der Kooij wrote:
>
> Another issue is error reporting. The only error you get at startup is
> about the last line tht might be missing. But just about any mistake
> will show that message. Can the error report be made more specific?
>
If you run MailScanner --lint you will get plenty of extra error
reporting about your Custom Functions and why they won't compile. Take a
look at this snippet of output I just tried, when I put a syntax error
into MyExample.pm
[root at alegria CustomFunctions]# perl -c MyExample.pm
Number found where operator expected at MyExample.pm line 104, near "1"
(Missing semicolon on previous line?)
syntax error at MyExample.pm line 104, near "1"
MyExample.pm had compilation errors.
[root at alegria CustomFunctions]# MailScanner --lint
Currently you are using no virus scanners.
This is probably not what you want.
In your /etc/MailScanner/MailScanner.conf file, set
Virus Scanners = clamav
Then download
http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/install-Clam-SA.tar.gz
Unpack it, "cd" into the directory and run ./install.sh
Trying to setlogsock(unix)
Skipping Custom Function file Internet.dk.pm.verold as its name does not
end in .pm or .pl
Number found where operator expected at
/usr/lib/MailScanner/MailScanner/CustomFunctions/MyExample.pm line 104,
near "1"
(Missing semicolon on previous line?)
Could not use Custom Function code
/usr/lib/MailScanner/MailScanner/CustomFunctions/MyExample.pm, it could
not be "require"d. Make sure the last line of the file says "1;" at
/usr/lib/MailScanner/MailScanner/Config.pm line 624
So as you see it prints out the Perl errors just above the "Could not
use Custom Function code" line near the bottom. What more do you want me
to add?
Jules
--
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key: http://www.jules.fm/julesfm.asc
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MailScanner
mailing list