I'm know I'm going to get seriously boo'ed for the following statements, but
I want to share a possible addition for the tmda community and a few
questions. :)
I'm a Perl programmer and have been so for three years. I must admit though
that Python syntax looks very interesting, and it is on my list to learn
more about. Unfortunately though, I have to seriously brush up my BASH and
KSH scripting. I digress though...
The tmda-cgi is very impressive. However, a bit to complicated for many of
my average customers. So I have written a much simplified CGI interface via
Perl. I am only allowing access to the whitelists and blacklists at the
moment. I allow the customer to view pending emails with the options of
previewing the message, releasing the message, deleting the message, or
doing nothing with the message. However, I may provide some limited access
to the filters. The only other feature which I may add is the ability to
whitelist or blacklist the sender while previewing the message so the
customer doesn't have to manually add the sender to his/her whitelist or
blacklist. Anyway the CGI is pretty slick as well as useful for the
not-so-intuitive person. If anyone is interested, I'll post it under the
same OpenSource terms at tmda.
Now for my questions:
1) I have no problem implementing setuid root for my CGI's securely .
However, I found it much more challenging to have the cgi temporarily run as
a local user for releasing-messages purposes. I successfully changed the
EUID of the CGI to the logged-in user, but tmda-pending would always look
for the config file in /root/.tmda instead of ~<user>/.tmda. The only way
that I could figure out was to temporarily change the user's shell to
/bin/bash to run tmda-pending to release messages. Then I changed the shell
back and followed up with extensive checks to make sure the shell changed
back successfully. I was hoping that you could provide a brief example of
how you did it. This is mostly for my own learning purposes in hopes of
better mastering the process setuid and cgi. I'm not looking for a Perl
example, but just brief a conceptual model of how you did it.
2) Also, is there anyway that I could use my cgi to release messages when a
person clicks on the confirm link in his/her challenge email sent by TMDA?
Now, for those of you wondering why I would re-invent the wheel. I have
three reasons:
1) To learn.
2) Because my boss wanted an interface which was more consistent
with our other customer interfaces.
3) Because my boss and I determined that we needed to simplify the
interface for our customers.
Finally, I would like thank the developers of TMDA again for a great
open-source product.
Thank you and regards,
Walt Wyndroski
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users