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 # with cdb map support
9 %bcond_with polish # with double English+Polish messages
11 %define _tls_ipv6_ver 1.20-pf-2.0.16
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 # Source0-md5: 3e5baf2cc497a5fb1aaa6ba11aa6491e
27 Source1: %{name}.aliases
30 Source5: %{name}.sysconfig
32 Source7: ftp://ftp.corpit.ru/pub/postfix/%{name}-dict_cdb-1.1.11-20021104.tar.gz
33 # Source7-md5: 5731b5081725f4688dc6fae119d617e4
34 Source8: http://www.ipnet6.org/postfix/download/tls+ipv6-%{_tls_ipv6_ver}.patch.gz
35 # Source8-md5: 9e26a2bb0cf36d6a9739c501ec26246a
36 Patch0: %{name}-config.patch
37 Patch1: %{name}-conf_msg.patch
38 Patch2: %{name}-dynamicmaps.patch
39 Patch3: %{name}-pgsql.patch
40 Patch4: %{name}-master.cf_cyrus.patch
41 Patch5: %{name}-pl.patch
42 Patch6: %{name}-cdb_man.patch
43 Patch7: %{name}-ns-mx-acl.patch
44 Patch8: %{name}-kill_warnings.patch
45 Patch9: %{name}-ipv6-kill_warnings.patch
46 URL: http://www.postfix.org/
48 %{?with_sasl:BuildRequires: cyrus-sasl-devel}
49 BuildRequires: db-devel
51 BuildRequires: libinet6 >= 0.20030228-1
52 %{?with_mysql:BuildRequires: mysql-devel}
53 %{?with_ldap:BuildRequires: openldap-devel >= 2.0.0}
54 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7c}
55 BuildRequires: pcre-devel
56 %{?with_pgsql:BuildRequires: postgresql-devel}
57 %{?with_cdb:BuildRequires: tinycdb-devel}
60 Requires(pre): /usr/sbin/useradd
61 Requires(pre): /usr/sbin/groupadd
62 Requires(pre): /usr/bin/getgid
63 Requires(pre): /bin/id
64 Requires(post): /bin/hostname
65 Requires(post,postun): /sbin/ldconfig
66 Requires(post,preun): /sbin/chkconfig
67 Requires(postun): /usr/sbin/userdel
68 Requires(postun): /usr/sbin/groupdel
76 Obsoletes: sendmail-cf
77 Obsoletes: sendmail-doc
82 %{?with_cdb:Requires:tinycdb}
83 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
86 Postfix is attempt to provide an alternative to the widely-used
87 Sendmail program. Postfix attempts to be fast, easy to administer, and
88 hopefully secure, while at the same time being sendmail compatible
89 enough to not upset your users. This version has IPv6 support.
92 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
93 você deseja um servidor SMTP *rápido*, instale este pacote.
96 Postfix es una alternativa para el mundialmente utilizado sendmail. Si
97 desea tener un servidor SMTP *rápido*, debe instalar este paquete.
100 Postfix (voir http://www.postfix.org/) se veut une alternative à
101 sendmail, responsable de l'acheminement de 70% des courriers
102 électroniques sur Internet. IBM en a suppotré le développement, mais
103 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
104 plus grand nombre de systèmes possible. Dans cette optique, il a été
105 écrit pour être totalement sous le contrôle de l'utilisateur.
108 Postfix (http://www.postfix.org/) e' un'alternativa al programma
109 sendmail utilizzato per la gestione del 70 per cento della posta
112 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
115 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
116 quale troverete le indicazioni per una corretta installazione e
117 configurazione di questo programma.
120 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
121 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
122 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
123 sendmailem by nie denerwowaæ Twoich u¿ytkowników. Ta wersja wspiera IPv6.
125 %description -l pt_BR
126 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
127 você deseja um servidor SMTP *rápido*, instale este pacote.
130 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
131 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
132 elektronickej po¹ty doruèenej na Internete.
134 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
135 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
136 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
137 mô¾e vyvíja» podµa jeho pou¾ívateµov.
139 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
140 popísané kroky potrebné pred a po in¹talácii Postfixu.
143 Summary: Postfix loadable modules development package
144 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
145 Group: Development/Libraries
146 Requires: %{name} = %{epoch}:%{version}
149 Header files to build additional map types for Postfix.
151 %description devel -l pl
152 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
155 Summary: LDAP map support for Postfix
156 Summary(pl): Obs³uga map LDAP dla Postfiksa
157 Group: Networking/Daemons
158 Requires: %{name} = %{epoch}:%{version}
159 Requires: openldap >= 2.0.0
161 %description dict-ldap
162 This package provides support for LDAP maps in Postfix.
164 %description dict-ldap -l pl
165 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
168 Summary: MySQL map support for Postfix
169 Summary(pl): Obs³uga map MySQL dla Postfiksa
170 Group: Networking/Daemons
171 Requires: %{name} = %{epoch}:%{version}
173 %description dict-mysql
174 This package provides support for MySQL maps in Postfix.
176 %description dict-mysql -l pl
177 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
180 Summary: PCRE map support for Postfix
181 Summary(pl): Obs³uga map PCRE dla Postfiksa
182 Group: Networking/Daemons
183 Requires: %{name} = %{epoch}:%{version}
185 %description dict-pcre
186 This package provides support for PCRE maps in Postfix.
188 %description dict-pcre -l pl
189 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
192 Summary: PostgreSQL map support for Postfix
193 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
194 Group: Networking/Daemons
195 Requires: %{name} = %{epoch}:%{version}
197 %description dict-pgsql
198 This package provides support for PostgreSQL maps in Postfix.
200 %description dict-pgsql -l pl
201 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
204 %setup -q %{?with_cdb:-a7}
205 zcat %{SOURCE8} | patch -p1 -s
211 %{?with_polish:%patch5 -p1}
212 %{?with_cdb:%patch6 -p1}
216 %{?with_cdb:sh dict_cdb.sh}
219 %{__make} -f Makefile.init makefiles
221 %{__make} DEBUG="" OPT="%{rpmcflags}" \
222 %{!?with_ldap:LDAPSO=""} \
223 %{!?with_mysql:MYSQLSO=""} \
224 %{!?with_pgsql:PGSQLSO=""} \
225 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}" \
226 AUXLIBS="-ldb -lresolv %{?with_sasl:-lsasl} %{?with_ssl:-lssl -lcrypto} %{?with_cdb:-lcdb}"
229 rm -rf $RPM_BUILD_ROOT
230 install -d $RPM_BUILD_ROOT/etc/{cron.daily,rc.d/init.d,sysconfig} \
231 $RPM_BUILD_ROOT%{_sysconfdir}/{mail,sasl} \
232 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,/usr/lib}\
233 $RPM_BUILD_ROOT{%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
234 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
237 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
239 install -d sample-conf; mv -f conf/sample* sample-conf || :
241 install bin/* $RPM_BUILD_ROOT%{_sbindir}
242 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
243 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
244 sed -e's,^daemon_directory = .*,daemon_directory = %{_libdir}/postfix,' \
245 conf/main.cf > $RPM_BUILD_ROOT%{_sysconfdir}/mail/main.cf
247 for f in dns global master util ; do
248 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
249 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
251 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
252 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
254 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
256 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
257 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
258 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
259 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
260 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
261 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
263 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
264 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
265 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
267 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
268 {aliases,access,canonical,relocated,transport,virtual}{,.db}
270 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
273 rm -rf $RPM_BUILD_ROOT
276 if [ -n "`/usr/bin/getgid postfix`" ]; then
277 if [ "`getgid postfix`" != "62" ]; then
278 echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
282 /usr/sbin/groupadd -g 62 -r -f postfix
284 if [ -n "`/usr/bin/getgid maildrop`" ]; then
285 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
286 echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
290 /usr/sbin/groupadd -g 63 -r -f maildrop
292 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
293 if [ "`/bin/id -u postfix`" != "62" ]; then
294 echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
298 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
303 if ! grep -q "^postmaster:" /etc/mail/aliases; then
304 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
305 echo "postmaster: root" >>/etc/mail/aliases
307 if ! grep -q "^myhostname" /etc/mail/main.cf; then
308 postconf -e myhostname=`/bin/hostname -f`
312 /sbin/chkconfig --add postfix
313 if [ -f /var/lock/subsys/postfix ]; then
314 /etc/rc.d/init.d/postfix restart >&2
316 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
320 if [ "$1" = "0" ]; then
321 if [ -f /var/lock/subsys/postfix ]; then
322 /etc/rc.d/init.d/postfix stop >&2
324 /sbin/chkconfig --del postfix
329 if [ "$1" = "0" ]; then
330 /usr/sbin/groupdel maildrop 2> /dev/null
331 /usr/sbin/userdel postfix 2> /dev/null
332 /usr/sbin/groupdel postfix 2> /dev/null
335 %triggerpostun -- postfix < 1:1.1.2
337 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
338 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
339 > /etc/mail/master.cf.rpmtmp
340 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
343 %defattr(644,root,root,755)
344 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES
345 %doc README_FILES/*README
347 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
348 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
349 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
350 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/pcre_table
351 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/regexp_table
352 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
353 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
354 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
355 #%ghost %{_sysconfdir}/mail/*.db
356 %dir %{_sysconfdir}/mail
357 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
358 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
359 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
360 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
361 %attr(755,root,root) %{_sysconfdir}/mail/post-install
362 %{_sysconfdir}/mail/postfix-files
363 %attr(740,root,root) /etc/cron.daily/postfix
364 %attr(754,root,root) /etc/rc.d/init.d/postfix
365 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
366 %{?with_sasl:%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sasl/smtpd.conf}
367 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
368 %attr(755,root,root) %{_bindir}/*
369 %attr(755,root,root) %{_sbindir}/s*
370 %attr(755,root,root) %{_sbindir}/postfix
371 %attr(755,root,root) %{_sbindir}/postalias
372 %attr(755,root,root) %{_sbindir}/postkick
373 %attr(755,root,root) %{_sbindir}/postl*
374 %attr(755,root,root) %{_sbindir}/postc*
375 %attr(755,root,root) %{_sbindir}/postmap
376 %attr(2755,root,maildrop) %{_sbindir}/postqueue
377 %attr(755,root,root) %{_sbindir}/postsuper
378 %attr(2755,root,maildrop) %{_sbindir}/postdrop
379 %attr(755,root,root) %{_sbindir}/qmqp-source
380 %attr(755,root,root) /usr/lib/sendmail
381 %dir %{_libdir}/postfix
382 %attr(755,root,root) %{_libdir}/postfix/[!d]*
383 %attr(755,root,root) %dir %{_var}/spool/postfix
384 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
385 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
386 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
387 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
388 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
389 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
390 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
391 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
392 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
393 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
394 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
395 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_libdir}/libpostfix-*.so
401 %{_includedir}/postfix
405 %defattr(644,root,root,755)
406 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
416 %defattr(644,root,root,755)
417 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
421 %defattr(644,root,root,755)
422 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so