Attaching op_leds. It is a binary that can change led lights in userspace...
would take a few moments to slap this together...
Open Clawsmail, goto "Configuration", "Plugins", there load "notification" (not the acpinotifier).
Then goto "Configuration", "Preferences", on the bottom left, there is the Plugins section. Select command, and you can make a script run.
The script only gets incomming email notifications. There should be a disable method, I have not found yet (other than doing a timeout inside the script to disable the led light, it would be on until reboot). Also ledlights stay on when in sleepmode.
edit: Found one, if you add a notification popup, you can track for the existance of such popup and disable the light when the popup is not there anymore.
Anyway. The script (which needs to be coded) calls op_leds, which needs the following changes before it works:
The problem is that there is a signal for new incomming mail, but Clawsmail does not seem to have a signal for read email, or user clicked on window.
If you look at the options, it is a fire-and-forget action. "Mail has arrived, run this program. done."
So your script either also runs a widget that creates a button "new mail has arrived, click ok to turn off led light" (that is easy), or hooks itself up to something to know when to disable the light (this is complex).
Normal uses is for example, playing a short audio fragment, that is true fire-and-forget. Or blink light 5 times, and done. (with the risk of not hearing/seeing it)