3 # - fix ipv6 patch against IPv4 RBLs
4 # - 0.0.0.0/0 is still being added to mynetworks if any ipv6/ip
9 %bcond_without ipv6 # without IPv6 support
10 %bcond_without ldap # without LDAP map module
11 %bcond_without mysql # without MySQL map module
12 %bcond_without pgsql # without PostgreSQL map module
13 %bcond_without sasl # without SMTP AUTH support
14 %bcond_without ssl # without SSL/TLS support
15 %bcond_with polish # with double English+Polish messages
16 %bcond_with cdb # with cdb map support
18 %define tls_ver 0.8.16-2.0.16-0.9.7b
19 Summary: Postfix Mail Transport Agent
20 Summary(cs): Postfix - program pro pøepravu po¹ty (MTA)
21 Summary(es): Postfix - Un MTA (Mail Transport Agent) de alto desempeño
22 Summary(fr): Agent de transport de courrier Postfix
23 Summary(pl): Serwer SMTP Postfix
24 Summary(pt_BR): Postfix - Um MTA (Mail Transport Agent) de alto desempenho
25 Summary(sk): Agent prenosu po¹ty Postfix
30 Group: Networking/Daemons
31 License: distributable
32 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz
33 # Source0-md5: ac13776442ba7708e683bc1bfbadab2f
34 Source1: %{name}.aliases
37 Source5: %{name}.sysconfig
38 Source6: ftp://ftp.aet.tu-cottbus.de/pub/pfixtls/pfixtls-%{tls_ver}.tar.gz
39 # Source6-md5: b39c08eabe807db4af5bcb1cafc9761e
41 Source8: ftp://ftp.corpit.ru/pub/postfix/%{name}-dict_cdb-1.1.11-20021104.tar.gz
42 # Source8-md5: 5731b5081725f4688dc6fae119d617e4
43 Patch0: %{name}-config.patch
44 Patch1: %{name}-conf_msg.patch
45 Patch2: %{name}-dynamicmaps.patch
46 Patch3: %{name}-pgsql.patch
47 Patch4: %{name}-master.cf_cyrus.patch
48 Patch5: %{name}-ipv6.patch
49 Patch6: %{name}-pl.patch
50 Patch7: %{name}-cdb_man.patch
51 Patch8: %{name}-ns-mx-acl.patch
52 Patch9: %{name}-kill_warnings.patch
53 URL: http://www.postfix.org/
55 %{?with_sasl:BuildRequires: cyrus-sasl-devel}
56 BuildRequires: db-devel
58 %{?with_ipv6:BuildRequires: libinet6 >= 0.20030228-1}
59 %{?with_mysql:BuildRequires: mysql-devel}
60 %{?with_ldap:BuildRequires: openldap-devel >= 2.0.0}
61 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7c}
62 BuildRequires: pcre-devel
63 %{?with_pgsql:BuildRequires: postgresql-devel}
64 %{?with_cdb:BuildRequires: tinycdb-devel}
67 Requires(pre): /usr/sbin/useradd
68 Requires(pre): /usr/sbin/groupadd
69 Requires(pre): /usr/bin/getgid
70 Requires(pre): /bin/id
71 Requires(post): /bin/hostname
72 Requires(post,postun): /sbin/ldconfig
73 Requires(post,preun): /sbin/chkconfig
74 Requires(postun): /usr/sbin/userdel
75 Requires(postun): /usr/sbin/groupdel
76 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
84 Obsoletes: sendmail-cf
85 Obsoletes: sendmail-doc
90 %{?with_cdb:Requires:tinycdb}
93 Postfix is attempt to provide an alternative to the widely-used
94 Sendmail program. Postfix attempts to be fast, easy to administer, and
95 hopefully secure, while at the same time being sendmail compatible
96 enough to not upset your users. %{?with_ipv6:This version has IPv6 support.}
99 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
100 você deseja um servidor SMTP *rápido*, instale este pacote.
103 Postfix es una alternativa para el mundialmente utilizado sendmail. Si
104 desea tener un servidor SMTP *rápido*, debe instalar este paquete.
107 Postfix (voir http://www.postfix.org/) se veut une alternative à
108 sendmail, responsable de l'acheminement de 70% des courriers
109 électroniques sur Internet. IBM en a suppotré le développement, mais
110 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
111 plus grand nombre de systèmes possible. Dans cette optique, il a été
112 écrit pour être totalement sous le contrôle de l'utilisateur.
115 Postfix (http://www.postfix.org/) e' un'alternativa al programma
116 sendmail utilizzato per la gestione del 70 per cento della posta
119 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
122 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
123 quale troverete le indicazioni per una corretta installazione e
124 configurazione di questo programma.
127 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
128 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
129 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
130 sendmailem by nie denerwowaæ Twoich u¿ytkowników. %{?with_ipv6:Ta wersja wspiera IPv6.}
132 %description -l pt_BR
133 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
134 você deseja um servidor SMTP *rápido*, instale este pacote.
137 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
138 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
139 elektronickej po¹ty doruèenej na Internete.
141 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
142 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
143 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
144 mô¾e vyvíja» podµa jeho pou¾ívateµov.
146 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
147 popísané kroky potrebné pred a po in¹talácii Postfixu.
150 Summary: Postfix loadable modules development package
151 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
152 Group: Development/Libraries
153 Requires: %{name} = %{epoch}:%{version}
156 Header files to build additional map types for Postfix.
158 %description devel -l pl
159 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
162 Summary: LDAP map support for Postfix
163 Summary(pl): Obs³uga map LDAP dla Postfiksa
164 Group: Networking/Daemons
165 Requires: %{name} = %{epoch}:%{version}
166 Requires: openldap >= 2.0.0
168 %description dict-ldap
169 This package provides support for LDAP maps in Postfix.
171 %description dict-ldap -l pl
172 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
175 Summary: MySQL map support for Postfix
176 Summary(pl): Obs³uga map MySQL dla Postfiksa
177 Group: Networking/Daemons
178 Requires: %{name} = %{epoch}:%{version}
180 %description dict-mysql
181 This package provides support for MySQL maps in Postfix.
183 %description dict-mysql -l pl
184 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
187 Summary: PCRE map support for Postfix
188 Summary(pl): Obs³uga map PCRE dla Postfiksa
189 Group: Networking/Daemons
190 Requires: %{name} = %{epoch}:%{version}
192 %description dict-pcre
193 This package provides support for PCRE maps in Postfix.
195 %description dict-pcre -l pl
196 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
199 Summary: PostgreSQL map support for Postfix
200 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
201 Group: Networking/Daemons
202 Requires: %{name} = %{epoch}:%{version}
204 %description dict-pgsql
205 This package provides support for PostgreSQL maps in Postfix.
207 %description dict-pgsql -l pl
208 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
211 %setup -q -a6 %{?with_cdb:-a8}
212 echo Postfix TLS patch:
213 patch -p1 -s <pfixtls-%{tls_ver}/pfixtls.diff
219 %{?with_ipv6:%patch5 -p1}
220 %{?with_polish:%patch6 -p1}
221 %{?with_cdb:%patch7 -p1}
224 %{?with_cdb:sh dict_cdb.sh}
227 %{__make} -f Makefile.init makefiles
229 %{__make} DEBUG="" OPT="%{rpmcflags}" \
230 %{!?with_ldap:LDAPSO=""} \
231 %{!?with_mysql:MYSQLSO=""} \
232 %{!?with_pgsql:PGSQLSO=""} \
233 CCARGS="%{?with_ldap:-DHAS_LDAP} -DHAS_PCRE %{?with_sasl:-DUSE_SASL_AUTH -I/usr/include/sasl} %{?with_mysql:-DHAS_MYSQL -I/usr/include/mysql} %{?with_pgsql:-DHAS_PGSQL -I/usr/include/postgresql} %{?with_ssl:-DHAS_SSL -I/usr/include/openssl} -DMAX_DYNAMIC_MAPS %{?with_cdb:-DHAS_CDB}" \
234 AUXLIBS="-ldb -lresolv %{?with_sasl:-lsasl} %{?with_ssl:-lssl -lcrypto} %{?with_cdb:-lcdb}"
237 rm -rf $RPM_BUILD_ROOT
238 install -d $RPM_BUILD_ROOT/etc/{cron.daily,rc.d/init.d,sysconfig} \
239 $RPM_BUILD_ROOT%{_sysconfdir}/{mail,sasl} \
240 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,/usr/lib}\
241 $RPM_BUILD_ROOT{%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
242 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
245 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
247 install -d sample-conf; mv -f conf/sample* sample-conf || :
249 install bin/* $RPM_BUILD_ROOT%{_sbindir}
250 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
251 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
252 sed -e's,^daemon_directory = .*,daemon_directory = %{_libdir}/postfix,' \
253 conf/main.cf > $RPM_BUILD_ROOT%{_sysconfdir}/mail/main.cf
255 for f in dns global master util ; do
256 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
257 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
259 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
260 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
262 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
264 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
265 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
266 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
267 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
268 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
269 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
271 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
272 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
273 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
275 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
276 {aliases,access,canonical,relocated,transport,virtual}{,.db}
278 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
281 rm -rf $RPM_BUILD_ROOT
284 if [ -n "`/usr/bin/getgid postfix`" ]; then
285 if [ "`getgid postfix`" != "62" ]; then
286 echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
290 /usr/sbin/groupadd -g 62 -r -f postfix
292 if [ -n "`/usr/bin/getgid maildrop`" ]; then
293 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
294 echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
298 /usr/sbin/groupadd -g 63 -r -f maildrop
300 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
301 if [ "`/bin/id -u postfix`" != "62" ]; then
302 echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
306 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
311 if ! grep -q "^postmaster:" /etc/mail/aliases; then
312 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
313 echo "postmaster: root" >>/etc/mail/aliases
315 if ! grep -q "^myhostname" /etc/mail/main.cf; then
316 postconf -e myhostname=`/bin/hostname -f`
320 /sbin/chkconfig --add postfix
321 if [ -f /var/lock/subsys/postfix ]; then
322 /etc/rc.d/init.d/postfix restart >&2
324 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
328 if [ "$1" = "0" ]; then
329 if [ -f /var/lock/subsys/postfix ]; then
330 /etc/rc.d/init.d/postfix stop >&2
332 /sbin/chkconfig --del postfix
337 if [ "$1" = "0" ]; then
338 /usr/sbin/groupdel maildrop 2> /dev/null
339 /usr/sbin/userdel postfix 2> /dev/null
340 /usr/sbin/groupdel postfix 2> /dev/null
343 %triggerpostun -- postfix < 1:1.1.2
345 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
346 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
347 > /etc/mail/master.cf.rpmtmp
348 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
351 %defattr(644,root,root,755)
352 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES
353 %doc README_FILES/*README
355 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
356 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
357 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
358 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/pcre_table
359 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/regexp_table
360 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
361 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
362 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
363 #%ghost %{_sysconfdir}/mail/*.db
364 %dir %{_sysconfdir}/mail
365 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
366 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
367 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
368 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
369 %attr(755,root,root) %{_sysconfdir}/mail/post-install
370 %{_sysconfdir}/mail/postfix-files
371 %attr(740,root,root) /etc/cron.daily/postfix
372 %attr(754,root,root) /etc/rc.d/init.d/postfix
373 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
374 %{?with_sasl:%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sasl/smtpd.conf}
375 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
376 %attr(755,root,root) %{_bindir}/*
377 %attr(755,root,root) %{_sbindir}/s*
378 %attr(755,root,root) %{_sbindir}/postfix
379 %attr(755,root,root) %{_sbindir}/postalias
380 %attr(755,root,root) %{_sbindir}/postkick
381 %attr(755,root,root) %{_sbindir}/postl*
382 %attr(755,root,root) %{_sbindir}/postc*
383 %attr(755,root,root) %{_sbindir}/postmap
384 %attr(2755,root,maildrop) %{_sbindir}/postqueue
385 %attr(755,root,root) %{_sbindir}/postsuper
386 %attr(2755,root,maildrop) %{_sbindir}/postdrop
387 %attr(755,root,root) %{_sbindir}/qmqp-source
388 %attr(755,root,root) /usr/lib/sendmail
389 %dir %{_libdir}/postfix
390 %attr(755,root,root) %{_libdir}/postfix/[!d]*
391 %attr(755,root,root) %dir %{_var}/spool/postfix
392 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
393 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
394 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
395 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
396 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
397 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
398 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
399 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
400 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
401 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
402 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
403 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_libdir}/libpostfix-*.so
409 %{_includedir}/postfix
413 %defattr(644,root,root,755)
414 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
424 %defattr(644,root,root,755)
425 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so