[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

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

sub filter_begin () {

# Load /etc/mail/spam_disabled_users.txt

Thanks for any help

Bryan Tolka

Bryan Tolka
Network Engineer
Robert C. Byrd Health Sciences Center
Morgantown, WV
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.

MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com

More information about the MIMEDefang mailing list