All,
For scalability, the next step up for Milter-greylist will be to implement a database backend. MySQL is a good candidate.
In my discussions with Emmanuel, we have identified the following steps to address this challenge, without breaking any current setups in the mean time. The proposed steps are:
1. Agree on and implement a storage API
2. define a --with-sql compiler option
3. implement hash storage model when compiled --with-sql
4. modify yacc/lex definitions for sql directives (servers, user name, password)
5. implement MySQL API interface
As regards to step 1, the storage API can look something like this:
#define MG_PEND 0
#define MG_WHITE 1
struct tuple_fields {
char *addr;
char *from;
char *to;
int tag;
int timeout;
};
void mg_init(); /* initialize storage backend */
void mg_start(); /* start cleaning thread, if needed */
int mg_tuple_add(struct tuple_fields);
int mg_tuple_del(struct tuple_fields); /* args may be NULL for wildcard */
int mg_tuple_match(struct tuple_fields);
int mg_tuple_refresh(struct tuple_fields); /* idem */
int mg_tuple_clean(); /* if backend needs cleanup */
At this point, we need to build consensus about the steps to take and the API for a MySQL backend.
Also, I'd like to know if anyone is available to take on one or more of the tasks at hand. I will work on moving the current code to a storage API based model.
Thanks,
Rudy EschauzierMessage
Implement MySQL backend in Milter-greylist
2009-01-18 by Rudy Eschauzier
Attachments
- No local attachments were found for this message.