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 wrap: on
line diff
--- 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));
--- 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