User customizable error messages

James A. Pattie james at PCXPERIENCE.COM
Wed Dec 11 00:13:15 GMT 2002

Hash: SHA1

Julian Field wrote:
> At 23:15 10/12/2002, you wrote:
>>         While looking over the Config file it struck me that as an end
>> user, I
>> might want to specify my own error message for certain error events.
>> How hard would it be to say instead of getting a rules file of files to
>> use based upon the user, we were able to specify that a string would be
>> returned instead of a file name?  This way, the users custom error
>> message could be stored in a database, etc. and you don't have to do
>> anything different except know not to try and open the returned string
>> unless I specify it is a filename.
> Interesting idea.
> Would it not be faster to regularly re-create the files from the database
> contents, and generate the ruleset automatically. Whenever you get a
> you could kill -HUP the process group. Or else just set the "Restart
> time fairly small so the configs are re-read more frequently.
> I admin that doing the database lookups "live" looks appealing, but it
> isn't the fastest solution.
> I'll take a look though and see how possible this is to implement.
> --
> Julian Field
> MailScanner thanks transtec Computers for their support

What if we go in a slightly different direction:

	You provide a config option that allows the admin to specify a
directory that any user customized error messages, etc. would be stored
in.  Possibly a directory per message type.

	Then based upon the username of the user being sent to, if a file
exists for them in the directory you use it, otherwise you ask for the
filename to work with.

	In my code, I'll then just create/delete the files as needed whenever
the user updates their error message or decides not to use their own but
use the default.

	This way you don't have to change a lot and we don't lose the speed
benefits of staying with local text files.

- --
James A. Pattie
james at

Linux  --  SysAdmin / Programmer
Xperience, Inc.

GPG Key Available at
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3202 bytes
Desc: S/MIME Cryptographic Signature
Url :

More information about the MailScanner mailing list