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

2017-04-27 Thread Ed Blackman
On Wed, Apr 26, 2017 at 03:07:28PM +0100, Chris Green wrote:
> On Tue, Apr 25, 2017 at 02:34:56PM -0400, Ed Blackman wrote:
> > 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
> > 
> Yes, but I belong to 60 or more lists, it would get  bit wordy!

I don't generally add lots of alias variants when I subscribe to a new 
list.  But when I see "To: notanalias@$hostname", I immediately open my 
mailing list aliases file and add "alias notanalias whatImeant".  Over a 
small number of posts to the new list, I exhaust the "here's a new way 
to get the alias wrong" space and the aliases cover all the old ways, so 
I don't have to think about what it should be.

Sort of a variant on "put it back in the first place that you looked for 
it", except I put it in all the places!

-- 
Ed Blackman


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

2017-04-27 Thread Antoine Amarilli
On Tue, Apr 25, 2017 at 10:42:17PM +1000, Erik Christiansen wrote:
> 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.)

Thanks for this idea! (although it's slightly hacky again :)) I don't
spellcheck all messages though -- and there's also the issue of alias
typos which would happen to be an English word.

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

I think ideally this should be an option, so people who do write to
local destinations and don't use aliases (or don't mind the typos) are
not bothered.

Best,

-- 
Antoine Amarilli



signature.asc
Description: PGP signature


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

2017-04-27 Thread Cameron Simpson

On 26Apr2017 15:07, Chris Green  wrote:

On Tue, Apr 25, 2017 at 02:34:56PM -0400, Ed Blackman wrote:

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


Yes, but I belong to 60 or more lists, it would get  bit wordy!


[~/rc/mutt(hg:default)]fleet*> wc aliases-auto
  18662   76167 1125266 aliases-auto

Mwahahaha!

Cheers,
Cameron Simpson 

George, discussing a patent and prior art:
"Look, this  publication has a date, the patent has a priority date,
can't you just compare them?"
Paul Sutcliffe:
"Not unless you're a lawyer."


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

2017-04-26 Thread Chris Green
On Tue, Apr 25, 2017 at 02:34:56PM -0400, Ed Blackman wrote:
> 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
> 
Yes, but I belong to 60 or more lists, it would get  bit wordy!

-- 
Chris Green


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


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 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 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


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 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 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 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