Re: Dovecot and mutt

2021-02-01 Thread Chris Bennett
On Mon, Jan 25, 2021 at 08:52:14AM -0700, @lbutlr wrote:
> I have tried, but failed,. To write a sieve and script to strip HTML parts of 
> messages and if the message is only HTML to pipe it through w3m and add the 
> html portion as an emo attachment (in case it has links that need clicking, 
> like on some 'confirm you exist' emails.
 
I truly hate those. Most often they now require Javascript, too.
I use ssh and neomutt. I'm going to write a macro to take the html
attachment and put it in a website directory. I've been doing it the
long hard manual way. I hate forced javascript. No excuse but sloppiness
to have that on a confirm you exist page.

In any case, this is just nice to vent a little steam out.
I don't think we can do much except chastise users of mailing lists.
Sounds like a good macro to send a polite form letter reply to evildoers.
 
> Honestly, I do not main HTML per se, it is when the HTML specifies font size, 
> colors, background colors, and other garbage like that that I despise it. A 
> well formed HTML message is is fine, but those are very rare.

+1

Thanks for the great software and long hard work to find the most
miniscule hidden bugs!

Chris Bennett




Re: Dovecot and mutt

2021-01-27 Thread Eduardo M KALINOWSKI

On 26/01/2021 18:18, Rupert Gallagher wrote:
If someone needs to send a formatted text, then they can use a text 
editor on headed paper, export to PDF and send it as attachment. E-mail 
proper is the plain text body of the message. When people send fancy 
HTML and expect me to read it on my phone, then they have wasted their 
effort, because the message is too heavy to download, heavy to display, 
and because I ultimately read e-mails in plain text. And most of the 
times it is spam.


And yet, ironically, this message you sent is in HTML.

It does have a plain text part, but it's base64 encoded. Not a problem 
for any half-decent MUA, but for those read hardcore users that read 
their mail directly from ~/maildir (or something like that), it's an 
extra decoding step ;-)



--
"Rembrandt's first name was Beauregard, which is why he never used it."
-- Dave Barry

Eduardo M KALINOWSKI
edua...@kalinowski.com.br


Re: Dovecot and mutt

2021-01-26 Thread Rupert Gallagher
If someone needs to send a formatted text, then they can use a text editor on 
headed paper, export to PDF and send it as attachment. E-mail proper is the 
plain text body of the message. When people send fancy HTML and expect me to 
read it on my phone, then they have wasted their effort, because the message is 
too heavy to download, heavy to display, and because I ultimately read e-mails 
in plain text. And most of the times it is spam.

 Original Message 
On Jan 25, 2021, 10:55, Darac Marjal < mailingl...@darac.org.uk> wrote:

On 25/01/2021 09:08, Rupert Gallagher wrote:
It would be useful to automatically de-HTML e-mails, but this is not a task for 
dovecot. Even more useful would be to deprecate HTML in e-mails.
Why would it be useful to deprecate HTML in emails? Presumably you're arguing 
for an alternative, more restricted markup language such as Enriched Text[1], 
Markdown[2]? Mutt already supports Enriched Text, but is probably the most 
popular MUA which does. I'm not aware of an MUA that natively renders Markdown 
bodies - most of the tutorials I see about that involve composing the message 
in Markdown and then converting it to HTML for sending - but to be honest, at 
this point the effort is a bit late. Realistically, how are you going to render 
that Markdown text in a Graphical MUA? Either you're going to write a custom 
control which renders the markup as styled text (that is, converts **bold** to 
a bold-face font etc) or you're just going to run the Markdown through a 
Markdown->HTML converter and pass it to a Web Browser component (both the 
converter and the renderer are "solved problems" so guess which solution 
developers would choose), in which case, what's the point of going "around the 
houses"?

[1] https://en.wikipedia.org/wiki/Enriched_text
[2] https://en.wikipedia.org/wiki/Markdown

 Original Message 
