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 URL: http://www.postfix.org/
54 %{?with_sasl:BuildRequires: cyrus-sasl-devel}
55 BuildRequires: db-devel
57 %{?with_ipv6:BuildRequires: libinet6 >= 0.20030228-1}
58 %{?with_mysql:BuildRequires: mysql-devel}
59 %{?with_ldap:BuildRequires: openldap-devel >= 2.0.0}
60 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7c}
61 BuildRequires: pcre-devel
62 %{?with_pgsql:BuildRequires: postgresql-devel}
63 %{?with_cdb:BuildRequires: tinycdb-devel}
66 Requires(pre): /usr/sbin/useradd
67 Requires(pre): /usr/sbin/groupadd
68 Requires(pre): /usr/bin/getgid
69 Requires(pre): /bin/id
70 Requires(post): /bin/hostname
71 Requires(post,postun): /sbin/ldconfig
72 Requires(post,preun): /sbin/chkconfig
73 Requires(postun): /usr/sbin/userdel
74 Requires(postun): /usr/sbin/groupdel
75 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
83 Obsoletes: sendmail-cf
84 Obsoletes: sendmail-doc
89 %{?with_cdb:Requires:tinycdb}
92 Postfix is attempt to provide an alternative to the widely-used
93 Sendmail program. Postfix attempts to be fast, easy to administer, and
94 hopefully secure, while at the same time being sendmail compatible
95 enough to not upset your users. %{?with_ipv6:This version has IPv6 support.}
98 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
99 você deseja um servidor SMTP *rápido*, instale este pacote.
102 Postfix es una alternativa para el mundialmente utilizado sendmail. Si
103 desea tener un servidor SMTP *rápido*, debe instalar este paquete.
106 Postfix (voir http://www.postfix.org/) se veut une alternative à
107 sendmail, responsable de l'acheminement de 70% des courriers
108 électroniques sur Internet. IBM en a suppotré le développement, mais
109 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
110 plus grand nombre de systèmes possible. Dans cette optique, il a été
111 écrit pour être totalement sous le contrôle de l'utilisateur.
114 Postfix (http://www.postfix.org/) e' un'alternativa al programma
115 sendmail utilizzato per la gestione del 70 per cento della posta
118 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
121 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
122 quale troverete le indicazioni per una corretta installazione e
123 configurazione di questo programma.
126 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
127 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
128 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
129 sendmailem by nie denerwowaæ Twoich u¿ytkowników. %{?with_ipv6:Ta wersja wspiera IPv6.}
131 %description -l pt_BR
132 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
133 você deseja um servidor SMTP *rápido*, instale este pacote.
136 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
137 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
138 elektronickej po¹ty doruèenej na Internete.
140 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
141 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
142 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
143 mô¾e vyvíja» podµa jeho pou¾ívateµov.
145 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
146 popísané kroky potrebné pred a po in¹talácii Postfixu.
149 Summary: Postfix loadable modules development package
150 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
151 Group: Development/Libraries
152 Requires: %{name} = %{epoch}:%{version}
155 Header files to build additional map types for Postfix.
157 %description devel -l pl
158 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
161 Summary: LDAP map support for Postfix
162 Summary(pl): Obs³uga map LDAP dla Postfiksa
163 Group: Networking/Daemons
164 Requires: %{name} = %{epoch}:%{version}
165 Requires: openldap >= 2.0.0
167 %description dict-ldap
168 This package provides support for LDAP maps in Postfix.
170 %description dict-ldap -l pl
171 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
174 Summary: MySQL map support for Postfix
175 Summary(pl): Obs³uga map MySQL dla Postfiksa
176 Group: Networking/Daemons
177 Requires: %{name} = %{epoch}:%{version}
179 %description dict-mysql
180 This package provides support for MySQL maps in Postfix.
182 %description dict-mysql -l pl
183 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
186 Summary: PCRE map support for Postfix
187 Summary(pl): Obs³uga map PCRE dla Postfiksa
188 Group: Networking/Daemons
189 Requires: %{name} = %{epoch}:%{version}
191 %description dict-pcre
192 This package provides support for PCRE maps in Postfix.
194 %description dict-pcre -l pl
195 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
198 Summary: PostgreSQL map support for Postfix
199 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
200 Group: Networking/Daemons
201 Requires: %{name} = %{epoch}:%{version}
203 %description dict-pgsql
204 This package provides support for PostgreSQL maps in Postfix.
206 %description dict-pgsql -l pl
207 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
210 %setup -q -a6 %{?with_cdb:-a8}
211 echo Postfix TLS patch:
212 patch -p1 -s <pfixtls-%{tls_ver}/pfixtls.diff
218 %{?with_ipv6:%patch5 -p1}
219 %{?with_polish:%patch6 -p1}
220 %{?with_cdb:%patch7 -p1}
222 %{?with_cdb:sh dict_cdb.sh}
225 %{__make} -f Makefile.init makefiles
227 %{__make} DEBUG="" OPT="%{rpmcflags}" \
228 %{!?with_ldap:LDAPSO=""} \
229 %{!?with_mysql:MYSQLSO=""} \
230 %{!?with_pgsql:PGSQLSO=""} \
231 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}" \
232 AUXLIBS="-ldb -lresolv %{?with_sasl:-lsasl} %{?with_ssl:-lssl -lcrypto} %{?with_cdb:-lcdb}"
235 rm -rf $RPM_BUILD_ROOT
236 install -d $RPM_BUILD_ROOT/etc/{cron.daily,rc.d/init.d,sysconfig} \
237 $RPM_BUILD_ROOT%{_sysconfdir}/{mail,sasl} \
238 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
239 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
242 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
244 install -d sample-conf; mv -f conf/sample* sample-conf || :
246 install bin/* $RPM_BUILD_ROOT%{_sbindir}
247 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
248 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
250 for f in dns global master util ; do
251 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
252 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
254 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
255 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
257 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
259 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
260 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
261 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
262 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
263 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
264 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
266 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
267 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
268 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
270 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
271 {aliases,access,canonical,relocated,transport,virtual}{,.db}
273 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
276 rm -rf $RPM_BUILD_ROOT
279 if [ -n "`/usr/bin/getgid postfix`" ]; then
280 if [ "`getgid postfix`" != "62" ]; then
281 echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
285 /usr/sbin/groupadd -g 62 -r -f postfix
287 if [ -n "`/usr/bin/getgid maildrop`" ]; then
288 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
289 echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
293 /usr/sbin/groupadd -g 63 -r -f maildrop
295 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
296 if [ "`/bin/id -u postfix`" != "62" ]; then
297 echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
301 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
306 if ! grep -q "^postmaster:" /etc/mail/aliases; then
307 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
308 echo "postmaster: root" >>/etc/mail/aliases
310 if ! grep -q "^myhostname" /etc/mail/main.cf; then
311 postconf -e myhostname=`/bin/hostname -f`
315 /sbin/chkconfig --add postfix
316 if [ -f /var/lock/subsys/postfix ]; then
317 /etc/rc.d/init.d/postfix restart >&2
319 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
323 if [ "$1" = "0" ]; then
324 if [ -f /var/lock/subsys/postfix ]; then
325 /etc/rc.d/init.d/postfix stop >&2
327 /sbin/chkconfig --del postfix
332 if [ "$1" = "0" ]; then
333 /usr/sbin/groupdel maildrop 2> /dev/null
334 /usr/sbin/userdel postfix 2> /dev/null
335 /usr/sbin/groupdel postfix 2> /dev/null
338 %triggerpostun -- postfix < 1:1.1.2
340 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
341 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
342 > /etc/mail/master.cf.rpmtmp
343 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
346 %defattr(644,root,root,755)
347 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES
348 %doc README_FILES/*README
350 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
351 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
352 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
353 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/pcre_table
354 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/regexp_table
355 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
356 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
357 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
358 #%ghost %{_sysconfdir}/mail/*.db
359 %dir %{_sysconfdir}/mail
360 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
361 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
362 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
363 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
364 %attr(755,root,root) %{_sysconfdir}/mail/post-install
365 %{_sysconfdir}/mail/postfix-files
366 %attr(740,root,root) /etc/cron.daily/postfix
367 %attr(754,root,root) /etc/rc.d/init.d/postfix
368 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
369 %{?with_sasl:%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sasl/smtpd.conf}
370 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
371 %attr(755,root,root) %{_bindir}/*
372 %attr(755,root,root) %{_sbindir}/s*
373 %attr(755,root,root) %{_sbindir}/postfix
374 %attr(755,root,root) %{_sbindir}/postalias
375 %attr(755,root,root) %{_sbindir}/postkick
376 %attr(755,root,root) %{_sbindir}/postl*
377 %attr(755,root,root) %{_sbindir}/postc*
378 %attr(755,root,root) %{_sbindir}/postmap
379 %attr(2755,root,maildrop) %{_sbindir}/postqueue
380 %attr(755,root,root) %{_sbindir}/postsuper
381 %attr(2755,root,maildrop) %{_sbindir}/postdrop
382 %attr(755,root,root) %{_sbindir}/qmqp-source
383 %attr(755,root,root) %{_libdir}/sendmail
384 %dir %{_libdir}/postfix
385 %attr(755,root,root) %{_libdir}/postfix/[!d]*
386 %attr(755,root,root) %dir %{_var}/spool/postfix
387 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
388 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
389 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
390 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
391 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
392 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
393 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
394 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
395 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
396 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
397 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
398 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_libdir}/libpostfix-*.so
404 %{_includedir}/postfix
408 %defattr(644,root,root,755)
409 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
419 %defattr(644,root,root,755)
420 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
424 %defattr(644,root,root,755)
425 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so