masqmail-0.2

changeset 110:c678d0342451

changed name ACC_NODOT_TERM to ACC_DOT_IGNORE for better understanding this is only a cosmetic change
author meillo@marmaro.de
date Tue, 29 Jun 2010 11:40:37 +0200
parents db52c64acaa2
children 43798acdfbc9
files src/accept.c src/masqmail.c src/masqmail.h src/smtpsend.c
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/src/accept.c	Tue Jun 29 11:34:53 2010 +0200
     1.2 +++ b/src/accept.c	Tue Jun 29 11:40:37 2010 +0200
     1.3 @@ -83,7 +83,7 @@
     1.4  
     1.5  		line1 = line;
     1.6  
     1.7 -		if ((line[0] == '.') && (!(flags & ACC_NODOT_TERM))) {
     1.8 +		if ((line[0] == '.') && (!(flags & ACC_DOT_IGNORE))) {
     1.9  			if (line[1] == '\n') {
    1.10  				g_free(line);
    1.11  				break;
    1.12 @@ -92,7 +92,7 @@
    1.13  		}
    1.14  
    1.15  		if (len <= 0) {
    1.16 -			if ((len == -1) && ((flags & ACC_NODOT_TERM) || (flags & ACC_NODOT_RELAX))) {
    1.17 +			if ((len == -1) && ((flags & ACC_DOT_IGNORE) || (flags & ACC_NODOT_RELAX))) {
    1.18  				/* we got an EOF, and the last line was not terminated by a CR */
    1.19  				gint len1 = strlen(line1);
    1.20  				if (len1 > 0) {  /* == 0 is 'normal' (EOF after a CR) */
     2.1 --- a/src/masqmail.c	Tue Jun 29 11:34:53 2010 +0200
     2.2 +++ b/src/masqmail.c	Tue Jun 29 11:40:37 2010 +0200
     2.3 @@ -814,7 +814,7 @@
     2.4  	case MODE_ACCEPT:
     2.5  		{
     2.6  			guint accept_flags = (opt_t ? ACC_DEL_RCPTS | ACC_RCPT_FROM_HEAD : 0)
     2.7 -			                     | (opt_i ? ACC_NODOT_TERM : ACC_NODOT_RELAX);
     2.8 +			                     | (opt_i ? ACC_DOT_IGNORE : ACC_NODOT_RELAX);
     2.9  			mode_accept(return_path, full_sender_name, accept_flags, &(argv[arg]), argc - arg);
    2.10  			exit(exit_failure ? EXIT_FAILURE : EXIT_SUCCESS);
    2.11  		}
     3.1 --- a/src/masqmail.h	Tue Jun 29 11:34:53 2010 +0200
     3.2 +++ b/src/masqmail.h	Tue Jun 29 11:40:37 2010 +0200
     3.3 @@ -310,7 +310,7 @@
     3.4  /* flags for accept() */
     3.5  #define ACC_DEL_RCPTS      0x02  /* -t option, delete rcpts that were given as cmd args */
     3.6  #define ACC_RCPT_FROM_HEAD 0x08  /* -t option, get rcpts from headers */
     3.7 -#define ACC_NODOT_TERM     0x10  /* a dot on a line itself does not end the message (-oi option) */
     3.8 +#define ACC_DOT_IGNORE     0x10  /* a dot on a line itself does not end the message (-oi option) */
     3.9  #define ACC_MAIL_FROM_HEAD 0x40  /* get return path from header */
    3.10  #define ACC_NODOT_RELAX    0x80  /* do not be picky if message ist not terminated by a dot on a line */
    3.11  #define ACC_SAVE_ENVELOPE_TO 0x0100  /* save an existent Envelope-to header as X-Orig-Envelope-to */
     4.1 --- a/src/smtpsend.c	Tue Jun 29 11:34:53 2010 +0200
     4.2 +++ b/src/smtpsend.c	Tue Jun 29 11:40:37 2010 +0200
     4.3 @@ -99,7 +99,7 @@
     4.4  			msg->rcpt_list = g_list_append(msg->rcpt_list, create_address_qualified(argv[optind++], TRUE, conf.host_name));
     4.5  		}
     4.6  
     4.7 -		if ((ret = accept_message(stdin, msg, ACC_NODOT_TERM)) == AERR_OK) {
     4.8 +		if ((ret = accept_message(stdin, msg, ACC_DOT_IGNORE)) == AERR_OK) {
     4.9  			if ((ret = smtp_deliver(server_name, server_port, resolve_list, msg, NULL, NULL)) == smtp_ok) {
    4.10  				exit(EXIT_SUCCESS);
    4.11  			}