diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | esmtprc.5 | 9 | ||||
-rw-r--r-- | lexer.l | 1 | ||||
-rw-r--r-- | parser.y | 4 | ||||
-rw-r--r-- | smtp.c | 5 | ||||
-rw-r--r-- | smtp.h | 1 |
6 files changed, 21 insertions, 1 deletions
@@ -5,6 +5,8 @@ News * Fix NTLM authentication (Nils Rennebarth). + * Option to disable Message-ID header (Phil Sutter). + * Version 0.6.0 (2007-09-03): * Handle CR-LF newline endings when parsing the headers. @@ -92,6 +92,15 @@ be used as "From:" when the message contains none. "%u" will be replaced with the username. "%%" by "%". .TP +\fBmessage_id\fR +Whether to set the Message-ID field of the message before sending. +Normally the receiving MTA sets the Message-ID if missing, so you can turn +this off if your sending host does not have a fully qualified domain name. + +Allowed values are either \fBenabled\fR or \fBdisabled\fR. It defaults to +\fBenabled\fR + +.TP \fBpreconnect\fR Shell command to execute prior to opening an SMTP connection. @@ -67,6 +67,7 @@ helo { return HELO; } force { return FORCE; } reverse_path { return REVERSE_PATH; } sender { return SENDER; } +message_id { return MSGID; } mda { return MDA; } = { return MAP; } @@ -64,7 +64,7 @@ void yyerror (const char *s); char *sval; } -%token IDENTITY DEFAULT HOSTNAME USERNAME PASSWORD STARTTLS CERTIFICATE_PASSPHRASE PRECONNECT POSTCONNECT MDA QUALIFYDOMAIN HELO FORCE SENDER REVERSE_PATH +%token IDENTITY DEFAULT HOSTNAME USERNAME PASSWORD STARTTLS CERTIFICATE_PASSPHRASE PRECONNECT POSTCONNECT MDA QUALIFYDOMAIN HELO FORCE SENDER MSGID REVERSE_PATH %token MAP @@ -116,6 +116,8 @@ statement : HOSTNAME map STRING { identity->host = xstrdup($3); SET_DEFAULT_IDEN | HELO map STRING { identity->helo = xstrdup($3); SET_DEFAULT_IDENTITY; } | FORCE REVERSE_PATH map STRING { identity->force_reverse_path = xstrdup($4); SET_DEFAULT_IDENTITY; } | FORCE SENDER map STRING { identity->force_sender = xstrdup($4); SET_DEFAULT_IDENTITY; } + | MSGID map DISABLED { identity->prohibit_msgid = 1; SET_DEFAULT_IDENTITY; } + | MSGID map ENABLED { identity->prohibit_msgid = 0; SET_DEFAULT_IDENTITY; } | MDA map STRING { mda = xstrdup($3); } | DEFAULT { default_identity = identity; } ; @@ -650,6 +650,11 @@ void smtp_send(message_t *msg, identity_t *identity) goto failure; } + /* Prohibit Message-ID:-Header if force_msgid is not specified */ + if(identity->prohibit_msgid) + if(!smtp_set_header_option(message, "Message-ID", Hdr_PROHIBIT, (int)1)) + goto failure; + /* DSN options */ if(!smtp_dsn_set_ret(message, msg->ret)) goto failure; @@ -53,6 +53,7 @@ typedef struct { /*@{*/ char *force_reverse_path; char *force_sender; + int prohibit_msgid; /*@}*/ } identity_t; |