3 # --without sasl - build without SMTP AUTH support
4 # --without ssl - build without SSL/TLS support
5 # --without ipv6 - build without IPv6 support
6 # --with polish - build with polish messages support
7 # _without_psql - no Postgres support
8 # _without_ldap - no LDAP support
10 %define tls_ver 0.8.11a-1.1.11-0.9.6d
11 Summary: Postfix Mail Transport Agent
12 Summary(cs): Postfix - program pro pøepravu po¹ty (MTA)
13 Summary(es): Postfix - Un MTA (Mail Transport Agent) de alto desempeño
14 Summary(fr): Agent de transport de courrier Postfix
15 Summary(pl): Serwer SMTP Postfix
16 Summary(pt_BR): Postfix - Um MTA (Mail Transport Agent) de alto desempenho
17 Summary(sk): Agent prenosu po¹ty Postfix
22 Group: Networking/Daemons
23 License: distributable
24 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz
25 Source1: %{name}.aliases
28 Source5: %{name}.sysconfig
29 Source6: ftp://ftp.aet.tu-cottbus.de/pub/pfixtls/pfixtls-%{tls_ver}.tar.gz
31 Patch0: %{name}-config.patch
32 Patch1: %{name}-conf_msg.patch
33 Patch2: %{name}-dynamicmaps.patch
34 Patch3: %{name}-pgsql.patch
35 Patch4: %{name}-master.cf_cyrus.patch
36 Patch5: %{name}-ipv6.patch
37 Patch6: %{name}-pl.patch
38 URL: http://www.postfix.org/
40 %{!?_without_sasl:BuildRequires: cyrus-sasl-devel}
41 BuildRequires: db-devel
43 %{!?_without_ipv6:BuildRequires: libinet6 >= 0.20010420-3}
44 BuildRequires: mysql-devel
45 %{!?_without_ldap:BuildRequires: openldap-devel >= 2.0.0}
46 %{!?_without_ssl:BuildRequires: openssl-devel >= 0.9.6a}
47 BuildRequires: pcre-devel
48 %{!?_without_psql:BuildRequires: postgresql-devel}
51 Requires(pre): /usr/sbin/useradd
52 Requires(pre): /usr/sbin/groupadd
53 Requires(pre): /usr/bin/getgid
54 Requires(pre): /bin/id
55 Requires(post): /bin/hostname
56 Requires(post,postun):/sbin/ldconfig
57 Requires(post,preun):/sbin/chkconfig
58 Requires(postun): /usr/sbin/userdel
59 Requires(postun): /usr/sbin/groupdel
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 Obsoletes: sendmail-cf
69 Obsoletes: sendmail-doc
76 Postfix is attempt to provide an alternative to the widely-used
77 Sendmail program. Postfix attempts to be fast, easy to administer, and
78 hopefully secure, while at the same time being sendmail compatible
79 enough to not upset your users. This version has IPv6 support.
82 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
83 você deseja um servidor SMTP *rápido*, instale este pacote.
86 Postfix es una alternativa para el mundialmente utilizado sendmail. Si
87 desea tener un servidor SMTP *rápido*, debe instalar este paquete.
90 Postfix (voir http://www.postfix.org/) se veut une alternative à
91 sendmail, responsable de l'acheminement de 70% des courriers
92 électroniques sur Internet. IBM en a suppotré le développement, mais
93 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
94 plus grand nombre de systèmes possible. Dans cette optique, il a été
95 écrit pour être totalement sous le contrôle de l'utilisateur.
98 Postfix (http://www.postfix.org/) e' un'alternativa al programma
99 sendmail utilizzato per la gestione del 70 per cento della posta
102 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
105 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
106 quale troverete le indicazioni per una corretta installazione e
107 configurazione di questo programma.
110 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
111 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
112 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
113 sendmailem by nie denerwowaæ Twoich u¿ytkowników. Ta wersja wspiera
116 %description -l pt_BR
117 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
118 você deseja um servidor SMTP *rápido*, instale este pacote.
121 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
122 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
123 elektronickej po¹ty doruèenej na Internete.
125 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
126 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
127 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
128 mô¾e vyvíja» podµa jeho pou¾ívateµov.
130 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
131 popísané kroky potrebné pred a po in¹talácii Postfixu.
134 Summary: Postfix loadable modules development package
135 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
136 Group: Development/Libraries
137 Requires: %{name} = %{version}
140 Header files to build additional map types for Postfix.
142 %description devel -l pl
143 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
146 Summary: LDAP map support for Postfix
147 Summary(pl): Obs³uga map LDAP dla Postfiksa
148 Group: Networking/Daemons
149 Requires: %{name} = %{version}
150 Requires: openldap >= 2.0.0
152 %description dict-ldap
153 This package provides support for LDAP maps in Postfix.
155 %description dict-ldap -l pl
156 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
159 Summary: MySQL map support for Postfix
160 Summary(pl): Obs³uga map MySQL dla Postfiksa
161 Group: Networking/Daemons
162 Requires: %{name} = %{version}
164 %description dict-mysql
165 This package provides support for MySQL maps in Postfix.
167 %description dict-mysql -l pl
168 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
171 Summary: PCRE map support for Postfix
172 Summary(pl): Obs³uga map PCRE dla Postfiksa
173 Group: Networking/Daemons
174 Requires: %{name} = %{version}
176 %description dict-pcre
177 This package provides support for PCRE maps in Postfix.
179 %description dict-pcre -l pl
180 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
183 Summary: PostgreSQL map support for Postfix
184 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
185 Group: Networking/Daemons
186 Requires: %{name} = %{version}
188 %description dict-pgsql
189 This package provides support for PostgreSQL maps in Postfix.
191 %description dict-pgsql -l pl
192 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
197 patch -p1 -s <pfixtls-%{tls_ver}/pfixtls.diff
202 %{!?_without_ipv6:%patch5 -p1}
203 %{?_with_polish:%patch6 -p1}
206 %{__make} -f Makefile.init makefiles
208 %{__make} DEBUG="" OPT="%{rpmcflags}" \
209 CCARGS="-DHAS_LDAP -DHAS_PCRE %{!?_without_sasl:-DUSE_SASL_AUTH} -DHAS_MYSQL -DHAS_PGSQL -I%{_includedir}/mysql -I%{_includedir}/postgresql %{!?_without_ssl:-DHAS_SSL -I%{_includedir}/openssl} -DMAX_DYNAMIC_MAPS" \
210 AUXLIBS="-ldb -lresolv %{!?_without_sasl:-lsasl} %{!?_without_ssl:-lssl -lcrypto}"
213 rm -rf $RPM_BUILD_ROOT
214 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{mail,cron.daily,rc.d/init.d,sasl,sysconfig} \
215 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
216 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
219 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
221 install -d sample-conf; mv -f conf/sample* sample-conf/ || :
223 install bin/* $RPM_BUILD_ROOT%{_sbindir}
224 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
225 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
227 for f in dns global master util ; do
228 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
229 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
231 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
232 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
234 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
236 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
237 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
238 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
239 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
240 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
241 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
243 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
244 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
245 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
247 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
248 {aliases,access,canonical,relocated,transport,virtual}{,.db}
250 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
253 rm -rf $RPM_BUILD_ROOT
256 if [ -n "`/usr/bin/getgid postfix`" ]; then
257 if [ "`getgid postfix`" != "62" ]; then
258 echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
262 /usr/sbin/groupadd -g 62 -r -f postfix
264 if [ -n "`/usr/bin/getgid maildrop`" ]; then
265 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
266 echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
270 /usr/sbin/groupadd -g 63 -r -f maildrop
272 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
273 if [ "`/bin/id -u postfix`" != "62" ]; then
274 echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
278 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
283 if ! grep -q "^postmaster:" /etc/mail/aliases; then
284 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
285 echo "postmaster: root" >>/etc/mail/aliases
287 if ! grep -q "^myhostname" /etc/mail/main.cf; then
288 postconf -e myhostname=`/bin/hostname -f`
292 /sbin/chkconfig --add postfix
293 if [ -f /var/lock/subsys/postfix ]; then
294 /etc/rc.d/init.d/postfix restart >&2
296 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
300 if [ "$1" = "0" ]; then
301 if [ -f /var/lock/subsys/postfix ]; then
302 /etc/rc.d/init.d/postfix stop >&2
304 /sbin/chkconfig --del postfix
309 if [ "$1" = "0" ]; then
310 /usr/sbin/groupdel maildrop 2> /dev/null
311 /usr/sbin/userdel postfix 2> /dev/null
312 /usr/sbin/groupdel postfix 2> /dev/null
315 %triggerpostun -- postfix < 1:1.1.2
316 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
317 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
318 > /etc/mail/master.cf.rpmtmp
319 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
322 %defattr(644,root,root,755)
323 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES
324 %doc README_FILES/*README
326 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
327 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
328 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
329 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
330 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
331 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
332 #%ghost %{_sysconfdir}/mail/*.db
333 %dir %{_sysconfdir}/mail
334 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
335 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
336 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
337 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
338 %attr(755,root,root) %{_sysconfdir}/mail/post-install
339 %{_sysconfdir}/mail/postfix-files
340 %attr(740,root,root) /etc/cron.daily/postfix
341 %attr(754,root,root) /etc/rc.d/init.d/postfix
342 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
343 %{!?_without_sasl:%config(noreplace) %verify(not size mtime md5) /etc/sasl/smtpd.conf}
344 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
345 %attr(755,root,root) %{_bindir}/*
346 %attr(755,root,root) %{_sbindir}/s*
347 %attr(755,root,root) %{_sbindir}/postfix
348 %attr(755,root,root) %{_sbindir}/postalias
349 %attr(755,root,root) %{_sbindir}/postkick
350 %attr(755,root,root) %{_sbindir}/postl*
351 %attr(755,root,root) %{_sbindir}/postc*
352 %attr(755,root,root) %{_sbindir}/postmap
353 %attr(2755,root,maildrop) %{_sbindir}/postqueue
354 %attr(755,root,root) %{_sbindir}/postsuper
355 %attr(2755,root,maildrop) %{_sbindir}/postdrop
356 %attr(755,root,root) %{_sbindir}/qmqp-source
357 %attr(755,root,root) %{_libdir}/sendmail
358 %dir %{_libdir}/postfix
359 %attr(755,root,root) %{_libdir}/postfix/[^d]*
360 %attr(755,root,root) %dir %{_var}/spool/postfix
361 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
362 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
363 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
364 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
365 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
366 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
367 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
368 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
369 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
370 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
371 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
372 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_libdir}/libpostfix-*.so
378 %{_includedir}/postfix
380 %if %{!?_without_ldap:1}%{?_without_ldap:0}
382 %defattr(644,root,root,755)
383 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
387 %defattr(644,root,root,755)
388 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
391 %defattr(644,root,root,755)
392 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
394 %if %{!?_without_psql:1}%{?_without_psql:0}
396 %defattr(644,root,root,755)
397 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so