I'm maintaining a quota package for a small linux distribution and many users which want to have quota dont want to install (and configure) a full mail package. I tried to get a small perl script 'sendEmail' (http://caspian.dotconf.net/menu/Software/SendEmail/) to work with warnquota.conf, without success. Is it possible to adapt warnquota to work with that program? Is it possible to write the warning into a file, which is supported by sendEmail via pipe.
TIA,
Jens
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It would be slightly non-trivial to adapt warnquota since, if I looked at SendEmail correctly, it has to have headers specified on the command line. I don't want to clutter warnquota code with calling syntax for every mail program someone has written. So won't it be easier to just write a simple script that would read the message from it's stdin, parse the headers (emails from warnquota are quite simple - From, Reply-to, Subject, To and optionally CC), write the message to a file and call SendEmail to it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-05-20
Thanks for your reply, Jan. I think you are right. I will try to write a wrapper script. Many Thanks ...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm maintaining a quota package for a small linux distribution and many users which want to have quota dont want to install (and configure) a full mail package. I tried to get a small perl script 'sendEmail' (http://caspian.dotconf.net/menu/Software/SendEmail/) to work with warnquota.conf, without success. Is it possible to adapt warnquota to work with that program? Is it possible to write the warning into a file, which is supported by sendEmail via pipe.
TIA,
Jens
It would be slightly non-trivial to adapt warnquota since, if I looked at SendEmail correctly, it has to have headers specified on the command line. I don't want to clutter warnquota code with calling syntax for every mail program someone has written. So won't it be easier to just write a simple script that would read the message from it's stdin, parse the headers (emails from warnquota are quite simple - From, Reply-to, Subject, To and optionally CC), write the message to a file and call SendEmail to it?
Thanks for your reply, Jan. I think you are right. I will try to write a wrapper script. Many Thanks ...