source: trunk/dports/mail/postgrey/Portfile @ 50984

Last change on this file since 50984 was 50984, checked in by and.damore@…, 10 years ago

Maintainer email change, second batch, mail without @macports.org domain are put in domain:user form.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $
2
3PortSystem       1.0
4
5name             postgrey
6version          1.31
7revision         2
8
9categories       mail
10maintainers      sky.fr:cbellot
11description      Postfix policy server implementing greylisting
12long_description When a request for delivery of a mail is received by \
13                 Postfix via SMTP, the triplet CLIENT_IP / SENDER / RECIPIENT \
14                 is built. If it is the first time that this triplet is seen, \
15                 or if the triplet was first seen, less than 5 minutes ago, \
16                 then the mail gets rejected with a temporary error. Hopefully\
17                 spammers or viruses will not try again later, as it is \
18                 however required per RFC.
19platforms        darwin
20homepage         http://postgrey.schweikert.ch/
21master_sites     ${homepage}pub \
22                 ${homepage}pub/old
23checksums        md5 b7a8a6fc9f1ad802c5a516a3be34bb29
24
25build.target
26depends_lib-append      port:p5-io-multiplex
27depends_lib-append      port:p5-net-server
28depends_lib-append      port:p5-berkeleydb
29
30startupitem.create      yes
31startupitem.start       "${prefix}/share/postgrey/postgrey.sh start"
32startupitem.stop        "${prefix}/share/postgrey/postgrey.sh stop"
33
34configure {
35  system "echo all: > ${worksrcpath}/Makefile"
36  reinplace "s|/usr/bin/perl|${prefix}/bin/perl|g" \
37        ${worksrcpath}/postgrey \
38        ${worksrcpath}/contrib/postgreyreport
39  reinplace "s|/etc/postfix|${prefix}/etc/postgrey|g" \
40        ${worksrcpath}/postgrey \
41        ${worksrcpath}/postgrey_whitelist_clients \
42        ${worksrcpath}/postgrey_whitelist_recipients \
43        ${worksrcpath}/contrib/postgreyreport
44  reinplace "s|/etc/main.cf|postfix's main.cf|g" \
45        ${worksrcpath}/postgrey
46  reinplace "s|/var/spool/postfix/postgrey|${prefix}/var/spool/postgrey|g" \
47        ${worksrcpath}/postgrey \
48        ${worksrcpath}/contrib/postgreyreport
49}
50destroot {
51  adduser postgrey realname=Postgrey\ Server
52  addgroup postgrey
53  file mkdir ${destroot}${prefix}/etc/postgrey
54  file mkdir ${destroot}${prefix}/share/postgrey
55  file mkdir ${destroot}${prefix}/share/doc/postgrey
56  file mkdir ${destroot}${prefix}/share/man/man1
57  file mkdir ${destroot}${prefix}/share/man/man8
58  xinstall -d -o postgrey -g postgrey -m 750 \
59        ${destroot}${prefix}/var/spool/postgrey
60  xinstall -d -o postgrey -g postgrey -m 750 \
61        ${destroot}${prefix}/var/run/postgrey
62  destroot.keepdirs ${destroot}${prefix}/var/spool/postgrey \
63        ${destroot}${prefix}/var/run/postgrey \
64        ${destroot}${prefix}/etc/postgrey
65  system "pod2man --section=8 ${worksrcpath}/postgrey > \
66        ${destroot}${prefix}/share/man/man8/postgrey.8"
67  system "pod2man --section=1 ${worksrcpath}/contrib/postgreyreport > \
68        ${destroot}${prefix}/share/man/man1/postgreyreport.1"
69  xinstall -m 755 -c ${worksrcpath}/contrib/postgreyreport \
70        ${destroot}${prefix}/bin/postgreyreport
71  xinstall -m 644 -c ${worksrcpath}/README \
72        ${worksrcpath}/README.exim \
73        ${worksrcpath}/Changes \
74        ${worksrcpath}/COPYING \
75        ${destroot}${prefix}/share/doc/postgrey
76  xinstall -m 644 -c ${portpath}/files/postgrey.conf \
77        ${destroot}${prefix}/etc/postgrey/postgrey.conf.sample
78  xinstall -m 755 -c ${portpath}/files/postgrey.sh \
79        ${destroot}${prefix}/share/postgrey
80  reinplace "s|__PREFIX|${prefix}|g" \
81        ${destroot}${prefix}/share/postgrey/postgrey.sh
82  xinstall -m 4755 -o postgrey -g postgrey -c \
83        ${worksrcpath}/postgrey \
84        ${destroot}${prefix}/sbin/postgrey
85  xinstall -m 644 -c \
86        ${worksrcpath}/postgrey_whitelist_clients \
87        ${destroot}${prefix}/etc/postgrey
88  xinstall -m 644 -c \
89        ${worksrcpath}/postgrey_whitelist_recipients \
90        ${destroot}${prefix}/etc/postgrey/postgrey_whitelist_recipients.default
91}
92
93post-install {
94ui_msg "\n
95Postgrey will be running with following default parameters:
96  user        : postgrey
97  group       : postgrey
98  tcp binding : localhost
99  tcp port    : 60000
100
101You will find configuration in ${prefix}/etc/postgrey
102  postgrey.conf                         : launch options
103  postgrey_whitelist_clients            : default clients whitelist
104  postgrey_whitelist_clients.local      : customisable clients whitelist
105  postgrey_whitelist_recipients         : customisable recipients whitelist
106  postgrey_whitelist_recipients.default : default recipients whitelist (unused)
107
108If you are using postfix, you should add to your main.cf a line:
109  check_policy_service inet:127.0.0.1:60000
110in the smtpd_recipient_restrictions configuration (after
111reject_unauth_destination and other rules) and reload postfix daemon.
112
113\n"
114}
115
Note: See TracBrowser for help on using the repository browser.