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