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"
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;
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