Yahoo Groups archive

Milter-greylist

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

Thread

milter-greylist with postfix

milter-greylist with postfix

2006-11-28 by Nerijus Baliunas

Hello,

According to http://www.postfix.org/MILTER_README.html#workarounds :
  Some Milter applications use the "{if_addr}" macro to recognize local mail;
  this macro does not exist in Postfix. Workaround: use the "{client_addr}"
  macro instead.

I had to replace {if_addr} with {client_addr} in milter-greylist.c (this got rid
of "smfi_getsymval failed for {if_addr}" in the log). If sendmail also supports
{client_addr}, could it be possible to change it in the source? If not, then
probably configure switch could be added for Postfix?

But I still get message "smfi_getsymval failed for {i}". Is it because of (the
same URL):
  This happens because some Milter applications expect that the queue ID
  is known before the MTA accepts the MAIL FROM (sender) command.
  Postfix, on the other hand, does not choose a queue file name until after
  it accepts the first valid RCPT TO (recipient) command.
?
There is a workaround below in the page.

And now the most serious problem. "              0" is added at the end of
every message, and a number (pid?) is added after all the headers,
for example:

X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
          44660

Message-Id: <20061127145914.674468019A@...>
           3753

Any idea why? Or should I ask in postfix list?

Regards,
Nerijus

Re: [milter-greylist] milter-greylist with postfix

2006-11-28 by Hajimu UMEMOTO

Hi,

>>>>> On Tue, 28 Nov 2006 02:52:15 +0200
>>>>> Nerijus Baliunas <nerijus@...> said:

nerijus> According to http://www.postfix.org/MILTER_README.html#workarounds :
nerijus>   Some Milter applications use the "{if_addr}" macro to recognize local mail;
nerijus>   this macro does not exist in Postfix. Workaround: use the "{client_addr}"
nerijus>   macro instead.

nerijus> I had to replace {if_addr} with {client_addr} in milter-greylist.c (this got rid
nerijus> of "smfi_getsymval failed for {if_addr}" in the log). If sendmail also supports
nerijus> {client_addr}, could it be possible to change it in the source? If not, then
nerijus> probably configure switch could be added for Postfix?

No, {client_addr} is not suitable for replacement of {if_addr}.  While
{if_addr} means an IP address of local sendmail, {client_addr} means
an IP address of client.

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@...  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

Re: [milter-greylist] milter-greylist with postfix

2006-11-28 by manu@netbsd.org

Nerijus Baliunas <nerijus@...> wrote:

> I had to replace {if_addr} with {client_addr} in milter-greylist.c (this
> got rid of "smfi_getsymval failed for {if_addr}" in the log). If sendmail
> also supports {client_addr}, could it be possible to change it in the
> source? If not, then probably configure switch could be added for Postfix?

Won't we later discover older or odd-flavored sendmail that miss
{client_addr}? I'd rather go for the --with-postfix configure flag.

OTOH, {if_addr} is only used for the X-Greylist header, to tell what
machine did the greylisting. That could be replace by the local IP
address we get if we open an UDP socket. Of course it can be wrong on
machine with multiple interfaces, but that should be okay in most cases.

Or we can have a config option to hardcode it.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] milter-greylist with postfix

2006-11-29 by Nerijus Baliunas

On Tue, 28 Nov 2006 06:45:24 +0100 manu@... wrote:

> > I had to replace {if_addr} with {client_addr} in milter-greylist.c (this
> > got rid of "smfi_getsymval failed for {if_addr}" in the log). If sendmail
> > also supports {client_addr}, could it be possible to change it in the
> > source? If not, then probably configure switch could be added for Postfix?
> 
> Won't we later discover older or odd-flavored sendmail that miss
> {client_addr}? I'd rather go for the --with-postfix configure flag.

Actually it's the other way around - sendmail-8.9.3 has {client_addr},
but not {if_addr}, while 8.10.0, 8.11.0 have both. So IMHO you don't
need configure flag (in case {client_addr} can be used instead of
{if_addr} of course).

> OTOH, {if_addr} is only used for the X-Greylist header, to tell what
> machine did the greylisting. That could be replace by the local IP
> address we get if we open an UDP socket. Of course it can be wrong on
> machine with multiple interfaces, but that should be okay in most cases.

