[milters] Archive

Lists Index Date Thread Search

Article: 3352
From: Anthony Howe
Date: 2013-03-06 12:34:56 -0500
Subject: 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