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_mysql - no MySQL support
9 # _without_ldap - no LDAP support
11 %define tls_ver 0.8.11a-1.1.11-0.9.6d
12 Summary: Postfix Mail Transport Agent
13 Summary(cs): Postfix - program pro pøepravu po¹ty (MTA)
14 Summary(es): Postfix - Un MTA (Mail Transport Agent) de alto desempeño
15 Summary(fr): Agent de transport de courrier Postfix
16 Summary(pl): Serwer SMTP Postfix
17 Summary(pt_BR): Postfix - Um MTA (Mail Transport Agent) de alto desempenho
18 Summary(sk): Agent prenosu po¹ty Postfix
23 Group: Networking/Daemons
24 License: distributable
25 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz
26 Source1: %{name}.aliases
29 Source5: %{name}.sysconfig
30 Source6: ftp://ftp.aet.tu-cottbus.de/pub/pfixtls/pfixtls-%{tls_ver}.tar.gz
32 Patch0: %{name}-config.patch
33 Patch1: %{name}-conf_msg.patch
34 Patch2: %{name}-dynamicmaps.patch
35 Patch3: %{name}-pgsql.patch
36 Patch4: %{name}-master.cf_cyrus.patch
37 Patch5: %{name}-ipv6.patch
38 Patch6: %{name}-pl.patch
39 Patch7: %{name}-db.patch
40 URL: http://www.postfix.org/
42 %{!?_without_sasl:BuildRequires: cyrus-sasl-devel}
43 BuildRequires: db-devel
45 %{!?_without_ipv6:BuildRequires: libinet6 >= 0.20010420-3}
46 %{!?_without_mysql:BuildRequires: mysql-devel}
47 %{!?_without_ldap:BuildRequires: openldap-devel >= 2.0.0}
48 %{!?_without_ssl:BuildRequires: openssl-devel >= 0.9.6a}
49 BuildRequires: pcre-devel
50 %{!?_without_psql:BuildRequires: postgresql-devel}
53 Requires(pre): /usr/sbin/useradd
54 Requires(pre): /usr/sbin/groupadd
55 Requires(pre): /usr/bin/getgid
56 Requires(pre): /bin/id
57 Requires(post): /bin/hostname
58 Requires(post,postun):/sbin/ldconfig
59 Requires(post,preun):/sbin/chkconfig
60 Requires(postun): /usr/sbin/userdel
61 Requires(postun): /usr/sbin/groupdel
62 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70 Obsoletes: sendmail-cf
71 Obsoletes: sendmail-doc
78 Postfix is attempt to provide an alternative to the widely-used
79 Sendmail program. Postfix attempts to be fast, easy to administer, and
80 hopefully secure, while at the same time being sendmail compatible
81 enough to not upset your users. This version has IPv6 support.
84 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
85 você deseja um servidor SMTP *rápido*, instale este pacote.
88 Postfix es una alternativa para el mundialmente utilizado sendmail. Si
89 desea tener un servidor SMTP *rápido*, debe instalar este paquete.
92 Postfix (voir http://www.postfix.org/) se veut une alternative à
93 sendmail, responsable de l'acheminement de 70% des courriers
94 électroniques sur Internet. IBM en a suppotré le développement, mais
95 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
96 plus grand nombre de systèmes possible. Dans cette optique, il a été
97 écrit pour être totalement sous le contrôle de l'utilisateur.
100 Postfix (http://www.postfix.org/) e' un'alternativa al programma
101 sendmail utilizzato per la gestione del 70 per cento della posta
104 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
107 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
108 quale troverete le indicazioni per una corretta installazione e
109 configurazione di questo programma.
112 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
113 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
114 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
115 sendmailem by nie denerwowaæ Twoich u¿ytkowników. Ta wersja wspiera
118 %description -l pt_BR
119 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
120 você deseja um servidor SMTP *rápido*, instale este pacote.
123 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
124 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
125 elektronickej po¹ty doruèenej na Internete.
127 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
128 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
129 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
130 mô¾e vyvíja» podµa jeho pou¾ívateµov.
132 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
133 popísané kroky potrebné pred a po in¹talácii Postfixu.
136 Summary: Postfix loadable modules development package
137 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
138 Group: Development/Libraries
139 Requires: %{name} = %{version}
142 Header files to build additional map types for Postfix.
144 %description devel -l pl
145 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
148 Summary: LDAP map support for Postfix
149 Summary(pl): Obs³uga map LDAP dla Postfiksa
150 Group: Networking/Daemons
151 Requires: %{name} = %{version}
152 Requires: openldap >= 2.0.0
154 %description dict-ldap
155 This package provides support for LDAP maps in Postfix.
157 %description dict-ldap -l pl
158 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
161 Summary: MySQL map support for Postfix
162 Summary(pl): Obs³uga map MySQL dla Postfiksa
163 Group: Networking/Daemons
164 Requires: %{name} = %{version}
166 %description dict-mysql
167 This package provides support for MySQL maps in Postfix.
169 %description dict-mysql -l pl
170 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
173 Summary: PCRE map support for Postfix
174 Summary(pl): Obs³uga map PCRE dla Postfiksa
175 Group: Networking/Daemons
176 Requires: %{name} = %{version}
178 %description dict-pcre
179 This package provides support for PCRE maps in Postfix.
181 %description dict-pcre -l pl
182 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
185 Summary: PostgreSQL map support for Postfix
186 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
187 Group: Networking/Daemons
188 Requires: %{name} = %{version}
190 %description dict-pgsql
191 This package provides support for PostgreSQL maps in Postfix.
193 %description dict-pgsql -l pl
194 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
199 patch -p1 -s <pfixtls-%{tls_ver}/pfixtls.diff
204 %{!?_without_ipv6:%patch5 -p1}
205 %{?_with_polish:%patch6 -p1}
209 %{__make} -f Makefile.init makefiles
211 %{__make} DEBUG="" OPT="%{rpmcflags}" \
212 CCARGS="%{!?_without_ldap:-DHAS_LDAP} -DHAS_PCRE %{!?_without_sasl:-DUSE_SASL_AUTH} %{!?_without_mysql:-DHAS_MYSQL} %{!?_without_psql:-DHAS_PGSQL} %{!?_without_mysql:-I%{_includedir}/mysql} %{!?_without_psql:-I%{_includedir}/postgresql} %{!?_without_ssl:-DHAS_SSL -I%{_includedir}/openssl} -DMAX_DYNAMIC_MAPS" \
213 AUXLIBS="-ldb -lresolv %{!?_without_sasl:-lsasl} %{!?_without_ssl:-lssl -lcrypto}"
216 rm -rf $RPM_BUILD_ROOT
217 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{mail,cron.daily,rc.d/init.d,sasl,sysconfig} \
218 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
219 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
222 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
224 install -d sample-conf; mv -f conf/sample* sample-conf/ || :
226 install bin/* $RPM_BUILD_ROOT%{_sbindir}
227 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
228 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
230 for f in dns global master util ; do
231 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
232 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
234 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
235 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
237 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
239 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
240 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
241 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
242 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
243 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
244 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
246 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
247 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
248 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
250 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
251 {aliases,access,canonical,relocated,transport,virtual}{,.db}
253 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
256 rm -rf $RPM_BUILD_ROOT
259 if [ -n "`/usr/bin/getgid postfix`" ]; then
260 if [ "`getgid postfix`" != "62" ]; then
261 echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
265 /usr/sbin/groupadd -g 62 -r -f postfix
267 if [ -n "`/usr/bin/getgid maildrop`" ]; then
268 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
269 echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
273 /usr/sbin/groupadd -g 63 -r -f maildrop
275 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
276 if [ "`/bin/id -u postfix`" != "62" ]; then
277 echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
281 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
286 if ! grep -q "^postmaster:" /etc/mail/aliases; then
287 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
288 echo "postmaster: root" >>/etc/mail/aliases
290 if ! grep -q "^myhostname" /etc/mail/main.cf; then
291 postconf -e myhostname=`/bin/hostname -f`
295 /sbin/chkconfig --add postfix
296 if [ -f /var/lock/subsys/postfix ]; then
297 /etc/rc.d/init.d/postfix restart >&2
299 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
303 if [ "$1" = "0" ]; then
304 if [ -f /var/lock/subsys/postfix ]; then
305 /etc/rc.d/init.d/postfix stop >&2
307 /sbin/chkconfig --del postfix
312 if [ "$1" = "0" ]; then
313 /usr/sbin/groupdel maildrop 2> /dev/null
314 /usr/sbin/userdel postfix 2> /dev/null
315 /usr/sbin/groupdel postfix 2> /dev/null
318 %triggerpostun -- postfix < 1:1.1.2
319 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
320 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
321 > /etc/mail/master.cf.rpmtmp
322 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
325 %defattr(644,root,root,755)
326 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES
327 %doc README_FILES/*README
329 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
330 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
331 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
332 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
333 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
334 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
335 #%ghost %{_sysconfdir}/mail/*.db
336 %dir %{_sysconfdir}/mail
337 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
338 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
339 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
340 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
341 %attr(755,root,root) %{_sysconfdir}/mail/post-install
342 %{_sysconfdir}/mail/postfix-files
343 %attr(740,root,root) /etc/cron.daily/postfix
344 %attr(754,root,root) /etc/rc.d/init.d/postfix
345 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
346 %{!?_without_sasl:%config(noreplace) %verify(not size mtime md5) /etc/sasl/smtpd.conf}
347 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
348 %attr(755,root,root) %{_bindir}/*
349 %attr(755,root,root) %{_sbindir}/s*
350 %attr(755,root,root) %{_sbindir}/postfix
351 %attr(755,root,root) %{_sbindir}/postalias
352 %attr(755,root,root) %{_sbindir}/postkick
353 %attr(755,root,root) %{_sbindir}/postl*
354 %attr(755,root,root) %{_sbindir}/postc*
355 %attr(755,root,root) %{_sbindir}/postmap
356 %attr(2755,root,maildrop) %{_sbindir}/postqueue
357 %attr(755,root,root) %{_sbindir}/postsuper
358 %attr(2755,root,maildrop) %{_sbindir}/postdrop
359 %attr(755,root,root) %{_sbindir}/qmqp-source
360 %attr(755,root,root) %{_libdir}/sendmail
361 %dir %{_libdir}/postfix
362 %attr(755,root,root) %{_libdir}/postfix/[^d]*
363 %attr(755,root,root) %dir %{_var}/spool/postfix
364 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
365 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
366 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
367 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
368 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
369 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
370 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
371 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
372 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
373 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
374 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
375 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
379 %defattr(644,root,root,755)
380 %attr(755,root,root) %{_libdir}/libpostfix-*.so
381 %{_includedir}/postfix
383 %if %{!?_without_ldap:1}%{?_without_ldap:0}
385 %defattr(644,root,root,755)
386 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
389 %if %{!?_without_mysql:1}%{?_without_mysql:0}
391 %defattr(644,root,root,755)
392 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
396 %defattr(644,root,root,755)
397 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
399 %if %{!?_without_psql:1}%{?_without_psql:0}
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so