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