masqmail

changeset 299:ca2d11aec2a3

fixed compile error; removed PROT_BSMTP; made protocol names ucase Dont know what PROT_BSMTP had been for. It's not used. RFC 5321 requires the protocol to be: Protocol = "ESMTP" / "SMTP" / Attdl-Protocol We now use upper case too, although it might not matter much.
author markus schnalke <meillo@marmaro.de>
date Thu, 09 Dec 2010 13:53:48 -0300
parents 6281ff92cb86
children d04894d0fc64
files src/accept.c src/masqmail.h
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/src/accept.c	Thu Dec 09 13:20:14 2010 -0300
     1.2 +++ b/src/accept.c	Thu Dec 09 13:53:48 2010 -0300
     1.3 @@ -20,11 +20,11 @@
     1.4  #include "masqmail.h"
     1.5  #include "readsock.h"
     1.6  
     1.7 +/* must match PROT_* in masqmail.h */
     1.8  gchar *prot_names[] = {
     1.9  	"local",
    1.10 -	"bsmtp",
    1.11 -	"smtp",
    1.12 -	"esmtp",
    1.13 +	"SMTP",
    1.14 +	"ESMTP",
    1.15  	"(unknown)"  /* should not happen, but better than crashing. */
    1.16  };
    1.17  
    1.18 @@ -308,7 +308,7 @@
    1.19  				addr = g_strdup(hdr->value);
    1.20  				g_strchomp(addr);
    1.21  
    1.22 -				msg->return_path = create_address_qualified(addr, FALSE, msg->received_host));
    1.23 +				msg->return_path = create_address_qualified(addr, FALSE, msg->received_host);
    1.24  				if (msg->return_path) {
    1.25  					DEBUG(3) debugf("setting return_path to %s\n", addr_string(msg->return_path));
    1.26  					msg->hdr_list = g_list_append( msg->hdr_list, create_header(HEAD_UNKNOWN, "X-Warning: return path set from %s address\n", hdr->id == HEAD_SENDER ? "Sender:" : "From:"));
    1.27 @@ -330,7 +330,7 @@
    1.28  			return AERR_NORCPT;
    1.29  		}
    1.30  
    1.31 -		if (!has_sender && !has_from)) {
    1.32 +		if (!has_sender && !has_from) {
    1.33  			DEBUG(3) debugf("adding 'From:' header\n");
    1.34  			if (msg->full_sender_name) {
    1.35  				msg->hdr_list = g_list_append(msg->hdr_list, create_header(HEAD_FROM, "From: \"%s\" <%s@%s>\n", msg->full_sender_name, msg->return_path->local_part, msg->return_path->domain));
     2.1 --- a/src/masqmail.h	Thu Dec 09 13:20:14 2010 -0300
     2.2 +++ b/src/masqmail.h	Thu Dec 09 13:53:48 2010 -0300
     2.3 @@ -203,9 +203,9 @@
     2.4  } table_pair;
     2.5  
     2.6  
     2.7 +/* must match the contents of prot_names[] in accept.c */
     2.8  typedef enum _prot_id {
     2.9  	PROT_LOCAL = 0,
    2.10 -	PROT_BSMTP,
    2.11  	PROT_SMTP,
    2.12  	PROT_ESMTP,
    2.13  	PROT_NUM