# # spec file for package mailx # # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: mailx BuildRequires: groff BuildRequires: krb5-devel BuildRequires: man BuildRequires: openssl-devel BuildRequires: pcre BuildRequires: pkg-config #BuildRequires: postfix BuildRequires: pkgconfig(openssl) Url: http://heirloom.sourceforge.net/mailx.html Provides: mail Recommends: smtp_daemon Version: 12.5 Release: 26.3 Summary: A MIME-Capable Implementation of the mailx Command License: BSD-4-Clause and MPL-1.1 Group: Productivity/Networking/Email/Utilities Source: mailx-%{version}.tar.bz2 Patch: mailx-%{version}.dif Patch1: nail-11.25-path.dif Patch2: mailx-%{version}-replyto.patch Patch3: nail-11.25-ttychar.dif Patch4: nail-11.25-toaddr.dif Patch5: mailx-%{version}-mime.dif Patch6: mailx-fix-openssl.patch #PATCH-FIX-OPENSUSE: Try to tranquilize gcc warning about parentheses (please check!) Patch7: mailx-12.5-parentheses.dif #PATCH-FIX-SUSE: Fix IPv6 address handling Patch8: mailx-12.5-ipv6.dif #PATCH-FIX-SUSE: bsc#909208 -- CVE-2004-2771, CVE-2014-7844: mailx: shell command injection via crafted email addresses Patch9: 0001-outof-Introduce-expandaddr-flag.patch #PATCH-FIX-SUSE: bsc#909208 -- CVE-2004-2771, CVE-2014-7844: mailx: shell command injection via crafted email addresses Patch10: 0002-unpack-Disable-option-processing-for-email-addresses.patch #PATCH-FIX-SUSE: bsc#909208 -- CVE-2004-2771, CVE-2014-7844: mailx: shell command injection via crafted email addresses Patch11: 0003-fio.c-Unconditionally-require-wordexp-support.patch #PATCH-FIX-SUSE: bsc#909208 -- CVE-2004-2771, CVE-2014-7844: mailx: shell command injection via crafted email addresses Patch12: 0004-globname-Invoke-wordexp-with-WRDE_NOCMD-CVE-2004-277.patch #PATCH-FIX-SUSE: bsc#1042663 -- mailx fails to build with openssl-1.1 Patch13: mailx-12.5-openssl-1.1.0f.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Nail is a mail user agent derived from Berkeley Mail 8.1. It is intended to provide the functionality of the POSIX.2 mailx command with additional support for MIME messages, POP3, and SMTP. In recent system environments, nail is Unicode/UTF-8 capable. Further, it contains some minor enhancements like the ability to set a "From:" address. %prep %setup -q -n mailx-%{version} %patch1 -p0 -b .path %patch2 -p0 -b .rplyto %patch3 -p0 -b .ttychr %patch4 -p0 -b .toaddr %patch5 -p0 -b .mime %patch6 -p0 -b .ssl %patch7 -p0 -b .par %patch8 -p0 -b .ipv6 %patch9 -p1 -b .0001 %patch10 -p1 -b .0002 %patch11 -p1 -b .0003 %patch12 -p1 -b .0004 %patch13 -p0 -b .ssl11f %patch -p1 -b .0 %build CC=gcc CFLAGS="${RPM_OPT_FLAGS} -pipe -D_GNU_SOURCE -DOPENSSL_NO_SSL_INTERN $(pkg-config --cflags openssl)" export CC CFLAGS $SHELL ./makeconfig make %{?jobs:-j%jobs} PREFIX=/usr CC="$CC" CFLAGS="$CFLAGS" # tbl < mailx.1 | groff -mandocdb -Tps | grep -v %%%%CreationDate > manual.ps # gzip -9fn manual.ps %install make install PREFIX=/usr DESTDIR=${RPM_BUILD_ROOT} rm -rf ${RPM_BUILD_ROOT}/bin mkdir ${RPM_BUILD_ROOT}/bin ln -sf ../usr/bin/mailx ${RPM_BUILD_ROOT}/bin/mail ln -sf mailx ${RPM_BUILD_ROOT}/usr/bin/Mail ln -sf mailx ${RPM_BUILD_ROOT}/usr/bin/mail ln -sf mailx.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/Mail.1.gz ln -sf mailx.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/mail.1.gz install -m 0644 mail.rc ${RPM_BUILD_ROOT}/etc mkdir -p ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) #%doc COPYING README manual.ps.gz nail.rc %doc COPYING README nail.rc /bin/mail %config /etc/mail.rc /usr/bin/Mail /usr/bin/mail /usr/bin/mailx %doc %{_mandir}/man1/Mail.1.gz %doc %{_mandir}/man1/mail.1.gz %doc %{_mandir}/man1/mailx.1.gz %changelog * Mon Jun 12 2017 werner@suse.de - Add patch mailx-12.5-openssl-1.1.0f.patch Avoid deprecated/unavailable openSSL client methods (boo#1042663) * Sat Apr 29 2017 bwiedemann@suse.com - call gzip -n and drop CreationDate from manual.ps to make build fully reproducible * Fri Apr 8 2016 werner@suse.de - Correct parenthese expansion to fulfill natural order (bnc#974561) * Tue Mar 17 2015 werner@suse.de - Modify patch mailx-12.5-mime.dif to allow Form Feed as valid characters within mail messages (bsc#922543) * Thu Dec 11 2014 werner@suse.de - Add patches 0001-outof-Introduce-expandaddr-flag.patch 0002-unpack-Disable-option-processing-for-email-addresses.patch 0003-fio.c-Unconditionally-require-wordexp-support.patch 0004-globname-Invoke-wordexp-with-WRDE_NOCMD-CVE-2004-277.patch to fix bsc#909208 -- CVE-2004-2771, CVE-2014-7844: mailx: shell command injection via crafted email addresses * Sat Apr 19 2014 crrodriguez@opensuse.org - Build with -DOPENSSL_NO_SSL_INTERN asserting that this package does not (and should not) use openSSL internals that are subject to binary incompatible changes. * Fri Dec 6 2013 werner@suse.de - Correct comment in spec file * Wed Dec 4 2013 werner@suse.de - Crop off the brackets of an ipv6 addresse if found (bnc#853246) * Tue Dec 3 2013 werner@suse.de - Add patch mailx-12.5-ipv6.dif to enable mailx to parse IPv6 addresses including a port. We do only support the [ipv6]:port syntax (bnc#853246) * Tue Jul 2 2013 werner@suse.de - Do not pseudo detect Latin nor UTF-8 in binary attachments (bnc#827010) - Add patch mailx-12.5-parentheses.dif, that is try to tranquilize gcc due warning about parentheses (please check!) * Tue Jun 25 2013 coolo@suse.com - buildrequire groff explicitly * Tue Jun 11 2013 cfarrell@suse.com - license update: BSD-4-Clause and MPL-1.1 See COPYING. Fedora also uses this license designation * Fri Sep 14 2012 idonmez@suse.com - Add BuildRequires on man to fix build for Factory * Fri Mar 23 2012 werner@suse.de - Avoid header rewrite in case of specified ttycharset in wrong locale but subject in ttycharset (bnc#753340) * Fri Mar 23 2012 werner@suse.de - Try to support not only UTF-8 but also latin text encodings (bnc#753340) * Fri May 13 2011 werner@suse.de - Update to heirloom mailx 12.5 * Better detection of base64 encoded text if acrossed a line * A null pointer dereference that lead to a segmentation fault when the user hit return at a yes/no question has been fixed * When both standard input and standard output refer to a terminal, ignore SIGPIPE * With the "-E" command line option or if the "skipemptybody" variable is set, outgoing messages that contain no text in their first or only part are not sent but silently discarded. * When an attachment that would have a "text/something" content type contains illegal byte sequences, it is now reliably sent out with the "application/octet-stream" content type instead * Fixed a bug that caused messages to be truncated with IMAP servers that use LF as line ending in message data, such as Google Mail (reported by Matthew L. Shobe). * Do not run filename expansion for IMAP or POP3 mailboxes names, making it possible to select mailboxes that contain both brackets and spaces in their names (reported by Matthew L. Shobe). * Fixed the format of the timezone in "Date" header fields for zones in the Western Hemisphere whose offsets are not an integral number of hours (patch by Matthew Fischer). * Fixed a message corruption that occurred when the "inc" command was used with a mbox format mailbox after encrypted messages had been viewed (reported by Martin Neitzel). * Fixed a condition that caused mailx to hang when looking at a message, copying that message, and issuing a "z" command evaluating an uncached portion of an IMAP folder. * Make it compile with OpenSSL 1.0.0-beta2 * For RFC 2047 MIME "encoded-word" parts in headers, assume that the end of each word resets the conversion state (Yedidyah Bar-David). * When the ORGANIZATION variable has an empty value, do not generate an "Organization:" header field. Previously, this condition resulted in mailx refusing to send mail - Fix my Reply-To patch found by milli * Sat Apr 9 2011 crrodriguez@opensuse.org - Allow mailx to compile properly when openSSL is built without SSLv2 support. * Tue Feb 1 2011 gber@opensuse.org - only recommend smtp_daemon, mailx has builtin SMTP support * Fri Jun 11 2010 coolo@novell.com - fix parallel make * Mon Apr 19 2010 meissner@suse.de - fixed build issue with openssl 1.0 * Thu Dec 17 2009 jengelh@medozas.de - enable parallel building * Tue Nov 3 2009 coolo@novell.com - updated patches to apply with fuzz=0 * Tue Apr 17 2007 werner@suse.de - Update to heirloom mailx 12.2 - Add UTF-8 detection (bug #262658) - Do not convert text attachments to terminal charset but send character set (bug #262658) - Improve the support of text/ MIME types other than text/plain (bug #262658) * Wed Nov 15 2006 werner@suse.de - Do not send the mail to a reply-to address (bug #218447) * Wed Sep 27 2006 werner@suse.de - Avoid to feed empty strings into mime if empty results leads to an error like it does for an empty ORGANIZATION variable * Thu Jul 20 2006 werner@suse.de - Update to mailx version 12.1 the successor of nail * Better handling of base64 encoding * Support for SendmailX - Add a workaround for Ctrl-H used in kernel messages (#189974) - Do not convert 8bit encodings to ASCII but use quoted printable * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Fri Jan 20 2006 schwab@suse.de - Don't strip binaries. * Mon Oct 17 2005 werner@suse.de - Update to nail 11.25 * Port all out patches to this version * Use dummy option for the reply-to patch because the double colon feature of the glibc's getopt does not work * New: ssl and krb5 support * Mon Aug 30 2004 werner@suse.de - Update to bugfix release 11.4 * Thu Aug 19 2004 werner@suse.de - Make it option compatible with old mail program - Update to 11.3 * Tue Aug 17 2004 werner@suse.de - Update to 11.2 * Fri Mar 26 2004 mmj@suse.de - Add postfix to # neededforbuild * Sat Jan 10 2004 adrian@suse.de - add %%defattr * Mon Dec 8 2003 werner@suse.de - Update to version 10.6 * Tue Nov 11 2003 werner@suse.de - Fix handling of multiword e-mail addresses (bug #32115) * Wed Jul 30 2003 werner@suse.de - Use charset of locale as default encoding if not set * Wed Jul 2 2003 ro@suse.de - added symlink /usr/bin/mail (again) * Wed Jul 2 2003 werner@suse.de - Update to nail 10.5 * Thu Feb 27 2003 werner@suse.de - Fix replyto patch for Replay and replay case * Mon Feb 3 2003 werner@suse.de - Don't eat option id `+' isn't used anymore - Accept comma seperated `to' list on command line * Mon Jan 27 2003 sf@suse.de - removed '+' from optarg string to be able to mix argument order * Thu Dec 19 2002 werner@suse.de - Move from mail-8.1.1 to nail-10.3 due of getting RFC 2046 - Port the reply-to patch to nail-10.3 in extension to replyto variable of nail configuration * Thu Mar 7 2002 werner@suse.de - Include, enhance and test the reply-to patch from poc@pocnet.net. Useful for system notify mails behind firewalls or from header rewrite because those mails arn't uniq without reply address. * Sat May 12 2001 schwab@suse.de - Fix missing declarations. * Wed Nov 22 2000 werner@suse.de - Allow `/' within valid mail addresses - Strip leading + of file name on command line * Fri Oct 6 2000 kukuk@suse.de - change group tag * Wed May 24 2000 uli@suse.de - moved docs to /usr/share * Sat Feb 26 2000 kukuk@suse.de - Move /usr/man -> /usr/share/man * Mon Sep 20 1999 ro@suse.de - added requires smtp_daemon * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Mon Mar 22 1999 werner@suse.de - Add pine format for date * Mon Mar 22 1999 werner@suse.de - Add a security fix - Correct a old security fix to make it work * Thu Jun 25 1998 werner@suse.de - No gid mail and not sgid mail: we do not use them * Thu Jun 25 1998 werner@suse.de - Even if we are safe by dropping edid we want no buffer overflow - Use IOSAFE implementation for glibc instead of fpurge * Wed Jun 24 1998 werner@suse.de - Move from old debian version 8.5.5 (5.5-kw) to OpenBSD 8.1 release plus some changes from debian, redhat, and some own. * Wed Feb 5 1997 werner@suse.de - Using mailx-5.5-kw/8.5.5-debian for mail - Some changes to get emacs date mark on work in mail folders - Some clean up in code