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 vda # with VDA patch
10 %bcond_with hir # with Beeth's header_if_reject patch
11 #%bcond_with polish # with double English+Polish messages
14 # - check/fix 'polish' bcond
16 Summary: Postfix Mail Transport Agent
17 Summary(cs): Postfix - program pro pøepravu po¹ty (MTA)
18 Summary(es): Postfix - Un MTA (Mail Transport Agent) de alto desempeño
19 Summary(fr): Agent de transport de courrier Postfix
20 Summary(pl): Serwer SMTP Postfix
21 Summary(pt_BR): Postfix - Um MTA (Mail Transport Agent) de alto desempenho
22 Summary(sk): Agent prenosu po¹ty Postfix
27 Group: Networking/Daemons
28 License: distributable
29 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz
30 # Source0-md5: 9c13d58494c64012bfd8ab0d6967305c
31 Source1: %{name}.aliases
34 Source4: %{name}.sysconfig
37 Source7: http://web.onda.com.br/nadal/postfix/VDA/%{name}-%{version}-vda.patch.gz
38 # Source7-md5: 6fb8fdac842e561ca19cc1ed6cd9f810
39 Patch0: %{name}-config.patch
40 Patch1: %{name}-conf_msg.patch
41 Patch2: %{name}-dynamicmaps.patch
42 Patch3: %{name}-master.cf_cyrus.patch
43 # from http://akson.sgh.waw.pl/~chopin/unix/postfix-2.1.5-header_if_reject.diff
44 Patch4: %{name}-header_if_reject.patch
45 #Patch5: %{name}-pl.patch
46 Patch6: %{name}-setsid.patch
47 Patch7: %{name}-size-check-before-proxy.patch
48 Patch8: %{name}-log-proxy-rejects.patch
49 URL: http://www.postfix.org/
51 %{?with_sasl:BuildRequires: cyrus-sasl-devel}
52 BuildRequires: db-devel
53 # getifaddrs() with IPv6 support
54 BuildRequires: glibc-devel >= 6:2.3.4
56 %{?with_mysql:BuildRequires: mysql-devel}
57 %{?with_ldap:BuildRequires: openldap-devel >= 2.2.0}
58 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
59 BuildRequires: pcre-devel
60 %{?with_pgsql:BuildRequires: postgresql-devel}
61 BuildRequires: rpmbuild(macros) >= 1.202
62 %{?with_cdb:BuildRequires: tinycdb-devel}
63 Requires(post): /bin/hostname
64 Requires(post,postun): /sbin/ldconfig
65 Requires(post,preun): /sbin/chkconfig
66 Requires(postun): /usr/sbin/groupdel
67 Requires(postun): /usr/sbin/userdel
68 Requires(pre): /bin/id
69 Requires(pre): /usr/bin/getgid
70 Requires(pre): /usr/sbin/groupadd
71 Requires(pre): /usr/sbin/useradd
72 Requires: /sbin/chkconfig
77 %{?with_cdb:Requires:tinycdb}
78 Provides: group(postfix)
80 Provides: user(postfix)
88 Obsoletes: sendmail-cf
89 Obsoletes: sendmail-doc
94 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97 Postfix is attempt to provide an alternative to the widely-used
98 Sendmail program. Postfix attempts to be fast, easy to administer, and
99 hopefully secure, while at the same time being sendmail compatible
100 enough to not upset your users. This version has IPv6 support.
102 %description -l pt_BR
103 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
104 você deseja um servidor SMTP *rápido*, instale este pacote.
107 Postfix es una alternativa para el mundialmente utilizado sendmail. Si
108 desea tener un servidor SMTP *rápido*, debe instalar este paquete.
111 Postfix (voir http://www.postfix.org/) se veut une alternative à
112 sendmail, responsable de l'acheminement de 70% des courriers
113 électroniques sur Internet. IBM en a suppotré le développement, mais
114 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
115 plus grand nombre de systèmes possible. Dans cette optique, il a été
116 écrit pour être totalement sous le contrôle de l'utilisateur.
119 Postfix (http://www.postfix.org/) e' un'alternativa al programma
120 sendmail utilizzato per la gestione del 70 per cento della posta
123 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
126 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
127 quale troverete le indicazioni per una corretta installazione e
128 configurazione di questo programma.
131 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
132 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
133 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
134 sendmailem by nie denerwowaæ u¿ytkowników. Ta wersja obs³uguje IPv6.
136 %description -l pt_BR
137 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
138 você deseja um servidor SMTP *rápido*, instale este pacote.
141 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
142 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
143 elektronickej po¹ty doruèenej na Internete.
145 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
146 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
147 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
148 mô¾e vyvíja» podµa jeho pou¾ívateµov.
150 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
151 popísané kroky potrebné pred a po in¹talácii Postfixu.
154 Summary: Postfix loadable modules development package
155 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
156 Group: Development/Libraries
157 Requires: %{name} = %{epoch}:%{version}-%{release}
160 Header files to build additional map types for Postfix.
162 %description devel -l pl
163 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
166 Summary: LDAP map support for Postfix
167 Summary(pl): Obs³uga map LDAP dla Postfiksa
168 Group: Networking/Daemons
169 Requires: %{name} = %{epoch}:%{version}-%{release}
170 Requires: openldap >= 2.2.0
172 %description dict-ldap
173 This package provides support for LDAP maps in Postfix.
175 %description dict-ldap -l pl
176 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
179 Summary: MySQL map support for Postfix
180 Summary(pl): Obs³uga map MySQL dla Postfiksa
181 Group: Networking/Daemons
182 Requires: %{name} = %{epoch}:%{version}-%{release}
184 %description dict-mysql
185 This package provides support for MySQL maps in Postfix.
187 %description dict-mysql -l pl
188 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
191 Summary: PCRE map support for Postfix
192 Summary(pl): Obs³uga map PCRE dla Postfiksa
193 Group: Networking/Daemons
194 Requires: %{name} = %{epoch}:%{version}-%{release}
196 %description dict-pcre
197 This package provides support for PCRE maps in Postfix.
199 %description dict-pcre -l pl
200 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
203 Summary: PostgreSQL map support for Postfix
204 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
205 Group: Networking/Daemons
206 Requires: %{name} = %{epoch}:%{version}-%{release}
208 %description dict-pgsql
209 This package provides support for PostgreSQL maps in Postfix.
211 %description dict-pgsql -l pl
212 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
216 %{?with_vda:zcat %{SOURCE7} | patch -p1 -s}
221 %{?with_hir:%patch4 -p0}
222 #%{?with_polish:%patch5 -p1}
228 %{__make} -f Makefile.init makefiles
233 %{!?with_ldap:LDAPSO=""} \
234 %{!?with_mysql:MYSQLSO=""} \
235 %{!?with_pgsql:PGSQLSO=""} \
236 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:-DUSE_TLS -I/usr/include/openssl} -DMAX_DYNAMIC_MAPS %{?with_cdb:-DHAS_CDB} -DHAVE_GETIFADDRS" \
237 AUXLIBS="-ldb -lresolv %{?with_sasl:-lsasl} %{?with_ssl:-lssl -lcrypto} %{?with_cdb:-lcdb}"
240 rm -rf $RPM_BUILD_ROOT
241 install -d $RPM_BUILD_ROOT/etc/{cron.daily,rc.d/init.d,sysconfig,pam.d} \
242 $RPM_BUILD_ROOT%{_sysconfdir}/{mail,sasl} \
243 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,/usr/lib}\
244 $RPM_BUILD_ROOT{%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
245 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public}
247 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
249 install bin/* $RPM_BUILD_ROOT%{_sbindir}
250 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
251 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
252 sed -e's,^daemon_directory = .*,daemon_directory = %{_libdir}/postfix,' \
253 conf/main.cf > $RPM_BUILD_ROOT%{_sysconfdir}/mail/main.cf
255 for f in dns global master util ; do
256 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
257 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
259 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
260 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
262 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
264 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
265 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
266 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
267 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/postfix
268 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
269 install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/smtp
270 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
272 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
273 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
274 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
276 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
277 {aliases,access,canonical,relocated,transport,virtual}{,.db}
279 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
281 rm -rf $RPM_BUILD_ROOT/etc/mail/makedefs.out $RPM_BUILD_ROOT/usr/share/man/cat*
284 rm -rf $RPM_BUILD_ROOT
287 %groupadd -g 62 postfix
288 %groupadd -g 63 maildrop
289 %useradd -u 62 -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix
293 if ! grep -q "^postmaster:" /etc/mail/aliases; then
294 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
295 echo "postmaster: root" >>/etc/mail/aliases
297 if [ "$1" = "1" ]; then
298 # only on installation, not upgrade
299 if ! grep -q "^myhostname" /etc/mail/main.cf; then
300 postconf -e myhostname=`/bin/hostname -f`
303 postfix upgrade-configuration
307 /sbin/chkconfig --add postfix
308 if [ -f /var/lock/subsys/postfix ]; then
309 /etc/rc.d/init.d/postfix restart >&2
311 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
315 if [ "$1" = "0" ]; then
316 if [ -f /var/lock/subsys/postfix ]; then
317 /etc/rc.d/init.d/postfix stop >&2
319 /sbin/chkconfig --del postfix
324 if [ "$1" = "0" ]; then
325 %groupremove maildrop
331 %defattr(644,root,root,755)
332 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES TLS_*
333 %doc README_FILES/*README
334 %doc examples/smtpd-policy
335 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/access
336 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/aliases
337 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/canonical
338 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/generic
339 #%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/pcre_table
340 #%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/regexp_table
341 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/relocated
342 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/transport
343 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/virtual
344 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/header_checks
345 #%ghost %{_sysconfdir}/mail/*.db
346 %dir %{_sysconfdir}/mail
347 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/dynamicmaps.cf
348 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/main.cf
349 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/master.cf
350 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/postfix-script
351 %attr(755,root,root) %{_sysconfdir}/mail/post-install
352 %{_sysconfdir}/mail/postfix-files
353 %attr(740,root,root) /etc/cron.daily/postfix
354 %attr(754,root,root) /etc/rc.d/init.d/postfix
355 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/postfix
356 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/smtp
357 %{?with_sasl:%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl/smtpd.conf}
358 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
359 %attr(755,root,root) %{_bindir}/*
360 %attr(755,root,root) %{_sbindir}/s*
361 %attr(755,root,root) %{_sbindir}/postfix
362 %attr(755,root,root) %{_sbindir}/postalias
363 %attr(755,root,root) %{_sbindir}/postkick
364 %attr(755,root,root) %{_sbindir}/postl*
365 %attr(755,root,root) %{_sbindir}/postc*
366 %attr(755,root,root) %{_sbindir}/postmap
367 %attr(2755,root,maildrop) %{_sbindir}/postqueue
368 %attr(755,root,root) %{_sbindir}/postsuper
369 %attr(2755,root,maildrop) %{_sbindir}/postdrop
370 %attr(755,root,root) %{_sbindir}/qmqp-sink
371 %attr(755,root,root) %{_sbindir}/qmqp-source
372 %attr(755,root,root) /usr/lib/sendmail
373 %dir %{_libdir}/postfix
374 %attr(755,root,root) %{_libdir}/postfix/[!d]*
375 %attr(755,root,root) %{_libdir}/postfix/discard
376 %attr(755,root,root) %dir %{_var}/spool/postfix
377 %attr(700,postfix,root) %dir %{_var}/spool/postfix/active
378 %attr(700,postfix,root) %dir %{_var}/spool/postfix/bounce
379 %attr(700,postfix,root) %dir %{_var}/spool/postfix/corrupt
380 %attr(700,postfix,root) %dir %{_var}/spool/postfix/defer
381 %attr(700,postfix,root) %dir %{_var}/spool/postfix/deferred
382 %attr(700,postfix,root) %dir %{_var}/spool/postfix/incoming
383 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
384 %attr(755,postfix,root) %dir %{_var}/spool/postfix/pid
385 %attr(700,postfix,root) %dir %{_var}/spool/postfix/private
386 %attr(710,postfix,maildrop) %dir %{_var}/spool/postfix/public
387 %attr(700,postfix,root) %dir %{_var}/spool/postfix/saved
388 %attr(644,postfix,root) %{_var}/spool/postfix/.nofinger
392 %defattr(644,root,root,755)
393 %attr(755,root,root) %{_libdir}/libpostfix-*.so
394 %{_includedir}/postfix
398 %defattr(644,root,root,755)
399 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
414 %defattr(644,root,root,755)
415 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so