login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
openbsd-tech
»
2009
»
February
»
18
Re: allow comments and empty lines in spamd.alloweddomains
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: patrick keshishian
Subject:
Re: allow comments and empty lines in spamd.alloweddomains
Date: Tuesday, February 17, 2009 - 11:14 pm
On Wed, Feb 18, 2009 at 07:03:19AM +0100, Olli Hauer wrote:
quoted text
> no, this is what I use, it also prevents a failure if someone has a trailing space after the mailaddress (allow entry) > > Index: grey.c > =================================================================== > RCS file: /cvs/src/libexec/spamd/grey.c,v > retrieving revision 1.45 > diff -u -r1.45 grey.c > --- grey.c 7 Dec 2008 21:12:52 -0000 1.45 > +++ grey.c 18 Feb 2009 06:02:00 -0000 > @@ -319,6 +319,18 @@ > SLIST_REMOVE_HEAD(&match_suffix, entry); > if ((fp = fopen(alloweddomains_file, "r")) != NULL) { > while ((buf = fgetln(fp, &len))) { > + /* strip white space-characters */ > + while (len > 0 && isspace(buf[len-1])) > + len--; > + while (len > 0 && isspace(*buf)) { > + buf++; > + len--; > + } > + /* jump over comments and blank lines */ > + if (*buf == '#' || *buf == '\n') > + continue; > + if (len == 0) > + continue;
You should do your len check before the check for '#' and '\n'. --patrick
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
allow comments and empty lines in spamd.alloweddomains
, Stephan A. Rickauer
, (Tue Feb 17, 1:13 pm)
Re: allow comments and empty lines in spamd.alloweddomains
, Otto Moerbeek
, (Tue Feb 17, 2:24 pm)
Re: allow comments and empty lines in spamd.alloweddomains
, Bob Beck
, (Tue Feb 17, 2:32 pm)
Re: allow comments and empty lines in spamd.alloweddomains
, Stephan A. Rickauer
, (Tue Feb 17, 3:02 pm)
Re: allow comments and empty lines in spamd.alloweddomains
, d-ra
, (Tue Feb 17, 3:39 pm)
Re: allow comments and empty lines in spamd.alloweddomains
, Pawel Veselov
, (Tue Feb 17, 4:45 pm)
Re: allow comments and empty lines in spamd.alloweddomains
, Olli Hauer
, (Tue Feb 17, 11:03 pm)
Re: allow comments and empty lines in spamd.alloweddomains
, patrick keshishian
, (Tue Feb 17, 11:14 pm)
Re: allow comments and empty lines in spamd.alloweddomains
, Olli Hauer
, (Tue Feb 17, 11:20 pm)
Re: allow comments and empty lines in spamd.alloweddomains
, d-ra
, (Wed Feb 18, 1:23 am)
Re: allow comments and empty lines in spamd.alloweddomains
, Stephan A. Rickauer
, (Wed Feb 18, 1:44 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Chuck Ebbert
Re: PCI: Unable to reserve mem region problem
Mingming Cao
Re: [RFC 1/4] Large Blocksize support for Ext2/3/4
Linus Torvalds
Linux 2.6.34-rc4
git
:
Ralf Wildenhues
[PATCH] Fix typos in the documentation
Adeodato
Bazaar's patience diff as GIT_EXTERNAL_DIFF
Johannes Schindelin
Re: [PATCH 2/4] Add functions get_relative_cwd() and is_inside_dir()
Len Brown
Re: fatal: unable to create '.git/index': File exists
Denis Bueno
Git clone error
git-commits-head
:
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
nfsd41: sanity check client drc maxreqs
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
V4L/DVB: gspca - sonixj: Adjust minor values of sensor ov7630. - set the color ga...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Sam Fourman Jr.
Re: Help with Altell PC6700
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
linux-netdev
:
Kurt Van Dijck
Re: [PATCH net-next-2.6 1/2] can: add driver for Softing card
Eric Dumazet
Re: [PATCH net-next-2.6] net: Introduce skb_orphan_try()
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
David Miller
Re: [PATCH v2] net: typos in comments in include/linux/igmp.h
Ursula Braun
[patch 0/1] remove header_ops bug in qeth driver
Colocation donated by:
Syndicate