Discussion:
[bug-mailutils] mailutils-3.2 released [stable]
Sergey Poznyakoff
2017-03-11 14:24:45 UTC
Permalink
Hello,

I am pleased to announce the release of GNU mailutils version 3.2. This is
a stable release. See the end of this message for a list of noteworthy
changes.

GNU mailutils is a protocol-independent framework for email processing.
It provides a set of libraries for doing almost any mail-related task on
any existing mailbox format, using a consistent format-independent API.

Several tools are built atop of these libraries and included in the package.
Among them are pop3 and imap4 servers, the traditional mailx mail reader,
the sieve mail filtering utility and a complete set of MH utilities that
can be used with GNU Emacs MH-E mode.

Visit http://mailutils.org for more information.

Here are the compressed sources:
ftp://ftp.gnu.org/gnu/mailutils/mailutils-3.2.tar.gz (5.9MB)
ftp://ftp.gnu.org/gnu/mailutils/mailutils-3.2.tar.bz2 (4.0MB)
ftp://ftp.gnu.org/gnu/mailutils/mailutils-3.2.tar.xz (2.7MB)

Here are the GPG detached signatures[*]:
ftp://ftp.gnu.org/gnu/mailutils/mailutils-3.2.tar.gz.sig
ftp://ftp.gnu.org/gnu/mailutils/mailutils-3.2.tar.bz2.sig
ftp://ftp.gnu.org/gnu/mailutils/mailutils-3.2.tar.xz.sig

Use a mirror for higher download bandwidth:
http://www.gnu.org/order/ftp.html

Here are the MD5 and SHA1 checksums:

fff6edfcb018d4d0cfbae1cb7a56fc51 mailutils-3.2.tar.gz
f2fca3d46e254cb0f5b17ca160bb9c64 mailutils-3.2.tar.bz2
7822db219cb52183e931dff5df3889e5 mailutils-3.2.tar.xz
852f99e63c0827502096de7badf50bef7a8d102d mailutils-3.2.tar.gz
b451dd69c259da00f26b1aeb291fe6012954c150 mailutils-3.2.tar.bz2
c5564173b89a1defbbd81cc1fcd1515cafc8c11a mailutils-3.2.tar.xz

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact. First, be sure to download both the .sig file
and the corresponding tarball. Then, run a command like this:

gpg --verify mailutils-3.2.tar.gz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

gpg --keyserver keys.gnupg.net --recv-keys 3602B07F55D0C732

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
Autoconf 2.69
Automake 1.14
Bison 2.7
Makeinfo 5.2

New in this release:

* configuration syntax

Statements that allow for variable substitution also allow for command
expansion. Commands are invoked the same way as in shell:

$(command [args...])

The following commands are defined:

- localpart X
Treats X as an email address and returns its part preceding
the @-sign. If there is no @-sign, returns X unchanged.

- domainpart X
Treats X as an email address and returns the part following
the @-sign. If there is no @-sign, returns empty string.

- shell CMD [ARGS...]
Runs the shell command CMD with the given arguments. Returns
the standard output from the command. The command is invoked
using "/bin/sh -c" and can contain any valid shell construct.

* imap4d

Namespace configuration completely rewritten. The "namespace" block
statement defines a particular namespaces. Within it, one or more
"prefix" statements define prefixes available in that namespace, along
with their mappings to the server filesystem, hierarchy delimiters etc.

An example of namespace configuration:

namespace personal {
prefix "" {
directory "$home/mailfolder";
}
prefix "#MH:" {
directory "$home/Mail";
delimiter "/";
mailbox-type "mh";
}
}

The following configuration statements have been withdrawn: homedir,
personal-namespace, other-namespace, shared-namespace,
other-mailbox-mode, shared-mailbox-mode.

* mail

** Modifying attachment name and filename

Two new options are provided for modifying attachment name (a.k.a
description), and file name:

--content-name=STRING
Sets the attachment name (description). Technically speaking, it
is the "name" parameter in the Content-Type MIME header.

--content-filename=NAME
Sets the file name (the "filename" parameter in the
Content-Description MIME header of the outgoing message).

Both options affect only the next `--attach' or `--attach-fd' option.

** Constructing attachments from the command line

The new option `--attach-fd=N' instructs mail to read attachment from
file descriptor N. By default, the attachments created using this
option are unnamed, i.e. neither name parameter of the Content-Type
header, nor the filename parameter of the Content-Disposition header
are set. Use the --content-name and --content-filename options to
change these.

The option `--attach-fd=0' causes attachment to be read from the
standard input. The option `--attach=-' has the same effect. For
obvious reasons, the interactive mode is suppressed in this case.

The `--attach-fd' option is useful when calling `mail' from another
program.

The new option `--skip-empty-attachments' instructs `mail' to omit
attachments that have zero-size body.

Example:

Suppose that the 'mail' binary is opened at file descriptor 5 and
the mail.c file is opened at descriptor 6, the following command
line sends them as attachments:

mail --encoding=base64 \
--content-type=application/octet-stream \
--content-name="the mail(1) binary" --content-filename="mail" \
--attach-fd=5 \
--encoding=binary\
--content-type=text/plain --content-name="mail.c source file"\
--content-filename=mail.c --attach-fd=6 \
***@example.org

See http://mailutils.org/wiki/Mail:_sending_attachments, for details.

* Bugfixes

** Fix memory leak in mu_stream_destroy.

** Fix handling of ambiguous command line options.

** Fix sieve logging in the maidag utility

** Fixes in 'Q' encoder.

Encodes question mark properly;
Limits the length of encoded words to 75 octets, as requested by RFC 2047.

