Discussion:
[bug-mailutils] mu-mh questions
Pierre-Jean
2017-06-06 15:01:01 UTC
Permalink
Hello alls,

As you may have noticed, I am training myself to use mu-mh. There are
still a few things I did not find how to do. Could you please give me
some advises or share some ideas, hints or scripts?

1) How do you deal with spams on the server side?
Usually, you log in to your mail account, and move messages to and
from the spam folder on the server as to train its spam filter. Is
there a way to do this with mh? Or should I remove the spam filtering
from the server and use a local one?

2) Is there a way to sign, check, encrypt, decrypt messages with GPG?

3) Is it possible to hide my passwords from the configuration file and
use a devoted tool to store the passwords?

Thanks for your answers!

Pierre-Jean.
jdh
2017-06-06 15:55:05 UTC
Permalink
If you are using gnu-mh, aka mu-mh with emacs's MH-E as I do,
you should probably direct this query to the MH-E users list at:

mh-e-***@lists.sourceforge.net

Regards
Darel
Post by Pierre-Jean
Hello alls,
As you may have noticed, I am training myself to use mu-mh. There are
still a few things I did not find how to do. Could you please give me
some advises or share some ideas, hints or scripts?
1) How do you deal with spams on the server side?
Usually, you log in to your mail account, and move messages to and
from the spam folder on the server as to train its spam filter. Is
there a way to do this with mh? Or should I remove the spam filtering
from the server and use a local one?
2) Is there a way to sign, check, encrypt, decrypt messages with GPG?
3) Is it possible to hide my passwords from the configuration file and
use a devoted tool to store the passwords?
Thanks for your answers!
Pierre-Jean.
_______________________________________________
Bug-mailutils mailing list
https://lists.gnu.org/mailman/listinfo/bug-mailutils
Sergey Poznyakoff
2017-06-06 16:43:17 UTC
Permalink
Hi Pierre-Jean,
Post by Pierre-Jean
1) How do you deal with spams on the server side?
Hmm, that doesn't seem much related to MH, to tell the truth. The ways
to configure server part depend on the software you are using on the
server.

However, being a client program suite, mailutils MH provides a way to
handle spam on the local machine as well. In particular, you can
create a Sieve script and instruct inc to use it by the following
line in your mh_profile:

inc: -script /path/to/your/sieve/file
Post by Pierre-Jean
Usually, you log in to your mail account, and move messages to and
from the spam folder on the server as to train its spam filter. Is
there a way to do this with mh?
I don't quite get the idea. Could you elaborate on it please?
Post by Pierre-Jean
2) Is there a way to sign, check, encrypt, decrypt messages with GPG?
If you are using Emacs interface, then I'd suggest using Mailcrypt
(https://www.emacswiki.org/emacs/MailCrypt). To enable it, add the
following to your .emacs file:

(require 'mailcrypt)
(mc-setversion "gpg")
(add-hook 'mh-folder-mode-hook 'mc-install-read-mode)
(add-hook 'mh-letter-mode-hook 'mc-install-write-mode)
(setq mc-gpg-user-id "YOURID")
(setq mc-passwd-timeout 14400)

See the description of the MH-Folder emacs mode for keyboard shortcuts.
Post by Pierre-Jean
3) Is it possible to hide my passwords from the configuration file and
use a devoted tool to store the passwords?
Passwords are normally stored in ~/.mu-tickets file (its format is
described in http://mailutils.org/wiki/Mailutils_wicket). Interfaces
to third-party password storing facilities can be implemented, if the
facility in question provides a documented API.

Regards,
Sergey
Pierre-Jean
2017-06-08 09:30:36 UTC
Permalink
Thank you Sergey for your answers.
Post by Sergey Poznyakoff
Post by Pierre-Jean
Usually, you log in to your mail account, and move messages to and
from the spam folder on the server as to train its spam filter. Is
there a way to do this with mh?
I don't quite get the idea. Could you elaborate on it please?
Yes, I can elaborate. My mail provider puts the spam messages in a
folder called +Junk. If I move a message to that folder its spam
filter should learn to recognize such messages as spam, on the other side,
if I remove a message from that folder, it should not consider similar
messages as spams. With the usual imap clients, moving messages to and
from the +Junk folder is not a problem. It's not as easy with MH,
hence my request for advises.
Post by Sergey Poznyakoff
If you are using Emacs interface, then I'd suggest using Mailcrypt
(https://www.emacswiki.org/emacs/MailCrypt).
Unfortunately, I don't use Emacs. I believe that my usage is out of
the range of MU-Mh.
Post by Sergey Poznyakoff
Passwords are normally stored in ~/.mu-tickets file (its format is
described in http://mailutils.org/wiki/Mailutils_wicket).
Allright, I'll check the doc for mu-tickets.

Kind regards,
Pierre-Jean.
Sergey Poznyakoff
2017-06-11 22:12:21 UTC
Permalink
Hi Pierre-Jean,
I'll return to the problem of using encrypted/signed messages in
my next email.
The problem of using PGP messages with MH can be subdivided in three
parts: (1) message decryption, (2) message verification,
and (3) message signing and encryption.

To handle the first part, observe that in MIME messages, encrypted
parts have application/octet-stream content type. Find attached the
script "mhshow", copy it somewhere to your path and make sure it
has executable bit set. Now add the following to your .mh_profile:

mhn-show-application/octet-stream: mhshow %F

The script uses file(1) to determine whether it has to do with a
PGP encrypted message, and calls gpg to decrypt it if so.

Whenever you need to read a signed part, run

mhn -show [-part N] MSG

or "edit mhn -show [-part N] MSG", from the whatnow prompt.

Parts (2) and (3) are handled by the script mhgpg, attached herewith.
To verify a PGP-signed message, run

edit mhgpg

To sign the composed message, run

edit mhgpg -s

If you have several keys, you can select the right one by placing its ID
in the gpg-user profile entry. E.g.

gpg-user: DE45AF11
or
gpg-user: ***@example.org

Finally, to encrypt the message being composed, do

edit mhgpg -e

Hope that helps.

Regards,
Sergey
Pierre-Jean
2017-06-18 13:18:30 UTC
Permalink
Post by Sergey Poznyakoff
The problem of using PGP messages with MH can be subdivided in three
parts: (1) message decryption, (2) message verification,
and (3) message signing and encryption.
Thanks, Sergey, for the pgp related scripts and tutorial.

I could'nt try them yet, because I am not using mh yet with my
personal mail address. But I had a look on the scripts, and
apparently, they only handle RFC 2440 (signatures in messages), and
not RFC 3156 (multipart signed messages).

That leads me to some questions:
- Will the scripts you sent me be part of mailutils?
- Do you plan to support RFC 3156 one day?

Kind Regards,
Pierre-Jean.

Loading...