diff options
| -rw-r--r-- | driver.c | 11 | ||||
| -rw-r--r-- | fetchmail.c | 4 | ||||
| -rw-r--r-- | fetchmail.h | 2 | ||||
| -rw-r--r-- | pop3.c | 6 | ||||
| -rw-r--r-- | rfc822.c | 5 | 
5 files changed, 16 insertions, 12 deletions
| @@ -168,7 +168,7 @@ static int is_host_alias(const char *name, struct query *ctl)       */      if (strcasecmp(lead_server->truename, name) == 0)  	return(TRUE); -    else if (str_in_list(&lead_server->akalist, name)) +    else if (str_in_list(&lead_server->akalist, name, TRUE))  	return(TRUE);      else if (!ctl->server.dns)  	return(FALSE); @@ -830,12 +830,15 @@ int num;		/* index of message */  	 * envelope sender from the Return-Path, the new Return-Path should be  	 * exactly the same as the original one.  	 * -	 * Empty Return-Path headers will be ignored. +	 * We do *not* want to ignore empty Return-Path headers.  These should +	 * be passed through as a way of indicating that a message should +	 * not trigger bounces if delivery fails.  What we *do* need to do is +	 * make sure we never try to rewrite such a blank Return-Path.  	 *  	 */ -	if (!strncasecmp("Return-Path:", line, 12) && (cp = nxtaddr(line))) +	if (!strncasecmp("Return-Path:", line, 12))  	{ -	    strcpy(return_path, cp); +	    strcpy(return_path, line);  	    if (!ctl->mda) {  		free(line);  		continue; diff --git a/fetchmail.c b/fetchmail.c index b968d21c..f108f7e8 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -503,7 +503,7 @@ int main (int argc, char **argv)  			 * Note:  this delay is important - don't remove!  			 */  			sleep(3); -			interface_note_activity(&ctl->server); +			interface_note_dactivity(&ctl->server);  		    }  #endif /* defined(linux) && !INET6 */  	    } @@ -688,7 +688,7 @@ static int load_params(int argc, char **argv, int optind)  	     */  	    for (ctl = querylist; ctl; ctl = ctl->next)  		if (!strcmp(ctl->server.pollname, argv[optind]) -			|| str_in_list(&ctl->server.akalist, argv[optind])) +			|| str_in_list(&ctl->server.akalist, argv[optind], TRUE))  		    goto foundit;  	    /* diff --git a/fetchmail.h b/fetchmail.h index 1f528c06..891c2ec8 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -306,7 +306,7 @@ void free_str_list(struct idlist **);  void save_str_pair(struct idlist **, const char *, const char *);  void free_str_pair_list(struct idlist **);  int delete_str(struct idlist **, int); -int str_in_list(struct idlist **, const char *); +int str_in_list(struct idlist **, const char *, const flag);  int str_nr_in_list(struct idlist **, const char *);  int str_nr_last_in_list(struct idlist **, const char *);  void str_set_mark( struct idlist **, const char *, const flag); @@ -435,8 +435,7 @@ static int pop3_getrange(int sock,  			new = save_str(&ctl->newsaved, id, UID_UNSEEN);  			new->val.status.num = num; -			/* note: ID comparison is caseblind */ -			if (str_in_list(&ctl->oldsaved, id)) { +			if (str_in_list(&ctl->oldsaved, id, FALSE)) {  			    new->val.status.mark = UID_SEEN;  			    str_set_mark(&ctl->oldsaved, id, UID_SEEN);  			} @@ -484,9 +483,8 @@ static int pop3_is_old(int sock, struct query *ctl, int num)      if (!ctl->oldsaved)  	return (num <= last);      else -	/* note: ID comparison is caseblind */          return (str_in_list(&ctl->oldsaved, -			    str_find (&ctl->newsaved, num))); +			    str_find(&ctl->newsaved, num), FALSE));  }  #ifdef UNUSED @@ -61,6 +61,9 @@ const char *host;	/* server hostname */       * "From: John Smith@my.pop.server (Systems) <jsmith@domain>" because       * the state machine can't look ahead to the <> part past the comment       * and instead treats `John Smith' as a bareword address. +     * +     * Also note that we don't rewrite the fake address <> in order to +     * avoid screwing up bounce suppression with a null Return-Path.       */      parendepth = state = 0; @@ -132,7 +135,7 @@ const char *host;	/* server hostname */  	    case 3:	/* we're in a <>-enclosed address */  		if (*from == '@')  		    has_host_part = TRUE; -		else if (*from == '>') +		else if (*from == '>' && from[-1] != '<')  		{  		    state = 1;  		    if (!has_host_part) | 
