[Mimedefang] mysql mimedefang

B. Tolka btolka at hsc.wvu.edu
Thu Jul 3 14:58:49 EDT 2003


BTW it worked nicely. As you call can see my programming skills are
lacking.

Where would the best place to place the mysql calls?
I would really like to store it in memory somewhere and not process the
filter each time a message is sent.

Right now it resides in filter_begin and gets called from
read_spam_list. 


sub filter_begin () {

# Load /etc/mail/spam_disabled_users.txt
   read_spam_list();


Thanks for any help

Bryan Tolka


Bryan Tolka
Network Engineer
---------------------------------------
Robert C. Byrd Health Sciences Center
Morgantown, WV
304-293-4683
btolka at hsc.wvu.edu
>>> dfs at roaringpenguin.com 07/03/03 12:10 PM >>>
On Thu, 3 Jul 2003, B. Tolka wrote:

> while( $sth->fetch() )
> {
> open(FD, ">> /etc/mail/spam_disabled_users.txt");
> print FD "$username\n";
> }

There are several things wrong:

1) The open is in the loop.
2) You don't check if it succeeds.
3) It most likely _won't_ succeed, because mimedefang runs as "defang",
not "root", and probably doesn't have write permission on the file.

--
David.
_______________________________________________
MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang




More information about the MIMEDefang mailing list