3 %bcond_without ldap # without LDAP map module
4 %bcond_without mysql # without MySQL map module
5 %bcond_without pgsql # without PostgreSQL map module
6 %bcond_without sasl # without SMTP AUTH support
7 %bcond_without ssl # without SSL/TLS support
8 %bcond_without cdb # without cdb map support
9 #%bcond_with polish # with double English+Polish messages
12 # - check/fix 'polish' bcond
14 %define _tls_ipv6_ver 1.25-pf-2.1.3
15 Summary: Postfix Mail Transport Agent
16 Summary(cs): Postfix - program pro pøepravu po¹ty (MTA)
17 Summary(es): Postfix - Un MTA (Mail Transport Agent) de alto desempeño
18 Summary(fr): Agent de transport de courrier Postfix
19 Summary(pl): Serwer SMTP Postfix
20 Summary(pt_BR): Postfix - Um MTA (Mail Transport Agent) de alto desempenho
21 Summary(sk): Agent prenosu po¹ty Postfix
26 Group: Networking/Daemons
27 License: distributable
28 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz
29 # Source0-md5: 1f515b0d80cd1f9db0113240bf36f248
30 Source1: %{name}.aliases
33 Source5: %{name}.sysconfig
35 Source7: ftp://ftp.corpit.ru/pub/postfix/%{name}-dict_cdb-1.1.11-20021104.tar.gz
36 # Source7-md5: 5731b5081725f4688dc6fae119d617e4
37 Source8: http://www.ipnet6.org/postfix/download/tls+ipv6-%{_tls_ipv6_ver}.patch.gz
38 # Source8-md5: e013ff8d4aa49e17d7ee85419481cfc7
39 Patch0: %{name}-config.patch
40 Patch1: %{name}-conf_msg.patch
41 Patch2: %{name}-dynamicmaps.patch
42 Patch4: %{name}-master.cf_cyrus.patch
43 #Patch5: %{name}-pl.patch
44 Patch6: %{name}-cdb_man.patch
45 Patch8: %{name}-kill_warnings.patch
46 Patch9: %{name}-ipv6-kill_warnings.patch
47 URL: http://www.postfix.org/
49 %{?with_sasl:BuildRequires: cyrus-sasl-devel}
50 BuildRequires: db-devel
52 BuildRequires: libinet6 >= 0.20030228-1
53 %{?with_mysql:BuildRequires: mysql-devel}
54 %{?with_ldap:BuildRequires: openldap-devel >= 2.2.0}
55 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
56 BuildRequires: pcre-devel
57 %{?with_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
72 %{?with_cdb:Requires:tinycdb}
81 Obsoletes: sendmail-cf
82 Obsoletes: sendmail-doc
87 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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. 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. 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}-%{release}
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}-%{release}
163 Requires: openldap >= 2.2.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}-%{release}
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}-%{release}
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}-%{release}
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 %{?with_cdb:-a7}
209 zcat %{SOURCE8} | patch -p1 -s
214 #%{?with_polish:%patch5 -p1}
215 %{?with_cdb:%patch6 -p1}
218 %{?with_cdb:sh dict_cdb.sh}
221 %{__make} -f Makefile.init makefiles
223 %{__make} DEBUG="" OPT="%{rpmcflags}" \
224 %{!?with_ldap:LDAPSO=""} \
225 %{!?with_mysql:MYSQLSO=""} \
226 %{!?with_pgsql:PGSQLSO=""} \
227 CCARGS="%{?with_ldap:-DHAS_LDAP} -DHAS_PCRE %{?with_sasl:-DUSE_SASL_AUTH -I/usr/include/sasl} %{?with_mysql:-DHAS_MYSQL -I/usr/include/mysql} %{?with_pgsql:-DHAS_PGSQL -I/usr/include/postgresql} %{?with_ssl:-DHAS_SSL -I/usr/include/openssl} -DMAX_DYNAMIC_MAPS %{?with_cdb:-DHAS_CDB}" \
228 AUXLIBS="-ldb -lresolv %{?with_sasl:-lsasl} %{?with_ssl:-lssl -lcrypto} %{?with_cdb:-lcdb}"
231 rm -rf $RPM_BUILD_ROOT
232 install -d $RPM_BUILD_ROOT/etc/{cron.daily,rc.d/init.d,sysconfig} \
233 $RPM_BUILD_ROOT%{_sysconfdir}/{mail,sasl} \
234 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,/usr/lib}\
235 $RPM_BUILD_ROOT{%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
236 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
239 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
241 install -d sample-conf; mv -f conf/sample* sample-conf || :
243 install bin/* $RPM_BUILD_ROOT%{_sbindir}
244 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
245 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
246 sed -e's,^daemon_directory = .*,daemon_directory = %{_libdir}/postfix,' \
247 conf/main.cf > $RPM_BUILD_ROOT%{_sysconfdir}/mail/main.cf
249 for f in dns global master util ; do
250 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
251 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
253 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
254 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
256 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
258 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
259 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
260 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
261 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
262 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
263 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
265 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
266 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
267 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
269 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
270 {aliases,access,canonical,relocated,transport,virtual}{,.db}
272 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
274 rm -rf /etc/mail/makedefs.out /usr/share/man/cat*
277 rm -rf $RPM_BUILD_ROOT
280 if [ -n "`/usr/bin/getgid postfix`" ]; then
281 if [ "`getgid postfix`" != "62" ]; then
282 echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
286 /usr/sbin/groupadd -g 62 -r -f postfix
288 if [ -n "`/usr/bin/getgid maildrop`" ]; then
289 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
290 echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
294 /usr/sbin/groupadd -g 63 -r -f maildrop
296 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
297 if [ "`/bin/id -u postfix`" != "62" ]; then
298 echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
302 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
307 if ! grep -q "^postmaster:" /etc/mail/aliases; then
308 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
309 echo "postmaster: root" >>/etc/mail/aliases
311 if [ "$1" = "1" ]; then
312 # only on installation, not upgrade
313 if ! grep -q "^myhostname" /etc/mail/main.cf; then
314 postconf -e myhostname=`/bin/hostname -f`
317 postfix upgrade-configuration
321 /sbin/chkconfig --add postfix
322 if [ -f /var/lock/subsys/postfix ]; then
323 /etc/rc.d/init.d/postfix restart >&2
325 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
329 if [ "$1" = "0" ]; then
330 if [ -f /var/lock/subsys/postfix ]; then
331 /etc/rc.d/init.d/postfix stop >&2
333 /sbin/chkconfig --del postfix
338 if [ "$1" = "0" ]; then
339 /usr/sbin/groupdel maildrop 2> /dev/null
340 /usr/sbin/userdel postfix 2> /dev/null
341 /usr/sbin/groupdel postfix 2> /dev/null
344 %triggerpostun -- postfix < 1:1.1.2
346 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
347 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
348 > /etc/mail/master.cf.rpmtmp
349 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
352 %defattr(644,root,root,755)
353 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES
354 %doc README_FILES/*README
356 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
357 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
358 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
359 #%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/pcre_table
360 #%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/regexp_table
361 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
362 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
363 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
364 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/header_checks
365 #%ghost %{_sysconfdir}/mail/*.db
366 %dir %{_sysconfdir}/mail
367 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
368 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
369 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
370 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
371 %attr(755,root,root) %{_sysconfdir}/mail/post-install
372 %{_sysconfdir}/mail/postfix-files
373 %attr(740,root,root) /etc/cron.daily/postfix
374 %attr(754,root,root) /etc/rc.d/init.d/postfix
375 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
376 %{?with_sasl:%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sasl/smtpd.conf}
377 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
378 %attr(755,root,root) %{_bindir}/*
379 %attr(755,root,root) %{_sbindir}/s*
380 %attr(755,root,root) %{_sbindir}/postfix
381 %attr(755,root,root) %{_sbindir}/postalias
382 %attr(755,root,root) %{_sbindir}/postkick
383 %attr(755,root,root) %{_sbindir}/postl*
384 %attr(755,root,root) %{_sbindir}/postc*
385 %attr(755,root,root) %{_sbindir}/postmap
386 %attr(2755,root,maildrop) %{_sbindir}/postqueue
387 %attr(755,root,root) %{_sbindir}/postsuper
388 %attr(2755,root,maildrop) %{_sbindir}/postdrop
389 %attr(755,root,root) %{_sbindir}/qmqp-source
390 %attr(755,root,root) /usr/lib/sendmail
391 %dir %{_libdir}/postfix
392 %attr(755,root,root) %{_libdir}/postfix/[!d]*
393 %attr(755,root,root) %dir %{_var}/spool/postfix
394 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
395 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
396 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
397 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
398 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
399 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
400 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
401 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
402 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
403 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
404 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
405 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_libdir}/libpostfix-*.so
411 %{_includedir}/postfix
415 %defattr(644,root,root,755)
416 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
426 %defattr(644,root,root,755)
427 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
431 %defattr(644,root,root,755)
432 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so