OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   30-Dec-2006 13:07:44
  Branch: HEAD                             Handle: 2006123012074400

  Added files:
    openpkg-src/milter-greylist
                            fsl.milter-greylist greylist.conf
                            milter-greylist.patch milter-greylist.spec
                            rc.milter-greylist

  Log:
    new package: milter-greylist 3.1.2 (Mail Filter for Greylisting)

  Summary:
    Revision    Changes     Path
    1.1         +16 -0      openpkg-src/milter-greylist/fsl.milter-greylist
    1.1         +104 -0     openpkg-src/milter-greylist/greylist.conf
    1.1         +53 -0      openpkg-src/milter-greylist/milter-greylist.patch
    1.1         +158 -0     openpkg-src/milter-greylist/milter-greylist.spec
    1.1         +60 -0      openpkg-src/milter-greylist/rc.milter-greylist
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/milter-greylist/fsl.milter-greylist
  ============================================================================
  $ cvs diff -u -r0 -r1.1 fsl.milter-greylist
  --- /dev/null 2006-12-30 13:07:18 +0100
  +++ fsl.milter-greylist       2006-12-30 13:07:44 +0100
  @@ -0,0 +1,16 @@
  +##
  +##  fsl.milter-greylist -- OSSP fsl configuration
  +##
  +
  +ident (milter-greylist)/.+ q{
  +    prefix(
  +        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
  +    )
  +    -> {
  +        debug: file(
  +            path="@l_prefix@/var/milter-greylist/milter-greylist.log",
  +            perm=0644
  +        )
  +    }
  +};
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/milter-greylist/greylist.conf
  ============================================================================
  $ cvs diff -u -r0 -r1.1 greylist.conf
  --- /dev/null 2006-12-30 13:07:18 +0100
  +++ greylist.conf     2006-12-30 13:07:44 +0100
  @@ -0,0 +1,104 @@
  +##
  +##  greylist.conf -- milter-greylist(8) configuration
  +##
  +
  +#   daemon parameters
  +user      "@l_rusr@:@l_mgrp@"
  +pidfile   "@l_prefix@/var/milter-greylist/milter-greylist.pid"
  +socket    "@l_prefix@/var/milter-greylist/milter-greylist.socket"
  +dumpfile  "@l_prefix@/var/milter-greylist/milter-greylist.db"
  +
  +#   database synchronization
  +#syncaddr    192.168.0.1 port 5252
  +#syncsrcaddr 192.168.0.1
  +#peer        192.168.0.2
  +
  +#   run-time behaviour
  +#verbose
  +#quiet
  +nospf
  +nodrac
  +
  +#   access control list definition: my own networks
  +list "my networks" addr { \
  +    127.0.0.1/8 \
  +    10.0.0.0/8 \
  +    172.16.0.0/12 \
  +    192.168.0.0/16 \
  +}
  +
  +#   access control list definition: broken MTAs that break with Greylisting
  +#   
