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.10-0.9.7b
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 # Source0-md5: 94ce611b6f3e169caee2b4634c6b5370
33 Source1: %{name}.aliases
36 Source5: %{name}.sysconfig
37 Source6: ftp://ftp.aet.tu-cottbus.de/pub/pfixtls/pfixtls-%{tls_ver}.tar.gz
38 # Source6-md5: 31f1e830882025957f735e5e9b7dd2fd
40 Source8: ftp://ftp.corpit.ru/pub/postfix/%{name}-dict_cdb-1.1.11-20021104.tar.gz
41 # Source8-md5: 5731b5081725f4688dc6fae119d617e4
42 Patch0: %{name}-config.patch
43 Patch1: %{name}-conf_msg.patch
44 Patch2: %{name}-dynamicmaps.patch
45 Patch3: %{name}-pgsql.patch
46 Patch4: %{name}-master.cf_cyrus.patch
47 Patch5: %{name}-ipv6.patch
48 Patch6: %{name}-pl.patch
49 Patch7: %{name}-cdb_man.patch
50 URL: http://www.postfix.org/
52 %{!?_without_sasl:BuildRequires: cyrus-sasl-devel}
53 BuildRequires: db-devel
55 %{!?_without_ipv6:BuildRequires: libinet6 >= 0.20030228-1}
56 %{!?_without_mysql:BuildRequires: mysql-devel}
57 %{!?_without_ldap:BuildRequires: openldap-devel >= 2.0.0}
58 %{!?_without_ssl:BuildRequires: openssl-devel >= 0.9.7b}
59 BuildRequires: pcre-devel
60 %{!?_without_pgsql:BuildRequires: postgresql-devel}
61 %{?_with_cdb:BuildRequires: tinycdb-devel}
64 Requires(pre): /usr/sbin/useradd
65 Requires(pre): /usr/sbin/groupadd
66 Requires(pre): /usr/bin/getgid
67 Requires(pre): /bin/id
68 Requires(post): /bin/hostname
69 Requires(post,postun): /sbin/ldconfig
70 Requires(post,preun): /sbin/chkconfig
71 Requires(postun): /usr/sbin/userdel
72 Requires(postun): /usr/sbin/groupdel
73 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81 Obsoletes: sendmail-cf
82 Obsoletes: sendmail-doc
87 %{?_with_cdb:Requires:tinycdb}
90 Postfix is attempt to provide an alternative to the widely-used
91 Sendmail program. Postfix attempts to be fast, easy to administer, and
92 hopefully secure, while at the same time being sendmail compatible
93 enough to not upset your users. %{!?_without_ipv6:This version has IPv6 support.}
96 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
97 você deseja um servidor SMTP *rápido*, instale este pacote.
100 Postfix es una alternativa para el mundialmente utilizado sendmail. Si
101 desea tener un servidor SMTP *rápido*, debe instalar este paquete.
104 Postfix (voir http://www.postfix.org/) se veut une alternative à
105 sendmail, responsable de l'acheminement de 70% des courriers
106 électroniques sur Internet. IBM en a suppotré le développement, mais
107 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
108 plus grand nombre de systèmes possible. Dans cette optique, il a été
109 écrit pour être totalement sous le contrôle de l'utilisateur.
112 Postfix (http://www.postfix.org/) e' un'alternativa al programma
113 sendmail utilizzato per la gestione del 70 per cento della posta
116 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
119 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
120 quale troverete le indicazioni per una corretta installazione e
121 configurazione di questo programma.
124 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
125 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
126 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
127 sendmailem by nie denerwowaæ Twoich u¿ytkowników. %{!?_without_ipv6:Ta wersja wspiera IPv6.}
129 %description -l pt_BR
130 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
131 você deseja um servidor SMTP *rápido*, instale este pacote.
134 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
135 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
136 elektronickej po¹ty doruèenej na Internete.
138 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
139 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
140 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
141 mô¾e vyvíja» podµa jeho pou¾ívateµov.
143 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
144 popísané kroky potrebné pred a po in¹talácii Postfixu.
147 Summary: Postfix loadable modules development package
148 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
149 Group: Development/Libraries
150 Requires: %{name} = %{epoch}:%{version}
153 Header files to build additional map types for Postfix.
155 %description devel -l pl
156 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
159 Summary: LDAP map support for Postfix
160 Summary(pl): Obs³uga map LDAP dla Postfiksa
161 Group: Networking/Daemons
162 Requires: %{name} = %{epoch}:%{version}
163 Requires: openldap >= 2.0.0
165 %description dict-ldap
166 This package provides support for LDAP maps in Postfix.
168 %description dict-ldap -l pl
169 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
172 Summary: MySQL map support for Postfix
173 Summary(pl): Obs³uga map MySQL dla Postfiksa
174 Group: Networking/Daemons
175 Requires: %{name} = %{epoch}:%{version}
177 %description dict-mysql
178 This package provides support for MySQL maps in Postfix.
180 %description dict-mysql -l pl
181 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
184 Summary: PCRE map support for Postfix
185 Summary(pl): Obs³uga map PCRE dla Postfiksa
186 Group: Networking/Daemons
187 Requires: %{name} = %{epoch}:%{version}
189 %description dict-pcre
190 This package provides support for PCRE maps in Postfix.
192 %description dict-pcre -l pl
193 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
196 Summary: PostgreSQL map support for Postfix
197 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
198 Group: Networking/Daemons
199 Requires: %{name} = %{epoch}:%{version}
201 %description dict-pgsql
202 This package provides support for PostgreSQL maps in Postfix.
204 %description dict-pgsql -l pl
205 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
208 %setup -q -a6 %{?_with_cdb:-a8}
209 echo Postfix TLS patch:
210 patch -p1 -s <pfixtls-%{tls_ver}/pfixtls.diff
216 %{!?_without_ipv6:%patch5 -p1}
217 %{?_with_polish:%patch6 -p1}
218 %{?_with_cdb:%patch7 -p1}
219 %{?_with_cdb:sh dict_cdb.sh}
222 %{__make} -f Makefile.init makefiles
224 %{__make} DEBUG="" OPT="%{rpmcflags}" \
225 %{?_without_ldap:LDAPSO=""} \
226 %{?_without_mysql:MYSQLSO=""} \
227 %{?_without_pgsql:PGSQLSO=""} \
228 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}" \
229 AUXLIBS="-ldb -lresolv %{!?_without_sasl:-lsasl} %{!?_without_ssl:-lssl -lcrypto} %{?_with_cdb:-L/usr/lib/libcdb.a -lcdb}"
232 rm -rf $RPM_BUILD_ROOT
233 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{mail,cron.daily,rc.d/init.d,sasl,sysconfig} \
234 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
235 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
238 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
240 install -d sample-conf; mv -f conf/sample* sample-conf/ || :
242 install bin/* $RPM_BUILD_ROOT%{_sbindir}
243 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
244 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
246 for f in dns global master util ; do
247 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
248 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
250 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
251 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
253 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
255 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
256 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
257 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
258 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
259 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
260 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
262 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
263 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
264 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
266 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
267 {aliases,access,canonical,relocated,transport,virtual}{,.db}
269 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
272 rm -rf $RPM_BUILD_ROOT
275 if [ -n "`/usr/bin/getgid postfix`" ]; then
276 if [ "`getgid postfix`" != "62" ]; then
277 echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
281 /usr/sbin/groupadd -g 62 -r -f postfix
283 if [ -n "`/usr/bin/getgid maildrop`" ]; then
284 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
285 echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
289 /usr/sbin/groupadd -g 63 -r -f maildrop
291 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
292 if [ "`/bin/id -u postfix`" != "62" ]; then
293 echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
297 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
302 if ! grep -q "^postmaster:" /etc/mail/aliases; then
303 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
304 echo "postmaster: root" >>/etc/mail/aliases
306 if ! grep -q "^myhostname" /etc/mail/main.cf; then
307 postconf -e myhostname=`/bin/hostname -f`
311 /sbin/chkconfig --add postfix
312 if [ -f /var/lock/subsys/postfix ]; then
313 /etc/rc.d/init.d/postfix restart >&2
315 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
319 if [ "$1" = "0" ]; then
320 if [ -f /var/lock/subsys/postfix ]; then
321 /etc/rc.d/init.d/postfix stop >&2
323 /sbin/chkconfig --del postfix
328 if [ "$1" = "0" ]; then
329 /usr/sbin/groupdel maildrop 2> /dev/null
330 /usr/sbin/userdel postfix 2> /dev/null
331 /usr/sbin/groupdel postfix 2> /dev/null
334 %triggerpostun -- postfix < 1:1.1.2
336 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
337 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
338 > /etc/mail/master.cf.rpmtmp
339 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
342 %defattr(644,root,root,755)
343 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES
344 %doc README_FILES/*README
346 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
347 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
348 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
349 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/pcre_table
350 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/regexp_table
351 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
352 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
353 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
354 #%ghost %{_sysconfdir}/mail/*.db
355 %dir %{_sysconfdir}/mail
356 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
357 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
358 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
359 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
360 %attr(755,root,root) %{_sysconfdir}/mail/post-install
361 %{_sysconfdir}/mail/postfix-files
362 %attr(740,root,root) /etc/cron.daily/postfix
363 %attr(754,root,root) /etc/rc.d/init.d/postfix
364 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
365 %{!?_without_sasl:%config(noreplace) %verify(not size mtime md5) /etc/sasl/smtpd.conf}
366 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
367 %attr(755,root,root) %{_bindir}/*
368 %attr(755,root,root) %{_sbindir}/s*
369 %attr(755,root,root) %{_sbindir}/postfix
370 %attr(755,root,root) %{_sbindir}/postalias
371 %attr(755,root,root) %{_sbindir}/postkick
372 %attr(755,root,root) %{_sbindir}/postl*
373 %attr(755,root,root) %{_sbindir}/postc*
374 %attr(755,root,root) %{_sbindir}/postmap
375 %attr(2755,root,maildrop) %{_sbindir}/postqueue
376 %attr(755,root,root) %{_sbindir}/postsuper
377 %attr(2755,root,maildrop) %{_sbindir}/postdrop
378 %attr(755,root,root) %{_sbindir}/qmqp-source
379 %attr(755,root,root) %{_libdir}/sendmail
380 %dir %{_libdir}/postfix
381 %attr(755,root,root) %{_libdir}/postfix/[^d]*
382 %attr(755,root,root) %dir %{_var}/spool/postfix
383 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
384 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
385 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
386 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
387 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
388 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
389 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
390 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
391 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
392 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
393 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
394 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
398 %defattr(644,root,root,755)
399 %attr(755,root,root) %{_libdir}/libpostfix-*.so
400 %{_includedir}/postfix
402 %if 0%{!?_without_ldap:1}
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
408 %if 0%{!?_without_mysql:1}
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
418 %if 0%{!?_without_pgsql:1}
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so