Re: [MlMt] Gravatar-hack for MailMate

2019-08-29 Thread Max Andersen
Hi,

sorry for reviving an old mail but I've been a happy user of this plist
"hack" to get gravatars but I have a few questions
after trying to update this to use https://api.faviconkit.com//144
to get domain icon.

1) is there a way to avoid having to restart mailmate fully to have changes
picked up ?
2) any way to see errors or what might take a long time because of changes
in the plist ?
3) click on the avatar seem to no longer work - any way to fix that ?


On Thu, Feb 21, 2019 at 3:35 PM Benny Kjær Nielsen 
wrote:

> Hi MailMate users,
>
> sorry about the avalanche of mailing list replies.
>
> For those of you hoping to spot a “useful” hack on the list, I do have
> something for you. Yet another user asked me about providing a way to
> display an image of each email correspondent. I still haven't integrated
> MailMate with images from Contacts, but I realized that it was fairly easy
> to use the Gravatar  service.
>
> I've attached a quick hack for the headers view which makes it look like
> this:
>
> That's the default gravatar, because I don't have one myself, but a
> surprising number of users on this list do have one.
>
> The attached file needs to be saved in this folder:
>
> /Users//Application 
> Support/MailMate/Resources/Layouts/headersFormatting.plist
>
> You might need to create Resources and Layouts and you currently need the
> latest test release of MailMate 1.x for this to work: Hold down ⌥ when
> clicking “Check Now” in the Software Update preferences pane.
>
> Note that this does mean that there'll be quite a lot of (encrypted)
> communication with the gravatar server.
>
> (I make no guarantees that this will work forever.)
>
> --
> Benny
> ___
> mailmate mailing list
> [email protected]
> https://lists.freron.com/listinfo/mailmate
>


-- 
/max
http://about.me/maxandersen
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-04-01 Thread Eric Sharakan
Hi, between updating to MM r5625 & upgrading to Mojave, this is no 
longer a problem.


Thanks.

-Eric

On 1 Apr 2019, at 8:08, Benny Kjær Nielsen wrote:


On 27 Mar 2019, at 2:11, Eric Sharakan wrote:

Speaking of search syntax, has anyone else noticed that if you open 
the contextual menu in the toolbar search field and select "View 
Search Syntax" you get an error that states "The selected content is 
currently unavailable"?


The Help system is, more or less, handled by Apple. I don't seem to be 
able to reproduce this. What happens if you try the “Help ▸ 
MailMate Help” menu item?


--
Benny
https://freron.com/become_a_mailmate_patron/
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate

___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-04-01 Thread Benny Kjær Nielsen

On 27 Mar 2019, at 2:11, Eric Sharakan wrote:

Speaking of search syntax, has anyone else noticed that if you open 
the contextual menu in the toolbar search field and select "View 
Search Syntax" you get an error that states "The selected content is 
currently unavailable"?


The Help system is, more or less, handled by Apple. I don't seem to be 
able to reproduce this. What happens if you try the “Help ▸ MailMate 
Help” menu item?


--
Benny
https://freron.com/become_a_mailmate_patron/
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-26 Thread Eric Sharakan

On 26 Mar 2019, at 11:17, Benny Kjær Nielsen wrote:


On 16 Mar 2019, at 15:23, Aslak Raanes wrote:

Is there a way for getting all the "Not Junk" mail adresses from 
MailMate?


Do you mean all senders of all emails explicitly marked as “Not 
Junk”? In that case, you could first make a search for “Not 
Junk” emails. Using the toolbar search field that would be `K 
$NotJunk`. Then select all emails (⌘A) and use “Command ▸ 
MailMate ▸ Copy Senders”.


--
Benny


Speaking of search syntax, has anyone else noticed that if you open the 
contextual menu in the toolbar search field and select "View Search 
Syntax" you get an error that states "The selected content is currently 
unavailable"?


-Eric___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-26 Thread Benny Kjær Nielsen

On 16 Mar 2019, at 15:23, Aslak Raanes wrote:

Is there a way for getting all the "Not Junk" mail adresses from 
MailMate?


Do you mean all senders of all emails explicitly marked as “Not 
Junk”? In that case, you could first make a search for “Not Junk” 
emails. Using the toolbar search field that would be `K $NotJunk`. Then 
select all emails (⌘A) and use “Command ▸ MailMate ▸ Copy 
Senders”.


