4 # - 0.0.0.0/0 is still being added to mynetworks if any ipv6/ip
8 # _without_ipv6 - without IPv6 support
9 # _without_ldap - without LDAP map module
10 # _without_mysql - without MySQL map module
11 # _without_pgsql - without PostgreSQL map module
12 # _without_sasl - without SMTP AUTH support
13 # _without_ssl - without SSL/TLS support
14 # _with_polish - with double English+Polish messages
15 # _with_cdb - tinycdb mapfile support
17 %define tls_ver 0.8.13-2.0.6-0.9.7a
18 Summary: Postfix Mail Transport Agent
19 Summary(cs): Postfix - program pro pøepravu po¹ty (MTA)
20 Summary(es): Postfix - Un MTA (Mail Transport Agent) de alto desempeño
21 Summary(fr): Agent de transport de courrier Postfix
22 Summary(pl): Serwer SMTP Postfix
23 Summary(pt_BR): Postfix - Um MTA (Mail Transport Agent) de alto desempenho
24 Summary(sk): Agent prenosu po¹ty Postfix
29 Group: Networking/Daemons
30 License: distributable
31 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz
32 Source1: %{name}.aliases
35 Source5: %{name}.sysconfig
36 Source6: ftp://ftp.aet.tu-cottbus.de/pub/pfixtls/pfixtls-%{tls_ver}.tar.gz
38 Source8: ftp://ftp.corpit.ru/pub/postfix/%{name}-dict_cdb-1.1.11-20021104.tar.gz
39 Patch0: %{name}-config.patch
40 Patch1: %{name}-conf_msg.patch
41 Patch2: %{name}-dynamicmaps.patch
42 Patch3: %{name}-pgsql.patch
43 Patch4: %{name}-master.cf_cyrus.patch
44 Patch5: %{name}-ipv6.patch
45 Patch6: %{name}-pl.patch
46 Patch7: %{name}-cdb_man.patch
47 URL: http://www.postfix.org/
49 %{!?_without_sasl:BuildRequires: cyrus-sasl-devel}
50 BuildRequires: db-devel
52 %{!?_without_ipv6:BuildRequires: libinet6 >= 0.20030228-1}
53 %{!?_without_mysql:BuildRequires: mysql-devel}
54 %{!?_without_ldap:BuildRequires: openldap-devel >= 2.0.0}
55 %{!?_without_ssl:BuildRequires: openssl-devel >= 0.9.7a}
56 BuildRequires: pcre-devel
57 %{!?_without_pgsql:BuildRequires: postgresql-devel}
58 %{?_with_cdb:BuildRequires: tinycdb-devel}
61 Requires(pre): /usr/sbin/useradd
62 Requires(pre): /usr/sbin/groupadd
63 Requires(pre): /usr/bin/getgid
64 Requires(pre): /bin/id
65 Requires(post): /bin/hostname
66 Requires(post,postun): /sbin/ldconfig
67 Requires(post,preun): /sbin/chkconfig
68 Requires(postun): /usr/sbin/userdel
69 Requires(postun): /usr/sbin/groupdel
70 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
78 Obsoletes: sendmail-cf
79 Obsoletes: sendmail-doc
84 %{?_with_cdb:Requires:tinycdb}
87 Postfix is attempt to provide an alternative to the widely-used
88 Sendmail program. Postfix attempts to be fast, easy to administer, and
89 hopefully secure, while at the same time being sendmail compatible
90 enough to not upset your users. %{!?_without_ipv6:This version has IPv6 support.}
93 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
94 você deseja um servidor SMTP *rápido*, instale este pacote.
97 Postfix es una alternativa para el mundialmente utilizado sendmail. Si
98 desea tener un servidor SMTP *rápido*, debe instalar este paquete.
101 Postfix (voir http://www.postfix.org/) se veut une alternative à
102 sendmail, responsable de l'acheminement de 70% des courriers
103 électroniques sur Internet. IBM en a suppotré le développement, mais
104 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
105 plus grand nombre de systèmes possible. Dans cette optique, il a été
106 écrit pour être totalement sous le contrôle de l'utilisateur.
109 Postfix (http://www.postfix.org/) e' un'alternativa al programma
110 sendmail utilizzato per la gestione del 70 per cento della posta
113 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
116 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
117 quale troverete le indicazioni per una corretta installazione e
118 configurazione di questo programma.
121 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
122 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
123 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
124 sendmailem by nie denerwowaæ Twoich u¿ytkowników. %{!?_without_ipv6:Ta wersja wspiera IPv6.}
126 %description -l pt_BR
127 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
128 você deseja um servidor SMTP *rápido*, instale este pacote.
131 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
132 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
133 elektronickej po¹ty doruèenej na Internete.
135 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
136 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
137 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
138 mô¾e vyvíja» podµa jeho pou¾ívateµov.
140 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
141 popísané kroky potrebné pred a po in¹talácii Postfixu.
144 Summary: Postfix loadable modules development package
145 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
146 Group: Development/Libraries
147 Requires: %{name} = %{version}
150 Header files to build additional map types for Postfix.
152 %description devel -l pl
153 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
156 Summary: LDAP map support for Postfix
157 Summary(pl): Obs³uga map LDAP dla Postfiksa
158 Group: Networking/Daemons
159 Requires: %{name} = %{version}
160 Requires: openldap >= 2.0.0
162 %description dict-ldap
163 This package provides support for LDAP maps in Postfix.
165 %description dict-ldap -l pl
166 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
169 Summary: MySQL map support for Postfix
170 Summary(pl): Obs³uga map MySQL dla Postfiksa
171 Group: Networking/Daemons
172 Requires: %{name} = %{version}
174 %description dict-mysql
175 This package provides support for MySQL maps in Postfix.
177 %description dict-mysql -l pl
178 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
181 Summary: PCRE map support for Postfix
182 Summary(pl): Obs³uga map PCRE dla Postfiksa
183 Group: Networking/Daemons
184 Requires: %{name} = %{version}
186 %description dict-pcre
187 This package provides support for PCRE maps in Postfix.
189 %description dict-pcre -l pl
190 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
193 Summary: PostgreSQL map support for Postfix
194 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
195 Group: Networking/Daemons
196 Requires: %{name} = %{version}
198 %description dict-pgsql
199 This package provides support for PostgreSQL maps in Postfix.
201 %description dict-pgsql -l pl
202 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
205 %setup -q -a6 %{?_with_cdb:-a8}
206 echo Postfix TLS patch:
207 patch -p1 -s <pfixtls-%{tls_ver}/pfixtls.diff
213 %{!?_without_ipv6:%patch5 -p1}
214 %{?_with_polish:%patch6 -p1}
215 %{?_with_cdb:%patch7 -p1}
216 %{?_with_cdb:sh dict_cdb.sh}
219 %{__make} -f Makefile.init makefiles
221 %{__make} DEBUG="" OPT="%{rpmcflags}" \
222 %{?_without_ldap:LDAPSO=""} \
223 %{?_without_mysql:MYSQLSO=""} \
224 %{?_without_pgsql:PGSQLSO=""} \
225 CCARGS="%{!?_without_ldap:-DHAS_LDAP} -DHAS_PCRE %{!?_without_sasl:-DUSE_SASL_AUTH -I/usr/include/sasl} %{!?_without_mysql:-DHAS_MYSQL -I/usr/include/mysql} %{!?_without_pgsql:-DHAS_PGSQL -I/usr/include/postgresql} %{!?_without_ssl:-DHAS_SSL -I/usr/include/openssl} -DMAX_DYNAMIC_MAPS %{?_with_cdb:-DHAS_CDB -I/usr/include/cdb.h}" \
226 AUXLIBS="-ldb -lresolv %{!?_without_sasl:-lsasl} %{!?_without_ssl:-lssl -lcrypto} %{?_with_cdb:-L/usr/lib/libcdb.a -lcdb}"
229 rm -rf $RPM_BUILD_ROOT
230 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{mail,cron.daily,rc.d/init.d,sasl,sysconfig} \
231 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
232 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
235 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
237 install -d sample-conf; mv -f conf/sample* sample-conf/ || :
239 install bin/* $RPM_BUILD_ROOT%{_sbindir}
240 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
241 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
243 for f in dns global master util ; do
244 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
245 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
247 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
248 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
250 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
252 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
253 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
254 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
255 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
256 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
257 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
259 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
260 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
261 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
263 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
264 {aliases,access,canonical,relocated,transport,virtual}{,.db}
266 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
269 rm -rf $RPM_BUILD_ROOT
272 if [ -n "`/usr/bin/getgid postfix`" ]; then
273 if [ "`getgid postfix`" != "62" ]; then
274 echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
278 /usr/sbin/groupadd -g 62 -r -f postfix
280 if [ -n "`/usr/bin/getgid maildrop`" ]; then
281 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
282 echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
286 /usr/sbin/groupadd -g 63 -r -f maildrop
288 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
289 if [ "`/bin/id -u postfix`" != "62" ]; then
290 echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
294 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
299 if ! grep -q "^postmaster:" /etc/mail/aliases; then
300 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
301 echo "postmaster: root" >>/etc/mail/aliases
303 if ! grep -q "^myhostname" /etc/mail/main.cf; then
304 postconf -e myhostname=`/bin/hostname -f`
308 /sbin/chkconfig --add postfix
309 if [ -f /var/lock/subsys/postfix ]; then
310 /etc/rc.d/init.d/postfix restart >&2
312 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
316 if [ "$1" = "0" ]; then
317 if [ -f /var/lock/subsys/postfix ]; then
318 /etc/rc.d/init.d/postfix stop >&2
320 /sbin/chkconfig --del postfix
325 if [ "$1" = "0" ]; then
326 /usr/sbin/groupdel maildrop 2> /dev/null
327 /usr/sbin/userdel postfix 2> /dev/null
328 /usr/sbin/groupdel postfix 2> /dev/null
331 %triggerpostun -- postfix < 1:1.1.2
333 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
334 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
335 > /etc/mail/master.cf.rpmtmp
336 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
339 %defattr(644,root,root,755)
340 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES
341 %doc README_FILES/*README
343 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
344 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
345 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
346 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/pcre_table
347 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/regexp_table
348 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
349 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
350 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
351 #%ghost %{_sysconfdir}/mail/*.db
352 %dir %{_sysconfdir}/mail
353 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
354 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
355 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
356 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
357 %attr(755,root,root) %{_sysconfdir}/mail/post-install
358 %{_sysconfdir}/mail/postfix-files
359 %attr(740,root,root) /etc/cron.daily/postfix
360 %attr(754,root,root) /etc/rc.d/init.d/postfix
361 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
362 %{!?_without_sasl:%config(noreplace) %verify(not size mtime md5) /etc/sasl/smtpd.conf}
363 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
364 %attr(755,root,root) %{_bindir}/*
365 %attr(755,root,root) %{_sbindir}/s*
366 %attr(755,root,root) %{_sbindir}/postfix
367 %attr(755,root,root) %{_sbindir}/postalias
368 %attr(755,root,root) %{_sbindir}/postkick
369 %attr(755,root,root) %{_sbindir}/postl*
370 %attr(755,root,root) %{_sbindir}/postc*
371 %attr(755,root,root) %{_sbindir}/postmap
372 %attr(2755,root,maildrop) %{_sbindir}/postqueue
373 %attr(755,root,root) %{_sbindir}/postsuper
374 %attr(2755,root,maildrop) %{_sbindir}/postdrop
375 %attr(755,root,root) %{_sbindir}/qmqp-source
376 %attr(755,root,root) %{_libdir}/sendmail
377 %dir %{_libdir}/postfix
378 %attr(755,root,root) %{_libdir}/postfix/[^d]*
379 %attr(755,root,root) %dir %{_var}/spool/postfix
380 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
381 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
382 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
383 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
384 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
385 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
386 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
387 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
388 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
389 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
390 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
391 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{_libdir}/libpostfix-*.so
397 %{_includedir}/postfix
399 %if 0%{!?_without_ldap:1}
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
405 %if 0%{!?_without_mysql:1}
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
412 %defattr(644,root,root,755)
413 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
415 %if 0%{!?_without_pgsql:1}
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so