On Jan 20, 2021, 13:58, @lbutlr < krem...@kreme.com> wrote:

On 20 Jan 2021, at 04:33, Piotr Auksztulewicz  wrote:
> On Wed, Jan 20, 2021 at 04:27:11AM -0700, @lbutlr wrote:
>> set imap_pass = "lasH-hds[er$asd" # Not a real password
>
> Use single quotes around the password. Double quotes make $asd to be
> interpreted as shell variable and replaced with (most likely) empty
> string, so you get a shortened passwort in effect.
This worked, thank you.
Also… gr. Who though expansion inside a password string was a clever idea 
and can I introduce them to a clue bat? :p
> PS. Also a mutt lover :-)
With the amount of HTML mail out there I really don't understand how people are 
able to use it anymore. Now, if I could get a 'stip html down to plain text' 
side function to work…
script execution error (#127): sh: line 3: fortune: command not found

Re: Dovecot and mutt

2021-01-26 Thread Stuart Henderson
On 2021-01-25, @lbutlr  wrote:
> I get a LOT of mail that is pointlessly HTMLized (including on this list)

*especially* on this list, for some reason.



Re: Dovecot and mutt

2021-01-25 Thread @lbutlr
On 25 Jan 2021, at 02:08, Rupert Gallagher  wrote:
> It would be useful to automatically de-HTML e-mails, but this is not a task 
> for dovecot. Even more useful would be to deprecate HTML in e-mails.

Well, that is never going to happen.

I have tried, but failed,. To write a sieve and script to strip HTML parts of 
messages and if the message is only HTML to pipe it through w3m and add the 
html portion as an emo attachment (in case it has links that need clicking, 
like on some 'confirm you exist' emails.

So far, that has failed and dovecote/sieve doesn't give enough logging when 
scripts fail (script works when run manually, fails when run from sieve, but no 
information on why it failed). For not I have given up.

I get a LOT of mail that is pointlessly HTMLized (including on this list) and 
would very much like to strip it down to plain text, but so far the best option 
appears to use a text-based mail client to access those messages.

What I may do is simply put all the HTML mail into a special jail (er, I mean 
mailbox) so that I don't encounter it accidentally.

Honestly, I do not main HTML per se, it is when the HTML specifies font size, 
colors, background colors, and other garbage like that that I despise it. A 
well formed HTML message is is fine, but those are very rare.


-- 
Vampires have risen from the dead, the grave and the crypt, but have
never managed it from the cat. --Witches Abroad



Re: Dovecot and mutt

2021-01-25 Thread Darac Marjal

On 25/01/2021 09:08, Rupert Gallagher wrote:
> It would be useful to automatically de-HTML e-mails, but this is not a
> task for dovecot. Even more useful would be to deprecate HTML in e-mails.

Why would it be useful to deprecate HTML in emails? Presumably you're
arguing for an alternative, more restricted markup language such as
Enriched Text[1], Markdown[2]? Mutt already supports Enriched Text, but
is probably the most popular MUA which does. I'm not aware of an MUA
that natively renders Markdown bodies - most of the tutorials I see
about that involve composing the message in Markdown and then converting
it to HTML for sending - but to be honest, at this point the effort is a
bit late. Realistically, how are you going to render that Markdown text
in a Graphical MUA? Either you're going to write a custom control which
renders the markup as styled text (that is, converts **bold** to a
bold-face font etc) or you're just going to run the Markdown through a
Markdown->HTML converter and pass it to a Web Browser component (both
the converter and the renderer are "solved problems" so guess which
solution developers would choose), in which case, what's the point of
going "around the houses"?


[1] https://en.wikipedia.org/wiki/Enriched_text

[2] https://en.wikipedia.org/wiki/Markdown


>
>
>
>  Original Message 
> On Jan 20, 2021, 13:58, @lbutlr < krem...@kreme.com> wrote:
>
>
> On 20 Jan 2021, at 04:33, Piotr Auksztulewicz  wrote:
> > On Wed, Jan 20, 2021 at 04:27:11AM -0700, @lbutlr wrote:
> >> set imap_pass = "lasH-hds[er$asd" # Not a real password
> >
> > Use single quotes around the password. Double quotes make $asd to be
> > interpreted as shell variable and replaced with (most likely) empty
> > string, so you get a shortened passwort in effect.
>
> This worked, thank you.
>
> Also… gr. Who though expansion inside a password string was a
> clever idea and can I introduce them to a clue bat? :p
>
> > PS. Also a mutt lover :-)
>
> With the amount of HTML mail out there I really don't understand
> how people are able to use it anymore. Now, if I could get a 'stip
> html down to plain text' side function to work…
>
> script execution error (#127): sh: line 3: fortune: command not found
>


OpenPGP_signature
Description: OpenPGP digital signature


Re: Dovecot and mutt

2021-01-25 Thread Rupert Gallagher
It would be useful to automatically de-HTML e-mails, but this is not a task for 
dovecot. Even more useful would be to deprecate HTML in e-mails.

 Original Message 
On Jan 20, 2021, 13:58, @lbutlr wrote:

> On 20 Jan 2021, at 04:33, Piotr Auksztulewicz  wrote:
>> On Wed, Jan 20, 2021 at 04:27:11AM -0700, @lbutlr wrote:
>>> set imap_pass = "lasH-hds[er$asd" # Not a real password
>>
>> Use single quotes around the password. Double quotes make $asd to be
>> interpreted as shell variable and replaced with (most likely) empty
>> string, so you get a shortened passwort in effect.
>
> This worked, thank you.
>
> Also… gr. Who though expansion inside a password string was a clever idea 
> and can I introduce them to a clue bat? :p
>
>> PS. Also a mutt lover :-)
>
> With the amount of HTML mail out there I really don't understand how people 
> are able to use it anymore. Now, if I could get a 'stip html down to plain 
> text' side function to work…
>
> script execution error (#127): sh: line 3: fortune: command not found

Re: Dovecot and mutt

2021-01-20 Thread @lbutlr
On 20 Jan 2021, at 07:20, Erwan David  wrote:
> On Wed, Jan 20, 2021 at 01:58:38PM CET, "@lbutlr"  said:
>> On 20 Jan 2021, at 04:33, Piotr Auksztulewicz  wrote:
>>> On Wed, Jan 20, 2021 at 04:27:11AM -0700, @lbutlr wrote:
 set imap_pass = "lasH-hds[er$asd"  # Not a real password
>>> 
>>> Use single quotes around the password. Double quotes make $asd to be
>>> interpreted as shell variable and replaced with (most likely) empty
>>> string, so you get a shortened passwort in effect.
>> 
>> This worked, thank you.
>> 
>> Also… gr. Who though expansion inside a password string was a clever 
>> idea and can I introduce them to a clue bat? :p
> 
> set imap_pass = $smtp_pass seems a good usecase.

But imap_pass = "$smtp_pass" seems like a silly use case.

>>> PS. Also a mutt lover :-)

>> With the amount of HTML mail out there I really don't understand how people 
>> are able to use it anymore. Now, if I could get a 'stip html down to plain 
>> text' side function to work… 

> In my .mailcap I have
> text/html; w3m -I %{charset} -T text/html; copiousoutput;

Interesting, I do not know about .mailcap (I use mutt only to send some 
automated mails ro users who want the data formatted in an HTML table).

> and in my .muttrc :
> auto_view text/html

Maybe that is what he does. I certainly looks very readable (which mutt is not, 
as a general rule, when viewing HTML mail).

It does seem to hide the links entirely, so you cannot, I assume click on any 
"Click here to confirm" links or whatever. Still, does look quite workable.

-- 
Be careful what you wish for. You never know who will be listening.
Or what, for that matter.

Re: Dovecot and mutt

2021-01-20 Thread Erwan David
On Wed, Jan 20, 2021 at 01:58:38PM CET, "@lbutlr"  said:
> On 20 Jan 2021, at 04:33, Piotr Auksztulewicz  wrote:
> > On Wed, Jan 20, 2021 at 04:27:11AM -0700, @lbutlr wrote:
> >> set imap_pass = "lasH-hds[er$asd"  # Not a real password
> > 
> > Use single quotes around the password. Double quotes make $asd to be
> > interpreted as shell variable and replaced with (most likely) empty
> > string, so you get a shortened passwort in effect.
> 
> This worked, thank you.
> 
> Also… gr. Who though expansion inside a password string was a clever idea 
> and can I introduce them to a clue bat? :p

set imap_pass = $smtp_pass seems a good usecase.

> > PS. Also a mutt lover :-)
> 
> With the amount of HTML mail out there I really don't understand how people 
> are able to use it anymore. Now, if I could get a 'stip html down to plain 
> text' side function to work… 

