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: f164b701c3e97b950d4cc64aff4de3c0
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: fcc8b7e7d94a9ce2d97453da0e6cd7c9
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 URL: http://www.postfix.org/
49 %{?with_sasl:BuildRequires: cyrus-sasl-devel}
50 BuildRequires: db-devel
51 # getifaddrs() with IPv6 support
52 BuildRequires: glibc-devel >= 6:2.3.4
54 %{?with_mysql:BuildRequires: mysql-devel}
55 %{?with_ldap:BuildRequires: openldap-devel >= 2.2.0}
56 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
57 BuildRequires: pcre-devel
58 %{?with_pgsql:BuildRequires: postgresql-devel}
59 BuildRequires: rpmbuild(macros) >= 1.202
60 %{?with_cdb:BuildRequires: tinycdb-devel}
63 Requires(post): /bin/hostname
64 Requires(pre): /bin/id
65 Requires(pre): /usr/bin/getgid
66 Requires(pre): /usr/sbin/groupadd
67 Requires(pre): /usr/sbin/useradd
68 Requires(post,preun): /sbin/chkconfig
69 Requires(post,postun): /sbin/ldconfig
70 Requires(postun): /usr/sbin/groupdel
71 Requires(postun): /usr/sbin/userdel
74 %{?with_cdb:Requires:tinycdb}
75 Provides: group(postfix)
77 Provides: user(postfix)
85 Obsoletes: sendmail-cf
86 Obsoletes: sendmail-doc
91 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94 Postfix is attempt to provide an alternative to the widely-used
95 Sendmail program. Postfix attempts to be fast, easy to administer, and
96 hopefully secure, while at the same time being sendmail compatible
97 enough to not upset your users. This version has IPv6 support.
100 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
101 você deseja um servidor SMTP *rápido*, instale este pacote.
104 Postfix es una alternativa para el mundialmente utilizado sendmail. Si
105 desea tener un servidor SMTP *rápido*, debe instalar este paquete.
108 Postfix (voir http://www.postfix.org/) se veut une alternative à
109 sendmail, responsable de l'acheminement de 70% des courriers
110 électroniques sur Internet. IBM en a suppotré le développement, mais
111 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
112 plus grand nombre de systèmes possible. Dans cette optique, il a été
113 écrit pour être totalement sous le contrôle de l'utilisateur.
116 Postfix (http://www.postfix.org/) e' un'alternativa al programma
117 sendmail utilizzato per la gestione del 70 per cento della posta
120 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
123 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
124 quale troverete le indicazioni per una corretta installazione e
125 configurazione di questo programma.
128 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
129 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
130 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
131 sendmailem by nie denerwowaæ u¿ytkowników. Ta wersja obs³uguje IPv6.
133 %description -l pt_BR
134 O Postfix é uma alternativa para o mundialmente utilizado sendmail. Se
135 você deseja um servidor SMTP *rápido*, instale este pacote.
138 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
139 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
140 elektronickej po¹ty doruèenej na Internete.
142 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
143 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
144 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
145 mô¾e vyvíja» podµa jeho pou¾ívateµov.
147 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
148 popísané kroky potrebné pred a po in¹talácii Postfixu.
151 Summary: Postfix loadable modules development package
152 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
153 Group: Development/Libraries
154 Requires: %{name} = %{epoch}:%{version}-%{release}
157 Header files to build additional map types for Postfix.
159 %description devel -l pl
160 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
163 Summary: LDAP map support for Postfix
164 Summary(pl): Obs³uga map LDAP dla Postfiksa
165 Group: Networking/Daemons
166 Requires: %{name} = %{epoch}:%{version}-%{release}
167 Requires: openldap >= 2.2.0
169 %description dict-ldap
170 This package provides support for LDAP maps in Postfix.
172 %description dict-ldap -l pl
173 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
176 Summary: MySQL map support for Postfix
177 Summary(pl): Obs³uga map MySQL dla Postfiksa
178 Group: Networking/Daemons
179 Requires: %{name} = %{epoch}:%{version}-%{release}
181 %description dict-mysql
182 This package provides support for MySQL maps in Postfix.
184 %description dict-mysql -l pl
185 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
188 Summary: PCRE map support for Postfix
189 Summary(pl): Obs³uga map PCRE dla Postfiksa
190 Group: Networking/Daemons
191 Requires: %{name} = %{epoch}:%{version}-%{release}
193 %description dict-pcre
194 This package provides support for PCRE maps in Postfix.
196 %description dict-pcre -l pl
197 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
200 Summary: PostgreSQL map support for Postfix
201 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
202 Group: Networking/Daemons
203 Requires: %{name} = %{epoch}:%{version}-%{release}
205 %description dict-pgsql
206 This package provides support for PostgreSQL maps in Postfix.
208 %description dict-pgsql -l pl
209 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
213 %{?with_vda:zcat %{SOURCE7} | patch -p1 -s}
218 %{?with_hir:%patch4 -p0}
219 #%{?with_polish:%patch5 -p1}
223 %{__make} -f Makefile.init makefiles
228 %{!?with_ldap:LDAPSO=""} \
229 %{!?with_mysql:MYSQLSO=""} \
230 %{!?with_pgsql:PGSQLSO=""} \
231 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" \
232 AUXLIBS="-ldb -lresolv %{?with_sasl:-lsasl} %{?with_ssl:-lssl -lcrypto} %{?with_cdb:-lcdb}"
235 rm -rf $RPM_BUILD_ROOT
236 install -d $RPM_BUILD_ROOT/etc/{cron.daily,rc.d/init.d,sysconfig,pam.d} \
237 $RPM_BUILD_ROOT%{_sysconfdir}/{mail,sasl} \
238 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,/usr/lib}\
239 $RPM_BUILD_ROOT{%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
240 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public}
242 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
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 %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/postfix
263 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
264 install %{SOURCE6} $RPM_BUILD_ROOT/etc/pam.d/smtp
265 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
267 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
268 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
269 ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT/usr/lib/sendmail
271 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
272 {aliases,access,canonical,relocated,transport,virtual}{,.db}
274 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
276 rm -rf $RPM_BUILD_ROOT/etc/mail/makedefs.out $RPM_BUILD_ROOT/usr/share/man/cat*
279 rm -rf $RPM_BUILD_ROOT
282 %groupadd -g 62 postfix
283 %groupadd -g 63 maildrop
284 %useradd -u 62 -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix
288 if ! grep -q "^postmaster:" /etc/mail/aliases; then
289 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
290 echo "postmaster: root" >>/etc/mail/aliases
292 if [ "$1" = "1" ]; then
293 # only on installation, not upgrade
294 if ! grep -q "^myhostname" /etc/mail/main.cf; then
295 postconf -e myhostname=`/bin/hostname -f`
298 postfix upgrade-configuration
302 /sbin/chkconfig --add postfix
303 if [ -f /var/lock/subsys/postfix ]; then
304 /etc/rc.d/init.d/postfix restart >&2
306 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
310 if [ "$1" = "0" ]; then
311 if [ -f /var/lock/subsys/postfix ]; then
312 /etc/rc.d/init.d/postfix stop >&2
314 /sbin/chkconfig --del postfix
319 if [ "$1" = "0" ]; then
320 %groupremove maildrop
326 %defattr(644,root,root,755)
327 %doc html *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES TLS_*
328 %doc README_FILES/*README
329 %doc examples/smtpd-policy
330 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/access
331 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/aliases
332 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/canonical
333 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/generic
334 #%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/pcre_table
335 #%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/regexp_table
336 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/relocated
337 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/transport
338 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/virtual
339 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/header_checks
340 #%ghost %{_sysconfdir}/mail/*.db
341 %dir %{_sysconfdir}/mail
342 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/dynamicmaps.cf
343 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/main.cf
344 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/master.cf
345 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/postfix-script
346 %attr(755,root,root) %{_sysconfdir}/mail/post-install
347 %{_sysconfdir}/mail/postfix-files
348 %attr(740,root,root) /etc/cron.daily/postfix
349 %attr(754,root,root) /etc/rc.d/init.d/postfix
350 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/postfix
351 %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/smtp
352 %{?with_sasl:%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl/smtpd.conf}
353 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
354 %attr(755,root,root) %{_bindir}/*
355 %attr(755,root,root) %{_sbindir}/s*
356 %attr(755,root,root) %{_sbindir}/postfix
357 %attr(755,root,root) %{_sbindir}/postalias
358 %attr(755,root,root) %{_sbindir}/postkick
359 %attr(755,root,root) %{_sbindir}/postl*
360 %attr(755,root,root) %{_sbindir}/postc*
361 %attr(755,root,root) %{_sbindir}/postmap
362 %attr(2755,root,maildrop) %{_sbindir}/postqueue
363 %attr(755,root,root) %{_sbindir}/postsuper
364 %attr(2755,root,maildrop) %{_sbindir}/postdrop
365 %attr(755,root,root) %{_sbindir}/qmqp-sink
366 %attr(755,root,root) %{_sbindir}/qmqp-source
367 %attr(755,root,root) /usr/lib/sendmail
368 %dir %{_libdir}/postfix
369 %attr(755,root,root) %{_libdir}/postfix/[!d]*
370 %attr(755,root,root) %{_libdir}/postfix/discard
371 %attr(755,root,root) %dir %{_var}/spool/postfix
372 %attr(700,postfix,root) %dir %{_var}/spool/postfix/active
373 %attr(700,postfix,root) %dir %{_var}/spool/postfix/bounce
374 %attr(700,postfix,root) %dir %{_var}/spool/postfix/corrupt
375 %attr(700,postfix,root) %dir %{_var}/spool/postfix/defer
376 %attr(700,postfix,root) %dir %{_var}/spool/postfix/deferred
377 %attr(700,postfix,root) %dir %{_var}/spool/postfix/incoming
378 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
379 %attr(755,postfix,root) %dir %{_var}/spool/postfix/pid
380 %attr(700,postfix,root) %dir %{_var}/spool/postfix/private
381 %attr(710,postfix,maildrop) %dir %{_var}/spool/postfix/public
382 %attr(700,postfix,root) %dir %{_var}/spool/postfix/saved
383 %attr(644,postfix,root) %{_var}/spool/postfix/.nofinger
387 %defattr(644,root,root,755)
388 %attr(755,root,root) %{_libdir}/libpostfix-*.so
389 %{_includedir}/postfix
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
399 %defattr(644,root,root,755)
400 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
404 %defattr(644,root,root,755)
405 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so