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