BTW, I don't see X-Greylist header in received mails with 3.0, should I?

What about smfi_getsymval failed for {i}? Is it because Postfix does not
know the queue ID before it accepts the MAIL FROM command?

Regards,
Nerijus

Re: [milter-greylist] milter-greylist with postfix

2006-11-29 by manu@netbsd.org

Nerijus Baliunas <nerijus@...> wrote:

> BTW, I don't see X-Greylist header in received mails with 3.0, should I?

That suggests milter-greylist does not handle your mail.
 
> What about smfi_getsymval failed for {i}? Is it because Postfix does not
> know the queue ID before it accepts the MAIL FROM command?

Well, we have to not display the queue ID, since it does not exists.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] milter-greylist with postfix

2006-11-29 by Nerijus Baliunas

On Wed, 29 Nov 2006 07:51:54 +0100 manu@... wrote:

> > BTW, I don't see X-Greylist header in received mails with 3.0, should I?
> 
> That suggests milter-greylist does not handle your mail.

It does :) I tested by telnetting to port 25, it does not accept message
the first time. Probably smth with Postfix?

Regards,
Nerijus

Re: [milter-greylist] milter-greylist with postfix

2006-11-29 by manu@netbsd.org

Nerijus Baliunas <nerijus@...> wrote:

> It does :) I tested by telnetting to port 25, it does not accept message
> the first time. Probably smth with Postfix?

Oh it was with postfix. That probably explains.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] milter-greylist with postfix

2006-11-30 by Nerijus Baliunas

On Wed, 29 Nov 2006 18:59:41 +0100 manu@... wrote:

> > It does :) I tested by telnetting to port 25, it does not accept message
> > the first time. Probably smth with Postfix?
> 
> Oh it was with postfix. That probably explains.

I asked in postfix list, Wietse said:
Are you by any chance using a content filter? Mailscanner will
surely screw up the queue file if Miltering is enabled.

And right, if I disable MailScanner, messages are OK. And X-Greylist
header is here, but showing my IP address:
X-Greylist: Delayed for 00:02:18 by milter-greylist-3.0 (mail.xxx.lt [84.32.63.24]); Thu, 30 Nov 2006 03:25:32 +0200 (EET)

So basically milter-greylist works great with postfix, the only 2 minor
things are client IP address in X-Greylist and "Well, we have to not
display the queue ID, since it does not exists" (quoting your yesterday's
message).

Regards,
Nerijus

Re: [milter-greylist] milter-greylist with postfix

2006-11-30 by Nerijus Baliunas

On Wed, 29 Nov 2006 07:51:54 +0100 manu@... wrote:

> > What about smfi_getsymval failed for {i}? Is it because Postfix does not
> > know the queue ID before it accepts the MAIL FROM command?
> 
> Well, we have to not display the queue ID, since it does not exists.

It exists, but later:
  This happens because some Milter applications expect that the queue ID
  is known before the MTA accepts the MAIL FROM (sender) command.
  Postfix, on the other hand, does not choose a queue file name until after
  it accepts the first valid RCPT TO (recipient) command.

Can the code be modified to display the queue ID after the first valid
RCPT TO command?

Regards,
Nerijus

Re: [milter-greylist] milter-greylist with postfix

2006-11-30 by manu@netbsd.org

Nerijus Baliunas <nerijus@...> wrote:

> Can the code be modified to display the queue ID after the first valid
> RCPT TO command?

No, because on a single-recipient message, if you greylist the message,
there is no valid RCPT command at all.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] milter-greylist with postfix

2007-01-03 by Mart Pirita

Tere.
>
>> So basically milter-greylist works great with postfix, the only 2 minor
>> things are client IP address in X-Greylist and "Well, we have to not
>> display the queue ID, since it does not exists" (quoting your yesterday's
>> message).
>>     
>
>   
So You are happy with it? If it works great I'd like to use
millter-greylist instead of postgrey in Debian.

> I sent a patch about a month ago, but it probably went unnoticed as I posted
> in another thread (about CVS). Now I am attaching a new patch against current
> cvs. I tested it, and it seems to work both with and without --enable-postfix.
>
>   
Is there any howto about  postfix & milter-greylist?


-- 
Mart

Re: [milter-greylist] milter-greylist with postfix

2007-01-03 by manu@netbsd.org

