]> git.pld-linux.org Git - packages/sendmail.git/blob - sendmail.spec
- adapteized.
[packages/sendmail.git] / sendmail.spec
1 Summary:        A widely used Mail Transport Agent (MTA).
2 Summary(pl):    Sendmail -- aplikacja do obs³ugi poczty elektronicznej
3 Name:           sendmail
4 Version:        8.10.1
5 Release:        1
6 License:        BSD
7 Group:          System Environment/Daemons
8 ######          Unknown group!
9 Group(pl):      Sieciowe/Serwery
10 Provides:       smtpdaemon
11 Source0:        ftp://ftp.cs.berkeley.edu/ucb/sendmail/%{name}.%{version}.tar.gz
12 Source1:        sendmail.init
13 Source2:        http://www.informatik.uni-kiel.de/%7Eca/email/rules/check.tar
14 Source3:        aliases
15 Source4:        sendmail.sysconfig
16 Source5:        sendmail-8.9.3-etc-mail-Makefile
17 Source6:        sendmail-redhat.mc
18 Patch0:         sendmail-8.10.0-redhat.patch
19 Patch1:         sendmail-8.10.0-makemapman.patch
20 Patch2:         sendmail-8.10.0-smrsh-paths.patch
21 Patch3:         sendmail-8.8.7-rmail.patch
22 #Patch4:        sendmail-8.10.0-aliasesDoS.patch
23 #Patch5:        sendmail-8.10.0-movefiles.patch
24 #Buildroot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 Prereq:         /sbin/chkconfig
27 Provides:       smtpdaemon
28 Obsoletes:      smtpdaemon
29 Obsoletes:      zmail
30 Obsoletes:      qmail
31 Obsoletes:      smail
32
33
34 %description
35 The Sendmail program is a very widely used Mail Transport Agent (MTA).
36 MTAs send mail from one machine to another. Sendmail is not a client
37 program, which you use to read your e-mail. Sendmail is a
38 behind-the-scenes program which actually moves your e-mail over
39 networks or the Internet to where you want it to go.
40
41 If you ever need to reconfigure Sendmail, you'll also need to have the
42 sendmail.cf package installed. If you need documentation on Sendmail,
43 you can install the sendmail-doc package.
44
45
46 %description -l pl
47 Sendmail jest programem umo¿liwiaj±cym wymianê poczty elektronicznej
48 miêdzy komputerami w sieci internet. Zajmuje siê przekazywaniem poczty
49 elektronicznej miêdzy bramkami pocztowymi i dostarczaniem przesy³ek na
50 konta docelowe. Bardzo dobrze obs³uguje aliasy pocztowe a jego
51 dodatkowym atutem jest prosta konfiguracja. Dziêki rozbudowanym
52 mo¿liwo¶ciom konfiguracyjnym jest w stanie dostarczaæ przesy³ki za
53 po¶rednictwem protoko³ów: SMTP, ESMTP, UUCP, X.400 i innych.
54
55 Je¿eli masz zamiar korzystaæ z poczty elektronicznej w sieci internet
56 oraz 6bone to zainstaluj ten pakiet
57
58 %package doc
59 Summary:        Documentation about the Sendmail Mail Transport Agent program.
60 Summary(pl):    Dokumentacja do Sendmaila.
61 Group(pl):      Serwery
62 Group:          Documentation
63
64 %description doc
65 The sendmail-doc package contains documentation about the Sendmail
66 Mail Transport Agent (MTA) program, including release notes, the
67 Sendmail FAQ and a few papers written about Sendmail. The papers are
68 provided in PostScript(TM) and troff formats.
69
70 Install the sendmail-doc package if you need documentation about
71 Sendmail.
72
73 %description -l pl
74 Ten pakiet zawiera dokumentacjê do programu Sendmail Mail Transport
75 Agent (MTA). Dokumentacja zwawiera informacje o zmianach w bie¿±cej
76 wersji, FAQ - najczêsciej zadawane pytania. Dokumentacja dostêpna jest
77 w formacie PostScript(TM) oraz troff. Je¿eli potrzebujesz dokumntacji
78 - zainstaluj ten pakiet.
79
80 %package cf
81 Summary:        The files needed to reconfigure Sendmail.
82 Summary(pl):    Pliki konfiguracyjne oraz makra m4 dla sendmaila
83 Group:          System Environment/Daemons
84 Group(pl):      Serwery
85 Requires:       %{name} = %{version}
86
87
88 %description cf
89 This package includes the configuration files which you'd need to
90 generate the sendmail.cf file distributed with the sendmail package.
91 You'll need the sendmail-cf package if you ever need to reconfigure
92 and rebuild your sendmail.cf file. For example, the default
93 sendmail.cf file is not configured for UUCP. If someday you needed to
94 send and receive mail over UUCP, you'd need to install the sendmail-cf
95 package to help you reconfigure Sendmail.
96
97 Install the sendmail-cf package if you need to reconfigure your
98 sendmail.cf file.
99
100 %description -l pl cf
101 Pakiet ten zawiera wszystkie pliki konfiguracyjne u¿ywane do gene-
102 rowania pliku sendmail.cf, znajduj±cego siê w pakiecie bazowym.
103 Bêdziesz potrzebowa³ tego pakietu je¿eli chcesz zmieniæ i przebudowaæ
104 konfiguracjê swojego sendmaila. Na przyk³ad, standardowy plik konfigu-
105 racyjny nie zawiera wspomagania dla poczty po UUCP. Je¿eli chcesz wy-
106 sy³aæ i odbieraæ pocztê po UUCP bêdziesz potrzebowa³ tego pakietu.
107
108 %prep
109 %setup -q
110 %patch0 -p1 -b .redhat
111 %patch1 -p1 -b .makemapman
112 %patch2 -p1 -b .smrsh
113 %patch3 -p1 -b .rmail
114 #%patch4 -p1 -b .aliases
115 #%patch5 -p1 -b .movestuff
116
117 # XXX REVERTING
118 #tar xf $RPM_SOURCE_DIR/check.tar -C cf
119 #chown root.root cf/hack/* cf/README.check
120
121
122 sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/redhat.mc
123
124 %build
125 export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DUSE_VENDOR_CF_PATH=1"
126
127 cd sendmail
128 sh Build -f ../redhat.config.m4
129 cd ..
130
131 cd mailstats
132 sh Build -f ../redhat.config.m4
133 cd ..
134
135 cd rmail
136 sh Build -f ../redhat.config.m4
137 cd ..
138
139 cd makemap
140 sh Build -f ../redhat.config.m4
141 cd ..
142
143 cd praliases
144 sh Build -f ../redhat.config.m4
145 cd ..
146
147 cd smrsh
148 sh Build -f ../redhat.config.m4
149 cd ..
150
151 cd cf/cf
152 m4 redhat.mc > redhat.cf
153
154 %install
155 rm -rf $RPM_BUILD_ROOT
156 install -d $RPM_BUILD_ROOT
157
158 cd $RPM_BUILD_ROOT
159 install -d etc/rc.d/init.d etc/rc.d/rc{0,1,2,3,4,5,6}.d etc/sysconfig
160 install -d usr/bin usr/lib usr/man/man{1,5,8} usr/sbin var/log var/spool usr/lib/sendmail-cf
161 cd -
162
163 OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
164
165 make DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
166  install -C $OBJDIR/sendmail
167 make DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
168  install -C $OBJDIR/mailstats
169 make DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
170  install -C $OBJDIR/praliases
171 make DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
172  force-install -C $OBJDIR/rmail
173 make DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
174  install -C $OBJDIR/makemap
175 ln -sf ../sbin/makemap $RPM_BUILD_ROOT%{_bindir}/makemap
176 make DESTDIR=$RPM_BUILD_ROOT SBINOWN=`id -nu` UBINOWN=`id -nu` SBINGRP=`id -ng` UBINGRP=`id -ng` MANOWN=`id -nu` MANGRP=`id -ng` \
177  install -C $OBJDIR/smrsh
178
179 # install docs by hand
180 install -d $RPM_BUILD_ROOT%{_prefix}/doc/sendmail
181 cp -ar FAQ LICENSE KNOWNBUGS README RELEASE_NOTES doc $RPM_BUILD_ROOT%{_prefix}/doc/sendmail
182 cp smrsh/README $RPM_BUILD_ROOT%{_prefix}/doc/sendmail/README.smrsh
183 cp cf/README $RPM_BUILD_ROOT%{_prefix}/doc/sendmail/README.cf
184
185 # install the cf files
186 cd cf
187 cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf
188 cd -
189
190 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail
191
192
193 install cf/cf/redhat.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
194 sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} > $RPM_BUILD_ROOT%{_sysconfdir}/mail/sendmail.mc
195 echo "# local-host-names - include all aliases for your machine here." > $RPM_BUILD_ROOT%{_sysconfdir}/mail/local-host-names
196
197 ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail
198 install -d -m755 $RPM_BUILD_ROOT/var/spool/mqueue
199
200 # dangling symlinks
201 for f in hoststat mailq newaliases purgestat
202   do
203     ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
204   done
205 install -d $RPM_BUILD_ROOT%{_sysconfdir}/smrsh
206
207 cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/mail/access
208 # Check the %{_prefix}/doc/sendmail-%{version}/README.cf file for a description
209 # of the format of this file. (search for access_db in that file)
210 # The %{_prefix}/doc/sendmail-%{version}/README.cf is part of the sendmail-doc
211 # package.
212 #
213 # by default we allow relaying from localhost...
214 localhost.localdomain           RELAY
215 localhost                       RELAY
216 127.0.0.1                       RELAY
217
218 EOF
219 for map in virtusertable access domaintable mailertable
220   do
221 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/${map}
222 makemap hash $RPM_BUILD_ROOT%{_sysconfdir}/mail/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/mail/${map}
223   done
224 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
225 makemap hash $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
226
227 install %SOURCE4 $RPM_BUILD_ROOT/etc/sysconfig/sendmail
228 install -m755 %SOURCE1 $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
229
230 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/mail/Makefile
231
232 chmod u+w $RPM_BUILD_ROOT%{_sbindir}/{mailstats,praliases}
233 chmod u+w $RPM_BUILD_ROOT%{_bindir}/rmail
234
235 strip $RPM_BUILD_ROOT%{_sbindir}/{mailstats,praliases,sendmail}
236 strip $RPM_BUILD_ROOT%{_bindir}/rmail
237
238 %clean
239 rm -rf $RPM_BUILD_ROOT
240
241 %post
242 #
243 # Convert old format to new
244 #
245 if [ -f /etc/mail/deny ] ; then
246     cat /etc/mail/deny | \
247         awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \
248                   {print $1" REJECT"}' >> /etc/mail/access
249     cp /etc/mail/deny /etc/mail/deny.rpmorig
250 fi
251 for oldfile in relay_allow ip_allow name_allow ; do
252     if [ -f /etc/mail/$oldfile ] ; then
253         cat /etc/mail/$oldfile | \
254                 awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \
255              { print $1\" RELAY\" }" >> /etc/mail/access
256         cp /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig
257      fi
258 done
259
260 #
261 # Oops, these files moved
262 #
263 if [ -f /etc/sendmail.cw ] ; then
264     cat /etc/sendmail.cw  | \
265       awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \
266            { print $1 }' >> /etc/mail/local-host-names
267     cp /etc/sendmail.cw /etc/sendmail.cw.rpmorig
268 fi
269 #
270 # Rebuild maps (next reboot will rebuild also)
271 #
272 { /usr/bin/newaliases
273   for map in virtusertable access domaintable mailertable
274   do
275     if [ -f /etc/mail/${map} ] ; then
276       /usr/bin/makemap hash /etc/mail/${map} < /etc/mail/${map}
277       sleep 1
278     fi
279   done
280 } > /dev/null 2>&1
281
282 /sbin/chkconfig --add sendmail
283
284 %preun
285 if [ $1 = 0 ]; then
286    /sbin/chkconfig --del sendmail
287 fi
288
289 # removal of compatibility links
290 %triggerpostun -- sendmail < 8.10.1
291 /sbin/chkconfig --add sendmail
292
293 %files
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_sbindir}/mailstats
296 %attr(755,root,root) %{_sbindir}/praliases
297 %attr(755,root,root) %{_bindir}/hoststat
298 %attr(755,root,root) %{_bindir}/purgestat
299 %attr(755,root,root) %{_bindir}/rmail
300 %attr(755,root,root) %{_bindir}/makemap
301 %attr(755,root,root) %{_sbindir}/makemap
302 %attr(755,root,root) %{_sbindir}/sendmail
303 %attr(755,root,root) %{_bindir}/newaliases
304 %attr(755,root,root) %{_bindir}/mailq
305 %attr(755,root,root) %{_sbindir}/smrsh
306 %{_libdir}/sendmail
307
308 %{_mandir}/man8/rmail.8*
309 %{_mandir}/man8/praliases.8*
310 %{_mandir}/man8/mailstats.8*
311 %{_mandir}/man8/makemap.8*
312 %{_mandir}/man8/sendmail.8*
313 %{_mandir}/man5/aliases.5*
314 %{_mandir}/man1/newaliases.1*
315 %{_mandir}/man1/mailq.1*
316
317 /var/log/statistics
318 # XXX can't do noreplace here or new sendmail will not deliver.
319 %config %{_sysconfdir}/sendmail.cf
320 %attr(0644,root,root) %config %{_sysconfdir}/mail/sendmail.mc
321 %config(noreplace) %{_sysconfdir}/mail/local-host-names
322 %config(noreplace) %{_sysconfdir}/aliases
323 %attr(0644,root,mail) %ghost %{_sysconfdir}/aliases.db
324 %attr(0755,root,mail) %dir      /var/spool/mqueue
325 %dir %{_sysconfdir}/smrsh
326 %dir %{_sysconfdir}/mail
327
328 %config %{_sysconfdir}/mail/Makefile
329 %attr(0644,root,root) %ghost %{_sysconfdir}/mail/virtusertable.db
330 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/mail/virtusertable
331
332 %attr(0644,root,root) %ghost %{_sysconfdir}/mail/access.db
333 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/mail/access
334
335 %attr(0644,root,root) %ghost %{_sysconfdir}/mail/domaintable.db
336 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/mail/domaintable
337
338 %attr(0644,root,root) %ghost %{_sysconfdir}/mail/mailertable.db
339 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/mail/mailertable
340
341 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/mail/helpfile
342
343 %config /etc/sysconfig/sendmail
344
345 %config /etc/rc.d/init.d/sendmail
346
347 %files cf
348 %defattr(644,root,root,755)
349 %{_libdir}/sendmail-cf
350
351 %files doc
352 %defattr(644,root,root,755)
353 %{_prefix}/doc/sendmail
This page took 0.743646 seconds and 4 git commands to generate.