Best regards,
Sergey
Jean Louis
2017-07-14 10:00:50 UTC
Permalink
Good day Sergey,

I am using the git version. Now I am getting
segmentation fault. What is interesting, the email
get sent.

Please let me know if you see anything wrong with
this command line.

I was using it just fine, now suddenly it started
segfaulting, so no email can be sent, as it gives
error.

Jean

mail -E "unset askcc" -a "Date: `/bin/date +'%a, %d %b %Y %T %z'`" -a "Content-Type: text/plain; charset=utf-8" -a "Content-Disposition: inline" -a "Content-Transfer-Encoding: 8bit" -a "From: Jean Louis <***@example.com>" -E 'set record=maildir:~/Maildir/***@my@example.com' -s 'Hello there' --alternative --content-type="text/html; charset=utf-8" --attach=/home/data1/protected/public_html/index.html "Jean Louis <***@protected.com>" --content-type=text/plain
Hello
Content-Type: not setting header
Content-Disposition: not setting header
Content-Transfer-Encoding: not setting header
Segmentation fault
Sergey Poznyakoff
2017-07-14 12:11:04 UTC
Permalink
Hello,
Post by Jean Louis
I am using the git version. Now I am getting
segmentation fault.
Fixed in the repo. Please pull.
Post by Jean Louis
Please let me know if you see anything wrong with
this command line.
Yes, many things, and mail will warn you about them:

mail: Content-Type: not setting header
mail: Content-Disposition: not setting header
mail: Content-Transfer-Encoding: not setting header

Regards,
Sergey
Jean Louis
2017-07-14 14:58:19 UTC
Permalink
Hello,

Now it works again.

I must verify the arguments better, and it is good
that it is informing me. I did not even know, as
program is running it and all mails went out
pretty fine.

Thank you much.

Jean
Post by Sergey Poznyakoff
Hello,
Post by Jean Louis
I am using the git version. Now I am getting
segmentation fault.
Fixed in the repo. Please pull.
Post by Jean Louis
Please let me know if you see anything wrong with
this command line.
mail: Content-Type: not setting header
mail: Content-Disposition: not setting header
mail: Content-Transfer-Encoding: not setting header
Regards,
Sergey
Jean Louis
2017-07-17 10:31:27 UTC
Permalink
Dear Sergey,

I have a system of Maildirs in the scheme such as
~/Maildir/***@example.com/

That is helping me quickly locate the conversation
belonging to certain email address.

There are 33281 such folders on my side.

I can easily count interactions with people by
using messages program, that helps me to sort out
who are those people who are better or well
connected with me.

However, I would like to find a an automatic way
to find out either folders or/and messages where
the last email has been sent by myself, by one of
my email addresses, or by using other type of
query.

What idea comes up in your mind if you wish to
find out if the last message within a folder have
been sent by certain email address?

I have reviewed sieve, and few programs, I do not
find it.

I am thinking in this direction: if `messages' can
find the number of messages in the inbox, I
already go that number of the last message.

And how do I access programmatically only the last
message to search for email address?

Jean
Jean Louis
2017-07-17 10:39:43 UTC
Permalink
On top of this, I see there is readmsg, that can
access message by number.

Maybe I could make a program to go over mailboxes,
and do something like readmsg on the last number
given by messages, and then grep or search the
first line From:

If you have better idea let me know.

Is From: always the first line given from readmsg?

Jean
Post by Jean Louis
Dear Sergey,
I have a system of Maildirs in the scheme such as
That is helping me quickly locate the conversation
belonging to certain email address.
There are 33281 such folders on my side.
I can easily count interactions with people by
using messages program, that helps me to sort out
who are those people who are better or well
connected with me.
However, I would like to find a an automatic way
to find out either folders or/and messages where
the last email has been sent by myself, by one of
my email addresses, or by using other type of
query.
What idea comes up in your mind if you wish to
find out if the last message within a folder have
been sent by certain email address?
I have reviewed sieve, and few programs, I do not
find it.
I am thinking in this direction: if `messages' can
find the number of messages in the inbox, I
already go that number of the last message.
And how do I access programmatically only the last
message to search for email address?
Jean
Sergey Poznyakoff
2017-07-17 19:24:11 UTC
Permalink
Hello,
Post by Jean Louis
What idea comes up in your mind if you wish to
find out if the last message within a folder have
been sent by certain email address?
Please find attached a simple program called "lastmesg" that (hopefully)
does what you need. Extract it on a machine where Mailutils 3.2 or
later is installed, change to the lastmesg directory and run make[1].
Run make install to install it. Use man lastmesg to get more info.

Regards,
Sergey

[1] The Makefile is rather simplistic and assumes mailutils is installed
in /usr. You'll have to tweak it, if it is installed elsewhere.
Jean Louis
2017-07-17 20:01:28 UTC
Permalink
Wow that is great.

I will test it soon to see if it works.

I have tried this one, this was in From: but it
did not find it:
no-***@no-reply.q146.pw

It does work with my type of emails.

Maybe it becomes part of Mailutils?

Thank you much,
Jean
Post by Sergey Poznyakoff
Hello,
Post by Jean Louis
What idea comes up in your mind if you wish to
find out if the last message within a folder have
been sent by certain email address?
Please find attached a simple program called "lastmesg" that (hopefully)
does what you need. Extract it on a machine where Mailutils 3.2 or
later is installed, change to the lastmesg directory and run make[1].
Run make install to install it. Use man lastmesg to get more info.
Regards,
Sergey
[1] The Makefile is rather simplistic and assumes mailutils is installed
in /usr. You'll have to tweak it, if it is installed elsewhere.
Loading...