(http://cvs.puremagic.com/viewcvs/greylisting/schema/whitelist_ip.txt?rev=1.16)
  +list "broken peers" addr { \
  +    12.5.136.141/32    \ # Southwest Airlines (unique sender)
  +    12.5.136.142/32    \ # Southwest Airlines
  +    12.5.136.143/32    \ # Southwest Airlines
  +    12.5.136.144/32    \ # Southwest Airlines
  +    12.107.209.244/32  \ # kernel.org (unique sender)
  +    12.107.209.250/32  \ # sourceware.org (unique sender)
  +    63.82.37.110/32    \ # SLmail
  +    63.169.44.143/32   \ # Southwest Airlines
  +    63.169.44.144/32   \ # Southwest Airlines
  +    64.7.153.18/32     \ # sentex.ca (common pool)
  +    64.12.136.0/24     \ # AOL (common pool)
  +    64.12.137.0/24     \ # AOL
  +    64.12.138.0/24     \ # AOL
  +    64.124.204.39      \ # moveon.org (unique sender)
  +    64.125.132.254/32  \ # collab.net (unique sender)
  +    66.94.237.16/28    \ # Yahoo Groups servers (common pool)
  +    66.94.237.32/28    \ # Yahoo Groups servers (common pool)
  +    66.94.237.48/30    \ # Yahoo Groups servers (common pool)
  +    66.100.210.82/32   \ # Groupwise?
  +    66.135.192.0/19    \ # Ebay
  +    66.162.216.166/32  \ # Groupwise?
  +    66.206.22.82/32    \ # Plexor
  +    66.206.22.83/32    \ # Plexor
  +    66.206.22.84/32    \ # Plexor
  +    66.206.22.85/32    \ # Plexor
  +    66.218.66.0/23     \ # Yahoo Groups servers (common pool)
  +    66.218.67.0/23     \ # Yahoo Groups servers (common pool)
  +    66.218.68.0/23     \ # Yahoo Groups servers (common pool)
  +    66.218.69.0/23     \ # Yahoo Groups servers (common pool)
  +    66.27.51.218/32    \ # ljbtc.com (Groupwise)
  +    152.163.225.0/24   \ # AOL
  +    194.245.101.88/32  \ # Joker.com
  +    195.235.39.19/32   \ # Tid InfoMail Exchanger v2.20
  +    195.238.2.0/24     \ # skynet.be (wierd retry pattern, common pool)
  +    195.238.3.0/24     \ # skynet.be
  +    195.46.220.208/32  \ # mgn.net
  +    195.46.220.209/32  \ # mgn.net
  +    195.46.220.210/32  \ # mgn.net
  +    195.46.220.211/32  \ # mgn.net
  +    195.46.220.221/32  \ # mgn.net
  +    195.46.220.222/32  \ # mgn.net
  +    195.238.2.0/24     \ # skynet.be (wierd retry pattern)
  +    195.238.3.0/24     \ # skynet.be
  +    204.107.120.10/32  \ # Ameritrade (no retry)
  +    205.188.0.0/16     \ # AOL
  +    205.206.231.0/24   \ # SecurityFocus.com (unique sender)
  +    207.115.63.0/24    \ # Prodigy - retries continually
  +    207.171.168.0/24   \ # Amazon.com
  +    207.171.180.0/24   \ # Amazon.com
  +    207.171.187.0/24   \ # Amazon.com
  +    207.171.188.0/24   \ # Amazon.com
  +    207.171.190.0/24   \ # Amazon.com
  +    209.132.176.174/32 \ # sourceware.org mailing lists (unique sender)
  +    211.29.132.0/24    \ # optusnet.com.au (wierd retry pattern)
  +    213.136.52.31/32   \ # Mysql.com (unique sender)
  +    216.33.244.0/24    \ # Ebay
  +    217.158.50.178/32  \ # AXKit mailing list (unique sender)
  +}
  +
  +#   access control list definition: of users that want Greylisting
  +list "greylisted recipients" rcpt {  \
  +    [EMAIL PROTECTED] \
  +    [EMAIL PROTECTED] \
  +    [EMAIL PROTECTED] \
  +}
  +
  +#   access control list
  +racl whitelist list "my networks"
  +racl whitelist list "broken peers"
  +racl greylist  list "greylisted recipients" delay 10m autowhite 3d
  +racl whitelist default
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/milter-greylist/milter-greylist.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1 milter-greylist.patch
  --- /dev/null 2006-12-30 13:07:18 +0100
  +++ milter-greylist.patch     2006-12-30 13:07:44 +0100
  @@ -0,0 +1,53 @@
  +Index: acl.c
  +--- acl.c.orig       2006-12-29 21:38:17 +0100
  ++++ acl.c    2006-12-30 12:52:01 +0100
  +@@ -627,7 +627,7 @@
  +             exit(EX_OSERR);
  +     }
  + 
  +-    memset(acl, 0, sizeof (acl));
  ++    memset(acl, 0, sizeof(*acl));
  +     acl->a_delay = -1;
  +     acl->a_autowhite = -1;
  +     LIST_INIT(&acl->a_clause);
  +Index: milter-greylist.c
  +--- milter-greylist.c.orig   2006-12-29 19:32:44 +0100
  ++++ milter-greylist.c        2006-12-30 12:59:15 +0100
  +@@ -1313,6 +1313,11 @@
  +      */
  +     if (conf.c_user != NULL) {
  +             struct passwd *pw = NULL;
  ++            struct group *gr = NULL;
  ++            char *c_group = NULL;
  ++
  ++            if ((c_group = strchr(conf.c_user, ':')) != NULL)
  ++                    *c_group++ = '\0';
  + 
  +             if ((pw = getpwnam(conf.c_user)) == NULL) {
  +                     mg_log(LOG_ERR, "%s: cannot get user %s data: %s",
  +@@ -1320,6 +1325,15 @@
  +                     exit(EX_OSERR);
  +             }
  + 
  ++            if (c_group != NULL) {
  ++                    if ((gr = getgrnam(c_group)) == NULL) {
  ++                            mg_log(LOG_ERR, "%s: cannot get group %s data: 
%s",
  ++                            argv[0], c_group, strerror(errno));
  ++                            exit(EX_OSERR);
  ++                    }
  ++                    pw->pw_gid = gr->gr_gid;
  ++            }
  ++
  + #ifdef HAVE_INITGROUPS
  +             if (initgroups(conf.c_user, pw->pw_gid) != 0) {
  +                     mg_log(LOG_ERR, "%s: cannot change "
  +@@ -1370,6 +1384,9 @@
  +      * Here we go!
  +      */
  +     conf_release();
  ++    umask(S_IWOTH);
  ++    smfi_opensocket(1);
  ++    umask(S_IWGRP|S_IWOTH);
  +     exitval = smfi_main();
  +     mg_log(LOG_ERR, "smfi_main() returned %d", exitval);
  +     
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/milter-greylist/milter-greylist.spec
  ============================================================================
  $ cvs diff -u -r0 -r1.1 milter-greylist.spec
  --- /dev/null 2006-12-30 13:07:18 +0100
  +++ milter-greylist.spec      2006-12-30 13:07:44 +0100
  @@ -0,0 +1,158 @@
  +##
  +##  milter-greylist.spec -- OpenPKG RPM Package Specification
  +##  Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  +##  Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  +##
  +##  Permission to use, copy, modify, and distribute this software for
  +##  any purpose with or without fee is hereby granted, provided that
  +##  the above copyright notice and this permission notice appear in all
  +##  copies.
  +##
  +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  +##  SUCH DAMAGE.
  +##
  +
  +#   package information
  +Name:         milter-greylist
  +Summary:      Mail Filter for Greylisting
  +URL:          http://hcpnet.free.fr/milter-greylist/
  +Vendor:       Emmanuel Dreyfus
  +Packager:     OpenPKG Foundation e.V.
  +Distribution: OpenPKG Community
  +Class:        EVAL
  +Group:        Mail
  +License:      BSD
  +Version:      3.1.2
  +Release:      20061230
  +
  +#   package options
  +%option       with_fsl  yes
  +
  +#   list of sources
  +Source0:      
ftp://ftp.espci.fr/pub/milter-greylist/milter-greylist-%{version}.tgz
  +Source1:      rc.milter-greylist
  +Source2:      greylist.conf
  +Source3:      fsl.milter-greylist
  +Patch0:       milter-greylist.patch
  +
  +#   build information
  +Prefix:       %{l_prefix}
  +BuildRoot:    %{l_buildroot}
  +BuildPreReq:  OpenPKG, openpkg >= 20060823, bison, flex, pkgconfig
  +PreReq:       OpenPKG, openpkg >= 20060823
  +BuildPreReq:  milter, db, curl, libspf2
  +PreReq:       milter, db, curl, libspf2
  +%if "%{with_fsl}" == "yes"
  +BuildPreReq:  fsl >= 1.2.0
  +PreReq:       fsl >= 1.2.0
  +%endif
  +AutoReq:      no
  +AutoReqProv:  no
  +
  +%description
  +    milter-greylist is a Greylisting mail filter based on the MILTER API
  +    of MTAs.
  +
  +%track
  +    prog milter-greylist = {
  +        version   = %{version}
  +        url       = ftp://ftp.espci.fr/pub/milter-greylist/
  +        regex     = milter-greylist-(__VER__)\.tgz
  +    }
  +
  +%prep
  +    %setup -q
  +    %patch -p0
  +
  +%build
  +    #   configure program
  +    CC="%{l_cc}" \
  +    CFLAGS="%{l_cflags -O} `pkg-config libcurl db --cflags-only-other`" \
  +    CPPFLAGS="%{l_cppflags} `pkg-config libcurl db --cflags-only-I`" \
  +    LDFLAGS="%{l_ldflags} %{l_fsl_ldflags} `pkg-config libcurl db 
--libs-only-other`" \
  +    LIBS="%{l_fsl_libs} `pkg-config libcurl db --libs-only-l`" \
  +    sh ./configure \
  +        --prefix=%{l_prefix} \
  +        --with-conffile=%{l_prefix}/etc/milter-greylist/greylist.conf \
  +        --with-dumpfile=%{l_prefix}/var/milter-greylist/greylist.db \
  +        --with-libmilter=%{l_prefix} \
  +        --with-db=%{l_prefix} \
  +        --with-libcurl=%{l_prefix} \
  +        --with-libspf2=%{l_prefix} \
  +        --with-user=%{l_rusr} \
  +        --enable-dnsrbl
  +
  +    #   build program
  +    %{l_make} %{l_mflags}
  +
  +%install
  +    #   create installation hierarchy
  +    rm -rf $RPM_BUILD_ROOT
  +    %{l_shtool} mkdir -p -m 755 \
  +        $RPM_BUILD_ROOT%{l_prefix}/sbin \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/fsl \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/milter-greylist \
  +        $RPM_BUILD_ROOT%{l_prefix}/var/milter-greylist \
  +        $RPM_BUILD_ROOT%{l_prefix}/man/man5 \
  +        $RPM_BUILD_ROOT%{l_prefix}/man/man8
  +
  +    #   install program
  +    %{l_shtool} install -c -s -m 755 \
  +        milter-greylist $RPM_BUILD_ROOT%{l_prefix}/sbin/
  +
  +    #   install manual pages
  +    %{l_shtool} install -c -m 644 \
  +        milter-greylist.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  +    %{l_shtool} install -c -m 644 \
  +        greylist.conf.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
  +
  +    #   install default configuration
  +    %{l_shtool} install -c -m 644 %{l_value -s -a} \
  +        %{SOURCE greylist.conf} \
  +        $RPM_BUILD_ROOT%{l_prefix}/etc/milter-greylist/
  +
  +    #   install run-command script
  +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
  +        %{SOURCE rc.milter-greylist} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  +
  +    #   install OSSP fsl configuration
  +    %{l_shtool} install -c -m 644 %{l_value -s -a} \
  +        %{SOURCE fsl.milter-greylist} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  +
  +    #   determine installation files
  +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  +        %{l_files_std} \
  +        '%config %{l_prefix}/etc/fsl/*' \
  +        '%config %{l_prefix}/etc/milter-greylist/*' \
  +        '%attr(-,%{l_rusr},%{l_mgrp}) %{l_prefix}/var/milter-greylist'
  +
  +%files -f files
  +
  +%clean
  +    rm -rf $RPM_BUILD_ROOT
  +
  +%post
  +    #   after upgrade, restart service
  +    [ $1 -eq 2 ] || exit 0
  +    eval `%{l_rc} milter-greylist status 2>/dev/null`
  +    [ ".$milter_greylist_active" = .yes ] && %{l_rc} milter-greylist restart
  +    exit 0
  +
  +%preun
  +    #   before erase, stop service and remove log files
  +    [ $1 -eq 0 ] || exit 0
  +    %{l_rc} milter-greylist stop 2>/dev/null
  +    rm -f $RPM_INSTALL_PREFIX/var/milter-greylist/* >/dev/null 2>&1 || true
  +    exit 0
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/milter-greylist/rc.milter-greylist
  ============================================================================
  $ cvs diff -u -r0 -r1.1 rc.milter-greylist
  --- /dev/null 2006-12-30 13:07:18 +0100
  +++ rc.milter-greylist        2006-12-30 13:07:44 +0100
  @@ -0,0 +1,60 @@
  [EMAIL PROTECTED]@/bin/openpkg rc
  +##
  +##  rc.milter-greylist -- Run-Commands
  +##
  +
  +%config
  +    milter_greylist_enable="$openpkg_rc_def"
  +    milter_greylist_flags=""
  +    milter_greylist_user="@l_rusr@"
  +    milter_greylist_prolog="true"
  +    milter_greylist_epilog="true"
  +    milter_greylist_numfiles="10"
  +    milter_greylist_minsize="1M"
  +    milter_greylist_complevel="9"
  +
  +%common
  +    
milter_greylist_pidfile="@l_prefix@/var/milter-greylist/milter-greylist.pid"
  +    
milter_greylist_logfile="@l_prefix@/var/milter-greylist/milter-greylist.log"
  +    
milter_greylist_socket="@l_prefix@/var/milter-greylist/milter-greylist.socket"
  +    milter_greylist_signal () {
  +        [ -f $milter_greylist_pidfile ] && kill -$1 `cat 
$milter_greylist_pidfile`
  +    }
  +
  +%status -u @l_susr@ -o
  +    milter_greylist_usable="unknown"
  +    milter_greylist_active="no"
  +    rcService milter-greylist enable yes && \
  +        milter_greylist_signal 0 && milter_greylist_active="yes"
  +    echo "milter_greylist_enable=\"$milter_greylist_enable\""
  +    echo "milter_greylist_usable=\"$milter_greylist_usable\""
  +    echo "milter_greylist_active=\"$milter_greylist_active\""
  +
  +%start -u @l_susr@
  +    rcService milter-greylist enable yes || exit 0
  +    rcService milter-greylist active yes && exit 0
  +    rm -f $milter_greylist_socket >/dev/null 2>&2 || true
  +    @l_prefix@/sbin/milter-greylist $milter_greylist_flags
  +
  +%stop -u @l_susr@
  +    rcService milter-greylist enable yes || exit 0
  +    rcService milter-greylist active no  && exit 0
  +    milter_greylist_signal TERM
  +    sleep 2
  +    rm -f $milter_greylist_pidfile >/dev/null 2>&1 || true
  +    rm -f $milter_greylist_socket  >/dev/null 2>&1 || true
  +
  +%restart -u @l_susr@
  +    rcService milter-greylist enable yes || exit 0
  +    rcService milter-greylist active no  && exit 0
  +    rc milter-greylist stop start
  +
  +%daily -u @l_susr@
  +    rcService milter-greylist enable yes || exit 0
  +    shtool rotate -f \
  +        -n $milter_greylist_numfiles -s $milter_greylist_minsize -d \
  +        -z $milter_greylist_complevel -m 644 -o @l_rusr@ -g @l_rgrp@ \
  +        -P "$milter_greylist_prolog" \
  +        -E "$milter_greylist_epilog; rc milter-greylist restart" \
  +        $milter_greylist_logfile
  +
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to