1 |
eras 12/02/01 22:46:57 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: postfix-2.10_pre20120130.ebuild |
5 |
postfix-2.9.0.ebuild postfix-2.8.8.ebuild |
6 |
Removed: postfix-2.9.0_rc2.ebuild |
7 |
postfix-2.10_pre20120124.ebuild |
8 |
Log: |
9 |
version bump |
10 |
|
11 |
(Portage version: 2.1.10.44/cvs/Linux x86_64) |
12 |
|
13 |
Revision Changes Path |
14 |
1.330 mail-mta/postfix/ChangeLog |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.330&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?rev=1.330&content-type=text/plain |
18 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/ChangeLog?r1=1.329&r2=1.330 |
19 |
|
20 |
Index: ChangeLog |
21 |
=================================================================== |
22 |
RCS file: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v |
23 |
retrieving revision 1.329 |
24 |
retrieving revision 1.330 |
25 |
diff -u -r1.329 -r1.330 |
26 |
--- ChangeLog 25 Jan 2012 06:20:10 -0000 1.329 |
27 |
+++ ChangeLog 1 Feb 2012 22:46:56 -0000 1.330 |
28 |
@@ -1,6 +1,15 @@ |
29 |
# ChangeLog for mail-mta/postfix |
30 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
31 |
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.329 2012/01/25 06:20:10 eras Exp $ |
32 |
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/ChangeLog,v 1.330 2012/02/01 22:46:56 eras Exp $ |
33 |
+ |
34 |
+*postfix-2.10_pre20120130 (01 Feb 2012) |
35 |
+*postfix-2.9.0 (01 Feb 2012) |
36 |
+*postfix-2.8.8 (01 Feb 2012) |
37 |
+ |
38 |
+ 01 Feb 2012; Eray Aslan <eras@g.o> +postfix-2.8.8.ebuild, |
39 |
+ -postfix-2.9.0_rc2.ebuild, +postfix-2.9.0.ebuild, |
40 |
+ -postfix-2.10_pre20120124.ebuild, +postfix-2.10_pre20120130.ebuild: |
41 |
+ version bump |
42 |
|
43 |
*postfix-2.10_pre20120124 (25 Jan 2012) |
44 |
*postfix-2.9.0_rc2 (25 Jan 2012) |
45 |
|
46 |
|
47 |
|
48 |
1.1 mail-mta/postfix/postfix-2.10_pre20120130.ebuild |
49 |
|
50 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.10_pre20120130.ebuild?rev=1.1&view=markup |
51 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.10_pre20120130.ebuild?rev=1.1&content-type=text/plain |
52 |
|
53 |
Index: postfix-2.10_pre20120130.ebuild |
54 |
=================================================================== |
55 |
# Copyright 1999-2012 Gentoo Foundation |
56 |
# Distributed under the terms of the GNU General Public License v2 |
57 |
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.10_pre20120130.ebuild,v 1.1 2012/02/01 22:46:56 eras Exp $ |
58 |
|
59 |
EAPI=4 |
60 |
|
61 |
inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam versionator |
62 |
|
63 |
MY_PV="${PV/_pre/-}" |
64 |
MY_SRC="${PN}-${MY_PV}" |
65 |
MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/experimental" |
66 |
VDA_PV="2.8.5" |
67 |
VDA_P="${PN}-vda-v10-${VDA_PV}" |
68 |
RC_VER="2.6" |
69 |
|
70 |
DESCRIPTION="A fast and secure drop-in replacement for sendmail." |
71 |
HOMEPAGE="http://www.postfix.org/" |
72 |
SRC_URI="${MY_URI}/${MY_SRC}.tar.gz |
73 |
vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) " |
74 |
|
75 |
LICENSE="IBM" |
76 |
SLOT="0" |
77 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
78 |
IUSE="+berkdb cdb doc dovecot-sasl hardened ldap ldap-bind memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda" |
79 |
|
80 |
DEPEND=">=dev-libs/libpcre-3.4 |
81 |
dev-lang/perl |
82 |
berkdb? ( >=sys-libs/db-3.2 ) |
83 |
cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) ) |
84 |
ldap? ( net-nds/openldap ) |
85 |
ldap-bind? ( net-nds/openldap[sasl] ) |
86 |
mysql? ( virtual/mysql ) |
87 |
pam? ( virtual/pam ) |
88 |
postgres? ( dev-db/postgresql-base ) |
89 |
sasl? ( >=dev-libs/cyrus-sasl-2 ) |
90 |
sqlite? ( dev-db/sqlite:3 ) |
91 |
ssl? ( >=dev-libs/openssl-0.9.6g )" |
92 |
|
93 |
RDEPEND="${DEPEND} |
94 |
dovecot-sasl? ( net-mail/dovecot ) |
95 |
memcached? ( net-misc/memcached ) |
96 |
net-mail/mailbase |
97 |
selinux? ( sec-policy/selinux-postfix ) |
98 |
!mail-mta/courier |
99 |
!mail-mta/esmtp |
100 |
!mail-mta/exim |
101 |
!mail-mta/mini-qmail |
102 |
!mail-mta/msmtp[mta] |
103 |
!mail-mta/nbsmtp |
104 |
!mail-mta/netqmail |
105 |
!mail-mta/nullmailer |
106 |
!mail-mta/qmail-ldap |
107 |
!mail-mta/sendmail |
108 |
!<mail-mta/ssmtp-2.64-r2 |
109 |
!>=mail-mta/ssmtp-2.64-r2[mta] |
110 |
!net-mail/fastforward" |
111 |
|
112 |
REQUIRED_USE="ldap-bind? ( ldap sasl )" |
113 |
|
114 |
S="${WORKDIR}/${MY_SRC}" |
115 |
|
116 |
pkg_setup() { |
117 |
# Add postfix, postdrop user/group (bug #77565) |
118 |
enewgroup postfix 207 |
119 |
enewgroup postdrop 208 |
120 |
enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
121 |
} |
122 |
|
123 |
src_prepare() { |
124 |
if use vda; then |
125 |
epatch "${DISTDIR}"/${VDA_P}.patch |
126 |
fi |
127 |
|
128 |
if ! use berkdb; then |
129 |
epatch "${FILESDIR}/${PN}_no-berkdb.patch" |
130 |
fi |
131 |
|
132 |
sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
133 |
src/util/sys_defs.h || die "sed failed" |
134 |
|
135 |
# change default paths to better comply with portage standard paths |
136 |
sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
137 |
} |
138 |
|
139 |
src_configure() { |
140 |
# Make sure LDFLAGS get passed down to the executables. |
141 |
local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread" |
142 |
|
143 |
use pam && mylibs="${mylibs} -lpam" |
144 |
|
145 |
if use ldap; then |
146 |
mycc="${mycc} -DHAS_LDAP" |
147 |
mylibs="${mylibs} -lldap -llber" |
148 |
fi |
149 |
|
150 |
if use mysql; then |
151 |
mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
152 |
mylibs="${mylibs} $(mysql_config --libs)" |
153 |
fi |
154 |
|
155 |
if use postgres; then |
156 |
mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
157 |
mylibs="${mylibs} -lpq -L$(pg_config --libdir)" |
158 |
fi |
159 |
|
160 |
if use sqlite; then |
161 |
mycc="${mycc} -DHAS_SQLITE" |
162 |
mylibs="${mylibs} -lsqlite3" |
163 |
fi |
164 |
|
165 |
if use ssl; then |
166 |
mycc="${mycc} -DUSE_TLS" |
167 |
mylibs="${mylibs} -lssl -lcrypto" |
168 |
fi |
169 |
|
170 |
# broken. and "in other words, not supported" by upstream. |
171 |
# Use inet_protocols setting in main.cf |
172 |
#if ! use ipv6; then |
173 |
# mycc="${mycc} -DNO_IPV6" |
174 |
#fi |
175 |
|
176 |
if use sasl; then |
177 |
if use dovecot-sasl; then |
178 |
# Set dovecot as default. |
179 |
mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
180 |
fi |
181 |
if use ldap-bind; then |
182 |
mycc="${mycc} -DUSE_LDAP_SASL" |
183 |
fi |
184 |
mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
185 |
mylibs="${mylibs} -lsasl2" |
186 |
elif use dovecot-sasl; then |
187 |
mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
188 |
fi |
189 |
|
190 |
if ! use nis; then |
191 |
sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \ |
192 |
src/util/sys_defs.h || die "sed failed" |
193 |
fi |
194 |
|
195 |
if ! use berkdb; then |
196 |
mycc="${mycc} -DNO_DB" |
197 |
if use cdb; then |
198 |
# change default hash format from Berkeley DB to cdb |
199 |
sed -i -e "s/hash/cdb/" src/util/sys_defs.h || die |
200 |
fi |
201 |
fi |
202 |
|
203 |
if use cdb; then |
204 |
mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
205 |
CDB_LIBS="" |
206 |
# Tinycdb is preferred. |
207 |
if has_version dev-db/tinycdb ; then |
208 |
einfo "Building with dev-db/tinycdb" |
209 |
CDB_LIBS="-lcdb" |
210 |
else |
211 |
einfo "Building with dev-db/cdb" |
212 |
CDB_PATH="/usr/$(get_libdir)" |
213 |
for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
214 |
CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}" |
215 |
done |
216 |
fi |
217 |
mylibs="${mylibs} ${CDB_LIBS}" |
218 |
fi |
219 |
|
220 |
# Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
221 |
# Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
222 |
mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
223 |
filter-lfs-flags |
224 |
|
225 |
# Workaround for bug #76512 |
226 |
if use hardened; then |
227 |
[[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
228 |
fi |
229 |
|
230 |
# Remove annoying C++ comment style warnings - bug #378099 |
231 |
append-flags -Wno-comment |
232 |
|
233 |
emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles |
234 |
} |
235 |
|
236 |
src_install () { |
237 |
/bin/sh postfix-install \ |
238 |
-non-interactive \ |
239 |
install_root="${D}" \ |
240 |
config_directory="/etc/postfix" \ |
241 |
manpage_directory="/usr/share/man" \ |
242 |
readme_directory="/usr/share/doc/${PF}/readme" \ |
243 |
html_directory="/usr/share/doc/${PF}/html" \ |
244 |
command_directory="/usr/sbin" \ |
245 |
daemon_directory="/usr/$(get_libdir)/postfix" \ |
246 |
mailq_path="/usr/bin/mailq" \ |
247 |
newaliases_path="/usr/bin/newaliases" \ |
248 |
sendmail_path="/usr/sbin/sendmail" \ |
249 |
|| die "postfix-install failed" |
250 |
|
251 |
# Fix spool removal on upgrade |
252 |
rm -Rf "${D}"/var |
253 |
keepdir /var/spool/postfix |
254 |
|
255 |
# Install rmail for UUCP, closes bug #19127 |
256 |
dobin auxiliary/rmail/rmail |
257 |
|
258 |
# Provide another link for legacy FSH |
259 |
dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
260 |
|
261 |
# Install qshape tool |
262 |
dobin auxiliary/qshape/qshape.pl |
263 |
doman man/man1/qshape.1 |
264 |
|
265 |
# Performance tuning tools and their manuals |
266 |
dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
267 |
doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
268 |
|
269 |
# Set proper permissions on required files/directories |
270 |
dodir /var/lib/postfix |
271 |
keepdir /var/lib/postfix |
272 |
fowners postfix:postfix /var/lib/postfix |
273 |
fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT} |
274 |
fperms 0750 /var/lib/postfix |
275 |
fowners root:postdrop /usr/sbin/post{drop,queue} |
276 |
fperms 02711 /usr/sbin/post{drop,queue} |
277 |
|
278 |
keepdir /etc/postfix |
279 |
if use mbox; then |
280 |
mypostconf="mail_spool_directory=/var/spool/mail" |
281 |
else |
282 |
mypostconf="home_mailbox=.maildir/" |
283 |
fi |
284 |
"${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
285 |
-e ${mypostconf} || die "postconf failed" |
286 |
|
287 |
insinto /etc/postfix |
288 |
newins "${FILESDIR}"/smtp.pass saslpass |
289 |
fperms 600 /etc/postfix/saslpass |
290 |
|
291 |
newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
292 |
# do not start mysql/postgres unnecessarily - bug #359913 |
293 |
use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
294 |
use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
295 |
|
296 |
mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
297 |
mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/ |
298 |
|
299 |
dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES* |
300 |
|
301 |
pamd_mimic_system smtp auth account |
302 |
|
303 |
if use sasl; then |
304 |
insinto /etc/sasl2 |
305 |
newins "${FILESDIR}"/smtp.sasl smtpd.conf |
306 |
fi |
307 |
|
308 |
# header files |
309 |
insinto /usr/include/postfix |
310 |
doins include/*.h |
311 |
|
312 |
# Remove unnecessary files |
313 |
rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
314 |
rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
315 |
} |
316 |
|
317 |
pkg_preinst() { |
318 |
# default for inet_protocols changed from ipv4 to all in postfix-2.9. |
319 |
# check inet_protocols setting in main.cf and modify if necessary to prevent |
320 |
# performance loss with useless DNS lookups and useless connection attempts. |
321 |
[[ -d ${ROOT}/etc/postfix ]] && { |
322 |
if [[ "$(${D}/usr/sbin/postconf -dh inet_protocols)" != "ipv4" ]]; then |
323 |
if [[ ! -n "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -nh inet_protocols)" ]]; |
324 |
then |
325 |
ewarn "\nCOMPATIBILITY: adding inet_protocols=ipv4 to main.cf." |
326 |
ewarn "That will keep the same behaviour as previous postfix versions." |
327 |
ewarn "Specify inet_protocols explicitly if you want to enable IPv6.\n" |
328 |
else |
329 |
# delete inet_protocols setting. there is already one in /etc/postfix |
330 |
sed -i -e /inet_protocols/d "${D}"/etc/postfix/main.cf || die |
331 |
fi |
332 |
fi |
333 |
} |
334 |
} |
335 |
|
336 |
pkg_postinst() { |
337 |
# Do not install server.{key,pem) SSL certificates if they already exist |
338 |
if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \ |
339 |
&& ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then |
340 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}" |
341 |
install_cert /etc/ssl/postfix/server |
342 |
chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem} |
343 |
fi |
344 |
|
345 |
if [[ ! -e /etc/mail/aliases.db ]] ; then |
346 |
ewarn |
347 |
ewarn "You must edit /etc/mail/aliases to suit your needs" |
348 |
ewarn "and then run /usr/bin/newaliases. Postfix will not" |
349 |
ewarn "work correctly without it." |
350 |
ewarn |
351 |
fi |
352 |
|
353 |
if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 7 ]]; then |
354 |
elog "If you are using old style postfix instances by symlinking" |
355 |
elog "startup scripts in ${ROOT}etc/init.d, please consider" |
356 |
elog "upgrading your config for postmulti support. For more info:" |
357 |
elog "http://www.postfix.org/MULTI_INSTANCE_README.html" |
358 |
if ! use berkdb; then |
359 |
ewarn "\nPostfix is installed without BerkeleyDB support." |
360 |
ewarn "Please turn on berkdb USE flag for hash or btree table" |
361 |
ewarn "lookup support.\n" |
362 |
fi |
363 |
fi |
364 |
} |
365 |
|
366 |
|
367 |
|
368 |
1.1 mail-mta/postfix/postfix-2.9.0.ebuild |
369 |
|
370 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.9.0.ebuild?rev=1.1&view=markup |
371 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.9.0.ebuild?rev=1.1&content-type=text/plain |
372 |
|
373 |
Index: postfix-2.9.0.ebuild |
374 |
=================================================================== |
375 |
# Copyright 1999-2012 Gentoo Foundation |
376 |
# Distributed under the terms of the GNU General Public License v2 |
377 |
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.9.0.ebuild,v 1.1 2012/02/01 22:46:56 eras Exp $ |
378 |
|
379 |
EAPI=4 |
380 |
|
381 |
inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam versionator |
382 |
|
383 |
MY_PV="${PV/_rc/-RC}" |
384 |
MY_SRC="${PN}-${MY_PV}" |
385 |
MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
386 |
VDA_PV="2.8.5" |
387 |
VDA_P="${PN}-vda-v10-${VDA_PV}" |
388 |
RC_VER="2.6" |
389 |
|
390 |
DESCRIPTION="A fast and secure drop-in replacement for sendmail." |
391 |
HOMEPAGE="http://www.postfix.org/" |
392 |
SRC_URI="${MY_URI}/${MY_SRC}.tar.gz |
393 |
vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) " |
394 |
|
395 |
LICENSE="IBM" |
396 |
SLOT="0" |
397 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
398 |
IUSE="+berkdb cdb doc dovecot-sasl hardened ldap ldap-bind memcached mbox mysql nis pam postgres sasl selinux sqlite ssl vda" |
399 |
|
400 |
DEPEND=">=dev-libs/libpcre-3.4 |
401 |
dev-lang/perl |
402 |
berkdb? ( >=sys-libs/db-3.2 ) |
403 |
cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) ) |
404 |
ldap? ( net-nds/openldap ) |
405 |
ldap-bind? ( net-nds/openldap[sasl] ) |
406 |
mysql? ( virtual/mysql ) |
407 |
pam? ( virtual/pam ) |
408 |
postgres? ( dev-db/postgresql-base ) |
409 |
sasl? ( >=dev-libs/cyrus-sasl-2 ) |
410 |
sqlite? ( dev-db/sqlite:3 ) |
411 |
ssl? ( >=dev-libs/openssl-0.9.6g )" |
412 |
|
413 |
RDEPEND="${DEPEND} |
414 |
dovecot-sasl? ( net-mail/dovecot ) |
415 |
memcached? ( net-misc/memcached ) |
416 |
net-mail/mailbase |
417 |
selinux? ( sec-policy/selinux-postfix ) |
418 |
!mail-mta/courier |
419 |
!mail-mta/esmtp |
420 |
!mail-mta/exim |
421 |
!mail-mta/mini-qmail |
422 |
!mail-mta/msmtp[mta] |
423 |
!mail-mta/nbsmtp |
424 |
!mail-mta/netqmail |
425 |
!mail-mta/nullmailer |
426 |
!mail-mta/qmail-ldap |
427 |
!mail-mta/sendmail |
428 |
!<mail-mta/ssmtp-2.64-r2 |
429 |
!>=mail-mta/ssmtp-2.64-r2[mta] |
430 |
!net-mail/fastforward" |
431 |
|
432 |
REQUIRED_USE="ldap-bind? ( ldap sasl )" |
433 |
|
434 |
S="${WORKDIR}/${MY_SRC}" |
435 |
|
436 |
pkg_setup() { |
437 |
# Add postfix, postdrop user/group (bug #77565) |
438 |
enewgroup postfix 207 |
439 |
enewgroup postdrop 208 |
440 |
enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
441 |
} |
442 |
|
443 |
src_prepare() { |
444 |
if use vda; then |
445 |
epatch "${DISTDIR}"/${VDA_P}.patch |
446 |
fi |
447 |
|
448 |
if ! use berkdb; then |
449 |
epatch "${FILESDIR}/${PN}_no-berkdb.patch" |
450 |
fi |
451 |
|
452 |
sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
453 |
src/util/sys_defs.h || die "sed failed" |
454 |
|
455 |
# change default paths to better comply with portage standard paths |
456 |
sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
457 |
} |
458 |
|
459 |
src_configure() { |
460 |
# Make sure LDFLAGS get passed down to the executables. |
461 |
local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread" |
462 |
|
463 |
use pam && mylibs="${mylibs} -lpam" |
464 |
|
465 |
if use ldap; then |
466 |
mycc="${mycc} -DHAS_LDAP" |
467 |
mylibs="${mylibs} -lldap -llber" |
468 |
fi |
469 |
|
470 |
if use mysql; then |
471 |
mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
472 |
mylibs="${mylibs} $(mysql_config --libs)" |
473 |
fi |
474 |
|
475 |
if use postgres; then |
476 |
mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
477 |
mylibs="${mylibs} -lpq -L$(pg_config --libdir)" |
478 |
fi |
479 |
|
480 |
if use sqlite; then |
481 |
mycc="${mycc} -DHAS_SQLITE" |
482 |
mylibs="${mylibs} -lsqlite3" |
483 |
fi |
484 |
|
485 |
if use ssl; then |
486 |
mycc="${mycc} -DUSE_TLS" |
487 |
mylibs="${mylibs} -lssl -lcrypto" |
488 |
fi |
489 |
|
490 |
# broken. and "in other words, not supported" by upstream. |
491 |
# Use inet_protocols setting in main.cf |
492 |
#if ! use ipv6; then |
493 |
# mycc="${mycc} -DNO_IPV6" |
494 |
#fi |
495 |
|
496 |
if use sasl; then |
497 |
if use dovecot-sasl; then |
498 |
# Set dovecot as default. |
499 |
mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
500 |
fi |
501 |
if use ldap-bind; then |
502 |
mycc="${mycc} -DUSE_LDAP_SASL" |
503 |
fi |
504 |
mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
505 |
mylibs="${mylibs} -lsasl2" |
506 |
elif use dovecot-sasl; then |
507 |
mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
508 |
fi |
509 |
|
510 |
if ! use nis; then |
511 |
sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \ |
512 |
src/util/sys_defs.h || die "sed failed" |
513 |
fi |
514 |
|
515 |
if ! use berkdb; then |
516 |
mycc="${mycc} -DNO_DB" |
517 |
if use cdb; then |
518 |
# change default hash format from Berkeley DB to cdb |
519 |
sed -i -e "s/hash/cdb/" src/util/sys_defs.h || die |
520 |
fi |
521 |
fi |
522 |
|
523 |
if use cdb; then |
524 |
mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
525 |
CDB_LIBS="" |
526 |
# Tinycdb is preferred. |
527 |
if has_version dev-db/tinycdb ; then |
528 |
einfo "Building with dev-db/tinycdb" |
529 |
CDB_LIBS="-lcdb" |
530 |
else |
531 |
einfo "Building with dev-db/cdb" |
532 |
CDB_PATH="/usr/$(get_libdir)" |
533 |
for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
534 |
CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}" |
535 |
done |
536 |
fi |
537 |
mylibs="${mylibs} ${CDB_LIBS}" |
538 |
fi |
539 |
|
540 |
# Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
541 |
# Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
542 |
mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
543 |
filter-lfs-flags |
544 |
|
545 |
# Workaround for bug #76512 |
546 |
if use hardened; then |
547 |
[[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
548 |
fi |
549 |
|
550 |
# Remove annoying C++ comment style warnings - bug #378099 |
551 |
append-flags -Wno-comment |
552 |
|
553 |
emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles |
554 |
} |
555 |
|
556 |
src_install () { |
557 |
/bin/sh postfix-install \ |
558 |
-non-interactive \ |
559 |
install_root="${D}" \ |
560 |
config_directory="/etc/postfix" \ |
561 |
manpage_directory="/usr/share/man" \ |
562 |
readme_directory="/usr/share/doc/${PF}/readme" \ |
563 |
html_directory="/usr/share/doc/${PF}/html" \ |
564 |
command_directory="/usr/sbin" \ |
565 |
daemon_directory="/usr/$(get_libdir)/postfix" \ |
566 |
mailq_path="/usr/bin/mailq" \ |
567 |
newaliases_path="/usr/bin/newaliases" \ |
568 |
sendmail_path="/usr/sbin/sendmail" \ |
569 |
|| die "postfix-install failed" |
570 |
|
571 |
# Fix spool removal on upgrade |
572 |
rm -Rf "${D}"/var |
573 |
keepdir /var/spool/postfix |
574 |
|
575 |
# Install rmail for UUCP, closes bug #19127 |
576 |
dobin auxiliary/rmail/rmail |
577 |
|
578 |
# Provide another link for legacy FSH |
579 |
dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
580 |
|
581 |
# Install qshape tool |
582 |
dobin auxiliary/qshape/qshape.pl |
583 |
doman man/man1/qshape.1 |
584 |
|
585 |
# Performance tuning tools and their manuals |
586 |
dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
587 |
doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
588 |
|
589 |
# Set proper permissions on required files/directories |
590 |
dodir /var/lib/postfix |
591 |
keepdir /var/lib/postfix |
592 |
fowners postfix:postfix /var/lib/postfix |
593 |
fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT} |
594 |
fperms 0750 /var/lib/postfix |
595 |
fowners root:postdrop /usr/sbin/post{drop,queue} |
596 |
fperms 02711 /usr/sbin/post{drop,queue} |
597 |
|
598 |
keepdir /etc/postfix |
599 |
if use mbox; then |
600 |
mypostconf="mail_spool_directory=/var/spool/mail" |
601 |
else |
602 |
mypostconf="home_mailbox=.maildir/" |
603 |
fi |
604 |
"${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
605 |
-e ${mypostconf} || die "postconf failed" |
606 |
|
607 |
insinto /etc/postfix |
608 |
newins "${FILESDIR}"/smtp.pass saslpass |
609 |
fperms 600 /etc/postfix/saslpass |
610 |
|
611 |
newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
612 |
# do not start mysql/postgres unnecessarily - bug #359913 |
613 |
use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
614 |
use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
615 |
|
616 |
mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
617 |
mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/ |
618 |
|
619 |
dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES* |
620 |
|
621 |
pamd_mimic_system smtp auth account |
622 |
|
623 |
if use sasl; then |
624 |
insinto /etc/sasl2 |
625 |
newins "${FILESDIR}"/smtp.sasl smtpd.conf |
626 |
fi |
627 |
|
628 |
# header files |
629 |
insinto /usr/include/postfix |
630 |
doins include/*.h |
631 |
|
632 |
# Remove unnecessary files |
633 |
rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
634 |
rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
635 |
} |
636 |
|
637 |
pkg_preinst() { |
638 |
# default for inet_protocols changed from ipv4 to all in postfix-2.9. |
639 |
# check inet_protocols setting in main.cf and modify if necessary to prevent |
640 |
# performance loss with useless DNS lookups and useless connection attempts. |
641 |
[[ -d ${ROOT}/etc/postfix ]] && { |
642 |
if [[ "$(${D}/usr/sbin/postconf -dh inet_protocols)" != "ipv4" ]]; then |
643 |
if [[ ! -n "$(${D}/usr/sbin/postconf -c ${ROOT}/etc/postfix -nh inet_protocols)" ]]; |
644 |
then |
645 |
ewarn "\nCOMPATIBILITY: adding inet_protocols=ipv4 to main.cf." |
646 |
ewarn "That will keep the same behaviour as previous postfix versions." |
647 |
ewarn "Specify inet_protocols explicitly if you want to enable IPv6.\n" |
648 |
else |
649 |
# delete inet_protocols setting. there is already one in /etc/postfix |
650 |
sed -i -e /inet_protocols/d "${D}"/etc/postfix/main.cf || die |
651 |
fi |
652 |
fi |
653 |
} |
654 |
} |
655 |
|
656 |
pkg_postinst() { |
657 |
# Do not install server.{key,pem) SSL certificates if they already exist |
658 |
if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \ |
659 |
&& ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then |
660 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}" |
661 |
install_cert /etc/ssl/postfix/server |
662 |
chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem} |
663 |
fi |
664 |
|
665 |
if [[ ! -e /etc/mail/aliases.db ]] ; then |
666 |
ewarn |
667 |
ewarn "You must edit /etc/mail/aliases to suit your needs" |
668 |
ewarn "and then run /usr/bin/newaliases. Postfix will not" |
669 |
ewarn "work correctly without it." |
670 |
ewarn |
671 |
fi |
672 |
|
673 |
if [[ $(get_version_component_range 2 ${REPLACING_VERSIONS}) -lt 9 ]]; then |
674 |
elog "If you are using old style postfix instances by symlinking" |
675 |
elog "startup scripts in ${ROOT}etc/init.d, please consider" |
676 |
elog "upgrading your config for postmulti support. For more info:" |
677 |
elog "http://www.postfix.org/MULTI_INSTANCE_README.html" |
678 |
if ! use berkdb; then |
679 |
ewarn "\nPostfix is installed without BerkeleyDB support." |
680 |
ewarn "Please turn on berkdb USE flag for hash or btree table" |
681 |
ewarn "lookup support.\n" |
682 |
fi |
683 |
fi |
684 |
} |
685 |
|
686 |
|
687 |
|
688 |
1.1 mail-mta/postfix/postfix-2.8.8.ebuild |
689 |
|
690 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.8.8.ebuild?rev=1.1&view=markup |
691 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/postfix/postfix-2.8.8.ebuild?rev=1.1&content-type=text/plain |
692 |
|
693 |
Index: postfix-2.8.8.ebuild |
694 |
=================================================================== |
695 |
# Copyright 1999-2012 Gentoo Foundation |
696 |
# Distributed under the terms of the GNU General Public License v2 |
697 |
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/postfix-2.8.8.ebuild,v 1.1 2012/02/01 22:46:56 eras Exp $ |
698 |
|
699 |
EAPI=4 |
700 |
|
701 |
inherit eutils multilib ssl-cert toolchain-funcs flag-o-matic pam |
702 |
|
703 |
MY_PV="${PV/_rc/-RC}" |
704 |
MY_SRC="${PN}-${MY_PV}" |
705 |
MY_URI="ftp://ftp.porcupine.org/mirrors/postfix-release/official" |
706 |
VDA_PV="2.8.5" |
707 |
VDA_P="${PN}-vda-v10-${VDA_PV}" |
708 |
RC_VER="2.5" |
709 |
|
710 |
DESCRIPTION="A fast and secure drop-in replacement for sendmail." |
711 |
HOMEPAGE="http://www.postfix.org/" |
712 |
SRC_URI="${MY_URI}/${MY_SRC}.tar.gz |
713 |
vda? ( http://vda.sourceforge.net/VDA/${VDA_P}.patch ) " |
714 |
|
715 |
LICENSE="IBM" |
716 |
SLOT="0" |
717 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
718 |
IUSE="cdb doc dovecot-sasl hardened ipv6 ldap ldap-bind mbox mysql nis pam postgres sasl selinux sqlite ssl vda" |
719 |
|
720 |
DEPEND=">=sys-libs/db-3.2 |
721 |
>=dev-libs/libpcre-3.4 |
722 |
dev-lang/perl |
723 |
cdb? ( || ( >=dev-db/tinycdb-0.76 >=dev-db/cdb-0.75-r1 ) ) |
724 |
ldap? ( net-nds/openldap ) |
725 |
ldap-bind? ( net-nds/openldap[sasl] ) |
726 |
mysql? ( virtual/mysql ) |
727 |
pam? ( virtual/pam ) |
728 |
postgres? ( dev-db/postgresql-base ) |
729 |
sasl? ( >=dev-libs/cyrus-sasl-2 ) |
730 |
sqlite? ( dev-db/sqlite:3 ) |
731 |
ssl? ( >=dev-libs/openssl-0.9.6g )" |
732 |
|
733 |
RDEPEND="${DEPEND} |
734 |
dovecot-sasl? ( net-mail/dovecot ) |
735 |
net-mail/mailbase |
736 |
selinux? ( sec-policy/selinux-postfix ) |
737 |
!mail-mta/courier |
738 |
!mail-mta/esmtp |
739 |
!mail-mta/exim |
740 |
!mail-mta/mini-qmail |
741 |
!mail-mta/msmtp[mta] |
742 |
!mail-mta/nbsmtp |
743 |
!mail-mta/netqmail |
744 |
!mail-mta/nullmailer |
745 |
!mail-mta/qmail-ldap |
746 |
!mail-mta/sendmail |
747 |
!<mail-mta/ssmtp-2.64-r2 |
748 |
!>=mail-mta/ssmtp-2.64-r2[mta] |
749 |
!net-mail/fastforward" |
750 |
|
751 |
REQUIRED_USE="ldap-bind? ( ldap sasl )" |
752 |
|
753 |
S="${WORKDIR}/${MY_SRC}" |
754 |
|
755 |
group_user_check() { |
756 |
einfo "Checking for postfix group ..." |
757 |
enewgroup postfix 207 |
758 |
einfo "Checking for postdrop group ..." |
759 |
enewgroup postdrop 208 |
760 |
einfo "Checking for postfix user ..." |
761 |
enewuser postfix 207 -1 /var/spool/postfix postfix,mail |
762 |
} |
763 |
|
764 |
pkg_setup() { |
765 |
# Add postfix, postdrop user/group (bug #77565) |
766 |
group_user_check || die "Failed to check/add needed user/group" |
767 |
} |
768 |
|
769 |
src_prepare() { |
770 |
if use vda ; then |
771 |
epatch "${DISTDIR}"/${VDA_P}.patch |
772 |
fi |
773 |
|
774 |
sed -i -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/mail/aliases|" \ |
775 |
src/util/sys_defs.h || die "sed failed" |
776 |
|
777 |
# change default paths to better comply with portage standard paths |
778 |
sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || die "sed failed" |
779 |
} |
780 |
|
781 |
src_configure() { |
782 |
# Make sure LDFLAGS get passed down to the executables. |
783 |
local mycc="-DHAS_PCRE" mylibs="${LDFLAGS} -lpcre -lcrypt -lpthread" |
784 |
|
785 |
use pam && mylibs="${mylibs} -lpam" |
786 |
|
787 |
if use ldap ; then |
788 |
mycc="${mycc} -DHAS_LDAP" |
789 |
mylibs="${mylibs} -lldap -llber" |
790 |
fi |
791 |
|
792 |
if use mysql ; then |
793 |
mycc="${mycc} -DHAS_MYSQL $(mysql_config --include)" |
794 |
mylibs="${mylibs} $(mysql_config --libs)" |
795 |
fi |
796 |
|
797 |
if use postgres ; then |
798 |
mycc="${mycc} -DHAS_PGSQL -I$(pg_config --includedir)" |
799 |
mylibs="${mylibs} -lpq -L$(pg_config --libdir)" |
800 |
fi |
801 |
|
802 |
if use sqlite ; then |
803 |
mycc="${mycc} -DHAS_SQLITE" |
804 |
mylibs="${mylibs} -lsqlite3" |
805 |
fi |
806 |
|
807 |
if use ssl ; then |
808 |
mycc="${mycc} -DUSE_TLS" |
809 |
mylibs="${mylibs} -lssl -lcrypto" |
810 |
fi |
811 |
|
812 |
if use sasl ; then |
813 |
if use dovecot-sasl ; then |
814 |
# Set dovecot as default. |
815 |
mycc="${mycc} -DDEF_SASL_SERVER=\\\"dovecot\\\"" |
816 |
fi |
817 |
if use ldap-bind ; then |
818 |
mycc="${mycc} -DUSE_LDAP_SASL" |
819 |
fi |
820 |
mycc="${mycc} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl" |
821 |
mylibs="${mylibs} -lsasl2" |
822 |
elif use dovecot-sasl ; then |
823 |
mycc="${mycc} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" |
824 |
fi |
825 |
|
826 |
if ! use nis ; then |
827 |
sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \ |
828 |
src/util/sys_defs.h || die "sed failed" |
829 |
fi |
830 |
|
831 |
if use cdb ; then |
832 |
mycc="${mycc} -DHAS_CDB -I/usr/include/cdb" |
833 |
CDB_LIBS="" |
834 |
|
835 |
# Tinycdb is preferred. |
836 |
if has_version dev-db/tinycdb ; then |
837 |
einfo "Building with dev-db/tinycdb" |
838 |
CDB_LIBS="-lcdb" |
839 |
else |
840 |
einfo "Building with dev-db/cdb" |
841 |
CDB_PATH="/usr/$(get_libdir)" |
842 |
for i in cdb.a alloc.a buffer.a unix.a byte.a ; do |
843 |
CDB_LIBS="${CDB_LIBS} ${CDB_PATH}/${i}" |
844 |
done |
845 |
fi |
846 |
|
847 |
mylibs="${mylibs} ${CDB_LIBS}" |
848 |
fi |
849 |
|
850 |
mycc="${mycc} -DDEF_DAEMON_DIR=\\\"/usr/$(get_libdir)/postfix\\\"" |
851 |
mycc="${mycc} -DDEF_CONFIG_DIR=\\\"/etc/postfix\\\"" |
852 |
mycc="${mycc} -DDEF_COMMAND_DIR=\\\"/usr/sbin\\\"" |
853 |
mycc="${mycc} -DDEF_SENDMAIL_PATH=\\\"/usr/sbin/sendmail\\\"" |
854 |
mycc="${mycc} -DDEF_NEWALIS_PATH=\\\"/usr/bin/newaliases\\\"" |
855 |
mycc="${mycc} -DDEF_MAILQ_PATH=\\\"/usr/bin/mailq\\\"" |
856 |
mycc="${mycc} -DDEF_MANPAGE_DIR=\\\"/usr/share/man\\\"" |
857 |
mycc="${mycc} -DDEF_README_DIR=\\\"/usr/share/doc/${PF}/readme\\\"" |
858 |
mycc="${mycc} -DDEF_HTML_DIR=\\\"/usr/share/doc/${PF}/html\\\"" |
859 |
mycc="${mycc} -DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\"" |
860 |
mycc="${mycc} -DDEF_DATA_DIR=\\\"/var/lib/postfix\\\"" |
861 |
mycc="${mycc} -DDEF_MAIL_OWNER=\\\"postfix\\\"" |
862 |
mycc="${mycc} -DDEF_SGID_GROUP=\\\"postdrop\\\"" |
863 |
|
864 |
# Robin H. Johnson <robbat2@g.o> 17/Nov/2006 |
865 |
# Fix because infra boxes hit 2Gb .db files that fail a 32-bit fstat signed check. |
866 |
mycc="${mycc} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" |
867 |
filter-lfs-flags |
868 |
|
869 |
# Workaround for bug #76512 |
870 |
if use hardened ; then |
871 |
[[ "$(gcc-version)" == "3.4" ]] && replace-flags -O? -Os |
872 |
fi |
873 |
|
874 |
emake DEBUG="" CC="$(tc-getCC)" OPT="${CFLAGS}" CCARGS="${mycc}" AUXLIBS="${mylibs}" makefiles |
875 |
} |
876 |
|
877 |
src_install () { |
878 |
/bin/sh postfix-install \ |
879 |
-non-interactive \ |
880 |
install_root="${D}" \ |
881 |
config_directory="/etc/postfix" \ |
882 |
manpage_directory="/usr/share/man" \ |
883 |
readme_directory="/usr/share/doc/${PF}/readme" \ |
884 |
html_directory="/usr/share/doc/${PF}/html" \ |
885 |
command_directory="/usr/sbin" \ |
886 |
daemon_directory="/usr/$(get_libdir)/postfix" \ |
887 |
mailq_path="/usr/bin/mailq" \ |
888 |
newaliases_path="/usr/bin/newaliases" \ |
889 |
sendmail_path="/usr/sbin/sendmail" \ |
890 |
|| die "postfix-install failed" |
891 |
|
892 |
# Fix spool removal on upgrade |
893 |
rm -Rf "${D}"/var |
894 |
keepdir /var/spool/postfix |
895 |
|
896 |
# Install rmail for UUCP, closes bug #19127 |
897 |
dobin auxiliary/rmail/rmail |
898 |
|
899 |
# Provide another link for legacy FSH |
900 |
dosym /usr/sbin/sendmail /usr/$(get_libdir)/sendmail |
901 |
|
902 |
# Install qshape tool |
903 |
dobin auxiliary/qshape/qshape.pl |
904 |
doman man/man1/qshape.1 |
905 |
|
906 |
# Performance tuning tools and their manuals |
907 |
dosbin bin/smtp-{source,sink} bin/qmqp-{source,sink} |
908 |
doman man/man1/smtp-{source,sink}.1 man/man1/qmqp-{source,sink}.1 |
909 |
|
910 |
# Set proper permissions on required files/directories |
911 |
dodir /var/lib/postfix |
912 |
keepdir /var/lib/postfix |
913 |
fowners postfix:postfix /var/lib/postfix |
914 |
fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT} |
915 |
fperms 0750 /var/lib/postfix |
916 |
fowners root:postdrop /usr/sbin/post{drop,queue} |
917 |
fperms 02711 /usr/sbin/post{drop,queue} |
918 |
|
919 |
keepdir /etc/postfix |
920 |
if use mbox ; then |
921 |
mypostconf="mail_spool_directory=/var/spool/mail" |
922 |
else |
923 |
mypostconf="home_mailbox=.maildir/" |
924 |
fi |
925 |
"${D}"/usr/sbin/postconf -c "${D}"/etc/postfix \ |
926 |
-e ${mypostconf} || die "postconf failed" |
927 |
|
928 |
insinto /etc/postfix |
929 |
newins "${FILESDIR}"/smtp.pass saslpass |
930 |
fperms 600 /etc/postfix/saslpass |
931 |
|
932 |
newinitd "${FILESDIR}"/postfix.rc6.${RC_VER} postfix |
933 |
# bug #359913 |
934 |
use mysql || sed -i -e "s/mysql //" "${D}/etc/init.d/postfix" |
935 |
use postgres || sed -i -e "s/postgresql //" "${D}/etc/init.d/postfix" |
936 |
|
937 |
dodoc *README COMPATIBILITY HISTORY INSTALL PORTING RELEASE_NOTES* |
938 |
|
939 |
mv "${S}"/examples "${D}"/usr/share/doc/${PF}/ |
940 |
mv "${D}"/etc/postfix/{*.default,makedefs.out} "${D}"/usr/share/doc/${PF}/ |
941 |
|
942 |
pamd_mimic_system smtp auth account |
943 |
|
944 |
if use sasl ; then |
945 |
insinto /etc/sasl2 |
946 |
newins "${FILESDIR}"/smtp.sasl smtpd.conf |
947 |
fi |
948 |
|
949 |
# Remove unnecessary files |
950 |
rm -f "${D}"/etc/postfix/{*LICENSE,access,aliases,canonical,generic} |
951 |
rm -f "${D}"/etc/postfix/{header_checks,relocated,transport,virtual} |
952 |
} |
953 |
|
954 |
pkg_postinst() { |
955 |
# Do not install server.{key,pem) SSL certificates if they already exist |
956 |
if use ssl && [[ ! -f "${ROOT}"/etc/ssl/postfix/server.key \ |
957 |
&& ! -f "${ROOT}"/etc/ssl/postfix/server.pem ]] ; then |
958 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Postfix SMTP Server}" |
959 |
install_cert /etc/ssl/postfix/server |
960 |
chown postfix:mail "${ROOT}"/etc/ssl/postfix/server.{key,pem} |
961 |
fi |
962 |
|
963 |
if [[ ! -e /etc/mail/aliases.db ]] ; then |
964 |
ewarn |
965 |
ewarn "You must edit /etc/mail/aliases to suit your needs" |
966 |
ewarn "and then run /usr/bin/newaliases. Postfix will not" |
967 |
ewarn "work correctly without it." |
968 |
ewarn |
969 |
fi |
970 |
|
971 |
elog "See the RELEASE_NOTES file in /usr/share/doc/${PF}" |
972 |
elog "for incompatibilities and other major changes between releases." |
973 |
} |