In my .mailcap I have
text/html; w3m -I %{charset} -T text/html; copiousoutput;

and in my .muttrc :
auto_view text/html


-- 
Erwan


Mutt usability [was: Dovecot and mutt]

2021-01-20 Thread Piotr Auksztulewicz
On Wed, Jan 20, 2021 at 05:58:38AM -0700, @lbutlr wrote:
> Also… gr. Who though expansion inside a password string was a
> clever idea and can I introduce them to a clue bat? :p

Well, this is just the result of a generic config file parser, every
statement gets processed the same way. I guess the mutt author did not
want to create special cases for some parameters like password, and
everything is clearly stated in the manual. It is also quite intuitive
for Unix/sh people that '$xxx' is different from "$xxx".

> > PS. Also a mutt lover :-)
>
> With the amount of HTML mail out there I really don't understand how
> people are able to use it anymore. Now, if I could get a 'stip html
> down to plain text' side function to work…

Just install a text-based browser, there are several: lynx, links, w3m
and more. I prefer w3m. Make sure mutt + metamail are configured properly
and mutt will launch the browser. Most legitimate HTML email is just pure
text, just slightly marked up if at all. If you get mostly-pictures HTML
message, it's 99.99% spam.

Most HTML emails have a plain text alternative and it will be displayed
instead. Some emails have empty plain text alternative, it is a small
nuisance then, you need to hit 'v' to see the MIME parts and navigate
to HTML one.

