Mercurial > hg > mlmmj
changeset 129:f72d7b29f576
Further stuff in mlmmj-maintd
author | mmj |
---|---|
date | Sun, 30 May 2004 00:27:53 +1000 |
parents | fc7dabe4ba65 |
children | 2ac5c3862982 |
files | include/mlmmj.h src/mlmmj-maintd.c |
diffstat | 2 files changed, 42 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/include/mlmmj.h Sat May 29 23:53:55 2004 +1000 +++ b/include/mlmmj.h Sun May 30 00:27:53 2004 +1000 @@ -18,6 +18,8 @@ #define WAITSLEEP 1000 #define MODREQLIFE 604800 /* How long time will moderation requests be kept? * 604800s is 7 days */ +#define DISCARDEDLIFE 604800 /* How long time will discarded mails be kept? + * 604800s is 7 days */ #define BOUNCELIFE 432000 /* How long time can addresses bounce before unsubscription happens? 432000s is 5 days */ #define PROBEINTERVAL 43200 /* How often is an address probed if it still
--- a/src/mlmmj-maintd.c Sat May 29 23:53:55 2004 +1000 +++ b/src/mlmmj-maintd.c Sun May 30 00:27:53 2004 +1000 @@ -30,13 +30,29 @@ int clean_moderation(const char *listdir) { +#if 0 DIR *moddir; struct dirent *dp; +#endif /* TODO: Go through the moderation/ directory and delete mails * older than MODREQLIFE (control/modreqlife later on) + * Also delete/resend from moderation/queue (probably delete) */ + return 0; +} + +int clean_discarded(const char *listdir) +{ +#if 0 + DIR *queuedir; + struct dirent *dp; +#endif + + /* TODO: Go through all the mails sitting in queue/discarded/ and + * delete those older than DISCARDEDLIFE (control/discardedlife) + */ return 0; } @@ -50,6 +66,25 @@ /* TODO: Go through all mails sitting in queue and send all that * has a .mailfrom, .reciptto suffix. + * Move the ones without to discarded, since we cannot know what to + * do with them. + */ + + return 0; +} + +int resend_requeue(const char *listdir) +{ +#if 0 + DIR *queuedir; + struct dirent *dp; +#endif + + /* TODO: Go through all mails sitting in requeue/ and send the mail in the + * archive marked by the directory name in requeue/ to the people in + * the file subscribers sitting in the same dir. + * IMPORTANT: do not forget to *not* archive and *not* delete when + * sent. */ return 0; @@ -64,6 +99,7 @@ /* TODO: invoke mlmmj-bounce -p address for all that haven't been * probed in PROBEINTERVAL (control/probeinterval) seconds + * Note that mlmmj-bounce is still missing the -p option :-) */ return 0; @@ -129,7 +165,9 @@ for(;;) { clean_moderation(listdir); + clean_discarded(listdir); resend_queue(listdir); + resend_requeue(listdir) probe_bouncers(listdir); unsub_bouncers(listdir);