1 Summary: Postfix Mail Transport Agent
2 Summary(pl): Agent Pocztowy Postfix
6 Group: Networking/Daemons
7 Group(de): Netzwerkwesen/Server
8 Group(pl): Sieciowe/Serwery
9 Copyright: Distributable
10 Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/snapshot-%{version}.tar.gz
11 Source1: %{name}.aliases
14 Source5: %{name}.sysconfig
15 Patch0: %{name}-config.patch
16 Patch1: http://www.misiek.eu.org/ipv6/%{name}-ver20000922-ipv6-20000922.patch.gz
17 Patch2: %{name}-pl.patch
18 URL: http://www.postfix.org/
21 %{!?no_ldap:BuildRequires: openldap-devel}
22 BuildRequires: openssl-devel >= 0.9.4-2
23 %{!?no_pcre:BuildRequires: pcre-devel}
24 %{!?no_sasl:BuildRequires: cyrus-sasl-devel}
29 Obsoletes: sendmail-cf
30 Prereq: /sbin/chkconfig
31 Prereq: %{_sbindir}/useradd
32 Prereq: %{_sbindir}/groupadd
33 Prereq: %{_sbindir}/userdel
34 Prereq: %{_sbindir}/groupdel
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _sysconfdir /etc
40 Postfix is attempt to provide an alternative to the widely-used
41 Sendmail program. Postfix attempts to be fast, easy to administer, and
42 hopefully secure, while at the same time being sendmail compatible
43 enough to not upset your users. This version have IPv6 support and
44 %{!?no_ldap:no }LDAP support.
47 Postfix jest prób± dostarczenia alternatywnego MTA w stosunku do
48 szeroko u¿ywanego sendmaila. Postfix w zamierzeniu ma byæ szybki,
49 ³atwy w administrowaniu, bezpieczny oraz ma byæ na tyle kompatybilny z
50 sendmailem by nie denerwowaæ Twoich u¿ytkowników. Ta wersja wspiera
51 IPv6%{!?no_ldap: oraz LDAP} %{?no_ldap: i nie zawiera wsparcia LDAP}.
54 %setup -q -n snapshot-%{version}
60 %{__make} -f Makefile.init makefiles
62 %{__make} DEBUG="" OPT="-g $RPM_OPT_FLAGS" \
63 CCARGS="%{!?no_ldap:-DHAS_LDAP} %{!?no_pcre:-DHAS_PCRE} %{!?no_sasl:-DUSE_SASL_AUTH } " AUXLIBS="%{!?no_ldap:-llber -lldap} -lnsl -ldb -lresolv %{!?no_pcre:-lpcre} %{!?no_sasl:-lsasl}"
66 rm -rf $RPM_BUILD_ROOT
67 rm -f {html,man}/Makefile.in conf/{LICENSE,main.cf.default}
69 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{mail,cron.daily,rc.d/init.d,sysconfig} \
70 $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,%{_mandir}/man{1,5,8}} \
71 $RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
74 install -d sample-conf; mv -f conf/sample* sample-conf/ || :
76 install -s bin/* $RPM_BUILD_ROOT%{_sbindir}
77 install -s libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
78 #install bin/* $RPM_BUILD_ROOT%{_sbindir}
79 #install libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
80 install conf/* $RPM_BUILD_ROOT%{_sysconfdir}/mail
82 (cd man; tar cf - .) | (cd $RPM_BUILD_ROOT%{_mandir}; tar xf -)
84 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
85 install %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
86 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
87 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/postfix
89 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
90 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
91 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
93 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/mail/postfix-script-sgid \
94 $RPM_BUILD_ROOT%{_sysconfdir}/mail/postfix-script
96 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/mail/postfix-script-{diff,nosgid}
98 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/\
99 {aliases,access,canonical,relocated,transport,virtual}{,.db}
101 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
102 LDAP_README HISTORY MYSQL_README UUCP_README \
103 0README BEWARE COMPATIBILITY DEBUG_README LICENSE LMTP_README \
105 RELEASE_NOTES RESTRICTION_CLASS SASL_README TODO FILTER_README
107 touch $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
110 if [ -n "`getgid postfix`" ]; then
111 if [ "`getgid postfix`" != "62" ]; then
112 echo "Warning: group postfix haven't gid=62. Corect this before install postfix" 1>&2
116 /usr/sbin/groupadd -g 62 -r -f postfix
117 if [ -f /var/db/group.db ]; then
118 /usr/bin/update-db 1>&2
121 if [ -n "`getgid maildrop`" ]; then
122 if [ "`getgid maildrop`" != "63" ]; then
123 echo "Warning: group maildrop haven't gid=63. Corect this before install postfix" 1>&2
127 /usr/sbin/groupadd -g 63 -r -f maildrop
128 if [ -f /var/db/group.db ]; then
129 /usr/bin/update-db 1>&2
132 if [ -n "`id -u postfix 2>/dev/null`" ]; then
133 if [ "`id -u postfix`" != "62" ]; then
134 echo "Warning: user postfix haven't uid=62. Corect this before install postfix" 1>&2
138 /usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
139 if [ -f /var/db/passwd.db ]; then
140 /usr/bin/update-db 1>&2
145 if ! grep -q "^postmaster:" /etc/mail/aliases; then
146 echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
147 echo "postmaster: root" >>/etc/mail/aliases
149 if ! grep -q "^myhostname" /etc/mail/main.cf; then
150 postconf -e myhostname=`hostname -f`
154 /sbin/chkconfig --add postfix
155 if [ -f /var/lock/subsys/postfix ]; then
156 /etc/rc.d/init.d/postfix restart >&2
158 echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
162 if [ "$1" = "0" ]; then
163 if [ -f /var/lock/subsys/postfix ]; then
164 /etc/rc.d/init.d/postfix stop >&2
166 /sbin/chkconfig --del postfix
171 %{_sbindir}/groupdel maildrop 2> /dev/null
172 %{_sbindir}/userdel postfix 2> /dev/null
173 %{_sbindir}/groupdel postfix 2> /dev/null
174 if [ -f /var/db/passwd.db ] || [ -f /var/db/group.db ]; then
175 /usr/bin/update-db 1>&2
180 rm -rf $RPM_BUILD_ROOT
183 %defattr(644,root,root,755)
184 %doc html {LDAP_README,HISTORY,MYSQL_README,UUCP_README}.gz
185 %doc {0README,BEWARE,COMPATIBILITY,DEBUG_README,LICENSE,LMTP_README,PCRE_README}.gz
186 %doc {RELEASE_NOTES,RESTRICTION_CLASS,SASL_README,TODO,FILTER_README}.gz
188 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/access
189 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
190 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/canonical
191 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/relocated
192 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/transport
193 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/virtual
194 #%ghost %{_sysconfdir}/mail/*.db
195 %dir %{_sysconfdir}/mail
196 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/main.cf
197 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/master.cf
198 %attr(755,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/postfix-script
199 %attr(740,root,root) /etc//cron.daily/postfix
200 %attr(754,root,root) /etc/rc.d/init.d/postfix
201 %attr(640,root,root) %config(noreplace) /etc/sysconfig/postfix
202 %attr(755,root,root) %{_bindir}/*
203 %attr(755,root,root) %{_sbindir}/s*
204 %attr(755,root,root) %{_sbindir}/post*i*
205 %attr(755,root,root) %{_sbindir}/postl*
206 %attr(755,root,root) %{_sbindir}/postc*
207 %attr(755,root,root) %{_sbindir}/postmap
208 %attr(755,root,root) %{_sbindir}/postsuper
209 %attr(2755,root,maildrop) %{_sbindir}/postdrop
210 %attr(755,root,root) %{_libdir}/sendmail
211 %attr(755,root,root) %{_libdir}/postfix
212 %attr(755,root,root) %dir %{_var}/spool/postfix
213 %attr(700, postfix,root) %dir %{_var}/spool/postfix/active
214 %attr(700, postfix,root) %dir %{_var}/spool/postfix/bounce
215 %attr(700, postfix,root) %dir %{_var}/spool/postfix/corrupt
216 %attr(700, postfix,root) %dir %{_var}/spool/postfix/defer
217 %attr(700, postfix,root) %dir %{_var}/spool/postfix/deferred
218 %attr(700, postfix,root) %dir %{_var}/spool/postfix/incoming
219 %attr(1730,postfix,maildrop) %dir %{_var}/spool/postfix/maildrop
220 %attr(755, postfix,root) %dir %{_var}/spool/postfix/pid
221 %attr(700, postfix,root) %dir %{_var}/spool/postfix/private
222 %attr(755, postfix,root) %dir %{_var}/spool/postfix/public
223 %attr(700, postfix,root) %dir %{_var}/spool/postfix/saved
224 %attr(644, postfix,root) %{_var}/spool/postfix/.nofinger