Anyway, I still find text access very useful to check mails quickly
without having to fire up some slow beast such as Thunderbird, or
while working from some firewalled environment - it is often easy to
SSH out. Hint: run your sshd also on port 443. If that doesn't work,
run stunnel on top. It didn't work for me only once, when one company
enabled TLS hijacking on the firewall temporarily (probably by mistake),
stunnel then warned me about wrong TLS cert :-) Also I hate webmail,
and I haven't installed any on my mail server, so I need mutt, badly.

-- 
Piotr "Malgond" Auksztulewicz firstn...@lastname.net


Re: Dovecot and mutt

2021-01-20 Thread Odhiambo Washington
On Wed, 20 Jan 2021 at 15:59, @lbutlr  wrote:

> On 20 Jan 2021, at 04:33, Piotr Auksztulewicz  wrote:
> > On Wed, Jan 20, 2021 at 04:27:11AM -0700, @lbutlr wrote:
> >> set imap_pass = "lasH-hds[er$asd"  # Not a real password
> >
> > Use single quotes around the password. Double quotes make $asd to be
> > interpreted as shell variable and replaced with (most likely) empty
> > string, so you get a shortened passwort in effect.
>
> This worked, thank you.
>
> Also… gr. Who though expansion inside a password string was a clever
> idea and can I introduce them to a clue bat? :p
>
> > PS. Also a mutt lover :-)
>
> With the amount of HTML mail out there I really don't understand how
> people are able to use it anymore. Now, if I could get a 'stip html down to
> plain text' side function to work…
>
>
Someone using mutt in 2021 must be a hater of all forms of GUI :-)

