MailScanner: extracting attachments
Hugo van der Kooij
hvdkooij at vanderkooij.org
Sun Mar 16 22:37:53 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Julian Field wrote:
| I've just spent the last 3 hours or so trying to implement this :-(
| Because of the fact that I read the configuration template data from a
| Perl source file itself, I can't read it in twice, I can't rewind the
| filehandle as Perl won't let me.
|
| So, at the moment, no can do. Sorry.
|
| It is surely good practice to do a "MailScanner --lint" after changing
| stuff anyway, isn't it?
Is there short way to check the config and use it in the init script? I
think that would much easier to to. If I read this right then Nagios
does a similar thing.
Thi is how Nagios defines the start procedure:
~ start)
~ echo -n "Starting nagios:"
~ $NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
~ if [ $? -eq 0 ]; then
~ su - $NagiosUser -c "touch
$NagiosVarDir/nagios.log $NagiosRetentionFile"
~ rm -f $NagiosCommandFile
~ touch $NagiosRunFile
~ chown $NagiosUser:$NagiosGroup $NagiosRunFile
~ $NagiosBin -d $NagiosCfgFile
~ if [ -d $NagiosLockDir ]; then touch
$NagiosLockDir/$NagiosLockFile; fi
~ echo " done."
~ exit 0
~ else
~ echo "CONFIG ERROR! Start aborted. Check your
Nagios configuration."
~ exit 1
~ fi
~ ;;
That way if you make an error you will notice it and it will not start
Nagios.
Hugo.
- --
hvdkooij at vanderkooij.org http://hugo.vanderkooij.org/
PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc
A: Yes.
>Q: Are you sure?
>>A: Because it reverses the logical flow of conversation.
>>>Q: Why is top posting frowned upon?
Bored? Click on http://spamornot.org/ and rate those images.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFH3aFABvzDRVjxmYERAsgqAJ44V30F0rcsJ2ll/gaRcnY6epoNQACePEUi
5ZgROXgSbSP+aVbNy25QL2w=
=sErD
-----END PGP SIGNATURE-----
More information about the MailScanner
mailing list