Re: [SLUG] painful request for info

From: Ronan Heffernan (ronan@iotcorp.com)
Date: Mon Aug 05 2002 - 05:37:46 EDT


patrick grantham wrote:
> The end goal is to update a SQL.DB. My end product is to have a set of text
> files with no duplicates, one listing email address for the undeliverables,
> another with old and new email addresses, another with opt-outs, anti-spam,
> etc. These listings will be imported to update our SQL DB server.
>

In your shoes, I would skip the text files. You can write a filter
program that accepts incoming emails just like any other filter (if I'm
not mistaken, qmail feeds the entire header/body of an email to the
filter program on stdin, is this standard?). This program can do the
filtering and then perform the SQL INSERT into the proper tables, and
with the proper flags. Make sure that your program is not vulnerable to
buffer overflows, as some people attach large files and blast the
spammers, out of spite. It would make sense to write this utility in
either C/C++ or Python (or Perl for the 'obfuscation is ebullient'
crowd). C/C++ will offer the fastest loading and operation, with the
least use of system resources (you might want to set the sticky-bit on
your executable). C/C++ might also offer you the most complete set of
database libraries (does Python or Perl allow connection to remote M$
SQL Server databases?) On the downside, C/C++ does not offer the
simple-yet-powerful string handling of the higher languages, so you will
have to do more work to create your filter rules.

--ronan



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:50:57 EDT