Mart Pirita <sysadmin@...> wrote:

> Is there any howto about  postfix & milter-greylist?

I asked Nerijus Baliunas if he would like to add a README section on the
topic. If someone else knowledgable in that area want to help, I assume
it would not hurt.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] milter-greylist with postfix

2007-01-03 by Nerijus Baliunas

On Wed, 03 Jan 2007 10:14:32 +0200 Mart Pirita <sysadmin@...> wrote:

> So You are happy with it? If it works great I'd like to use
> millter-greylist instead of postgrey in Debian.

Yes, it works great (except there are minor problems if you use MailScanner).

> > I sent a patch about a month ago, but it probably went unnoticed as I posted
> > in another thread (about CVS). Now I am attaching a new patch against current
> > cvs. I tested it, and it seems to work both with and without --enable-postfix.
>
> Is there any howto about  postfix & milter-greylist?

Yes, there is README update in the patch (which was somehow missed when manu
committed it to cvs today, I hope he'll commit it too soon).

Regards,
Nerijus

Re: [milter-greylist] milter-greylist with postfix

2007-01-03 by Mart Pirita

Tere.
> Yes, it works great (except there are minor problems if you use
> MailScanner).
No I don't. But what I should use?
>
> Yes, there is README update in the patch (which was somehow missed when manu
> committed it to cvs today, I hope he'll commit it too soon).
>
>   
Ok, hopefully next release will include everything.


-- 
Mart

Re: [milter-greylist] milter-greylist with postfix

2007-01-03 by manu@netbsd.org

Mart Pirita <sysadmin@...> wrote:

> Ok, hopefully next release will include everything.

The updated README is in CVS, you can check it out.

I have a feature to complete before rolling out 3.1.4: posting message
headers and body to an external URL for data stage ACL using URL checks.
That does not seems straightforward, so I can't tell how long it will
take before you hve 3.1.4. 

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

milter-greylist with postfix in macosx 10.4?

2007-02-28 by Mart Pirita

Tere.

Well, I'm trying to get latest milter-greylist working with postfix in 
macosx 10.4 with options:

./configure --with-user=postfix --without-db --without-drac-db 
--enable-postfix \                                 
--with-conffile=/opt/etc/greylist.conf 
--with-dumpfile=/opt/local/etc/greylist.db \                               
--with-libmilter=/Users/admin/sendmail-8.14.0/libmilter

and getting hundreds lines errors, starting with:

milter-greylist.c:80:29: error: libmilter/mfapi.h: No such file or directory
In file included from dump.h:67,
                 from milter-greylist.c:82:
milter-greylist.h:150: error: parse error before 'sfsistat'
milter-greylist.h:150: warning: no semicolon at end of struct or union
milter-greylist.h:153: error: parse error before '}' token


and ending with:

milter-greylist.c:2867: warning: return type defaults to 'int'
milter-greylist.c: In function 'stat_from_code':
milter-greylist.c:2871: error: 'SMFIS_REJECT' undeclared (first use in 
this function)
milter-greylist.c:2875: error: 'SMFIS_TEMPFAIL' undeclared (first use in 
this function)
make: *** [milter-greylist.o] Error 1


So question is, should it compile in osx at all?  And seems libmilter 
stuff is missing, however the sendmail source is pointed?



-- 
Mart

Re: [milter-greylist] milter-greylist with postfix in macosx 10.4?

2007-02-28 by Nerijus Baliunas

On Thu, 01 Mar 2007 00:49:29 +0200 Mart Pirita <sysadmin@...> wrote:

> Well, I'm trying to get latest milter-greylist working with postfix in 
> macosx 10.4 with options:
> 
> ./configure --with-user=postfix --without-db --without-drac-db 
> --enable-postfix \                                 
> --with-conffile=/opt/etc/greylist.conf 
> --with-dumpfile=/opt/local/etc/greylist.db \                               
> --with-libmilter=/Users/admin/sendmail-8.14.0/libmilter
> 
> and getting hundreds lines errors, starting with:
> 
> milter-greylist.c:80:29: error: libmilter/mfapi.h: No such file or directory

All the other errors are because of this. If you have /Users/admin/sendmail-8.14.0/libmilter/mfapi.h,
you should probably try --with-libmilter=/Users/admin/sendmail-8.14.0.
Or you can try CFLAGS=/path/to/directory/which/has libmilter/mfapi.h ./configure...

Regards,
Nerijus

Re: [milter-greylist] milter-greylist with postfix in macosx 10.4?

2007-03-01 by Mart Pirita

Tere.
> All the other errors are because of this. If you have /Users/admin/sendmail-8.14.0/libmilter/mfapi.h,
> you should probably try --with-libmilter=/Users/admin/sendmail-8.14.0.
>   
Same problem, tried 
--with-libmilter=/Users/admin/sendmail-8.14.0/include/libmilter and 
--with-libmilter=/Users/admin/sendmail-8.14.0

However the file in /Users/admin/sendmail-8.14.0/include/libmilter/mfapi.h
> Or you can try CFLAGS=/path/to/directory/which/has libmilter/mfapi.h ./configure...
>
>   
Tried  even with both settings:
                                                          
                                                                                                                  

CFLAGS=/Users/admin/sendmail-8.14.0/include/libmilter
                                                                                                    

./configure --with-user=postfix --without-db --without-drac-db 
--enable-postfix \                                 
--with-conffile=/opt/etc/greylist.conf 
--with-dumpfile=/opt/local/etc/greylist.db \                               
--with-libmilter=/Users/admin/sendmail-8.14.0/include/libmilter

Still same error:

Required libmilter not found. Use --with-libmilter
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o milter-greylist.o milter-greylist.c
milter-greylist.c:80:29: error: libmilter/mfapi.h: No such file or directory

How to make greylist find this missing mfapi.h? What is the default path for if? In RH this file is located in /usr/include/libmilter/mfapi.h Should I make some symbolic link there?


-- 
Mart

Re: [milter-greylist] milter-greylist with postfix in macosx 10.4?

2007-03-01 by Mart Pirita

Tere.

Well, copied directory from 
/Users/admin/sendmail-8.14.0/include/libmilter to /usr/include/libmilter 
and tried again with same settings:

CFLAGS=/Users/admin/sendmail-8.14.0/include/libmilter
 

./configure --with-user=postfix --without-db --without-drac-db 
--enable-postfix \ 
--with-conffile=/opt/etc/greylist.conf 
--with-dumpfile=/opt/local/etc/greylist.db \ 
    --with-libmilter=/Users/admin/sendmail-8.14.0/include/libmilter

New error occurred:

Required libmilter not found. Use --with-libmilter
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o milter-greylist.o milter-greylist.c
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o pending.o pending.c
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o sync.o sync.c
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o dnsrbl.o dnsrbl.c
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o list.o list.c
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o macro.o macro.c
bison -y -p`echo conf_yacc.c|sed 's/^\([^_]\{1,\}_\).*$/\1/'` conf_yacc.y
mv y.tab.c conf_yacc.c
flex -oconf_lex.c conf_lex.l
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o conf_yacc.o conf_yacc.c
In file included from conf_yacc.y:1085:
conf_lex.l:115: error: redefinition of 'rcsid'
conf_yacc.y:9: error: previous definition of 'rcsid' was here
make: *** [conf_yacc.o] Error 1

Tried with less settings:

./configure --with-user=postfix --without-db --without-drac-db 
--enable-postfix \
--with-conffile=/opt/etc/greylist.conf 
--with-dumpfile=/opt/local/etc/greylist.db


Required libmilter not found. Use --with-libmilter
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o milter-greylist.o milter-greylist.c
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o pending.o pending.c
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o sync.o sync.c
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o dnsrbl.o dnsrbl.c
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o list.o list.c
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o macro.o macro.c
bison -y -p`echo conf_yacc.c|sed 's/^\([^_]\{1,\}_\).*$/\1/'` conf_yacc.y
mv y.tab.c conf_yacc.c
flex -oconf_lex.c conf_lex.l
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o conf_yacc.o conf_yacc.c
In file included from conf_yacc.y:1085:
conf_lex.l:115: error: redefinition of 'rcsid'
conf_yacc.y:9: error: previous definition of 'rcsid' was here
make: *** [conf_yacc.o] Error 1
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o conf_yacc.o conf_yacc.c
In file included from conf_yacc.y:1085:
conf_lex.l:115: error: redefinition of 'rcsid'
conf_yacc.y:9: error: previous definition of 'rcsid' was here
make: *** [conf_yacc.o] Error 1


Now what?


-- 
Mart

Can't compile milter-greylist with postfix in Debian?

2007-05-04 by Mart Pirita

Tere.

Well, first I trid in OSX, no luck, now with debian, same problems, can't get it right:


./configure --enable-postfix --with-user=postfix --without-db --without-drac-db \
--with-conffile=/etc/greylist/greylist.conf --with-dumpfile=/etc/greylist/greylist.db \
--with-libmilter=/home/mart/sendmail-8.14.1/include/libmilter

Required libmilter not found. Use --with-libmilter
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o milter-greylist.o milter-greylist.c
milter-greylist.c:80:29: libmilter/mfapi.h: No such file or directory
In file included from dump.h:67,
                 from milter-greylist.c:82:
milter-greylist.h:40:29: libmilter/mfapi.h: No such file or directory


Tried:


CFLAGS=/home/mart/sendmail-8.14.1/include/libmilter

./configure --enable-postfix --with-user=postfix --without-db --without-drac-db \
--with-conffile=/etc/greylist/greylist.conf --with-dumpfile=/etc/greylist/greylist.db \
--with-libmilter=/home/mart/sendmail-8.14.1



Required libmilter not found. Use --with-libmilter
gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o milter-greylist.o milter-greylist.c
milter-greylist.c:80:29: libmilter/mfapi.h: No such file or directory
In file included from dump.h:67,
                 from milter-greylist.c:82:
milter-greylist.h:40:29: libmilter/mfapi.h: No such file or directory


/home/mart/sendmail-8.14.1/include/libmilter# ls -al
total 40
drwxr-xr-x  2 1037 root  4096 Apr  4 02:32 .
drwxr-xr-x  6 1037 root  4096 Apr  4 02:32 ..
-rw-r--r--  1 1037 root 16588 Nov  2  2006 mfapi.h
-rw-r--r--  1 1037 root  4727 Mar 27 21:53 mfdef.h
-rw-r--r--  1 1037 root   641 May 23  2006 milter.h


Any hint?


-- 
Mart

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-04 by Nerijus Baliunas

On Fri, 04 May 2007 16:49:28 +0300 Mart Pirita <sysadmin@...> wrote:

> ./configure --enable-postfix --with-user=postfix --without-db --without-drac-db \
> --with-conffile=/etc/greylist/greylist.conf --with-dumpfile=/etc/greylist/greylist.db \
> --with-libmilter=/home/mart/sendmail-8.14.1/include/libmilter
> 
> Required libmilter not found. Use --with-libmilter
> gcc -g -O2 -Wall -D_BSD_SOURCE   -c -o milter-greylist.o milter-greylist.c
> milter-greylist.c:80:29: libmilter/mfapi.h: No such file or directory

Is libmilter/mfapi.h in /home/mart/sendmail-8.14.1/include/libmilter?
I don't think so. You should probably use --with-libmilter=/home/mart/sendmail-8.14.1/include.

Regards,
Nerijus

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-04 by Mart Pirita

Tere.
>
> Is libmilter/mfapi.h in /home/mart/sendmail-8.14.1/include/libmilter?
>   
Yes it is - /home/mart/sendmail-8.14.1/include/libmilter/mfapi.h Didn't 
You notice in the previous post:

/home/mart/sendmail-8.14.1/include/libmilter# ls -al
total 40
drwxr-xr-x  2 1037 root  4096 Apr  4 02:32 .
drwxr-xr-x  6 1037 root  4096 Apr  4 02:32 ..
-rw-r--r--  1 1037 root 16588 Nov  2  2006 mfapi.h
-rw-r--r--  1 1037 root  4727 Mar 27 21:53 mfdef.h
-rw-r--r--  1 1037 root   641 May 23  2006 milter.h



> I don't think so. You should probably use --with-libmilter=/home/mart/sendmail-8.14.1/include.
>
>   
I tried everything,  the milter-greylist.c line 80 is - #include 
<libmilter/mfapi.h>, I even modified it to #include "mfapi.h" and copied 
/home/mart/sendmail-8.14.1/include/libmilter/mfapi.h into 
/home/mart/milter-greylist-3.1.8 with no luck.


In redhat I have:

/usr/include/libmilter
/usr/include/libmilter/mfapi.h
/usr/include/libmilter/mfdef.h

And milter-greylist-3.1.8 compiles fine without the --with-libmilter option.

Copied also stuff in debian into /usr/include/libmilter didn't help.

Can't figure out what is wrong?

-- 
Mart

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-05 by Nerijus Baliunas

On Sat, 05 May 2007 01:04:58 +0300 Mart Pirita <sysadmin@...> wrote:

> > Is libmilter/mfapi.h in /home/mart/sendmail-8.14.1/include/libmilter?
> 
> Yes it is - /home/mart/sendmail-8.14.1/include/libmilter/mfapi.h Didn't 
> You notice in the previous post:
> 
> /home/mart/sendmail-8.14.1/include/libmilter# ls -al
> -rw-r--r--  1 1037 root 16588 Nov  2  2006 mfapi.h

I did notice. But didn't you notice that I deliberately asked about "libmilter/mfapi.h",
not mfapi.h. If you do ls -l libmilter/mfapi.h in this directory, you'll get
ls: libmilter/mfapi.h: No such file or directory.
But if you do it in /home/mart/sendmail-8.14.1/include, you will get correct result.
Now do you see the difference?

But I don't think it's worth doing what you are trying to do now - much easier
would be to install sendmail-devel (sendmail-dev?) package in Debian.

Regards,
Nerijus

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-08 by Mart Pirita

Tere.
>
> I did notice. But didn't you notice that I deliberately asked about "libmilter/mfapi.h",
> not mfapi.h. If you do ls -l libmilter/mfapi.h in this directory, you'll get
> ls: libmilter/mfapi.h: No such file or directory.
> But if you do it in /home/mart/sendmail-8.14.1/include, you will get correct result.
> Now do you see the difference?
>   
Yes I see.
> But I don't think it's worth doing what you are trying to do now - much easier
> would be to install sendmail-devel (sendmail-dev?) package in Debian.
>
>   
Ok, good idea, tried, no such package, installed libmilter-dev instead,
but now new error occured:

In file included from conf_yacc.y:1173:
conf_lex.l: In function `conf_dispose_input_file':
conf_lex.l:311: error: `YY_FLUSH_BUFFER' undeclared (first use in this
function)
conf_lex.l:311: error: (Each undeclared identifier is reported only once
conf_lex.l:311: error: for each function it appears in.)
conf_yacc.y: At top level:
conf_lex.c:2130: warning: `yyunput' defined but not used
make: *** [conf_yacc.o] Error 1

Now what?




-- 
Mart

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-08 by manu@netbsd.org

Mart Pirita <sysadmin@...> wrote:

> In file included from conf_yacc.y:1173:
> conf_lex.l: In function `conf_dispose_input_file':
> conf_lex.l:311: error: `YY_FLUSH_BUFFER' undeclared (first use in this
> function)
> conf_lex.l:311: error: (Each undeclared identifier is reported only once
> conf_lex.l:311: error: for each function it appears in.)
> conf_yacc.y: At top level:
> conf_lex.c:2130: warning: `yyunput' defined but not used
> make: *** [conf_yacc.o] Error 1
> 
> Now what?

It seems there are broken versions of flex that do not define
YY_FLUSH_BUFFER. flex-2.5.4 works. Newer flex also works, there is a gap
of flex version(s) that do(es) not.

I wonder if we really need that YY_FLUSH_BUFFER. AIDA Shinra added it,
but I don't really know why...

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-08 by Mart Pirita

Tere.
>
> It seems there are broken versions of flex that do not define
> YY_FLUSH_BUFFER. flex-2.5.4 works. Newer flex also works, there is a gap
> of flex version(s) that do(es) not.
>   
Debian Sarge uses 2.5.31-31sarge.
> I wonder if we really need that YY_FLUSH_BUFFER. AIDA Shinra added it,
> but I don't really know why...
>
>   
As I can't upgrade the flex, can You please give hint how to bypass this 
error?

-- 
Mart

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-08 by Emmanuel Dreyfus

On Wed, May 09, 2007 at 12:19:03AM +0300, Mart Pirita wrote:
> As I can't upgrade the flex, can You please give hint how to bypass this 
> error?

You can comment the offending line (I don't know why it's there), but I
cannot swear it is not harmful.

-- 
Emmanuel Dreyfus
manu@...

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-09 by Mart Pirita

Tere.
>
>
> This one:
>
>   
>> YY_FLUSH_BUFFER;                                                                                           
>>     
>
>
>   
Ok, did that:

void
conf_dispose_input_file(void) {
/*
        YY_FLUSH_BUFFER;
*/
}


But new error occur:

In file included from dump_yacc.y:75:
dump_lex.l: In function `dump_dispose_input_file':
dump_lex.l:96: error: `YY_FLUSH_BUFFER' undeclared (first use in this
function)
dump_lex.l:96: error: (Each undeclared identifier is reported only once
dump_lex.l:96: error: for each function it appears in.)
dump_yacc.y: At top level:
dump_lex.c:1185: warning: `yyunput' defined but not used
make: *** [dump_yacc.o] Error 1


-- 
Mart

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-09 by AIDA Shinra

At Tue, 8 May 2007 18:40:25 +0200,
Emmanuel Dreyfus wrote:
> 
> Mart Pirita <sysadmin@...> wrote:
> 
> > In file included from conf_yacc.y:1173:
> > conf_lex.l: In function `conf_dispose_input_file':
> > conf_lex.l:311: error: `YY_FLUSH_BUFFER' undeclared (first use in this
> > function)
> > conf_lex.l:311: error: (Each undeclared identifier is reported only once
> > conf_lex.l:311: error: for each function it appears in.)
> > conf_yacc.y: At top level:
> > conf_lex.c:2130: warning: `yyunput' defined but not used
> > make: *** [conf_yacc.o] Error 1
> > 
> > Now what?
> 
> It seems there are broken versions of flex that do not define
> YY_FLUSH_BUFFER. flex-2.5.4 works. Newer flex also works, there is a gap
> of flex version(s) that do(es) not.
> 
> I wonder if we really need that YY_FLUSH_BUFFER. AIDA Shinra added it,
> but I don't really know why...

