]> git.pld-linux.org Git - packages/sendmail.git/blob - sendmail.spec
- updated to 8.11.4 and removed ipv6-glibc-2.2 obsoleted patch.
[packages/sendmail.git] / sendmail.spec
1 #
2 # Conditional build:
3 # _without_ldap - without LDAP
4 #
5 Summary:        A widely used Mail Transport Agent (MTA)
6 Summary(de):    sendmail-Mail-Übertragungsagent
7 Summary(fr):    Agent de transport de courrier sendmail
8 Summary(pl):    Sendmail -- aplikacja do obs³ugi poczty elektronicznej
9 Summary(tr):    Elektronik posta hizmetleri sunucusu
10 Name:           sendmail
11 Version:        8.11.4
12 Release:        1
13 License:        BSD
14 Group:          Networking/Daemons
15 Group(de):      Netzwerkwesen/Server
16 Group(pl):      Sieciowe/Serwery
17 Provides:       smtpdaemon
18 Source0:        ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz
19 Source1:        %{name}.init
20 Source2:        http://www.informatik.uni-kiel.de/~ca/email/rules/check.tar
21 Source3:        aliases
22 Source4:        %{name}.sysconfig
23 Source5:        %{name}-etc-mail-Makefile
24 Source6:        %{name}.mc
25 Source7:        %{name}-config.m4
26 Source8:        %{name}.sasl
27 Patch0:         %{name}-redhat.patch
28 Patch1:         %{name}-makemapman.patch
29 Patch2:         %{name}-smrsh-paths.patch
30 Patch3:         %{name}-rmail.patch
31 Patch4:         %{name}-manpath.patch
32 Patch5:         %{name}-m4path.patch
33 Patch6:         %{name}-dtelnet.patch
34 Patch7:         %{name}-pld.mc.patch
35 Patch8:         %{name}-redirect.patch
36 Patch9:         %{name}-hprescan-dos.patch
37 Patch10:        %{name}-aliasesDoS.patch
38 Patch11:        %{name}-fix.patch
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 BuildRequires:  cyrus-sasl-devel
41 BuildRequires:  db3-devel
42 BuildRequires:  gdbm-devel
43 %{!?_without_ldap:BuildRequires:        openldap-devel}
44 BuildRequires:  pam-devel
45 Requires:       m4
46 Prereq:         /sbin/chkconfig
47 Provides:       smtpdaemon
48 Obsoletes:      smtpdaemon
49 Obsoletes:      zmailer
50 Obsoletes:      qmail
51 Obsoletes:      smail
52 Obsoletes:      exim
53 Obsoletes:      postfix
54 Obsoletes:      sendmail-cf
55 Obsoletes:      sendmail-doc
56
57 %define         _sysconfdir     /etc/mail
58
59 %description
60 The Sendmail program is a very widely used Mail Transport Agent (MTA).
61 MTAs send mail from one machine to another. Sendmail is not a client
62 program, which you use to read your e-mail. Sendmail is a
63 behind-the-scenes program which actually moves your e-mail over
64 networks or the Internet to where you want it to go.
65
66 %description -l de
67 Sendmail überträgt Mails zwischen Rechnern. Es implementiert eine
68 allgemeine Mail-Routing-Funktion über das Netzwerk mit Aliasing und
69 Weiterleiten von Nachrichten, automatischem Routing an
70 Netzwerk-Gateways und flexible Konfiguration. Wenn Sie E-Mails über
71 das Internet senden und empfangen möchten, brauchen Sie sendmail.
72
73 %description -l fr
74 Sendmail est un agent de transport de courrier, qui est le programme
75 transférent le courrier d'une machine à l'autre. Sendmail implémente
76 une facilité générale de routage de courrier entre les réseaux, permet
77 l'\"aliasing\" et le \"forwarding\", un routage automatique sur les
78 passerelles du réseau, et une configuration flexible.
79
80 %description -l pl
81 Sendmail jest programem umo¿liwiaj±cym wymianê poczty elektronicznej
82 miêdzy komputerami w sieci internet. Zajmuje siê przekazywaniem poczty
83 elektronicznej miêdzy bramkami pocztowymi i dostarczaniem przesy³ek na
84 konta docelowe. Bardzo dobrze obs³uguje aliasy pocztowe a jego
85 dodatkowym atutem jest prosta konfiguracja. Dziêki rozbudowanym
86 mo¿liwo¶ciom konfiguracyjnym jest w stanie dostarczaæ przesy³ki za
87 po¶rednictwem protoko³ów: SMTP, ESMTP, UUCP, X.400 i innych.
88
89 %description -l tr
90 Sendmail, bir mektubu bir makineden diðerine taþýr. Pek çok davranýþý
91 ayarlanabilir. Internet üzerinden mektup almak veya göndermek
92 istiyorsanýz bu pakete gereksiniminiz olacaktýr.
93
94 %prep
95 %setup -q
96 %patch0 -p1
97 %patch1 -p1
98 %patch2 -p1
99 %patch3 -p1
100 %patch4 -p0
101 %patch5 -p1
102 %patch6 -p1
103 %patch7 -p1
104 %patch8 -p1
105 %patch9 -p1
106 %patch10 -p1
107 %patch11 -p1
108
109 # seems to be obsoleted...
110 #tar xf %{SOURCE2} -C cf
111
112 sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/redhat.mc
113
114 install %{SOURCE7} config.m4
115
116 %build
117
118 %if %{?debug:0}%{!?debug:1}
119 echo "define(\`confLDOPTS\', \`-s\')" >> config.m4
120 %endif
121 %if %{?_without_ldap:0}%{!?_without_ldap:1}
122 echo "APPENDDEF(\`confMAPDEF\', \`-DLDAPMAP\')" >> config.m4
123 echo "APPENDDEF(\`confLIBS\', \`-lldap -llber\')" >> config.m4
124 %endif
125
126 RPM_OPT_FLAGS="%{rpmcflags} \
127         -DUSE_VENDOR_CF_PATH=1 -DNETINET6 -D_FFR_TESTMODE_DROP_PRIVS"
128 export RPM_OPT_FLAGS
129
130 cd sendmail     && sh Build -f ../config.m4
131 cd ../mailstats && sh Build -f ../config.m4
132 cd ../rmail     && sh Build -f ../config.m4
133 cd ../makemap   && sh Build -f ../config.m4
134 cd ../praliases && sh Build -f ../config.m4
135 cd ../smrsh     && sh Build -f ../config.m4
136 cd ../cf/cf
137 m4 redhat.mc > redhat.cf
138
139 %install
140 rm -rf $RPM_BUILD_ROOT
141 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,sasl,smrsh}} \
142         $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_libdir} \
143         $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \
144         $RPM_BUILD_ROOT/var/log $RPM_BUILD_ROOT/var/spool/mqueue \
145         $RPM_BUILD_ROOT%{_libdir}/sendmail-cf \
146
147 OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
148
149 IDNU=`id -nu`
150 IDNG=`id -ng`
151 SMINSTOPT="DESTDIR=$RPM_BUILD_ROOT SBINOWN=$IDNU SBINGRP=$IDNG \
152         UBINOWN=$IDNU UBINGRP=$IDNG MANOWN=$IDNU MANGRP=$IDNG"
153 %{__make} $SMINSTOPT install -C $OBJDIR/sendmail
154 %{__make} $SMINSTOPT install -C $OBJDIR/mailstats
155 %{__make} $SMINSTOPT install -C $OBJDIR/praliases
156 %{__make} $SMINSTOPT force-install -C $OBJDIR/rmail
157 %{__make} $SMINSTOPT install -C $OBJDIR/makemap
158 ln -sf ../sbin/makemap $RPM_BUILD_ROOT%{_bindir}/makemap
159 %{__make} $SMINSTOPT install -C $OBJDIR/smrsh
160
161 # install docs by hand
162 install -d $RPM_BUILD_ROOT%{_docdir}/sendmail
163 cp -ar FAQ LICENSE KNOWNBUGS README RELEASE_NOTES doc $RPM_BUILD_ROOT%{_docdir}/sendmail
164 cp smrsh/README $RPM_BUILD_ROOT%{_docdir}/sendmail/README.smrsh
165 cp cf/README $RPM_BUILD_ROOT%{_docdir}/sendmail/README.cf
166
167 # install the cf files
168 cd cf
169 rm -f cf/{Build,Makefile} feature/*~
170 cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf
171 cd -
172
173 install cf/cf/redhat.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
174 sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} \
175         > $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc
176 echo "# local-host-names - include all aliases for your machine here." \
177         > $RPM_BUILD_ROOT%{_sysconfdir}/local-host-names
178
179 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
180
181 # dangling symlinks
182 for f in hoststat mailq newaliases purgestat ; do
183   ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
184 done
185
186 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/access
187 # Check the %{_prefix}/doc/sendmail-%{version}/README.cf file for a description
188 # of the format of this file. (search for access_db in that file)
189 # The %{_prefix}/doc/sendmail-%{version}/README.cf is part of the sendmail-doc
190 # package.
191 #
192 # by default we allow relaying from localhost...
193 localhost.localdomain           RELAY
194 localhost                       RELAY
195 127.0.0.1                       RELAY
196 EOF
197
198 for map in virtusertable access domaintable mailertable ; do
199         touch $RPM_BUILD_ROOT%{_sysconfdir}/${map}
200                 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
201                 $RPM_BUILD_ROOT%{_sysconfdir}/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/${map}
202 done
203
204 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
205 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
206         $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
207
208 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
209 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
210 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/Makefile
211 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sasl/sendmail
212
213 mv $RPM_BUILD_ROOT/usr/share/doc/sendmail/{FAQ,KNOWNBUGS,LICENSE,README,README.cf,doc/op/op.me} .
214
215 gzip -9nf FAQ KNOWNBUGS README README.cf op.me
216
217 %clean
218 rm -rf $RPM_BUILD_ROOT
219
220 %post
221 #
222 # Convert old format to new
223 #
224 if [ -f /etc/mail/deny ] ; then
225         cat /etc/mail/deny | \
226                 awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \
227                 {print $1" REJECT"}' >> /etc/mail/access
228         cp /etc/mail/deny /etc/mail/deny.rpmorig
229 fi
230 for oldfile in relay_allow ip_allow name_allow ; do
231         if [ -f /etc/mail/$oldfile ] ; then
232                 cat /etc/mail/$oldfile | \
233                         awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \
234                         { print $1\" RELAY\" }" >> /etc/mail/access
235                 cp /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig
236         fi
237 done
238
239 #
240 # Oops, these files moved
241 #
242 if [ -f /etc/sendmail.cw ] ; then
243         cat /etc/sendmail.cw  | \
244                 awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \
245                 { print $1 }' >> /etc/mail/local-host-names
246         cp /etc/sendmail.cw /etc/sendmail.cw.rpmorig
247 fi
248 #
249 # Rebuild maps (next reboot will rebuild also)
250 #
251 { /usr/bin/newaliases
252  for map in virtusertable access domaintable mailertable; do
253         if [ -f /etc/mail/${map} ] ; then
254                 /usr/bin/makemap hash /etc/mail/${map} < /etc/mail/${map}
255                 sleep 1
256         fi
257  done
258 } > /dev/null 2>&1
259
260 /sbin/chkconfig --add sendmail
261 if [ -f /var/lock/subsys/sendmail ]; then
262         /etc/rc.d/init.d/sendmail restart >&2
263 else
264         echo "Run \"/etc/rc.d/init.d/sendmail start\" to start sendmail daemon." >&2
265 fi
266
267 %preun
268 if [ "$1" = "0" ]; then
269         if [ -f /var/lock/subsys/sendmail ]; then
270                 /etc/rc.d/init.d/sendmail stop >&2
271         fi
272         /sbin/chkconfig --del sendmail
273 fi
274
275 # removal of compatibility links
276 %triggerpostun -- sendmail < 8.10.1
277 /sbin/chkconfig --add sendmail
278
279 %files
280 %defattr(644,root,root,755)
281 %doc *.gz
282 %attr(755,root,root) %{_sbindir}/mailstats
283 %attr(755,root,root) %{_sbindir}/praliases
284 %attr(755,root,root) %{_bindir}/hoststat
285 %attr(755,root,root) %{_bindir}/purgestat
286 %attr(755,root,root) %{_bindir}/rmail
287 %attr(755,root,root) %{_bindir}/makemap
288 %attr(755,root,root) %{_sbindir}/makemap
289 %attr(755,root,root) %{_sbindir}/sendmail
290 %attr(755,root,root) %{_bindir}/newaliases
291 %attr(755,root,root) %{_bindir}/mailq
292 %attr(755,root,root) %{_sbindir}/smrsh
293 %{_libdir}/sendmail
294
295 %{_mandir}/man8/rmail.8*
296 %{_mandir}/man8/praliases.8*
297 %{_mandir}/man8/mailstats.8*
298 %{_mandir}/man8/makemap.8*
299 %{_mandir}/man8/sendmail.8*
300 %{_mandir}/man5/aliases.5*
301 %{_mandir}/man1/newaliases.1*
302 %{_mandir}/man1/mailq.1*
303
304 /var/log/statistics
305 # XXX can't do noreplace here or new sendmail will not deliver.
306 %config %{_sysconfdir}/sendmail.cf
307 %config %{_sysconfdir}/sendmail.mc
308 %config(noreplace) %{_sysconfdir}/local-host-names
309 %config(noreplace) %{_sysconfdir}/aliases
310 %attr(0644,root,mail) %ghost %{_sysconfdir}/aliases.db
311 %attr(0755,root,mail) %dir /var/spool/mqueue
312 %dir /etc/smrsh
313 %dir %{_sysconfdir}
314
315 %config %{_sysconfdir}/Makefile
316 %ghost %{_sysconfdir}/virtusertable.db
317 %config(noreplace) %{_sysconfdir}/virtusertable
318 %ghost %{_sysconfdir}/access.db
319 %config(noreplace) %{_sysconfdir}/access
320 %ghost %{_sysconfdir}/domaintable.db
321 %config(noreplace) %{_sysconfdir}/domaintable
322 %ghost %{_sysconfdir}/mailertable.db
323 %config(noreplace) %{_sysconfdir}/mailertable
324 %config(noreplace) %{_sysconfdir}/helpfile
325
326 %attr(754,root,root) /etc/rc.d/init.d/sendmail
327 %config(noreplace) /etc/sysconfig/sendmail
328 %config(noreplace) /etc/sasl/sendmail
329
330 %dir %{_libdir}/sendmail-cf
331 %dir %{_libdir}/sendmail-cf/cf
332 %{_libdir}/sendmail-cf/cf/pld.mc
333 %{_libdir}/sendmail-cf/feature
334 %{_libdir}/sendmail-cf/m4
335 %{_libdir}/sendmail-cf/mailer
336 %dir %{_libdir}/sendmail-cf/ostype
337 %{_libdir}/sendmail-cf/ostype/linux.m4
338 %dir %{_libdir}/sendmail-cf/sh
339 %{_libdir}/sendmail-cf/sh/makeinfo.sh
340 %{_libdir}/sendmail-cf/siteconfig
This page took 0.405643 seconds and 4 git commands to generate.