A thunderbird add on
Add a option to context menu of the attachement, for show a windows where you will get a string value from a textbox(if have autocomplete is better but not requiered) and after that, you will pass the file and the string value to and other program for be process