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,/usr/lib}\
239 $RPM_BUILD_ROOT{%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
240 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
243 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
245 install -d sample-conf; mv -f conf/sample* sample-conf || :
247 install bin/* $RPM_BUILD_ROOT%{_sbindir}
248 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
249 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
251 for f in dns global master util ; do
252 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
253 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
255 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
256 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
258 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
260 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
261 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
262 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
263 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
264 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
265 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
267 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
268 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
269 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
271 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
272 {aliases,access,canonical,relocated,transport,virtual}{,.db}
274 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
277 rm -rf $RPM_BUILD_ROOT
280 if [ -n "`/usr/bin/getgid postfix`" ]; then
281 if [ "`getgid postfix`" != "62" ]; then
282 echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
286 /usr/sbin/groupadd -g 62 -r -f postfix
288 if [ -n "`/usr/bin/getgid maildrop`" ]; then
289 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
290 echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
294 /usr/sbin/groupadd -g 63 -r -f maildrop
296 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
297 if [ "`/bin/id -u postfix`" != "62" ]; then
298 echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
302 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
307 if ! grep -q "^postmaster:" /etc/mail/aliases; then
308 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
309 echo "postmaster: root" >>/etc/mail/aliases
311 if ! grep -q "^myhostname" /etc/mail/main.cf; then
312 postconf -e myhostname=`/bin/hostname -f`
316 /sbin/chkconfig --add postfix
317 if [ -f /var/lock/subsys/postfix ]; then
318 /etc/rc.d/init.d/postfix restart >&2
320 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
324 if [ "$1" = "0" ]; then
325 if [ -f /var/lock/subsys/postfix ]; then
326 /etc/rc.d/init.d/postfix stop >&2
328 /sbin/chkconfig --del postfix
333 if [ "$1" = "0" ]; then
334 /usr/sbin/groupdel maildrop 2> /dev/null
335 /usr/sbin/userdel postfix 2> /dev/null
336 /usr/sbin/groupdel postfix 2> /dev/null
339 %triggerpostun -- postfix < 1:1.1.2
341 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
342 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
343 > /etc/mail/master.cf.rpmtmp
344 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
347 %defattr(644,root,root,755)
348 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES
349 %doc README_FILES/*README
351 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
352 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
353 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
354 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/pcre_table
355 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/regexp_table
356 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
357 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
358 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
359 #%ghost %{_sysconfdir}/mail/*.db
360 %dir %{_sysconfdir}/mail
361 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
362 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
363 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
364 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
365 %attr(755,root,root) %{_sysconfdir}/mail/post-install
366 %{_sysconfdir}/mail/postfix-files
367 %attr(740,root,root) /etc/cron.daily/postfix
368 %attr(754,root,root) /etc/rc.d/init.d/postfix
369 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
370 %{?with_sasl:%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sasl/smtpd.conf}
371 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
372 %attr(755,root,root) %{_bindir}/*
373 %attr(755,root,root) %{_sbindir}/s*
374 %attr(755,root,root) %{_sbindir}/postfix
375 %attr(755,root,root) %{_sbindir}/postalias
376 %attr(755,root,root) %{_sbindir}/postkick
377 %attr(755,root,root) %{_sbindir}/postl*
378 %attr(755,root,root) %{_sbindir}/postc*
379 %attr(755,root,root) %{_sbindir}/postmap
380 %attr(2755,root,maildrop) %{_sbindir}/postqueue
381 %attr(755,root,root) %{_sbindir}/postsuper
382 %attr(2755,root,maildrop) %{_sbindir}/postdrop
383 %attr(755,root,root) %{_sbindir}/qmqp-source
384 %attr(755,root,root) /usr/lib/sendmail
385 %dir %{_libdir}/postfix
386 %attr(755,root,root) %{_libdir}/postfix/[!d]*
387 %attr(755,root,root) %dir %{_var}/spool/postfix
388 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
389 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
390 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
391 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
392 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
393 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
394 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
395 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
396 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
397 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
398 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
399 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_libdir}/libpostfix-*.so
405 %{_includedir}/postfix
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
425 %defattr(644,root,root,755)
426 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so