Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] cutting off sender-string

2004-09-08 by hans hm04

hi 

thanks to all, who did response to my posting, 
especially to you emmanuel for milter-greylist.
it's really a great tool for preventing spam. 

i did made the following mods:

======================================================================
*** .dump.h_orig        Tue Sep  7 18:32:21 2004
--- dump.h      Wed Sep  8 19:32:04 2004
***************
*** 54,60 ****
  #endif
  
  #define DATELEN 40
! #define ADDRLEN       31
  #define IPADDRLEN sizeof("255.255.255.255")
  
  #include "milter-greylist.h"
--- 54,61 ----
  #endif
  
  #define DATELEN 40
! /* changed by mayer */ 
! #define ADDRLEN       63
  #define IPADDRLEN sizeof("255.255.255.255")
  
  #include "milter-greylist.h"
======================================================================
*** .autowhite.c_orig   Mon Aug  2 14:11:48 2004
--- autowhite.c Wed Sep  8 19:30:35 2004
***************
*** 275,281 ****
        struct tm tm;
  
        fprintf(stream, "\n\n#\n# Auto-whitelisted tuples\n#\n");
!       fprintf(stream, "# Sender IP    %32s    %32s    Expire\n",
            "Sender e-mail", "Recipient e-mail");
  
        AUTOWHITE_RDLOCK;
--- 275,281 ----
        struct tm tm;
  
        fprintf(stream, "\n\n#\n# Auto-whitelisted tuples\n#\n");
!       fprintf(stream, "# Sender IP    %64s    %64s    Expire\n",
            "Sender e-mail", "Recipient e-mail");
  
        AUTOWHITE_RDLOCK;
***************
*** 286,292 ****
                iptostring(aw->a_sa, aw->a_salen, textaddr, sizeof(textaddr));
  
                fprintf(stream, 
!                   "%s     %32s    %32s    %ld AUTO # %s\n",
                    textaddr, aw->a_from, aw->a_rcpt, 
                    (long)aw->a_tv.tv_sec, textdate);
  
--- 286,292 ----
                iptostring(aw->a_sa, aw->a_salen, textaddr, sizeof(textaddr));
  
                fprintf(stream, 
!                   "%s     %64s    %64s    %ld AUTO # %s\n",
                    textaddr, aw->a_from, aw->a_rcpt, 
                    (long)aw->a_tv.tv_sec, textdate);
======================================================================
*** .pending.c_orig     Tue Aug  3 23:56:07 2004
--- pending.c   Wed Sep  8 19:30:47 2004
***************
*** 341,347 ****
        struct tm tm;
  
        fprintf(stream, "\n\n#\n# greylisted tuples\n#\n");
!       fprintf(stream, "# Sender IP    %32s    %32s    Time accepted\n", 
            "Sender e-mail", "Recipient e-mail");
  
        PENDING_RDLOCK;
--- 341,347 ----
        struct tm tm;
  
        fprintf(stream, "\n\n#\n# greylisted tuples\n#\n");
!       fprintf(stream, "# Sender IP    %64s    %64s    Time accepted\n", 
            "Sender e-mail", "Recipient e-mail");
  
        PENDING_RDLOCK;
***************
*** 349,355 ****
                localtime_r((time_t *)&pending->p_tv.tv_sec, &tm);
                strftime(textdate, DATELEN, "%Y-%m-%d %T", &tm);
  
!               fprintf(stream, "%s     %32s    %32s    %ld # %s\n", 
                    pending->p_addr, pending->p_from, 
                    pending->p_rcpt, (long)pending->p_tv.tv_sec, textdate);
                
--- 349,355 ----
                localtime_r((time_t *)&pending->p_tv.tv_sec, &tm);
                strftime(textdate, DATELEN, "%Y-%m-%d %T", &tm);
  
!               fprintf(stream, "%s     %64s    %64s    %ld # %s\n", 
                    pending->p_addr, pending->p_from, 
                    pending->p_rcpt, (long)pending->p_tv.tv_sec, textdate);
======================================================================


i will post tomorrow the results.

best regards 
hans 

-- 

On Tue, Sep 07, 2004 at 03:20:02PM -0700, jothev wrote:
> 
> > > is there a bugfix or workaround 
> > > to increase the string-length for 
> > > example to 64 
> > 
> > Sure: bump ADDRLEN in dump.h and rebuild.
> 
> 
> I'm a newbie here, but looking at the code it appears
> that the printf statements (when dumping to
> greylist.db) use a hardcoded "%32s", so you probably
> should bump that also? I'm not sure whether the
> import/reread code has similar issues.
> 
> --John
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.