[milters] Archive

Lists Index Date Thread Search

Article: 3353
From: de Longpre, Dale
Date: 2013-03-06 14:29:45 -0500
Subject: RE: Milter-gris not adding xhdr

You are a rock star!  That worked just as I'm sure you expected.

X-Scanned-By: milter-gris/0.22.117.117 (localhost [127.0.0.1]); Wed, 06 Mar 2013 14:27:54
-0500

Thank you for all you do!

Dale

-----Original Message-----
From: milters@milter.info [mailto:milters@milter.info] On Behalf Of Anthony Howe
Sent: Wednesday, March 06, 2013 12:35 PM
To: milters@milter.info
Subject: [milters] Re: Milter-gris not adding xhdr

On 6 Mar 2013 10:34, de Longpre, Dale whispered from the shadows...:
> I need to have the xhdr added so I found that I need to add the "#define
DROPPED_ADD_HEADERS 1" to milter-gris.c.   
> 
> That worked to get the following code to run in the filterEndMessage
>         (void) smfi_addheader(ctx, X_SCANNED_BY, data->line);
>         syslog(LOG_NOTICE, "dfd -- Just tried to add header ");   // dfd
test
> 
> The issue is that the header isn't added to the resulting message.   Any idea where I
should look now?

Looks like I forgot to #ifdef the flags. Try the following patch...

index 8903b4f..115ccd5 100755
--- a/milter-gris.c
+++ b/milter-gris.c
@@ -893,7 +893,11 @@ smfInfo milter = {
        {
                MILTER_NAME,            /* filter name */
                SMFI_VERSION,           /* version code -- do not change */
+#ifdef DROPPED_ADD_HEADERS
+               SMFIF_ADDHDRS,          /* flags */
+#else
                0,                      /* flags */
+#endif
                filterOpen,             /* connection info filter */
                filterHelo,             /* SMTP HELO command filter */
                filterMail,             /* envelope sender filter */
-- 
Anthony C Howe            Skype: SirWumpus                  SnertSoft
                        Twitter: SirWumpus      BarricadeMX & Milters
http://snert.com/      http://nanozen.info/     http://snertsoft.com/


Lists Index Date Thread Search