-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)


Re: Dovecot and mutt

2021-01-20 Thread @lbutlr
On 20 Jan 2021, at 04:33, Piotr Auksztulewicz  wrote:
> On Wed, Jan 20, 2021 at 04:27:11AM -0700, @lbutlr wrote:
>> set imap_pass = "lasH-hds[er$asd"  # Not a real password
> 
> Use single quotes around the password. Double quotes make $asd to be
> interpreted as shell variable and replaced with (most likely) empty
> string, so you get a shortened passwort in effect.

This worked, thank you.

Also… gr. Who though expansion inside a password string was a clever idea 
and can I introduce them to a clue bat? :p

> PS. Also a mutt lover :-)

With the amount of HTML mail out there I really don't understand how people are 
able to use it anymore. Now, if I could get a 'stip html down to plain text' 
side function to work… 


script execution error (#127): sh: line 3: fortune: command not found



Re: Dovecot and mutt

2021-01-20 Thread Piotr Auksztulewicz
On Wed, Jan 20, 2021 at 04:27:11AM -0700, @lbutlr wrote:
> set imap_pass = "lasH-hds[er$asd"  # Not a real password

Use single quotes around the password. Double quotes make $asd to be
interpreted as shell variable and replaced with (most likely) empty
string, so you get a shortened passwort in effect.

PS. Also a mutt lover :-)

-- 
Piotr "Malgond" Auksztulewicz firstn...@lastname.net


Re: Dovecot and mutt

2021-01-20 Thread Aki Tuomi


> On 20/01/2021 13:27 @lbutlr  wrote:
> 
>  
> I have a user who is unable to use mutt to login. I tested and sent a muttrc 
> that worked for me and all he needed to do was put in his username and 
> password.
> 
> Which failed.
> 
> After some back and forth, I figured out that his password contains a '$' and 
> a '[' in it, and it seems like one of, or both, of these characters may be 
> the issue. Is that expected? The account and password work properly via iOS 
> and macOS mail, so the issue does't appear to be dovecot, but I find it very 
> odd that mutt would have a glaring issue like this, so I am wondering if 
> there is something else that I need to do.
> 
> Mutt 2.0.4 (2020-12-30)
> 
> The configuration looks like this:
> 
> # Imap settings
> set imap_user = "u...@example.com"
> set imap_pass = "lasH-hds[er$asd"  # Not a real password
> 
> # Smtp settings
> set smtp_url = "smtps://mail.covisp.net:587"
> set smtp_pass = "lasHhds[er$asd"
> 
> # Remote mail folders
> set folder = "imaps://mail.covisp.net:993"
> set spoolfile = "+INBOX"
> set postponed = "+/Drafts"
> set record = "+/Sent Mail"
> set trash = "+/Trash"
> 
> --

mutt treats them as variables most likely. Have you tried adding \ ?

Aki


Dovecot and mutt

2021-01-20 Thread @lbutlr
I have a user who is unable to use mutt to login. I tested and sent a muttrc 
that worked for me and all he needed to do was put in his username and password.

Which failed.

After some back and forth, I figured out that his password contains a '$' and a 
'[' in it, and it seems like one of, or both, of these characters may be the 
issue. Is that expected? The account and password work properly via iOS and 
macOS mail, so the issue does't appear to be dovecot, but I find it very odd 
that mutt would have a glaring issue like this, so I am wondering if there is 
something else that I need to do.

Mutt 2.0.4 (2020-12-30)

The configuration looks like this:

# Imap settings
set imap_user = "u...@example.com"
set imap_pass = "lasH-hds[er$asd"  # Not a real password

# Smtp settings
set smtp_url = "smtps://mail.covisp.net:587"
set smtp_pass = "lasHhds[er$asd"

# Remote mail folders
set folder = "imaps://mail.covisp.net:993"
set spoolfile = "+INBOX"
set postponed = "+/Drafts"
set record = "+/Sent Mail"
set trash = "+/Trash"

--