How to be warned about non-existent aliases?

2017-04-25 Thread Antoine Amarilli
Hello everyone,

I was interested to know whether there is a configuration option in mutt
to warn the user when entering a wrong alias (that is, a recipient that
does not contain '@' but is not known to mutt's alias database).

My use case is that, when I type something without '@' (e.g., "jdoe"),
I never intend to refer to a local user of the local machine, or of the
remote SMTP server: I always intend to refer to an alias. Hence, when I
mistype an alias (e.g., "jdeo"), I would like mutt to warn me and refuse
to send the email.

Currently, mutt completes "jdeo" to "jdeo@$hostname" if $hostname is set
(and leaves it as-is otherwise), and happily sends the mail. If I don't
notice the typo, I have to hope that I get a delivery status
notification (and then the mail has already been sent to the other
recipients, so it's a pain to send it again only to some of them...).

Hence, is there a configuration setting to tell mutt that recipients
without '@' should not be completed, and that an error should be
displayed if there are not a known alias? Or is there some other way to
achieve this?

(I have looked in the documentation but I didn't see anything relevant.
I have also asked the same question a few days ago

but I didn't receive any response there.)

Thanks in advance for your help!

Best regards,

-- 
Antoine Amarilli



signature.asc
Description: PGP signature


Re: How to be warned about non-existent aliases?

2017-04-25 Thread Michael Tatge
Hi,

* On Tue, Apr 25, 2017 10:36AM +0200 Antoine Amarilli (a...@a3nm.net) muttered:
> I was interested to know whether there is a configuration option in mutt
> to warn the user when entering a wrong alias (that is, a recipient that
> does not contain '@' but is not known to mutt's alias database).

not a direct solution to your case, but try to tab-complete aliases. If
they don't complete they are unknown.

Michael
-- 
PGP-Key-ID: 0xDE3C3D3BEEE7D043
Jabber: in...@jabber.de


Re: How to be warned about non-existent aliases?

2017-04-25 Thread Antoine Amarilli
Hi Michael,

On Tue, Apr 25, 2017 at 11:18:01AM +0200, Michael Tatge wrote:
> * On Tue, Apr 25, 2017 10:36AM +0200 Antoine Amarilli (a...@a3nm.net) 
> muttered:
> > I was interested to know whether there is a configuration option in mutt
> > to warn the user when entering a wrong alias (that is, a recipient that
> > does not contain '@' but is not known to mutt's alias database).
> 
> not a direct solution to your case, but try to tab-complete aliases. If
> they don't complete they are unknown.

Thanks for the suggestion! Someone else had already mentioned this to
me, but it's a bit fragile: having to notice that something doesn't
tab-complete is not the most reliable way to be notified of an error...
So I'd like something better if possible.

Best,

-- 
Antoine Amarilli



signature.asc
Description: PGP signature


Re: How to be warned about non-existent aliases?

2017-04-25 Thread Chris Green
On Tue, Apr 25, 2017 at 11:57:31AM +0200, Antoine Amarilli wrote:
> Hi Michael,
> 
> On Tue, Apr 25, 2017 at 11:18:01AM +0200, Michael Tatge wrote:
> > * On Tue, Apr 25, 2017 10:36AM +0200 Antoine Amarilli (a...@a3nm.net) 
> > muttered:
> > > I was interested to know whether there is a configuration option in mutt
> > > to warn the user when entering a wrong alias (that is, a recipient that
> > > does not contain '@' but is not known to mutt's alias database).
> > 
> > not a direct solution to your case, but try to tab-complete aliases. If
> > they don't complete they are unknown.
> 
> Thanks for the suggestion! Someone else had already mentioned this to
> me, but it's a bit fragile: having to notice that something doesn't
> tab-complete is not the most reliable way to be notified of an error...
> So I'd like something better if possible.
> 
Yes, it's a problem I have with mutt too.  For example I'm subscribed
to a list called uk-rid...@the-hug.net which is aliased to uk-r, or is
it ukr, or   

Fortunately I have a local mail server so mail to ukr gets bounced
back to me with a non-existent destination error very quickly but it
would be nice if mutt could tell me somehow.

Essentially anything without an @ should be an alias, I never actually
send mail to local (same system) destinations.

-- 
Chris Green


Re: How to be warned about non-existent aliases?

2017-04-25 Thread Erik Christiansen
On 25.04.17 11:16, Chris Green wrote:
> Essentially anything without an @ should be an alias, I never actually
> send mail to local (same system) destinations.

While I do send mail to myself several times per week, as paperless
Post-It notes, that would involve even less typing with a "me" alias.

As I have edit_headers set, and always enter destinations in the editor,
there is no possibility of tab-completion in mutt, for semi-manual
checking. (Though I could scrape the aliases from .muttrc with a few
lines of awk, to generate a private dictionary for vim, and then use
spellchecking to flag bung aliases. Thus a quick hack is to hit zg on
any good alias which fails spellchecking, to add it to the private OK
spell-list.)

Anyway, +1 for accepting the need for aliases for local destinations, as
the price for fumble checking in mutt.

Erik


Re: How to be warned about non-existent aliases?

2017-04-25 Thread Chris Green
On Tue, Apr 25, 2017 at 10:42:17PM +1000, Erik Christiansen wrote:
> On 25.04.17 11:16, Chris Green wrote:
> > Essentially anything without an @ should be an alias, I never actually
> > send mail to local (same system) destinations.
> 
> While I do send mail to myself several times per week, as paperless
> Post-It notes, that would involve even less typing with a "me" alias.
> 
> As I have edit_headers set, and always enter destinations in the editor,
> there is no possibility of tab-completion in mutt, for semi-manual
> checking. (Though I could scrape the aliases from .muttrc with a few
> lines of awk, to generate a private dictionary for vim, and then use
> spellchecking to flag bung aliases. Thus a quick hack is to hit zg on
> any good alias which fails spellchecking, to add it to the private OK
> spell-list.)
> 
> Anyway, +1 for accepting the need for aliases for local destinations, as
> the price for fumble checking in mutt.
> 
Yes, if I did use any local destinations there would only be two or
three so adding aliases for them wouldn't be very onerous.

-- 
Chris Green


Bazaar problem with index and pager view on new install. Maybe newline/linefeed issue?

2017-04-25 Thread Abner Gershon
I have been using Mutt with Gmail IMAP for years on an older server
running Debian 3.1, Linux kernel 2.6.20.1-1-686, and Mutt version
1.5.9 without problems for years.

Recently I installed Mutt on a newer server running Ubuntu 16.04.2,
Linux 4.4.0-72-generic (x86_64, and Mutt version 1.5.24.

( In both cases I access these servers using ssh from windows/putty or
mac/terminal but get the same result. )

I copied my .muttrc over from the old to the new machine.

On the new machine there is a strange behavior using the index view.
When I first start the application in terminal there is lack of a new
line between the highlighted line and the next line. For example:

21551 N T Apr 25 eFax message   A fax message21552   F Apr 25   The
next mssg header
21553 N + Apr 25 ...
21554 N + Apr 25 ...

As I scroll up or down using the "j" or "k" keys the same things
occurs for each highlighted line. For example after I go down three
lines it looks like this:

21551 N T Apr 25 eFax message   A fax message21552   F Apr 25   The
next mssg header
21551 N T Apr 25 eFax message   A fax message21552   F Apr 25   The
next mssg header
21552 N T Apr 25The next mssg header   A fax message21553   F Apr 25
Here is mssg header
21553 N T Apr 25 Here is mssg header   A fax message21554   F Apr 25
Another mssg header

Also there is some bazaar highlighting. The view gets more and more
confusing the more I scroll up or down. Also affects pager view.

Here is a sreenshot of problem:

https://drive.google.com/file/d/0B4X5mynXTK2DcnEzYUZTS1J0dGJfbGJVbHB5VTVHWGhLYnlB/view?usp=sharing

I have attached: copy of .muttrc and copy of "mutt -v" output.

I have been doing some google searches but could not find any reports
or solutions regarding this behavior. Hoping to get some help here.
# A basic .muttrc for use with Gmail
# Change the following six lines to match your Gmail account details
set imap_user = "xx...@gmail.com"
set imap_pass = "xxx"
# set smtp_url = "smtp://...@gmail.com@smtp.gmail.com:587/"
# set smtp_pass = "x"
set from = "xx...@gmail.com"
set realname = "A Gxx"
# Change the following line to a different editor you prefer.
set editor = "vim"
# Basic config, you can leave this as is
set folder = "imaps://imap.gmail.com:993"
# set spoolfile = "+INBOX"
set spoolfile = "+[Gmail]/All Mail"
# set imap_check_subscribed
set hostname = gmail.com
set mail_check = 120
set timeout = 300
set imap_keepalive = 300
set postponed = "+[Gmail]/Drafts"
set record = "+[Gmail]/Sent Mail"
set header_cache=~/.mutt/cache/headers
# set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
set include
set sort = 'threads'
set auto_tag = yes
hdr_order Date From To Cc
auto_view text/html
bind editor  complete-query
bind editor ^T complete
bind editor  noop
# Gmail-style keyboard shortcuts
# macro index,pager y "unset trash\n " "Gmail 
archive message"
macro index,pager d "=[Gmail]/Trash" "Trash"
# " "Gmail delete message"
macro index,pager gl ""
macro index,pager gi "=INBOX" "Go to inbox"
macro index,pager ga "=[Gmail]/All Mail" "Go to all mail"
macro index,pager gs "=[Gmail]/Starred" "Go to starred 
messages"
macro index,pager gd "=[Gmail]/Drafts" "Go to drafts"
macro index,pager gt "=[Gmail]/Sent Mail" "Go to sent 
mail"
# show index lines above email text display
set pager_index_lines=5
# added by a gershon 2017-04-21 13:37 
set date_format="%d %b %Y"
set index_format="%4C %Z %(%b %d) %-15.15L %s"
Mutt 1.5.24 (2015-08-30)
Copyright (C) 1996-2009 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 4.4.0-72-generic (x86_64)
ncurses: ncurses 6.0.20160213 (compiled with 6.0)
libidn: 1.32 (compiled with 1.32)
hcache backend: tokyocabinet 1.4.48

Compiler:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.3.1-9ubuntu1' 
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-5 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object 
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib 
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-objc-

Re: How to be warned about non-existent aliases?

2017-04-25 Thread Ed Blackman
On Tue, Apr 25, 2017 at 10:36:32AM +0200, Antoine Amarilli wrote:
> I was interested to know whether there is a configuration option in mutt
> to warn the user when entering a wrong alias (that is, a recipient that
> does not contain '@' but is not known to mutt's alias database).

No configuration option that I know of, but if you send email via 
sendmail (vs SMTP), you could use a variant of 
https://dev.mutt.org/trac/wiki/ConfigTricks/CheckAttach to check that 
To, Cc, and Bcc don't contain "@$hostname" and refuse to send if so, 
otherwise passing on to sendmail.

-- 
Ed Blackman


Re: How to be warned about non-existent aliases?

2017-04-25 Thread Ed Blackman
On Tue, Apr 25, 2017 at 11:16:05AM +0100, Chris Green wrote:
> Yes, it's a problem I have with mutt too.  For example I'm subscribed
> to a list called uk-rid...@the-hug.net which is aliased to uk-r, or is
> it ukr, or   

alias uk-riders uk-rid...@the-hug.net
# remembering is hard, aliases are cheap
alias uk-r uk-riders
alias ukr uk-riders
alias ukriders uk-riders

-- 
Ed Blackman


Re: How to be warned about non-existent aliases?

2017-04-25 Thread Antoine Amarilli
Hi,

On Tue, Apr 25, 2017 at 02:32:08PM -0400, Ed Blackman wrote:
> On Tue, Apr 25, 2017 at 10:36:32AM +0200, Antoine Amarilli wrote:
> > I was interested to know whether there is a configuration option in mutt
> > to warn the user when entering a wrong alias (that is, a recipient that
> > does not contain '@' but is not known to mutt's alias database).
> 
> No configuration option that I know of, but if you send email via 
> sendmail (vs SMTP), you could use a variant of 
> https://dev.mutt.org/trac/wiki/ConfigTricks/CheckAttach to check that 
> To, Cc, and Bcc don't contain "@$hostname" and refuse to send if so, 
> otherwise passing on to sendmail.

Thanks for the suggestion! I'm using SMTP however, and anyway that's a
bit of a dirty hack ;). Speaking of dirty hacks, I guess I could also
set $hostname to "FIXMEFIXMEFIXME.doesnotexist", increasing the chances
that I notice the erroneous addresses or that my SMTP complains about
them... that's not exactly satisfactory either, though.

Best,

-- 
Antoine Amarilli



signature.asc
Description: PGP signature


How to tell GUI MUAs to show message in a fixed font?

2017-04-25 Thread Grant Edwards
Is there anything one can do when sending a plain text e-mail message
to tell GUI-based MUAs that they should display it in a fixed font?

I would have sworn that a lot of GUI e-mail programs used to use a
fixed-width font for text/plain content-tupe, but they no longer seem
to do that.

-- 
Grant Edwards   grant.b.edwardsYow! TAILFINS!! ... click
  at   ...
  gmail.com