From 7e5f7378b21c8e5e00883e4c8ac90a33a05ace03 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Fri, 13 Jun 2025 11:25:16 -0400 Subject: [PATCH] waring is really sent back, trouble with out logs --- conf/mailleur.conf.dvl | 3 +++ lib/geseml.c | 23 ++++------------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/conf/mailleur.conf.dvl b/conf/mailleur.conf.dvl index 07270a7..dda4243 100644 --- a/conf/mailleur.conf.dvl +++ b/conf/mailleur.conf.dvl @@ -14,6 +14,9 @@ SMTPPORTS = ":127.127.10.25:1025:" #SMTPPORTS = "smtps:127.127.10.25:1065:1" #------------------------------------------------ +#defining default domain +DFLTDOMAIN = "example.com" +#------------------------------------------------ #Defining SERVER mode Certificate data CA_ROOT_SRV = "./certs/root-safe_CA.pem" CA_CERT_SRV = "./certs/mailleur_server-chain-cert_x509.pem" diff --git a/lib/geseml.c b/lib/geseml.c index 2214a5e..ab4f55b 100644 --- a/lib/geseml.c +++ b/lib/geseml.c @@ -779,22 +779,7 @@ proceed=true; while (proceed==true) { (void) rou_alert(0,"JMPDBG %s phase='%d'",OPEP,phase); switch (phase) { - case 0 : //getting the local originator - char dname[60]; - char *ptr; - - (void) memset(dname,'\000',sizeof(dname)); - if (gethostname(dname,sizeof(dname))<0) { - (void) rou_alert(0,"%s Unable to get host name (error=<%s> bug?)", - OPEP,strerror(errno)); - phase=999; - } - if ((ptr=strchr(dname,'.'))!=(char *)0) { - ptr++; - (void) memcpy(dname,ptr,strlen(ptr)+1); - } - break; - case 1 : //check if email is FROM local or remote + case 0 : //check if email is FROM local or remote char *domain; int status; @@ -819,16 +804,16 @@ while (proceed==true) { break; } break; - case 2 : //reversing originator/recipient + case 1 : //reversing originator/recipient char orig[100]; - (void) snprintf(orig,sizeof(orig),"%s@%s","noreply",dname); + (void) snprintf(orig,sizeof(orig),"%s@%s","noreply",getenv("DFLTDOMAIN")); tra->rcptto=rou_freestr(tra->rcptto); tra->rcptto=tra->mailfrom; tra->mailfrom=strdup(orig); done=true; break; - case 3 : //building the new sessid file + case 2 : //building the new sessid file tra->resp=(char **)rou_freelist((void **)tra->resp,(genfree_t)rou_freestr); break; default : //SAFE Guard -- 2.47.3