From ba5fa5df760a83c29830baa0660a852db4bf565b Mon Sep 17 00:00:00 2001 From: Jean-Marc Pigeon Date: Sun, 16 Nov 2025 16:31:26 -0500 Subject: [PATCH] calling getspf within check from --- lib/gesspf.c | 8 ++++++-- lib/lvleml.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/gesspf.c b/lib/gesspf.c index 6a20a42..727716d 100644 --- a/lib/gesspf.c +++ b/lib/gesspf.c @@ -644,17 +644,21 @@ return spf; /* return the SPF status. */ /* */ /********************************************************/ -PUBLIC SPFENU spf_getspf(char *domain,char *peerip) +PUBLIC SPFENU spf_getspf(char *mailfrom,char *peerip) { #define OPEP "gesspf.c:spf_getspf" SPFENU spf; +char *domain; AFNTYP **afns; spf=spf_unknown; +domain=strchr(mailfrom,'@'); +if (domain!=(char *)0) + domain++; afns=afn_getipnums(peerip); -if (afns!=(AFNTYP **)0) { +if ((afns!=(AFNTYP **)0)&&(domain!=(char *)0)) { int try; try=0; diff --git a/lib/lvleml.h b/lib/lvleml.h index 45b83ff..a26487c 100644 --- a/lib/lvleml.h +++ b/lib/lvleml.h @@ -37,7 +37,7 @@ typedef struct { char *termend; //contact ending condition SESTYP *session; //SMTP current session information char *mailfrom; //current mail from originator - SPFENU isgoodspf; //remote mail spf status + SPFENU fromspf; //remote email spf status RCPTYP **recipients; //List of email recipient LOGPTR *logptr; //reference to session log char *transout; //data to be flush out to remote -- 2.47.3