GitHub repository: https://github.com/qiqitori/reply_as_original_recipient
URL: https://addons.mozilla.org/en-US/thunderbird/addon/reply-as-original-recipient/
This Thunderbird extension automatically changes the From: field in replies to whatever the original sender’s email had in To:, but only if there is a + in the email address (and there is only one address in To:).
URL: https://addons.mozilla.org/ja/thunderbird/addon/reply-as-original-recipient/
返信の時、受信したメールの「宛先」に入っているメールアドレスを返信の送信元に設定してくれるThunderbirdアドオンを作ってみました。
(ただし、仕様上、宛先のメールアドレスに「+」が入っていないと動作しません。メールアドレスが二つ以上入っている場合も動作しません。)
URL: https://addons.mozilla.org/de-DE/thunderbird/addon/reply-as-original-recipient/
Mit diesem Thunderbird-Addon wird bei Antworten auf angekommene Emails, die im “An:”-Feld eine Email-Adresse mit einem “+” enthalten, das “Von:”-Feld automatisch auf jene “An:”-Email-Adresse gesetzt. Allerdings funktioniert dies nur bei Emails, die nur einen “An:”-Empfänger haben.
2017-01-29 edit: 1.1 beta version: reply_as_original_recipient-1.1-tb.xpi
This version adds an option in the config editor that allows the extension to work even if there is no plus character in the To: address. The option is at “extensions.replyasoriginalrecipient.use_plus”. The default is true, meaning that the address has to contain a plus character.
Thanks a lot! This is really helpful to have when your email provider features the “+” syntax for dynamic aliases, and allows to send emails from arbitrary aliases as well. Only email provider I know which does that is mailbox.org.
Version 1.1 doesn’t work correctly if you are in CC
I got an email as copy but when I reply it adds the email of the original To as new sender, which is totally nonsense.
I never want to send as someone else, I only want the addon to select the right one of my accounts to send from.
Solution would be:
if the address in CC matches one of my accounts then use that one, only otherwise use the oritinal To address as sender.
Hey, thanks for testing and commenting. I’ll take a look at this on the weekend!
I now downloaded the xpi file for 1.0, unpacked it in a folder and edited the line that checks rot the “+”. I replaced it with my email catch-all-domain, so only if that domain is in the TO: field, it will use that as sender email.
then I repacked it with
cd ~/extensions/my_extensions
zip -r ../sample.xpi *
that new xpi file works fine with only my domain instead of the check for “+” ;)
I think this is what most people need it for, so just make that “+” string configurable in the next version.
+1
+1 from me, too
Thanks for this extension.
Could it be possible to check if there is ‘Delivered-To’ field and then use it instead of ‘To’ field. It would be useful for email received from mailing-list.
Hey, sorry for taking ages to get back to you. Does the following plugin do what you need?
https://addons.mozilla.org/en-US/thunderbird/addon/correct-identity/
Edit:
I checked if there is a way to get “Delivered-To” from originalHeader as defined in the code below, by trying (among other things) originalHeader.getStringProperty(“Delivered-To”), but nothing worked. Sorry. If you know of an extension that uses “Delivered-To” somewhere, I could borrow some code from there.
/* Get original recipient */
originalHeader = this.getMessageHeaderFromURI(gMsgCompose.originalMsgURI);
originalRecipient = originalHeader.mime2DecodedRecipients;
I have to support Qiqitori on this one:
The only way to get to those headers is using an ID to get an InputStream of the local stored message, than reading the raw data parsing the Headers manualy.
Without an existing function this is totally out of the scope of this extension (would take 10 times as much code, not to mention the amount of testing till it is stable)
Thank you, it works well with the “Protected E-mail Addresses” add-on¹.
1. https://addons.mozilla.org/en-US/thunderbird/addon/protected-e-mail-addresses/
Could it be possible to configure the separator? gmail uses ‘+’, but some other systems use ‘-‘. The exim mail software allows admins to configure whatever they want.
It would actually be cool to be able to set a pattern to match the recipient so I could match on domain. I want to match hamish-foo@mydomain only, if I receive an email to some-list@domain.com I don’t want to reply as some-list@domain.com just because that matches the dash.
Thank you so much for the 1.1-beta version! This is almost exactly what I need.
The only problem I notice, is that replying to messages sent to “undisclosed-recipients:” use that as a From :-p
I don’t know if you can read it in an extension, there is _one_ place where I think you can always read the actual intended recipient name:
In the received email headers, there are a number of “Received: from … by … id … for …”, and the _last_ “for” gives the actual intended recipient, even if BCC ;-)
Cheers!
Note: Delivered-To is _not_ the address to seek. In most cases, when receiving an email to an alias, you will see:
Delivered-To: real-name@example.org
Received: from … by your-server id … for real-name@example.org”
Received: from … by your-server id … for alias@example.org”
Thus my suggestion to use Received rather than Delivered-To.
That being said, if reading the headers is impossible, as suggested in #comment-6495 then being able to match a pattern in both To: and Cc: (for example “*@example.org”, or “name+*@gmail.com”) would be pretty nice!
Unless I am mistaken, this is what rubo77 did in #comment-3140 ;-)
Cheers
I changed a few Lines in the beta version to address the some of the issues:
# Multiple “To:” entries
The extension will still work when there are multiple “To:” entries, as long as only one entry has a plus sign (or matches the patterns, see below)
# “Cc:”
“To:” and “Cc:” are both used to find the Recipient. This makes senece now that only exactly one match is alowed.
# Configurable patterns:
The option “use_plus” is replaced by “extensions.replyasoriginalrecipient.patterns”.
## Example of patterns:
`name+*@gmail.com` (Thx @Yves for the idea)
`*@example.org`
`*+*` (the default)
`*` (same behaviour as “use_plus” set to false in version 1.1)
`*@example.org,*+*` (multiple patterns are separated by comma)
The patterns are matched case insensitive against the full recipient e.g. `My Name ` as well as the email (the part between “).
Only `*` and `,` have special meaning in the patterns option.
Blanks at the beginning and the end are ignored.
@Qiqitori: Thank you for the very useful extension. I temporarily [uploaded the changed xpi to my server](https://samuel-kirschner.de/reply_as_original_recipient-1.2-tb.xpi) Feel free to repost it here or even upload it to addons.thunderbird.net
@Yves: Thanks for the pattern example. Before I read your comment I was using regex, and having ato write a pattern like `^name\+.*@gmail\.com$` is really not that convenient.
Woo! Awesome. Will add your xpi to this page tonight or during the weekend.
Thank you very much.
Do you intend to update this plugin and the one that allows for no + in the address to be compatible with version 60 and above?
Aw, did it break? D:
The newest version of Thunderbird will not allow me to install and comes back with a message in Red saying “Reply As Original Recipient could not be installed because it is not compatible with Thunderbird 60.0”
Ah. Hmm. I just tried downloading the extension from https://addons.thunderbird.net/en-US/thunderbird/addon/reply-as-original-recipient/ which seemed to work.
Maybe they update compatibility metadata automatically?
I don’t think I’ll be able to keep updating the metadata of the beta extension, so here’s what you have to do to change the metadata yourself:
1) Unzip the .xpi file
2) Open install.rdf and change em:maxVersion=”53.*” to something higher.
3) Zip everything up again and change the file extension from .zip to .xpi
The project is MPL licensed, no? So it should be possible to put it on github?
Hi,
Added a repository at https://github.com/qiqitori/reply_as_original_recipient
The proposed 1.1 and 1.2 versions are kept in branches “1.1” and “1.2”, respectively.
Just a very simple question from a noob: how do I get to that config editor where I can change the criteria?
Hi,
Edit -> Preferences -> Advanced -> Config Editor
(If you can’t see the Edit menu, try pressing Alt + E)
does this still work for everyone else?
it used to work for me but suddenly just stopped doing anything…
its still installed and such, but the sender email isnt modified anymore.
(started noticing because i was getting replies in unexpected folders… i use aliases and sieve to autosort into folders, which this extension was a heavenly help for…)
I just installed the “standard” version from the addons repo, and it seems to work
Hi Qiqitori,
I had a little time today to change two more things in the beta:
– A small configuration dialog to enter the pattern. Including a description, but it is only in English.
– Raising the version to 69.*, just so the beta don’t stop working. This is no meant as a stable solution.
Could you check it out?
( Uploaded it to, http://samuel-kirschner.de/reply_as_original_recipient-1.3-tb.xpi )
And maybe create a Japanese translation of the pattern-option-description.
In case I’ll have some more time I would like to add German and Japanese language files.
— Samuel Kirschner
Hey, do you have a github account? I imported the code here: https://github.com/qiqitori/reply_as_original_recipient
I’ve been maintaining the beta releases as separate branches. If you could send me a pull request, I could maybe import your changes a bit quicker.
To be honest, I don’t use this extension myself and regularly forget how to test it. In order to publish an actual new release, the extension should by default do exactly what it did in the currently published version. (If your changes don’t break anything I think we could publish.)
for me the extension (every version i tested) has stopped working…
i use thunderbird daily (60.2.1) and was using it for aliases WITHOUT the + attribute.
it worked perfectly (and i thank you for that), but now it just acts as if it is not there.
When uploaded as official extention, somehow mozilla has an automated process that adjusts the “maxVersion” if there are no issues.
The beta that can be downloaded from here does not get the automated update (it is just a file, no magic there).
I guess, if you would have opend the addon-tab in thunderbird, there would have been a hint like “addon does not work with this version of thunderbird”
I used a “dirty trick”: I just asumed that even without modifications beta version 1.3 should be testet until version “69.*”. It is not even posible to upload a plugin that uses a not jet exiting version to addons.mozilla, but it realy helps when testing a beta :)
just installed this version, and this one works again!
thank you so much :D
Be carefull when using my Version 1.3!
I added a settings-dialog to make it easier to adjust the pattern.
It worked like a charm, but then I updated to Thunder 60, and now the “prefwindow” is just transparent. As soon as you choese “Addon Prefrences -> Reply as origial Recipiant” from the file-menu Thunderbird is completly unusable (you cant even close it) you need the task manger to killl it.
Use `about:config` instead. untill I find a solution.
I took this extension and changed it a little further. The one thing I’ve changed is how the original e-mail address is set to the sender field. The previous code always used the entire text, including name and address. This makes me look like the sender named me. If that includes misspellings and other crap, that would be the sender name of my message. If the sender didn’t know my name and only entered the address alone, I would send my message without a name, too.
My change now only applies the original recipient e-mail address but leaves the account name.
Example:
My account configuration: My Name
Somebody sent me a message to: xyz
My sender (previous version): xyz
My sender (modified): My Name
This looks more friendly to the recipient of my reply and makes sure I am recognised by my name.
I call it version 1.4. It is based on 1.2. The number 1.3 was already used but declared broken so I skipped it.
Here’s the archive: https://unclassified.de/tmp/reply_as_original_recipient-1.4-tb.zip (Rename to .xpi; if I did it, you couldn’t download the file with Firefox)
Oh, my coment was mangled by the blog. Here’s the part with the senders, using different characters:
My account configuration: My Name (my.name@example.com)
Somebody sent me a message to: xyz (my.alias@example.com)
My sender (previous version): xyz (my.alias@example.com)
My sender (modified): My Name (my.alias@example.com)
hi…
my ‘reply-to sender only’ not functioning, after I removed the add-on…
how do I reinstate it…?
Is it possible to get it updated for Thunderbird 68?
I’ve updated my version of the add-on for Thunderbird 68. It seems to work fine. You can download it here:
https://unclassified.de/tmp/reply_as_original_recipient-1.5-tb.xpi
It also worls fine for me, thank you for the work effort
It works fine for me, thank you for your work efforts
Following the example of Samuel, I just created a pull request at https://github.com/qiqitori/reply_as_original_recipient/pull/5 to incorporate the changes mentioned here in the comments. It works fine in TB 68 and the configuration preference is great as I want every reply to look for the “From” header of the preceding message. A big “thank you” to everyone!
I was a bit disappointed as the extension “Virtual Identity” ceased to work because of the update to TB 68, but then I found this extension which is much more lightweight and seems to do the job as good as my previous solution.
Yves, thank you for putting time and work into this. I really depend on this extension and have updated Thunderbird to 68.3.1. I’m keeping my fingers crossed and going to try your 1.5 update now. Thank you again. If I can help with any future testing to keep this extension alive, I’d be happy to help.
Yves, just a quick update. I have been using your 1.5 update with Thunderbird 68.3.1 for a few days and so far, for me, it’s working great. So thanks again! To be clear, I have not tested all aspects of it. I simply always want the recipient address populated to the sender address of my reply (no “plus” or other requirement), and that works. Happy holidays!
I am using TB 68.5.0 and just installed this extension (1.5) for the first time. I can’t seem to get it to work for me. Can someone please confirm? Would love to know if it’s just me or the extension.
Hi, the version here should work: https://github.com/qiqitori/reply_as_original_recipient/
Please let me know if it doesn’t.
Thanks for the quick work. Unfortunately, after changing zip file to xpi extension, it would not install. Keep getting the dreaded: This add-on could not be installed . . . not compatible with Thunderbird 68.5.0.
Success . . the version in the link you just provided worked for me. I retried all the steps and this time everything worked right away. Thanks again for the quick work to get this out – – great support.
I would welcome the same link !
Thks in advance
the same link would be useful for me as well !
The latest commit in the github repo, from feb 2020, works perfectly (at least in Thunderbird 68.9.0 64-bit)!
Many thanks for this excellent add-on, I’ve been using a catch-all address in all of my domains since forever and have been very annoyed at having to manually edit the from-address every time I needed to. No more! Happy days are here again! :)
I must however admit that it took a number of failed attempts, with Thunderbird refusing due to supposed incompatibility with 68+, to realize that Thunderbird requires the (manifest) files to be in the root of the zip/xpi though. I first had them in a sub folder, as they come when using regular download from github instead of using git.
latest commit in the github also works on 68.10.0 64-bit.
Would it be fairly easy to fix this for Thunderbird 78 on MacOS?
I’ve no idea :p
(Also I didn’t expect maintaining a tiny extension would be so much work.)
Does this port work for you:
https://github.com/qiqitori/reply_as_original_recipient/issues/3#issuecomment-706601538
Also interested whether this works for at least some people:
https://github.com/qiqitori/reply_as_original_recipient/issues/3#issuecomment-673741155
I am very interested in this plugin because I use a catch-all e-mail domain, receive e-mails with various usernames “@mydomain.com” in the “To” field and would like to reply with the same e-mail address in the “From” field of my reply.
But the plugin refuses to be installed because it “… is incompatible with Tunderbird 78.6.0”. Even if I install it manually by cloning the GitHub repository and creating the .xpi file, it gets deactivated after the next restart.
Any chance this plugin will be adapted to be compatible with Thunderbird 78.6.0 (64-bit)?
Hi,
Does this port work for you:
https://github.com/qiqitori/reply_as_original_recipient/issues/3#issuecomment-706601538
Also interested whether this works for at least some people:
https://github.com/qiqitori/reply_as_original_recipient/issues/3#issuecomment-673741155
I just wanted to say thanks this addon is the reason I have used thunderbird all these years. Thanks every who makes this possible.