forked from macports/macports-ports
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Portfile
102 lines (81 loc) · 4.02 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup legacysupport 1.1
name opensmtpd
version 7.4.0p1
revision 0
categories mail
license ISC
maintainers {@ryanakca debian.org:rak}
description secure, reliable, lean, and easy-to configure SMTP server
long_description The OpenSMTPD server seeks to be \
\n* as secure as possible, and uses privilege separation to mitigate \
\n possible security bugs \
\n* as reliable as possible: any accepted email must not be lost \
\n* lean: it covers typical usage cases instead of every obscure one \
\n* easy to configure, with a configuration syntax reminiscent of the OpenBSD \
\n Packet Filter's (PF) \
\n* fast and efficient: it can handle large queues with reasonable performance
homepage https://www.opensmtpd.org
master_sites https://opensmtpd.org/archives/
checksums rmd160 e62234e14c5288c8b3e73714224d99d216df9479 \
sha256 9e82a2ec9419e181d4ca27d8e3ebe5d129fded5ba84022ff4d11a73f8edb70b5 \
size 908307
depends_build port:bison
depends_lib port:libevent \
path:lib/libssl.dylib:openssl
startupitem.create yes
startupitem.executable ${prefix}/sbin/smtpd -F
add_users _smtpd group=_smtpd realname=OpenSMTP\ Daemon \
_smtpq group=_smtpq realname=OpenSMTP\ Queue
set sysconfdir ${prefix}/etc/${name}
post-patch {
reinplace "s|file:/etc/mail/aliases|file:${sysconfdir}/aliases|g" ${worksrcpath}/usr.sbin/smtpd/smtpd.conf
}
#temp fix for 7.4.0p1. Already patched upstream, to be included in next release.
patchfiles configure.patch \
EAI_OVERFLOW.patch
depends_build-append \
port:autoconf \
port:automake \
port:libtool
configure.args --sysconfdir=${sysconfdir} \
--with-auth-pam \
--with-libevent=${prefix} \
--with-mantype=doc \
--with-path-queue=${prefix}/var/spool/smtpd \
--with-table-db
# The spool directory *must* be installed with uid/gid 0.
# OpenSMTPD checks these permissions at startup (queue_backend.c, using ckdir
# from util.c), and aborts if they are not correctly set. Consequently,
# opensmtpd must be installed as root
destroot.asroot yes
destroot.keepdirs ${destroot}${prefix}/var/spool/smtpd
post-destroot {
xinstall -o root -g wheel -m 711 -d ${destroot}${prefix}/var/spool/smtpd
file rename ${destroot}${sysconfdir}/smtpd.conf ${destroot}${sysconfdir}/smtpd.conf.dist
file link -symbolic ${destroot}${prefix}/sbin/sendmail smtpctl
file link -symbolic ${destroot}${prefix}/sbin/mailq smtpctl
file link -symbolic ${destroot}${prefix}/sbin/makemap smtpctl
file link -symbolic ${destroot}${prefix}/sbin/newaliases smtpctl
}
post-activate {
if {![file exists ${sysconfdir}/smtpd.conf]} {
file copy ${sysconfdir}/smtpd.conf.dist ${sysconfdir}/smtpd.conf
}
if {![file exists ${sysconfdir}/aliases] && [file exists /etc/postfix/aliases]} {
file copy /etc/postfix/aliases ${sysconfdir}/aliases
}
}
notes "
Both OpenSMTPD and the built-in Postfix daemon listen on port 25 by\
default. The easiest way to avoid this conflict is to change the\
inet_interfaces setting in /etc/postfix/main.cf to keep Postfix from\
listening to the same interfaces as OpenSMTPD, and then restarting Postfix.\
To keep Postfix from listening on any interfaces, it is sufficient to set:
inet_interfaces =
Please see postconf(5) for more details.
"
livecheck.url https://opensmtpd.org/archives/
livecheck.type regex
livecheck.regex opensmtpd-(\[0-9p.\]+)\\.tar\\.gz