/* * Copyright (c) 2019 Markus Hennecke * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef __DNSBL_H__ #define __DNSBL_H__ #include #include struct spamlist { TAILQ_ENTRY(spamlist) entry; char *name; char *dns; }; struct config { TAILQ_HEAD(, spamlist) lists; char *config_file; char *logfile; FILE *log; int autowhitelist; struct passwd *pw; }; struct spamlist *spamlist_new(const char *, const char *); void spamlist_free(struct spamlist *); struct config *config_new(void); void config_free(struct config *); void config_add_spamlist(struct config *, const char *, const char *); bool config_parse(struct config *, const char *); bool config_check(struct config *); struct config *config_reload(struct config *); #endif // __DNSBL_H__