Mercurial > hg > mlmmj
changeset 339:6ec796e27f54
Sanity checks
author | mmj |
---|---|
date | Tue, 14 Sep 2004 19:22:41 +1000 |
parents | 60da8d3ef63e |
children | 42efdd1ccb12 |
files | ChangeLog src/mlmmj-process.c |
diffstat | 2 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Sep 14 09:01:32 2004 +1000 +++ b/ChangeLog Tue Sep 14 19:22:41 2004 +1000 @@ -1,3 +1,4 @@ + o Add sanity checks to disallow denial mails going to the list o Implement -d option for mlmmj-maintd to be able to supply it with a directory containing several listdirs, where mlmmj-maintd then will run maintenance o Chown option and a fix for mlmmj-make-ml.sh. Thanks Ingo Lameter
--- a/src/mlmmj-process.c Tue Sep 14 09:01:32 2004 +1000 +++ b/src/mlmmj-process.c Tue Sep 14 19:22:41 2004 +1000 @@ -595,6 +595,15 @@ } if(addrtocc && !intocc) { + /* Don't send a mail about denial to the list, but silently + * discard and exit */ + if (strncasecmp(listaddress, fromemails.emaillist[0], + strlen(listaddress)) == 0) { + myfree(listaddr); + unlink(donemailname); + myfree(donemailname); + exit(EXIT_SUCCESS); + } listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); maildata[0] = "*LSTADDR*"; @@ -625,6 +634,15 @@ subonlypost = statctrl(listdir, "subonlypost"); if(subonlypost) { + /* Don't send a mail about denial to the list, but silently + * discard and exit */ + if (strncasecmp(listaddress, fromemails.emaillist[0], + strlen(listaddress)) == 0) { + myfree(listaddr); + unlink(donemailname); + myfree(donemailname); + exit(EXIT_SUCCESS); + } if(is_subbed(listdir, fromemails.emaillist[0]) != 0) { listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr); @@ -661,6 +679,15 @@ access_rules = ctrlvalues(listdir, "access"); if (access_rules) { + /* Don't send a mail about denial to the list, but silently + * discard and exit */ + if (strncasecmp(listaddress, fromemails.emaillist[0], + strlen(listaddress)) == 0) { + myfree(listaddr); + unlink(donemailname); + myfree(donemailname); + exit(EXIT_SUCCESS); + } if (do_access(access_rules, &allheaders) == DENY) { listname = genlistname(listaddr); listfqdn = genlistfqdn(listaddr);