Replace YY_FLUSH_BUFFER in conf.c to conf__flush_buffer(YY_CURRENT_BUFFER).
Similarly, replace one in dump.c to dump__flush_buffer(YY_CURRENT_BUFFER).

We need it in case there is an error in conf file. Without it, we will
see the rest of the erroneous conf file prepended in reading updated
conf file.

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-09 by manu@netbsd.org

AIDA Shinra <shinra@...> wrote:

> Replace YY_FLUSH_BUFFER in conf.c to conf__flush_buffer(YY_CURRENT_BUFFER).
> Similarly, replace one in dump.c to dump__flush_buffer(YY_CURRENT_BUFFER).

Change committed in CVS...

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-09 by manu@netbsd.org

Mart Pirita <sysadmin@...> wrote:

> In file included from dump_yacc.y:75:
> dump_lex.l: In function `dump_dispose_input_file':
> dump_lex.l:96: error: `YY_FLUSH_BUFFER' undeclared (first use in this
> function)
> dump_lex.l:96: error: (Each undeclared identifier is reported only once
> dump_lex.l:96: error: for each function it appears in.)
> dump_yacc.y: At top level:
> dump_lex.c:1185: warning: `yyunput' defined but not used
> make: *** [dump_yacc.o] Error 1

Same problem, same fix.

However, I applied a fix that seems better in the CVS version. Try
checking it out, it's just 4.0 alpha4 with various build fixes.
-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-10 by Mart Pirita

Tere.
>
> Same problem, same fix.
>   
Ok, did that, compiled, milter-greylist is running, also inserted into
bottom main.cf:

milter_default_action = accept
milter_connect_macros = j
milter_protocol = 3
smtpd_milters = unix:/var/run/greylist/greylist.sock

But milter-greylist won't catch any message, verbose mode shows
everything ok, I can see in logs only that prog started.

-- 
Mart

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-10 by manu@netbsd.org

Mart Pirita <sysadmin@...> wrote:

> But milter-greylist won't catch any message, verbose mode shows
> everything ok, I can see in logs only that prog started.

Check that milter-greylist and postfix agree on the socket location.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-10 by Nerijus Baliunas

On Thu, 10 May 2007 14:54:20 +0300 Mart Pirita <sysadmin@...> wrote:

> Ok, did that, compiled, milter-greylist is running, also inserted into
> bottom main.cf:
> 
> milter_default_action = accept
> milter_connect_macros = j
> milter_protocol = 3
> smtpd_milters = unix:/var/run/greylist/greylist.sock
> 
> But milter-greylist won't catch any message, verbose mode shows
> everything ok, I can see in logs only that prog started.

What are /var/run/greylist/greylist.sock permissions? What are
/var/run/greylist permissions? What groups user postfix belongs
to? 

Regards,
Nerijus

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-10 by Mart Pirita

Tere.
>
> What are /var/run/greylist/greylist.sock permissions? What are
> /var/run/greylist permissions? 
/var/run/greylist# ls -al
total 12
drwxr-xr-x   2 postfix postfix 4096 May 10 14:51 .
drwxr-xr-x  14 root    root    4096 May 10 14:54 ..
-rw-r--r--   1 root    root       6 May 10 14:51 greylist.pid
srwxr-xr-x   1 postfix postfix    0 May 10 14:51 greylist.sock



> What groups user postfix belongs
> to? 
>
>
>   
user postfix doesnt belong into any groups accordig to the /etc/groups:

postfix:x:1001:


But from /etc/postfix/master.cf I see, that smtp is running in chroot
mode, maybe disable it?:

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (50)
# ==========================================================================
smtp      inet  n       -       -       -       35      smtpd


-- 
Mart

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-10 by Mart Pirita

Tere.
>
> Check that milter-greylist and postfix agree on the socket location.
>
>   
Hmm, but socket exists:

/var/run/greylist# ls -al
total 12
drwxr-xr-x   2 postfix postfix 4096 May 10 14:51 .
drwxr-xr-x  14 root    root    4096 May 10 14:54 ..
-rw-r--r--   1 root    root       6 May 10 14:51 greylist.pid
srwxr-xr-x   1 postfix postfix    0 May 10 14:51 greylist.sock



-- 
Mart

Re: [milter-greylist] Can't compile milter-greylist with postfix in Debian?

2007-05-10 by Nerijus Baliunas

On Thu, 10 May 2007 17:26:32 +0300 Mart Pirita <sysadmin@...> wrote:

> > What are /var/run/greylist/greylist.sock permissions? What are
> > /var/run/greylist permissions? 
> /var/run/greylist# ls -al
> total 12
> drwxr-xr-x   2 postfix postfix 4096 May 10 14:51 .
> drwxr-xr-x  14 root    root    4096 May 10 14:54 ..
> -rw-r--r--   1 root    root       6 May 10 14:51 greylist.pid
> srwxr-xr-x   1 postfix postfix    0 May 10 14:51 greylist.sock

ls -ld /var/run/greylist output?
I assume you run milter-greylist as postfix user?

> user postfix doesnt belong into any groups accordig to the /etc/groups:
> 
> postfix:x:1001:

What is "groups postfix" command output?

> But from /etc/postfix/master.cf I see, that smtp is running in chroot
> mode, maybe disable it?:

You can try, but if milter-greylist and postfix use the same socket file there
should be no problems.
If you still have problems please post your milter-greylist configuration
(i.e. how do you launch it? what is /etc/mail/greylist.conf?).

Regards,
Nerijus

List down?

2007-05-12 by Mart Pirita

Tere.


Two days trying to sent message, mail server shows:

May 11 00:02:32 tibu sendmail[12327]: l4AL2QFO012323: to=<milter-greylist@yahoogroups.com>, 
ctladdr=<sysadmin@...> (516/500), delay=00:00:06, xdelay=00:00:05, mailer=esmtp, 
pri=122394, relay=mta13.grp.scd.yahoo.com. [66.218.66.71], dsn=2.0.0, stat=Sent (ok 
1178830952 qp 55076)
May 12 00:25:25 tibu sendmail[1764]: l4BLF4oK001760: to=<milter-greylist@yahoogroups.com>, 
ctladdr=<sysadmin@...> (516/500), delay=00:10:20, xdelay=00:10:20, mailer=esmtp, 
pri=122681, relay=mta5.grp.scd.yahoo.com. [66.218.66.166], dsn=2.0.0, stat=Sent (ok 
1178918725 qp 19168)
11111

But no message arrives here or http://tech.groups.yahoo.com/group/milter-greylist/

Any hint?


-- 
Mart

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.