fa.openbsd.tech
[Top] [All Lists]

spamd grey.c diff

Subject: spamd grey.c diff
From: Dieter Rauschenberger <dr@xxxxxxx>
Date: Sat, 26 Jul 2008 16:37:11 UTC
Newsgroups: fa.openbsd.tech

Hi,

this diff makes spamd(8) to ignore lines starting with a '#' sign
(comment lines) in the spamd.alloweddomains file.


Index: grey.c
===================================================================
RCS file: /cvs/src/libexec/spamd/grey.c,v
retrieving revision 1.43
diff -u -p -r1.43 grey.c
--- grey.c      11 Jul 2008 14:53:32 -0000      1.43
+++ grey.c      26 Jul 2008 16:21:33 -0000
@@ -319,6 +319,8 @@ readsuffixlists(void)
                SLIST_REMOVE_HEAD(&match_suffix, entry);
        if ((fp = fopen(alloweddomains_file, "r")) != NULL) {
                while ((buf = fgetln(fp, &len))) {
+                       if (*buf == '#' )
+                               continue;
                        if (buf[len-1] == '\n')
                                len--;
                        if ((m = malloc(sizeof(struct mail_addr))) == NULL)
Index: grey.c
===================================================================
RCS file: /cvs/src/libexec/spamd/grey.c,v
retrieving revision 1.43
diff -u -p -r1.43 grey.c
--- grey.c      11 Jul 2008 14:53:32 -0000      1.43
+++ grey.c      26 Jul 2008 16:21:33 -0000
@@ -319,6 +319,8 @@ readsuffixlists(void)
                SLIST_REMOVE_HEAD(&match_suffix, entry);
        if ((fp = fopen(alloweddomains_file, "r")) != NULL) {
                while ((buf = fgetln(fp, &len))) {
+                       if (*buf == '#' )
+                               continue;
                        if (buf[len-1] == '\n')
                                len--;
                        if ((m = malloc(sizeof(struct mail_addr))) == NULL)


<Prev in Thread] Current Thread [Next in Thread>
  • spamd grey.c diff, Dieter Rauschenberger <=