]> SAFE projects GIT repository - jmp/mailleur/commitdiff
waring is really sent back, trouble with out logs
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 13 Jun 2025 15:25:16 +0000 (11:25 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 13 Jun 2025 15:25:16 +0000 (11:25 -0400)
conf/mailleur.conf.dvl
lib/geseml.c

index 07270a7bf60a67fdf0717ae367137c8674d19999..dda4243ceac67143ed73139b8d0cd1acbb2472e8 100644 (file)
@@ -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"
index 2214a5ec665347947827147204c974b4627a1a81..ab4f55b1c9339cab2a1082b00aa417abc9e22d95 100644 (file)
@@ -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