]> SAFE projects GIT repository - jmp/mailleur/commitdiff
calling getspf within check from
authorJean-Marc Pigeon <jmp@safe.c>
Sun, 16 Nov 2025 21:31:26 +0000 (16:31 -0500)
committerJean-Marc Pigeon <jmp@safe.c>
Sun, 16 Nov 2025 21:31:26 +0000 (16:31 -0500)
lib/gesspf.c
lib/lvleml.h

index 6a20a42ddf924f59459edfc950071c8a5feb71d7..727716da67f0c331a15ecaac825319429573c15b 100644 (file)
@@ -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;
index 45b83ffbaade46bbf89696d0083a039cf32121ac..a26487cd4712349823f1bcf681db671a30b19551 100644 (file)
@@ -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