--
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-16 Thread Aslak Raanes

On 3 Mar 2019, at 12:22, Benny Kjær Nielsen wrote:

(But [libravatar.org] appears to be slower which emphasizes that 
MailMate does not cache these images.)


It might be because  [didn't provide 
`Cache-Control`](https://git.linux-kernel.at/oliver/ivatar/issues/50) at 
that point?


Is there a way for getting all the "Not Junk" mail adresses from 
MailMate?


Anyway, here is one script for making a `RewriteMap` that your local 
Apache can use for a caching reverse proxy.


(Only needs `pip install pylibravatar py3dns requests furl` if I recall 
correctly)


```python
#!/usr/bin/env python3
import libravatar
import requests
from furl import furl
import os
import sys
import argparse

p = argparse.ArgumentParser()
p.add_argument(
"-i",
"--infile",
type=argparse.FileType("r"),
default=sys.stdin,
help="Input one email adress pr line",
)
p.add_argument(
"-o",
"--outfile",
type=argparse.FileType("w"),
default=sys.stdout,
help="Output result fitting for a Apache RewriteMap",
)
a = p.parse_args()


for em in a.infile.read().splitlines():
# Get libravatar_url, default to 404 with added query for
# not using gravatarproxy and redirect if no libravatar
# au = avatarurl
try:
au = furl(
libravatar.libravatar_url(
email=em, https=True, default="404"
)
).add(args={"gravatarproxy": "n", "gravatarredirect": "n"})
ah = libravatar.parse_user_identity(email=em, openid=None)[0]
except Exception:
pass

# Follow redirects
aur = requests.head(au.url, allow_redirects=True)

# If no libravatar, check if a gravatar exist
if aur.status_code == 404:
au = furl("https://www.gravatar.com/avatar/";).add(
path=ah, args={"d": "404"}
)
aur = requests.head(au, allow_redirects=True)

# If http = 200, (not e.g. 404) output result
if aur.status_code == 200:
# Remove query
au = furl(aur.url).remove(query=True).url
# Output result fitting for
# 


# -> mailmd5hash avatarurl # mail
a.outfile.write(" ".join([ah, au]) + " # " + em + os.linesep)
```






___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Benny Kjær Nielsen

On 4 Mar 2019, at 2:08, Charlie Garrison wrote:

I read that as needing the latest release for the 
headersFormatting.plist. So I tried it, and it didn't work, and I 
asked for clarification.


Next time I won't do that; I'll just ask the crystal ball instead of 
getting snark from this list.


I'm not sure if this is about my short response to your problem with 
making it work. If it was then I'm sorry I wasn't more helpful.


--
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Benny Kjær Nielsen

On 4 Mar 2019, at 2:03, Charlie Garrison wrote:


On 3 Mar 2019, at 20:39, Benny Kjær Nielsen wrote:


On 26 Feb 2019, at 14:02, Charlie Garrison wrote:

It's not working for me though; would that be due to me using a beta 
version rather than latest 1.x release?


Yes, I  _think_  I noted that in my initial email, but I might be 
wrong :)


