3 # --without sasl - build wihtout SMTP AUTH support
4 # --without ssl - build without SSL/TLS support
5 # --without ipv6 - build without IPv6 support
7 %define tls_ver 0.8.5-1.1.5-0.9.6c
8 Summary: Postfix Mail Transport Agent
9 Summary(cs): Postfix - program pro pøepravu po¹ty (MTA)
10 Summary(fr): Agent de transport de courrier Postfix
11 Summary(pl): Serwer SMTP Postfix
12 Summary(sk): Agent prenosu po¹ty Postfix
17 Group: Networking/Daemons
18 License: distributable
19 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz
20 Source1: %{name}.aliases
23 Source5: %{name}.sysconfig
24 Source6: ftp://ftp.aet.tu-cottbus.de/pub/pfixtls/pfixtls-%{tls_ver}.tar.gz
26 Patch0: %{name}-config.patch
27 Patch1: %{name}-pl.patch
28 Patch2: %{name}-conf_msg.patch
29 Patch3: %{name}-ipv6.patch
30 Patch4: %{name}-dynamicmaps.patch
31 Patch5: %{name}-pgsql.patch
32 URL: http://www.postfix.org/
34 %{!?_without_sasl:BuildRequires: cyrus-sasl-devel}
35 BuildRequires: db3-devel
37 %{!?_without_ipv6:BuildRequires: libinet6 >= 0.20010420-3}
38 BuildRequires: mysql-devel
39 BuildRequires: openldap-devel >= 2.0.0
40 %{!?_without_ssl:BuildRequires: openssl-devel >= 0.9.6a}
41 BuildRequires: pcre-devel
42 BuildRequires: postgresql-devel
45 Requires(pre): /usr/sbin/useradd
46 Requires(pre): /usr/sbin/groupadd
47 Requires(pre): /usr/bin/getgid
48 Requires(pre): /bin/id
49 Requires(post): /bin/hostname
50 Requires(post,postun):/sbin/ldconfig
51 Requires(post,preun):/sbin/chkconfig
52 Requires(postun): /usr/sbin/userdel
53 Requires(postun): /usr/sbin/groupdel
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 Obsoletes: sendmail-cf
63 Obsoletes: sendmail-doc
70 Postfix is attempt to provide an alternative to the widely-used
71 Sendmail program. Postfix attempts to be fast, easy to administer, and
72 hopefully secure, while at the same time being sendmail compatible
73 enough to not upset your users. This version has IPv6 support.
76 Postfix (voir http://www.postfix.org/) se veut une alternative à
77 sendmail, responsable de l'acheminement de 70% des courriers
78 électroniques sur Internet. IBM en a suppotré le développement, mais
79 ne contrôle pas son évolution. Le but est d'installer Postfix sur le
80 plus grand nombre de systèmes possible. Dans cette optique, il a été
81 écrit pour être totalement sous le contrôle de l'utilisateur.
84 Postfix (http://www.postfix.org/) e' un'alternativa al programma
85 sendmail utilizzato per la gestione del 70 per cento della posta
88 Seppur IBM supporti lo sviluppo di Postfix, non controlla la sua
91 Consultate la pagine web http://www.moongroup.com/how-to.phtml nella
92 quale troverete le indicazioni per una corretta installazione e
93 configurazione di questo programma.
96 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
97 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
98 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
99 sendmailem by nie denerwowaæ Twoich u¿ytkowników. Ta wersja wspiera
103 Postfix (pozri http://www.postfix.org/) má za cieµ by» alternatívou k
104 ¹iroko roz¹írenému programu sendmail, zodpovednému za 70% v¹etkej
105 elektronickej po¹ty doruèenej na Internete.
107 Aj keï IBM podporovala vývoj Postfixu, zdr¾iava sa vplyvu na jeho
108 vývoj. Cieµom je in¹talácia Postfixu na èo najväè¹om poète systémov.
109 Do tohoto momentu je softvér poskytovaný bez ovplyvòovania, tak¾e sa
110 mô¾e vyvíja» podµa jeho pou¾ívateµov.
112 Urèite si preèítajte http://www.moongroup.com/how-to.phtml, kde sú
113 popísané kroky potrebné pred a po in¹talácii Postfixu.
116 Summary: Postfix loadable modules development package
117 Summary(pl): Pakiet dla programistów ³adowanych modu³ów do postfiksa
118 Group: Development/Libraries
119 Requires: %{name} = %{version}
122 Header files to build additional map types for Postfix.
124 %description devel -l pl
125 Pliki nag³ówkowe do tworzenia dodatkowych typów map dla Postfiksa.
128 Summary: LDAP map support for Postfix
129 Summary(pl): Obs³uga map LDAP dla Postfiksa
130 Group: Networking/Daemons
131 Requires: %{name} = %{version}
132 Requires: openldap >= 2.0.0
134 %description dict-ldap
135 This package provides support for LDAP maps in Postfix.
137 %description dict-ldap -l pl
138 Ten pakiet dodaje obs³ugê map LDAP do Postfiksa.
141 Summary: MySQL map support for Postfix
142 Summary(pl): Obs³uga map MySQL dla Postfiksa
143 Group: Networking/Daemons
144 Requires: %{name} = %{version}
146 %description dict-mysql
147 This package provides support for MySQL maps in Postfix.
149 %description dict-mysql -l pl
150 Ten pakiet dodaje obs³ugê map MySQL do Postfiksa.
153 Summary: PCRE map support for Postfix
154 Summary(pl): Obs³uga map PCRE dla Postfiksa
155 Group: Networking/Daemons
156 Requires: %{name} = %{version}
158 %description dict-pcre
159 This package provides support for PCRE maps in Postfix.
161 %description dict-pcre -l pl
162 Ten pakiet dodaje obs³ugê map PCRE do Postfiksa.
165 Summary: PostgreSQL map support for Postfix
166 Summary(pl): Obs³uga map PostgreSQL dla Postfiksa
167 Group: Networking/Daemons
168 Requires: %{name} = %{version}
170 %description dict-pgsql
171 This package provides support for PostgreSQL maps in Postfix.
173 %description dict-pgsql -l pl
174 Ten pakiet dodaje obs³ugê map PostgreSQL do Postfiksa.
180 patch -p1 -s <pfixtls-%{tls_ver}/pfixtls.diff
182 %{!?_without_ipv6:%patch3 -p1 }
187 %{__make} -f Makefile.init makefiles
189 %{__make} DEBUG="" OPT="%{rpmcflags}" \
190 CCARGS="-DHAS_LDAP -DHAS_PCRE %{!?_without_sasl:-DUSE_SASL_AUTH} -DHAS_MYSQL -DHAS_PGSQL -I/usr/include/mysql -I/usr/include/postgresql %{!?_without_ssl:-DHAS_SSL -I/usr/include/openssl} -DMAX_DYNAMIC_MAPS" \
191 AUXLIBS="-ldb -lresolv %{!?_without_sasl:-lsasl} %{!?_without_ssl:-lssl -lcrypto}"
194 rm -rf $RPM_BUILD_ROOT
195 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{mail,cron.daily,rc.d/init.d,sasl,sysconfig} \
196 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,%{_includedir}/postfix,%{_mandir}/man{1,5,8}} \
197 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
200 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
202 install -d sample-conf; mv -f conf/sample* sample-conf/ || :
204 install bin/* $RPM_BUILD_ROOT%{_sbindir}
205 install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
206 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
208 for f in dns global master util ; do
209 install lib/lib${f}.a $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
210 ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
212 install lib/dict*.so $RPM_BUILD_ROOT%{_libdir}/postfix
213 install include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
215 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
217 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
218 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
219 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
220 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
221 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/sasl/smtpd.conf
222 install auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
224 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
225 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
226 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
228 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
229 {aliases,access,canonical,relocated,transport,virtual}{,.db}
231 gzip -9nf *README COMPATIBILITY HISTORY LICENSE RELEASE_NOTES \
234 > $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
237 rm -rf $RPM_BUILD_ROOT
240 if [ -n "`/usr/bin/getgid postfix`" ]; then
241 if [ "`getgid postfix`" != "62" ]; then
242 echo "Warning: group postfix haven't gid=62. Correct this before installing postfix" 1>&2
246 /usr/sbin/groupadd -g 62 -r -f postfix
248 if [ -n "`/usr/bin/getgid maildrop`" ]; then
249 if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
250 echo "Warning: group maildrop haven't gid=63. Correct this before installing postfix" 1>&2
254 /usr/sbin/groupadd -g 63 -r -f maildrop
256 if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
257 if [ "`/bin/id -u postfix`" != "62" ]; then
258 echo "Warning: user postfix haven't uid=62. Correct this before installing postfix" 1>&2
262 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
267 if ! grep -q "^postmaster:" /etc/mail/aliases; then
268 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
269 echo "postmaster: root" >>/etc/mail/aliases
271 if ! grep -q "^myhostname" /etc/mail/main.cf; then
272 postconf -e myhostname=`/bin/hostname -f`
276 /sbin/chkconfig --add postfix
277 if [ -f /var/lock/subsys/postfix ]; then
278 /etc/rc.d/init.d/postfix restart >&2
280 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
284 if [ "$1" = "0" ]; then
285 if [ -f /var/lock/subsys/postfix ]; then
286 /etc/rc.d/init.d/postfix stop >&2
288 /sbin/chkconfig --del postfix
293 if [ "$1" = "0" ]; then
294 /usr/sbin/groupdel maildrop 2> /dev/null
295 /usr/sbin/userdel postfix 2> /dev/null
296 /usr/sbin/groupdel postfix 2> /dev/null
299 %triggerpostun -- postfix < 1:1.1.2
300 sed -e 's/^\(pickup[ ]\+fifo[ ]\+[^ ]\+[ ]\+\)[^ ]\+\([ ]\)/\1-\2/;
301 s/^\(cleanup[ ]\+unix[ ]\+\)[^ ]\+\([ ]\)/\1n\2/' /etc/mail/master.cf \
302 > /etc/mail/master.cf.rpmtmp
303 mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf
306 %defattr(644,root,root,755)
307 %doc html *.gz README_FILES/*.gz
309 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
310 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
311 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
312 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
313 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
314 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
315 #%ghost %{_sysconfdir}/mail/*.db
316 %dir %{_sysconfdir}/mail
317 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/dynamicmaps.cf
318 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
319 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
320 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
321 %attr(755,root,root) %{_sysconfdir}/mail/post-install
322 %{_sysconfdir}/mail/postfix-files
323 %attr(740,root,root) /etc/cron.daily/postfix
324 %attr(754,root,root) /etc/rc.d/init.d/postfix
325 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/postfix
326 %{!?_without_sasl:%config(noreplace) %verify(not size mtime md5) /etc/sasl/smtpd.conf}
327 %attr(755,root,root) %{_libdir}/libpostfix-*.so.*
328 %attr(755,root,root) %{_bindir}/*
329 %attr(755,root,root) %{_sbindir}/s*
330 %attr(755,root,root) %{_sbindir}/postfix
331 %attr(755,root,root) %{_sbindir}/postalias
332 %attr(755,root,root) %{_sbindir}/postkick
333 %attr(755,root,root) %{_sbindir}/postl*
334 %attr(755,root,root) %{_sbindir}/postc*
335 %attr(755,root,root) %{_sbindir}/postmap
336 %attr(2755,root,maildrop) %{_sbindir}/postqueue
337 %attr(755,root,root) %{_sbindir}/postsuper
338 %attr(2755,root,maildrop) %{_sbindir}/postdrop
339 %attr(755,root,root) %{_sbindir}/qmqp-source
340 %attr(755,root,root) %{_libdir}/sendmail
341 %dir %{_libdir}/postfix
342 %attr(755,root,root) %{_libdir}/postfix/[^d]*
343 %attr(755,root,root) %dir %{_var}/spool/postfix
344 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
345 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
346 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
347 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
348 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
349 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
350 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
351 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
352 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
353 %attr(710, postfix,maildrop) %dir %{_var}/spool/postfix/public
354 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
355 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger
359 %defattr(644,root,root,755)
360 %attr(755,root,root) %{_libdir}/libpostfix-*.so
361 %{_includedir}/postfix
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_libdir}/postfix/dict_ldap.so
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_libdir}/postfix/dict_mysql.so
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_libdir}/postfix/dict_pcre.so
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_libdir}/postfix/dict_pgsql.so