diff options
Diffstat (limited to '')
-rw-r--r-- | antispam-plugin.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/antispam-plugin.h b/antispam-plugin.h index dfe4445..d50abf5 100644 --- a/antispam-plugin.h +++ b/antispam-plugin.h @@ -93,6 +93,15 @@ static inline struct istream *get_mail_stream(struct mail *mail) return result; } +static inline const char *const * +get_mail_headers(struct mail *mail, const char *hdr) +{ + const char *const *result; + if (mail_get_headers(mail, hdr, &result) < 0) + return NULL; + return result; +} + static inline struct ostream * o_stream_create_from_fd(int fd, pool_t pool ATTR_UNUSED) { @@ -109,6 +118,12 @@ static inline struct istream *get_mail_stream(struct mail *mail) return mail_get_stream(mail, NULL, NULL); } +static inline const char *const * +get_mail_headers(struct mail *mail, const char *hdr) +{ + return mail_get_headers(mail, hdr); +} + static inline struct ostream * o_stream_create_from_fd(int fd, pool_t pool) { |