Installing milter-greylist on Solaris

The following instructions were used to install milter-greylist 2.0.2 on a Solaris 8 system with sendmail 8.13.5.

1. Install the latest version of GNU m4 and GNU bison from Sunfreeware or from source. The versions of yacc and m4 in /usr/ccs/bin will lead to milter-greylist compilation errors, such as the following:

ld: warning: symbol `yy_yyv' has differing sizes:
        (file conf_yacc.o value=0x25a58; file dump_yacc.o value=0xc030);
        conf_yacc.o definition taken
ld: fatal: symbol `yys' is multiply-defined:
        (file conf_yacc.o type=OBJT; file dump_yacc.o type=OBJT);
ld: fatal: symbol `yyv' is multiply-defined:
        (file conf_yacc.o type=OBJT; file dump_yacc.o type=OBJT);
ld: fatal: File processing errors. No output written to milter-greylist
collect2: ld returned 1 exit status
make: *** [milter-greylist] Error 1

bison -y -p`echo conf_yacc.c|sed 's/^\([^_]\{1,\}_\).*$/\1/'` conf_yacc.y
Broken Pipe
make: *** [conf_yacc.c] Error 141

2. Extract the milter-greylist tarball.
$ gzip -cd milter-greylist-2.0.2.tgz | tar xf -

3. Build and install milter-greylist.
$ cd milter-greylist-2.0.2
$ ./configure
$ make
# /usr/ccs/bin/make install

4. Add the following to your sendmail macro configuration file.
INPUT_MAIL_FILTER(`greylist', `S=local:/var/milter-greylist/milter-greylist.sock')

5. Build and install the sendmail configuration file.

6. Configure /etc/mail/greylist.conf appropriately.

7. Create a milter-greylist startup and shutdown script.

# vi /etc/init.d/milter-greylist

#!/bin/sh

SOCKET=/var/milter-greylist/milter-greylist.sock

case "$1" in
'start')
   /usr/local/bin/milter-greylist -p $SOCKET
   ;;
'stop')
   /usr/bin/pkill -f /usr/local/bin/milter-greylist
   ;;
'reload')
   $0 stop; $0 start
   ;;
*)
   echo "Usage: $0 { start | stop | reload }"
   exit 1
   ;;
esac
exit 0

# chown root:root /etc/init.d/milter-greylist
# chmod 744 /etc/init.d/milter-greylist
# ln -s /etc/init.d/milter-greylist /etc/rc2.d/S87milter-greylist

8. Start milter-greylist.
# /etc/init.d/milter-greylist start

Back to brandonhutchinson.com.
Last modified: 2008/11/24