[resolved!] add all INCOMING addresses to address book

Discussion of general topics about Mozilla Thunderbird
klades
Posts: 855
Joined: May 3rd, 2004, 1:20 pm
Contact:

Post by klades »

First of all: as far as I'm concerned, the function has been deleted under TB2 and should work on TB1.5.
I've written a small extension that restores this function, you can find the first "prototype" here:
https://nic-nac-project.org/~kaosmos/In ... -0.0.1.xpi

This extension uses the native code, with some improvements:
1) by default it collects address just from "Inbox" folder (while the native TB function collects from every folder, also "Sent", "Drafts" etc);
2) by default it collects also from other folder, if its name begin with "@" (for ex. "@MyInbox");
3) you can collect from every folders, putting the pref "extension.incoming_addresses_collector.mode" equal to 1;
4) you can disable the extension at all putting the pref "extension.incoming_addresses_collector.enable" equal to false;
5) never collects if the mail is marked as spam;
6) it's compatible from 1.5 to 3.0 TB version;

Notice that both the native function and my extension, collect the addresses in the folder selected in Options --> Compose --> Addresses --> Add automatically [...]

Feedbacks are welcome :-)
Ciao, Paolo
klades
Posts: 855
Joined: May 3rd, 2004, 1:20 pm
Contact:

Post by klades »

The first stable version of the extension is available here:
https://nic-nac-project.org/~kaosmos/in ... rcollector
User avatar
chrizoo
Posts: 374
Joined: October 11th, 2006, 5:58 pm

Post by chrizoo »

If anybody watched the topic but couldn't reply in the meanwhile, this is just to say that thanks to Daifne, the topic is open again and you can post ...

Klades, thanks a lot for contributing with your extension. I'll try it out, and give you feedback soon. But Klades, you said, the preference was deleted in TB2 and should work on TB1.5... I have 1.5.0.10 and it does not seem to work. Could you elaborate on that Klades ?
User avatar
chrizoo
Posts: 374
Joined: October 11th, 2006, 5:58 pm

Post by chrizoo »

Ok, I have installed your extension and tried it, Klades. WORKS LIKE A CHARM!!! Thanks!
Please note, that addresses are not automatically added if a mail arrives in your inbox. You have to click on that mail and only at that moment the sender address is added to your address book.
klades
Posts: 855
Joined: May 3rd, 2004, 1:20 pm
Contact:

Post by klades »

Hello chrizoo, I'm happy to know that the extension works well!

About this issue:

Please note, that addresses are not automatically added if a mail arrives in your inbox. You have to click on that mail and only at that moment the sender address is added to your address book


it's written also on my webpage and it's the same behaviour that TB 1.5 had about it. Consider that Thunderbird parses headers (and so also addresses) just when you click on message. I've tried to develop a version that adds addresses when the mail arrives, but it had a lot of problems and I give up.

About 1.5.0.10 version, as far as I am concerned, the pref "mail.collect_email_address_incoming" should work, but remember that anyway you must click on message to add addresses.
User avatar
chrizoo
Posts: 374
Joined: October 11th, 2006, 5:58 pm

Post by chrizoo »

Hi klades, nice you came back.
I didn't really want to raise it as an issue, it was rather for your information only. I missed your statement on your webpage, sorry. It's not really important anyway.

Thanks for having written the plugin, it's so helpful!

In 1.5.0.10, I make sure that I click on messages, but the senders are not added to my address book (regardless of the pref's value). Your extension fixes that. Any ideas why this got broken ? I wrote on the lower end of page 2, that I'm quite sure that beforehand it used to work for me: when I clicked on a mail in my inbox, the sender was collected. I did not apply any major TB updates in the meanwhile, I think not even minor ones. In the first post on page 3 you stated that the pref was deleted in TB2 but should work in TB1.5. Do you know when exactly it stopped working? In TB2 or maybe already in one of the later 1.5 releases (1.5.0.9 or 1.5.0.12 or something ....) ?

It would actually be great, if "add sender address book" and "add recipient(s) to address book" was one of the actions you could perform in filters. That way, you could add addresses right when mail arrives (i.e. without clicking on them) and it would also provide for a more flexible approach.
For example, the user could add sender addresses only if the a certain string is part of the recipients. This comes in quite handy, if you use a global inbox and have different mail addresses, and you only want to collect sender addresses of your friends, i.e. mails that are sent to your private address, for example.

Would it be difficult/much work to include that as an option in your extension ? I mean, not the filter action, because I guess it's quite complicated or even impossible to add new filter actions via an extension.
But could you add options to your extension, that incoming addresses are only added when a certain string (that the user can enter in the options) is part of the recipients, so that your extension only collects the user's friends' email addresses ? Or, for that matter, if it's easier to implement, you could list the email accounts and provide checkboxes for the accounts that should be included when collecting addresses. This way, the user can also make sure that only addresses of mails sent to the private address (or business address, or whatever the user needs) get collected.

Of course, this behaviour would also be great for outgoing mails, meaning that only recipients of outgoing mails are collected when the mails are sent from your private address. But I guess, that it's impossible to control this with your extension ?

I have no idea, if all this can be done easily, but I thought I come up with some ideas/suggestions, if you don't mind. Thanks anyway for sharing your work with us, it's much appreciated!
klades
Posts: 855
Joined: May 3rd, 2004, 1:20 pm
Contact:

Post by klades »

I've released a new version of Incoming Addresses Collector (0.2), you can read about it here: https://nic-nac-project.org/~kaosmos/in ... or-en.html
It has two new features:
1) possibility to insert a regular expression as condition;
2) possibility to collect addresses when receiving messages (but this one should be used just on TB2, because I'm afraid that on TB 1.5 it doesn't work properly).

As far as I concerned, it's not possible add actions in filters.
In future I could instead add a feature to control collecting according account or recipient address.
Ciao, Paolo
Marenick
Posts: 1
Joined: January 15th, 2009, 9:13 am

Re: [resolved!] add all INCOMING addresses to address book

Post by Marenick »

Hi Klades,

I can't believe I found this add-on. I have been searching for something like this. However, I was wondering if you can tell me how I can control which address book is used for the collection. I beleive the two defaults are personal address book and collected addresses. But lets say I want to create an UNSUBSCRIBE adress book and send all emails that come into this account right into my UNSUBSCRIBE book. Is this possible?

Thanks,

Mike
Post Reply