Yes, you said the latest release was needed, but didn't mention the 
2.x series. And you didn't say whether the latest version was needed 
to support Gravatar or the headersFormatting.plist file. I know the 
2.x series supports the headersFormatting.plist file, so figured it 
must also support the Gravatar hack (since it's just additional html).


That makes sense, but the additional HTML requires the calculation of an 
`md5` value which is currently only supported by the 1.x test releases.


As already established in this thread, I made several mistakes in my 
original description of the hack. I'm very sorry about that. The hack 
itself was never intended to be more than something that a few users 
might want to play with. I'll try to be more careful in the future 
when/if sharing such hacks.


--
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Bill Cole

On 3 Mar 2019, at 6:22, Benny Kjær Nielsen wrote:


On 1 Mar 2019, at 1:35, Aslak Raanes wrote:


On 21 Feb 2019, at 15:35, Benny Kjær Nielsen wrote:

I still haven't integrated MailMate with images from Contacts, but I 
realized that it was fairly easy to use the 
[Gravatar](https://www.gravatar.com) service.


One alternative could be use 
[Libravatar](https://www.libravatar.org/) and its [federated 
api](https://wiki.libravatar.org/api/) which makes it possible to run 
your own avatar server.


I didn't know that one. It does work:

{
formatString = "src=\"https://seccdn.libravatar.org/avatar/${from.address.#md5}\"/>";

},

(But it appears to be slower which emphasizes that MailMate does not 
cache these images.)




PSA:

This is also a reminder that no matter which "service" of these you use, 
this "feature" is literally telling a third party who's email you are 
reading, every time you read an email.


HARD PASS!

--
Bill Cole
[email protected] or [email protected]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread John Cooper

Charlie Garrison wrote (at 17:08 on 3 Mar 2019):


On 4 Mar 2019, at 1:12, John Cooper wrote:


You did.


You must know more than me then. I found the following to be 
ambiguous:


... you currently need the latest test release of MailMate 1.x for 
this to work...


I don't find this ambiguous.

Next time I won't do that; I'll just ask the crystal ball instead of 
getting snark from this list. 


I never addressed you, much less indulged in snark. I regret that you 
were offended.

___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Charlie Garrison

On 4 Mar 2019, at 1:12, John Cooper wrote:


You did.


You must know more than me then. I found the following to be ambiguous:


The attached file needs to be saved in this folder:

/Users//Application 
Support/MailMate/Resources/Layouts/headersFormatting.plist


You might need to create Resources and Layouts and you currently need 
the latest test release of MailMate 1.x for this to work: Hold down 
⌥ when clicking “Check Now” in the Software Update preferences 
pane.


I read that as needing the latest release for the 
headersFormatting.plist. So I tried it, and it didn't work, and I asked 
for clarification.


Next time I won't do that; I'll just ask the crystal ball instead of 
getting snark from this list.


-cng

--

Charlie Garrison   
Garrison Computer Services  
PO Box 380
Tumbarumba NSW 2653  Australia
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Charlie Garrison

On 3 Mar 2019, at 20:39, Benny Kjær Nielsen wrote:


On 26 Feb 2019, at 14:02, Charlie Garrison wrote:

It's not working for me though; would that be due to me using a beta 
version rather than latest 1.x release?


Yes, I  _think_  I noted that in my initial email, but I might be 
wrong :)


Yes, you said the latest release was needed, but didn't mention the 2.x 
series. And you didn't say whether the latest version was needed to 
support Gravatar or the headersFormatting.plist file. I know the 2.x 
series supports the headersFormatting.plist file, so figured it must 
also support the Gravatar hack (since it's just additional html).


Thanks,
Charlie


--

Charlie Garrison   
Garrison Computer Services  
PO Box 380
Tumbarumba NSW 2653  Australia
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread John Cooper

Benny Kjær Nielsen wrote (at 1:39 on 3 Mar 2019):


On 26 Feb 2019, at 14:02, Charlie Garrison wrote:

It's not working for me though; would that be due to me using a beta 
version rather than latest 1.x release?


Yes, I *think* I noted that in my initial email, but I might be wrong 
:)


You did.___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Benny Kjær Nielsen

On 1 Mar 2019, at 1:35, Aslak Raanes wrote:


On 21 Feb 2019, at 15:35, Benny Kjær Nielsen wrote:

I still haven't integrated MailMate with images from Contacts, but I 
realized that it was fairly easy to use the 
[Gravatar](https://www.gravatar.com) service.


One alternative could be use [Libravatar](https://www.libravatar.org/) 
and its [federated api](https://wiki.libravatar.org/api/) which makes 
it possible to run your own avatar server.


I didn't know that one. It does work:

{
formatString = "src=\"https://seccdn.libravatar.org/avatar/${from.address.#md5}\"/>";

},

(But it appears to be slower which emphasizes that MailMate does not 
cache these images.)


Since MailMate doesn't support the federated api (yet) one could use 
Apache installed on macOS to redirect or reverse proxy to different 
avatar servers.


Thanks for sharing. That is definitely taking the hack to new heights :)

--
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Benny Kjær Nielsen

On 28 Feb 2019, at 20:13, Giovanni Lanzani wrote:


On 22 Feb 2019, at 23:22, Max Rydahl Andersen wrote:


I copied the file so I have this:

```
$ ls ~/Library/Application\ Support/MailMate/Resources/Layouts
Mailboxes
headersFormatting.plist
```

but after restarting nothing seem to happen


Same here.


You seem to be using a release of MailMate which should work with this 
hack. You can use “View ▸ Show HTML Source” after focusing the 
headers view to see if the HTML code generated includes a reference to 
the Gravatar site.


(It's just a hack so tracking down issues is not a very high priority ;) 
)


--
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Benny Kjær Nielsen

On 28 Feb 2019, at 20:18, John Cooper wrote:


but after restarting nothing seem to happen


Same here.


You need the latest test release of 1.x (hold down ⌥ when clicking 
“Check Now” in the Software Update preferences pane).


--
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Benny Kjær Nielsen

On 26 Feb 2019, at 15:05, Compass Luca Cignacco wrote:

Instead of gravatar is it possible to use the website icon? It would 
be nice…


Here's one way to accomplish that:

{
		formatString = "src=\"https://besticon-demo.herokuapp.com/icon?url=${from.domain}&size=16..64..64\"/>";

},

(I googled and found [this 
service](https://github.com/mat/besticon/blob/master/Readme.markdown) 
used above.)


A quick test (for my incoming mail) doesn't work as well as the 
gravatar.


--
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Benny Kjær Nielsen
On 22 Feb 2019, at 23:22, Max Rydahl Andersen wrote:

> but after restarting nothing seem to happen

Currently only works on the 1.x branch.

-- 
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-03-03 Thread Benny Kjær Nielsen

On 26 Feb 2019, at 14:02, Charlie Garrison wrote:

It's not working for me though; would that be due to me using a beta 
version rather than latest 1.x release?


Yes, I *think* I noted that in my initial email, but I might be wrong :)

Semi-related question, is there a way to view the rendered html in the 
headers? During this I noted that earlier custom changes I made to 
headersFormatting.plist are not working as expected. Suggestions for 
troubleshooting it?


Yes, focus the view by clicking on it and then hit ⌃⌘U just like you 
can do it for the main message view.


--
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-02-28 Thread Aslak Raanes

On 21 Feb 2019, at 15:35, Benny Kjær Nielsen wrote:

I still haven't integrated MailMate with images from Contacts, but I 
realized that it was fairly easy to use the 
[Gravatar](https://www.gravatar.com) service.


One alternative could be use [Libravatar](https://www.libravatar.org/) 
and its [federated api](https://wiki.libravatar.org/api/) which makes it 
possible to run your own avatar server.


Since MailMate doesn't support the federated api (yet) one could use 
Apache installed on macOS to redirect or reverse proxy to different 
avatar servers.


I.e. change `headersFormatting.plist` to something like:

```diff
--- headersFormatting-2.plist   2019-03-01 00:18:48.0 +0100
+++ headersFormatting.plist 2019-03-01 00:41:08.0 +0100
@@ -5,7 +5,7 @@
(
// Gravatar example with link
{
-formatString = "href=\"https://www.gravatar.com/${from.address.#md5}\";>style=\"float: left; height: 60px;\" 
src=\"https://www.gravatar.com/avatar/${from.address.#md5}\"/>";
+formatString = "src=\"http://localhost/avatar/${from.address.#md5}?s=60&d=identicon\"; 
srcset=\"http://localhost/avatar/${from.address.#md5}?s=60&d=identicon 
1x, http://localhost/avatar/${from.address.#md5}?s=90&d=identicon 
1.5x,http://localhost/avatar/${from.address.#md5}?s=120&d=identicon 
2x\"/>";

},
{
separator = { string = "\n"; };
```

and by [using Apache 
RewriteMap](https://httpd.apache.org/docs/current/rewrite/rewritemap.html), 
redirect


```apache
LoadModule ssl_module libexec/apache2/mod_ssl.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so



CustomLog /var/log/apache2/avatar-rewrite-access.log combined
ErrorLog /var/log/apache2/avatar-rewrite-error.log

SSLProxyEngine On
RewriteEngine On

RewriteMap hash2avatarurl 
"txt:/Library/WebServer/hash2avatarurl.txt"
RewriteRule "^/avatar/(.*)" 
"${hash2avatarurl:$1|https://www.gravatar.com/avatar/}"; 
[R,L]



```
or reverse proxy

```apache
LoadModule proxy_module libexec/apache2/mod_proxy.so
LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so
LoadModule ssl_module libexec/apache2/mod_ssl.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule cache_module libexec/apache2/mod_cache.so
LoadModule cache_socache_module libexec/apache2/mod_cache_socache.so
LoadModule socache_shmcb_module libexec/apache2/mod_socache_shmcb.so


LogLevel info rewrite:trace3 socache_shmcb:debug

CustomLog /var/log/apache2/avatar-proxy-access.log combined
ErrorLog /var/log/apache2/avatar-proxy-error.log

CacheSocache shmcb:/var/tmp/avatarproxyshmcbcache(512000)

CacheQuickHandler off

CacheStoreExpired On
CacheIgnoreNoLastMod On
CacheIgnoreCacheControl On
CacheDefaultExpire 86400
CacheMinExpire 86400
CacheMaxExpire 604800

CacheHeader On
CacheDetailHeader On


CacheEnable socache


SSLProxyEngine on
RewriteEngine On

RewriteMap hash2avatarurl 
"dbm:/Library/WebServer/hash2avatarurl.dbm"
RewriteRule "^/avatar/(.*)" 
"${hash2avatarurl:$1|https://www.gravatar.com/avatar/}"; 
[P]



```

where `hash2avatarurl.txt` looks like:

```text
54d652cfd5beed169d4d585b134c65e1 
https://secure.gravatar.com/avatar/54d652cfd5beed169d4d585b134c65e1
967b1e0903bb424fdf75fa38bcaf9af0 
https://seccdn.libravatar.org/avatar/967b1e0903bb424fdf75fa38bcaf9af0

```


___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-02-28 Thread John Cooper

Giovanni Lanzani wrote (at 11:13 on 28 Feb 2019):


On 22 Feb 2019, at 23:22, Max Rydahl Andersen wrote:


I copied the file so I have this:

```
$ ls ~/Library/Application\ Support/MailMate/Resources/Layouts
Mailboxes
headersFormatting.plist
```

but after restarting nothing seem to happen


Same here.


Same here. But I thought maybe it was just that none of my 
correspondents use Gravatar.___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-02-28 Thread Giovanni Lanzani
On 22 Feb 2019, at 23:22, Max Rydahl Andersen wrote:

> I copied the file so I have this:
>
> ```
> $ ls ~/Library/Application\ Support/MailMate/Resources/Layouts
> Mailboxes
> headersFormatting.plist
> ```
>
> but after restarting nothing seem to happen

Same here.___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-02-26 Thread Compass Luca Cignacco
Instead of gravatar is it possible to use the website icon? It would be 
nice…


On 21 Feb 2019, at 16:26, Benny Kjær Nielsen wrote:


On 21 Feb 2019, at 16:24, Robert M. Münch wrote:


On 21 Feb 2019, at 15:35, Benny Kjær Nielsen wrote:


… The attached file needs to be saved in this folder:


Sorry, that might be useful to include :)

--
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


![alt text](http://www.compass.udine.it/files/stacks-image-5fd47a7.png)
Via dell’asilo 11 - 33048 - San Giovanni al Natisone (UD) - Italy
VAT N. IT02260610304 - C.Fisc. CGNLCU75L29G284O - Cod. SDI **WP7SE2Q**
Tel. +39 0432 743221 - [email protected] - PEC: [email protected]
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-02-26 Thread Charlie Garrison

On 22 Feb 2019, at 21:16, Benny Kjær Nielsen wrote:

In this case, it's fairly simple what you need to do if you already 
have the `longFormatting` key defined. The file should start with 
this:


Thanks for that. I understand the changes now.

It's not working for me though; would that be due to me using a beta 
version rather than latest 1.x release?


Semi-related question, is there a way to view the rendered html in the 
headers? During this I noted that earlier custom changes I made to 
headersFormatting.plist are not working as expected. Suggestions for 
troubleshooting it?


-cng

--

Charlie Garrison   
Garrison Computer Services  
PO Box 380
Tumbarumba NSW 2653  Australia
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-02-22 Thread Max Rydahl Andersen


I copied the file so I have this:

```
$ ls ~/Library/Application\ Support/MailMate/Resources/Layouts
Mailboxes
headersFormatting.plist
```

but after restarting nothing seem to happen


/max
https://xam.dk/about

On 22 Feb 2019, at 11:16, Benny Kjær Nielsen wrote:


On 22 Feb 2019, at 1:20, Charlie Garrison wrote:

To everyone: Sorry about the missing attachment *and* the wrong path. 
I've attached a new file, because the other one was actually much more 
complex than it needed to be (because I was trying out different 
approaches to the problem). They are functionally equivalent though.



On 22 Feb 2019, at 1:35, Benny Kjær Nielsen wrote:


The attached file needs to be saved in this folder:

/Users//Application 
Support/MailMate/Resources/Layouts/headersFormatting.plist


Just to emphasize, it should have been:

	/Users//Library/Application 
Support/MailMate/Resources/Layouts/headersFormatting.plist


(And `Resources/Layouts` likely do not exist for most users.)

I've already got a custom headersFormatting.plist which is quite 
different from the one you supplied. Would you be willing to point 
out what the differences are for the Gravatar icon? Or, is there any 
docco to explain the structure of the headersFormatting.plist file?


There is no documentation. It really is just for users that would 
rather tinker with low level files than wait for me to implement some 
specific feature. (There are no guarantees I won't change the format 
of one or more of these files in the future.)


In this case, it's fairly simple what you need to do if you already 
have the `longFormatting` key defined. The file should start with 
this:


~~~
{
longFormatting =
{
children =
(
// Gravatar example with link
{
formatString = "href=\"https://www.gravatar.com/${from.address.#md5}\";>style=\"float: left; height: 60px;\" 
src=\"https://www.gravatar.com/avatar/${from.address.#md5}\"/>";

},
~~~

And then continue with its current content. In other words, the 
`children` group above just got a new “first child”.


The above also shows you that it's possible to click on the avatar to 
go to the corresponding Gravatar page.


--
Benny
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-02-22 Thread Benny Kjær Nielsen

On 22 Feb 2019, at 1:20, Charlie Garrison wrote:

To everyone: Sorry about the missing attachment *and* the wrong path. 
I've attached a new file, because the other one was actually much more 
complex than it needed to be (because I was trying out different 
approaches to the problem). They are functionally equivalent though.



On 22 Feb 2019, at 1:35, Benny Kjær Nielsen wrote:


The attached file needs to be saved in this folder:

/Users//Application 
Support/MailMate/Resources/Layouts/headersFormatting.plist


Just to emphasize, it should have been:

	/Users//Library/Application 
Support/MailMate/Resources/Layouts/headersFormatting.plist


(And `Resources/Layouts` likely do not exist for most users.)

I've already got a custom headersFormatting.plist which is quite 
different from the one you supplied. Would you be willing to point out 
what the differences are for the Gravatar icon? Or, is there any docco 
to explain the structure of the headersFormatting.plist file?


There is no documentation. It really is just for users that would rather 
tinker with low level files than wait for me to implement some specific 
feature. (There are no guarantees I won't change the format of one or 
more of these files in the future.)


In this case, it's fairly simple what you need to do if you already have 
the `longFormatting` key defined. The file should start with this:


~~~
{
longFormatting =
{
children =
(
// Gravatar example with link
{
formatString = "href=\"https://www.gravatar.com/${from.address.#md5}\";>style=\"float: left; height: 60px;\" 
src=\"https://www.gravatar.com/avatar/${from.address.#md5}\"/>";

},
~~~

And then continue with its current content. In other words, the 
`children` group above just got a new “first child”.


The above also shows you that it's possible to click on the avatar to go 
to the corresponding Gravatar page.


--
Benny
{
longFormatting =
{
children =
(
// Gravatar example with link
{
formatString = "https://www.gravatar.com/${from.address.#md5}\";>https://www.gravatar.com/avatar/${from.address.#md5}\"/>";
},
{
separator = { string = "\n"; };
placeholderString = "(No headers found)";
// There is a lot of redundancy in the 
following. Need some way to simplify/template how this works.
// For now, only Resent-From/To is displayed.
// Note that this does not work well for 
multiple Resent headers, in particular, multiple Resent-To are hard to 
interpret/display.

prefixString = "";
suffixString = "";

children =
(
{
prefix = { string = 
"Resent-From:"; };
suffixString = 
"";
children =
(
{
formatString = 
"${resent-from.name.#nospoof}";
escapeHTML = 1;
singleClick =
{

titleFormatting = { prefixString = "Resent from "; formatString = 
"“${resent-from.name}”"; };

queryFormatting = { formatString = "resent-from.name = '${resent-from.name}'"; 
separatorString = " or "; escapeSingleQuotes = 1; };
};
},
{
prefix = { 
formatString = "${resent-from.name:+ <}";};
formatString = 
"${resent-from.address}";
escapeHTML = 1;
suffix = { 
formatString = "${resent-from.name:+>}";};
singleClick =
{

titleFormatting = { 

Re: [MlMt] Gravatar-hack for MailMate

2019-02-21 Thread Charlie Garrison

Good morning,

On 22 Feb 2019, at 1:35, Benny Kjær Nielsen wrote:


The attached file needs to be saved in this folder:

/Users//Application 
Support/MailMate/Resources/Layouts/headersFormatting.plist


I've already got a custom headersFormatting.plist which is quite 
different from the one you supplied. Would you be willing to point out 
what the differences are for the Gravatar icon? Or, is there any docco 
to explain the structure of the headersFormatting.plist file?


Thanks,
Charlie


--

Charlie Garrison   
Garrison Computer Services  
PO Box 380
Tumbarumba NSW 2653  Australia
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-02-21 Thread Verdon Vaillancourt
Yup

> Is the "library" folder missing in the initial path?
>
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-02-21 Thread Rick Cogley
>   /Users//Application 
> Support/MailMate/Resources/Layouts/headersFormatting.plist

I wanted to try this, but I cannot find this path. Instead, I have:

 /Users//Library/Application Support/Mailmate…

Is the "library" folder missing in the initial path?

--
Rick Cogley


signature.asc
Description: OpenPGP digital signature
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Gravatar-hack for MailMate

2019-02-21 Thread Benny Kjær Nielsen
On 21 Feb 2019, at 16:24, Robert M. Münch wrote:

> On 21 Feb 2019, at 15:35, Benny Kjær Nielsen wrote:
>
>> … The attached file needs to be saved in this folder:

Sorry, that might be useful to include :)

-- 
Benny
{
longFormatting =
{
children =
(
// Gravatar example with link (which becomes a bit 
messy because the md5 value is needed twice).
{
prefixString = "https://www.gravatar.com/";;
children = (
{
formatString = 
"${from.address.#md5}";
suffixString = "\">";
},
{
// Note: Could float it right 
instead
prefixString = "https://www.gravatar.com/avatar/";;
formatString = 
"${from.address.#md5}";
suffixString = "\"/>";
},
);
suffixString = "";
},
{
separator = { string = "\n"; };
placeholderString = "(No headers found)";
// There is a lot of redundancy in the 
following. Need some way to simplify/template how this works.
// For now, only Resent-From/To is displayed.
// Note that this does not work well for 
multiple Resent headers, in particular, multiple Resent-To are hard to 
interpret/display.

prefixString = "";
suffixString = "";

children =
(
{
prefix = { string = 
"Resent-From:"; };
suffixString = 
"";
children =
(
{
formatString = 
"${resent-from.name.#nospoof}";
escapeHTML = 1;
singleClick =
{

titleFormatting = { prefixString = "Resent from "; formatString = 
"“${resent-from.name}”"; };

queryFormatting = { formatString = "resent-from.name = '${resent-from.name}'"; 
separatorString = " or "; escapeSingleQuotes = 1; };
};
},
{
prefix = { 
formatString = "${resent-from.name:+ <}";};
formatString = 
"${resent-from.address}";
escapeHTML = 1;
suffix = { 
formatString = "${resent-from.name:+>}";};
singleClick =
{

titleFormatting = { prefixString = "Resent from "; formatString = 
"“${resent-from.address}”"; };

queryFormatting = { formatString = "resent-from.address = 
'${resent-from.address}'"; separatorString = " or "; escapeSingleQuotes = 1; };
};
},
);
copyValues =
(
{ title = ''; 
valueFormatting = { formatString = '${resent-from.name:+${resent-from.name} 
<${resent-from.address}>}'; }; },
{ title = 'Address 
Only'; valueFormatting = { formatString = '${resent-from.address}'; }; },
{ title = 'Name Only'; 
valueForma

Re: [MlMt] Gravatar-hack for MailMate

2019-02-21 Thread Robert M. Münch
On 21 Feb 2019, at 15:35, Benny Kjær Nielsen wrote:

> … The attached file needs to be saved in this folder:

There is no attached file. Robert

signature.asc
Description: OpenPGP digital signature
___
mailmate mailing list
[email protected]
https://lists.freron.com/listinfo/mailmate