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
11 %define _tls_ipv6_ver 1.21-pf-2.0.19
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: 3515ba531b0fadd0e54ef688797d393e
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: 30b8759733b9b5fa6bdee506e8e5195f
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.7d}
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
71 %{?with_cdb:Requires:tinycdb}
80 Obsoletes: sendmail-cf
81 Obsoletes: sendmail-doc
86 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89 Postfix is attempt to provide an alternative to the widely-used
90 Sendmail program. Postfix attempts to be fast, easy to administer, and
91 hopefully secure, while at the same time being sendmail compatible
92 enough to not upset your users. This version has IPv6 support.
95 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
96 você deseja um servidor SMTP *rápido*, instale este pacote.
99 Postfix es una alternativa para el mundialmente utilizado sendmail. Si
100 desea tener un servidor SMTP *rápido*, debe instalar este paquete.
103 Postfix (voir http://www.postfix.org/) se veut une alternative à
104 sendmail, responsable de l'acheminement de 70% des courriers
105 électroniques sur Internet. IBM en a suppotré le développement, mais
106 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
107 plus grand nombre de systèmes possible. Dans cette optique, il a été
108 écrit pour être totalement sous le contrôle de l'utilisateur.
111 Postfix (http://www.postfix.org/) e' un'alternativa al programma
112 sendmail utilizzato per la gestione del 70 per cento della posta
115 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
118 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
119 quale troverete le indicazioni per una corretta installazione e
120 configurazione di questo programma.
123 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
124 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
125 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
126 sendmailem by nie denerwowaæ Twoich u¿ytkowników. Ta wersja wspiera IPv6.
128 %description -l pt_BR
129 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
130 você deseja um servidor SMTP *rápido*, instale este pacote.
133 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
134 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
135 elektronickej po¹ty doruèenej na Internete.
137 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
138 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
139 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
140 mô¾e vyvíja» podµa jeho pou¾ívateµov.
142 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
143 popísané kroky potrebné pred a po in¹talácii Postfixu.
146 Summary: Postfix loadable modules development package
147 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
148 Group: Development/Libraries
149 Requires: %{name} = %{epoch}:%{version}
152 Header files to build additional map types for Postfix.
154 %description devel -l pl
155 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
158 Summary: LDAP map support for Postfix
159 Summary(pl): Obs³uga map LDAP dla Postfiksa
160 Group: Networking/Daemons
161 Requires: %{name} = %{epoch}:%{version}
162 Requires: openldap >= 2.0.0
164 %description dict-ldap
165 This package provides support for LDAP maps in Postfix.
167 %description dict-ldap -l pl
168 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
171 Summary: MySQL map support for Postfix
172 Summary(pl): Obs³uga map MySQL dla Postfiksa
173 Group: Networking/Daemons
174 Requires: %{name} = %{epoch}:%{version}
176 %description dict-mysql
177 This package provides support for MySQL maps in Postfix.
179 %description dict-mysql -l pl
180 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
183 Summary: PCRE map support for Postfix
184 Summary(pl): Obs³uga map PCRE dla Postfiksa
185 Group: Networking/Daemons
186 Requires: %{name} = %{epoch}:%{version}
188 %description dict-pcre
189 This package provides support for PCRE maps in Postfix.
191 %description dict-pcre -l pl
192 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
195 Summary: PostgreSQL map support for Postfix
196 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
197 Group: Networking/Daemons
198 Requires: %{name} = %{epoch}:%{version}
200 %description dict-pgsql
201 This package provides support for PostgreSQL maps in Postfix.
203 %description dict-pgsql -l pl
204 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
207 %setup -q %{?with_cdb:-a7}
208 zcat %{SOURCE8} | patch -p1 -s
214 %{?with_polish:%patch5 -p1}
215 %{?with_cdb:%patch6 -p1}
219 %{?with_cdb:sh dict_cdb.sh}
222 %{__make} -f Makefile.init makefiles
224 %{__make} DEBUG="" OPT="%{rpmcflags}" \
225 %{!?with_ldap:LDAPSO=""} \
226 %{!?with_mysql:MYSQLSO=""} \
227 %{!?with_pgsql:PGSQLSO=""} \
228 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}" \
229 AUXLIBS="-ldb -lresolv %{?with_sasl:-lsasl} %{?with_ssl:-lssl -lcrypto} %{?with_cdb:-lcdb}"
232 rm -rf $RPM_BUILD_ROOT
233 install -d $RPM_BUILD_ROOT/etc/{cron.daily,rc.d/init.d,sysconfig} \
234 $RPM_BUILD_ROOT%{_sysconfdir}/{mail,sasl} \
235 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,/usr/lib}\
236 $RPM_BUILD_ROOT{%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
237 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
240 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
242 install -d sample-conf; mv -f conf/sample* sample-conf || :
244 install bin/* $RPM_BUILD_ROOT%{_sbindir}
245 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
246 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
247 sed -e's,^daemon_directory = .*,daemon_directory = %{_libdir}/postfix,' \
248 conf/main.cf > $RPM_BUILD_ROOT%{_sysconfdir}/mail/main.cf
250 for f in dns global master util ; do
251 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
252 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
254 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
255 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
257 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
259 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
260 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
261 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
262 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
263 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
264 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
266 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
267 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
268 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
270 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
271 {aliases,access,canonical,relocated,transport,virtual}{,.db}
273 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
276 rm -rf $RPM_BUILD_ROOT
279 if [ -n "`/usr/bin/getgid postfix`" ]; then
280 if [ "`getgid postfix`" != "62" ]; then
281 echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
285 /usr/sbin/groupadd -g 62 -r -f postfix
287 if [ -n "`/usr/bin/getgid maildrop`" ]; then
288 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
289 echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
293 /usr/sbin/groupadd -g 63 -r -f maildrop
295 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
296 if [ "`/bin/id -u postfix`" != "62" ]; then
297 echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
301 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
306 if ! grep -q "^postmaster:" /etc/mail/aliases; then
307 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
308 echo "postmaster: root" >>/etc/mail/aliases
310 if [ "$1" = "1" ]; then
311 # only on installation, not upgrade
312 if ! grep -q "^myhostname" /etc/mail/main.cf; then
313 postconf -e myhostname=`/bin/hostname -f`
318 /sbin/chkconfig --add postfix
319 if [ -f /var/lock/subsys/postfix ]; then
320 /etc/rc.d/init.d/postfix restart >&2
322 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
326 if [ "$1" = "0" ]; then
327 if [ -f /var/lock/subsys/postfix ]; then
328 /etc/rc.d/init.d/postfix stop >&2
330 /sbin/chkconfig --del postfix
335 if [ "$1" = "0" ]; then
336 /usr/sbin/groupdel maildrop 2> /dev/null
337 /usr/sbin/userdel postfix 2> /dev/null
338 /usr/sbin/groupdel postfix 2> /dev/null
341 %triggerpostun -- postfix < 1:1.1.2
343 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
344 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
345 > /etc/mail/master.cf.rpmtmp
346 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
349 %defattr(644,root,root,755)
350 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES
351 %doc README_FILES/*README
353 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
354 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
355 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
356 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/pcre_table
357 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/regexp_table
358 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
359 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
360 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
361 #%ghost %{_sysconfdir}/mail/*.db
362 %dir %{_sysconfdir}/mail
363 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
364 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
365 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
366 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
367 %attr(755,root,root) %{_sysconfdir}/mail/post-install
368 %{_sysconfdir}/mail/postfix-files
369 %attr(740,root,root) /etc/cron.daily/postfix
370 %attr(754,root,root) /etc/rc.d/init.d/postfix
371 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
372 %{?with_sasl:%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sasl/smtpd.conf}
373 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
374 %attr(755,root,root) %{_bindir}/*
375 %attr(755,root,root) %{_sbindir}/s*
376 %attr(755,root,root) %{_sbindir}/postfix
377 %attr(755,root,root) %{_sbindir}/postalias
378 %attr(755,root,root) %{_sbindir}/postkick
379 %attr(755,root,root) %{_sbindir}/postl*
380 %attr(755,root,root) %{_sbindir}/postc*
381 %attr(755,root,root) %{_sbindir}/postmap
382 %attr(2755,root,maildrop) %{_sbindir}/postqueue
383 %attr(755,root,root) %{_sbindir}/postsuper
384 %attr(2755,root,maildrop) %{_sbindir}/postdrop
385 %attr(755,root,root) %{_sbindir}/qmqp-source
386 %attr(755,root,root) /usr/lib/sendmail
387 %dir %{_libdir}/postfix
388 %attr(755,root,root) %{_libdir}/postfix/[!d]*
389 %attr(755,root,root) %dir %{_var}/spool/postfix
390 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
391 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
392 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
393 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
394 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
395 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
396 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
397 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
398 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
399 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
400 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
401 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
405 %defattr(644,root,root,755)
406 %attr(755,root,root) %{_libdir}/libpostfix-*.so
407 %{_includedir}/postfix
411 %defattr(644,root,root,755)
412 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
417 %defattr(644,root,root,755)
418 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
422 %defattr(644,root,root,755)
423 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
427 %defattr(644,root,root,755)
428 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so