WHERE char *SmtpUseTLS;
#endif
WHERE char *Spoolfile;
-WHERE char *SpamSep;
#if defined(USE_SSL) || defined(USE_GNUTLS)
WHERE char *SslCertFile INITVAL (NULL);
** Madmutt will attach the message whether or not this is the case,
** as long as the non-``$$reply_regexp'' parts of both messages are identical.
*/
- {"spam_separator", DT_STR, R_NONE, UL &SpamSep, ","},
- /*
- ** .pp
- ** ``$spam_separator'' controls what happens when multiple spam headers
- ** are matched: if \fIunset\fP, each successive header will overwrite any
- ** previous matches value for the spam label. If \fIset\fP, each successive
- ** match will append to the previous, using ``$spam_separator'' as a
- ** separator.
- */
{"spoolfile", DT_PATH, R_NONE, UL &Spoolfile, "" },
/*
** .pp
## sendmail_wait
## shell
## shorthost
+## spam_separator
## sysconfdir
## tmpdir
## use_8bitmime
{"MTransport", luaopen_MTransport},
{"MAlias", luaopen_MAlias},
{"MCharset", luaopen_MCharset},
+ {"Mime", luaopen_Mime},
};
int i;
mime-token.c mime-token.h: mime-token.def mime-token.sh
sh mime-token.sh $@ < $<
+include $(top_builddir)/tools/cpkg2c.mk
-include $(top_builddir)/tools/cflags.mk
*/
#include <lib-lib/lib-lib.h>
-
+#include <lib-lua/lib-lua.h>
#include "mime.h"
+@import "../lib-lua/base.cpkg"
#define BOUNDARYLEN 16
-
const char MimeSpecials[] = "@.,;:<>[]\\\"()?/= \t";
const char *BodyTypes[] = {
"x-uuencoded",
};
+@package Mime {
+ /*
+ ** .pp
+ ** ``$spam_separator'' controls what happens when multiple spam headers
+ ** are matched: if \fIunset\fP, each successive header will overwrite any
+ ** previous matches value for the spam label. If \fIset\fP, each successive
+ ** match will append to the previous, using ``$spam_separator'' as a
+ ** separator.
+ */
+ string_t spam_separator = m_strdup(",");
+};
+
/****************************************************************************/
/* rfc822 header parameters */
/****************************************************************************/
}
}
+/* vim:set ft=c: */
#include "mime-types.h"
#include "mime-token.h"
+#include <lib-lua/lib-lua.h>
+#include "mime.li"
+
extern const char MimeSpecials[];
extern const char *BodyTypes[];
extern const char *BodyEncodings[];
{
/* if spam tag already exists, figure out how to amend it */
if (e->spam && *buf) {
- if (SpamSep) {
- /* If SpamSep defined, append with separator */
- mutt_buffer_addstr(e->spam, SpamSep);
- mutt_buffer_addstr(e->spam, buf);
+ if (Mime.spam_separator) {
+ mutt_buffer_addstr(e->spam, Mime.spam_separator);
} else {
- /* else overwrite */
mutt_buffer_reset(e->spam);
- mutt_buffer_addstr(e->spam, buf);
}
+ mutt_buffer_addstr(e->spam, buf);
}
if (!e->spam) {
# automake sucks, badly
all: ../lib-mime/mime-token.h \
- ../lib-lua/lua-token.h \
- ../lib-lua/madmutt.li \
- ../charset.li
+ ../lib-mime/mime.li \
+ ../lib-lua/lua-token.h \
+ ../lib-lua/madmutt.li \
+ ../charset.li
../%: ; $(MAKE) -C $(@D) $(@F)