# HG changeset patch # User markus schnalke # Date 1291913628 10800 # Node ID ca2d11aec2a3c865cdaa1e698765ab6b07f8e0c0 # Parent 6281ff92cb861d1f7aeb79ea5dc323a35fa8fb98 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. diff -r 6281ff92cb86 -r ca2d11aec2a3 src/accept.c --- a/src/accept.c Thu Dec 09 13:20:14 2010 -0300 +++ b/src/accept.c Thu Dec 09 13:53:48 2010 -0300 @@ -20,11 +20,11 @@ #include "masqmail.h" #include "readsock.h" +/* must match PROT_* in masqmail.h */ gchar *prot_names[] = { "local", - "bsmtp", - "smtp", - "esmtp", + "SMTP", + "ESMTP", "(unknown)" /* should not happen, but better than crashing. */ }; @@ -308,7 +308,7 @@ addr = g_strdup(hdr->value); g_strchomp(addr); - msg->return_path = create_address_qualified(addr, FALSE, msg->received_host)); + msg->return_path = create_address_qualified(addr, FALSE, msg->received_host); if (msg->return_path) { DEBUG(3) debugf("setting return_path to %s\n", addr_string(msg->return_path)); 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:")); @@ -330,7 +330,7 @@ return AERR_NORCPT; } - if (!has_sender && !has_from)) { + if (!has_sender && !has_from) { DEBUG(3) debugf("adding 'From:' header\n"); if (msg->full_sender_name) { 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)); diff -r 6281ff92cb86 -r ca2d11aec2a3 src/masqmail.h --- a/src/masqmail.h Thu Dec 09 13:20:14 2010 -0300 +++ b/src/masqmail.h Thu Dec 09 13:53:48 2010 -0300 @@ -203,9 +203,9 @@ } table_pair; +/* must match the contents of prot_names[] in accept.c */ typedef enum _prot_id { PROT_LOCAL = 0, - PROT_BSMTP, PROT_SMTP, PROT_ESMTP, PROT_NUM