Commit ccb7ad7f ccb7ad7f2f7ff72086e89a5ecb79c732d718eb58 by Sergey Poznyakoff

Final update for GPLv3

1 parent 980ded01
GNU LESSER GENERAL PUBLIC LICENSE
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Discussion Draft 2 of Version 3, 28 March 2007
THIS IS A DRAFT, NOT A PUBLISHED VERSION OF THE GNU LESSER GENERAL
PUBLIC LICENSE.
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Copyright (C) 2007 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
......@@ -31,7 +27,7 @@ of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version."
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
......@@ -43,14 +39,12 @@ object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
......@@ -58,16 +52,15 @@ that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a. under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b. under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
......@@ -76,15 +69,14 @@ material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a. Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b. Accompany the object code with a copy of the GNU GPL and this license
document.
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
......@@ -92,21 +84,21 @@ portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a. Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b. Accompany the Combined Work with a copy of the GNU GPL and this license
document.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c. For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d. Do one of the following:
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
......@@ -114,27 +106,26 @@ the following:
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e. Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
......@@ -142,16 +133,15 @@ facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a. Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b. Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
......@@ -173,4 +163,3 @@ whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
......
2007-06-29 Sergey Poznyakoff <gray@gnu.org.ua>
* COPYING, COPYING.LESSER: Install official versions
* configure.ac, NEWS: Version 1.2
* libsieve/extensions/spamd.c: Append `X-' headers.
* mail.local/main.c: Read message contents from the message
stream, so any changes to its headers and/or body are propagated
to the final delivery.
2007-06-28 Sergey Poznyakoff <gray@gnu.org.ua>
* configure.ac: Remove the definition of ARG_UNUSED
......
GNU mailutils NEWS -- history of user-visible changes. 2007-06-28
GNU mailutils NEWS -- history of user-visible changes. 2007-06-29
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
See the end of file for copying conditions.
Please send mailutils bug reports to <bug-mailutils@gnu.org>.
Version 1.1.90:
Version 1.2:
* GPLv3
The programs in this release are licensed under GNU General Public License
version 3. The libraries are covered by GNU Lesser General Public License
The programs in this release are licensed under the GNU General Public License
version 3. The libraries are covered by the GNU Lesser General Public License
version 3.
* `libmailbox' library
......@@ -109,6 +109,9 @@ the last three arguments:
The program can be run by a non-privileged user. Thus, it can be used with
`fetchmail' and similar utilities.
Any changes to message headers done by Sieve filters are reflected in
the delivered message.
* The `mail' utility:
Fix bugs in `pipe' command: the cmd variable setting
......
......@@ -17,7 +17,7 @@ dnl You should have received a copy of the GNU General Public License along
dnl with GNU Mailutils; if not, write to the Free Software Foundation,
dnl Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
AC_INIT([GNU Mailutils], [1.1.90], [bug-mailutils@gnu.org], [mailutils])
AC_INIT([GNU Mailutils], [1.2], [bug-mailutils@gnu.org], [mailutils])
AC_CONFIG_SRCDIR([mailbox/mailbox.c])
AC_CONFIG_AUX_DIR([scripts])
AC_CANONICAL_TARGET([])
......
......@@ -122,6 +122,7 @@ numaddr_test (mu_sieve_machine_t mach, mu_list_t args, mu_list_t tags)
to vc.limit. If `:under' tag was given we reverse the return value */
if (mu_sieve_tag_lookup (tags, "under", NULL))
rc = !rc;
return rc;
}
......
......@@ -410,10 +410,10 @@ spamd_test (mu_sieve_machine_t mach, mu_list_t args, mu_list_t tags)
spamd_abort (mach, &stream, handler);
}
mu_header_set_value (hdr, "X-Spamd-Status", spam_str, 1);
mu_header_set_value (hdr, "X-Spamd-Score", score_str, 1);
mu_header_set_value (hdr, "X-Spamd-Threshold", threshold_str, 1);
mu_header_set_value (hdr, "X-Spamd-Keywords", buffer, 1);
mu_header_append (hdr, "X-Spamd-Status", spam_str);
mu_header_append (hdr, "X-Spamd-Score", score_str);
mu_header_append (hdr, "X-Spamd-Threshold", threshold_str);
mu_header_append (hdr, "X-Spamd-Keywords", buffer);
while (spamd_read_line (mach, stream, buffer, sizeof buffer, &size) == 0
&& size > 0)
......
......@@ -124,6 +124,7 @@ static const char *argp_capa[] = {
char *from = NULL;
char *progfile_pattern = NULL;
char *sieve_pattern = NULL;
char *saved_envelope; /* A hack to spare mu_envelope_ calls */
#define D_DEFAULT "9s"
......@@ -592,12 +593,11 @@ make_tmp (const char *from, mu_mailbox_t *mbox)
if (from)
{
time_t t;
char *ptr;
time (&t);
asprintf (&ptr, "From %s %s", from, ctime (&t));
status = tmp_write (stream, &offset, ptr, strlen (ptr));
free (ptr);
asprintf (&saved_envelope, "From %s %s", from, ctime (&t));
status = tmp_write (stream, &offset, saved_envelope,
strlen (saved_envelope));
}
else
{
......@@ -607,6 +607,12 @@ make_tmp (const char *from, mu_mailbox_t *mbox)
if (auth)
mu_auth_data_free (auth);
}
else
{
saved_envelope = strdup (buf);
if (!saved_envelope)
status = ENOMEM;
}
}
else if (!memcmp (buf, "From ", 5))
{
......@@ -668,6 +674,7 @@ void
deliver (mu_mailbox_t imbx, char *name)
{
mu_mailbox_t mbox;
mu_message_t msg;
char *path;
mu_url_t url = NULL;
mu_locker_t lock;
......@@ -694,7 +701,15 @@ deliver (mu_mailbox_t imbx, char *name)
return;
}
if ((status = mu_mailbox_get_stream (imbx, &istream)) != 0)
if ((status = mu_mailbox_get_message (imbx, 1, &msg)) != 0)
{
mailer_err (_("Cannot get message from the temporary mailbox: %s"),
mu_strerror (status));
mu_auth_data_free (auth);
return;
}
if ((status = mu_message_get_stream (msg, &istream)) != 0)
{
mailer_err (_("Cannot get input message stream: %s"),
mu_strerror (status));
......@@ -776,7 +791,7 @@ deliver (mu_mailbox_t imbx, char *name)
default:
if ((status = mu_stream_size (istream, &isize)))
{
mailer_err (_("Cannot get stream size (input message): %s"),
mailer_err (_("Cannot get stream size (input message %s): %s"),
path, mu_strerror (status));
exit_code = EX_UNAVAILABLE;
failed++;
......@@ -795,9 +810,7 @@ deliver (mu_mailbox_t imbx, char *name)
if (!failed && switch_user_id (auth, 1) == 0)
{
mu_off_t ioff = 0;
mu_off_t off = size;
size_t nwr, nrd;
size_t nrd;
char *buf = NULL;
mu_off_t bufsize = 1024;
......@@ -810,22 +823,28 @@ deliver (mu_mailbox_t imbx, char *name)
status = errno = ENOMEM;
failed++;
}
else if ((status = mu_stream_seek (ostream, size, SEEK_SET)) != 0
|| (status = mu_stream_seek (istream, 0, SEEK_SET) != 0))
/* nothing: the error will be reported later */;
else
{
status = 0;
while ((status = mu_stream_read (istream, buf, bufsize, ioff, &nrd))
== 0
&& nrd > 0)
status = mu_stream_sequential_write (ostream, saved_envelope,
strlen (saved_envelope));
if (status == 0)
{
status = mu_stream_write (ostream, buf, nrd, off, &nwr);
if (status)
break;
ioff += nrd;
off += nwr;
}
while ((status = mu_stream_sequential_read (istream,
buf, bufsize,
&nrd))
== 0
&& nrd > 0)
{
status = mu_stream_sequential_write (ostream, buf, nrd);
if (status)
break;
}
free (buf);
free (buf);
}
}
switch_user_id (auth, 0);
......