From: Art Cancro Date: Sun, 12 Jul 1998 22:02:39 +0000 (+0000) Subject: Now, citmail.c doesn't attempt to read the userlog directly. This is a X-Git-Tag: v7.86~8439 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=4f5d0edd26910c48170ab69cb16995e26af2f9c5;p=citadel.git Now, citmail.c doesn't attempt to read the userlog directly. This is a very Good Thing, because there's no userlog to read anymore. --- diff --git a/citadel/citmail.c b/citadel/citmail.c index 4dec56b21..2f4a12cc4 100644 --- a/citadel/citmail.c +++ b/citadel/citmail.c @@ -169,42 +169,6 @@ char buf[]; { buf[strlen(buf)-1]=0; } -int islocalok(char recp[]) { - - struct usersupp ust; - long lookfor; - char a_recp[128]; - int found_closest_match = 0; - int a,us; - strcpy(a_recp,recp); - for (a=0; a=0) { - while(read(us,&ust,sizeof(struct usersupp))>0) { - if (lookfor == ust.usernum) { - strcpy(recp,ust.fullname); - close(us); - return(2); - } - if (!strucmp(ust.fullname,a_recp)) { - strcpy(recp,ust.fullname); - close(us); - return(3); - } - if (!struncmp(ust.fullname,a_recp,strlen(a_recp))) { - strcpy(recp,ust.fullname); - found_closest_match = 1; - } - } - close(us); - } - if (getpwnam(recp)!=NULL) return(1); - if (found_closest_match) return(3); - return(0); - } - /* strip leading and trailing spaces */ void striplt(buf) char buf[]; { @@ -567,9 +531,6 @@ char *name; { void deliver(char recp[], int is_test, int deliver_to_ignet) { - int b; - b=islocalok(recp); - /* various ways we can deliver mail... */ if (deliver_to_ignet) { @@ -599,14 +560,10 @@ void deliver(char recp[], int is_test, int deliver_to_ignet) { if (is_test == 0) do_roommail(recp); } - else if (b==1) { - syslog(LOG_NOTICE,"fallback mailer to user %s",recp); - if (is_test == 0) do_fallback(recp); - } - else { - /* Otherwise, the user is local (or an unknown name was specified, in - * which case we let netproc handle the bounce) + /* Otherwise, we treat the recipient as the name of a local + * Citadel user. If the username doesn't exist, we still + * deliver it to Citadel -- netproc will handle the bounce. */ syslog(LOG_NOTICE,"to Citadel user %s",recp); if (is_test == 0) do_citmail(recp, LOCAL);