Image

Imagediscordian wrote in Imagelinux 😊pleased

A little creativity

As I mentioned a little while ago, I made a switch to Sylpheed-claws. It took a little creativity, but I finally managed to tweak it to be pretty much exactly what I want out of a mail client. One thing bugged me to no end, though. The signature placement. I absolutely abhor a signature below the quoted reply/forward. Can't bloody stand it. Sylpheed, much to my dismay, doesn't offer the ability to customize signature placement. Nor does it differentiate between quoting styles for multiple addresses. To further my frustration, it seems that in the options for the quoting rules, you can call an external program - but you can't pass it any useful info. So I had to come up with something totally creative - even if a little insane.



Ok... this is a twisted multi-step process.

1. For each account, I set default signature to be a unique label. I chose to go with results from a command and simply echo the account name. This will make sure that the last line of every outgoing email identifies the account.

2. In "Common Preferences" I enabled automatic launch of external editor for sending.

3. I wrote a Perl script that accepts a file name on the command line. It reads that file and strips the last line. Based on that, it reads the proper signature file, and inserts it before the mail. Upon exit, it returns control back to Sylpheed's native compose window.

4. In "Other Preferences" I set the external editor to be an iconified xterm running the script I described in step 3.

The script executes in less than half of a second and the signature is in the proper place, ready for actual email composition. It's a little over-board to simply insert a signature into an Email, but I like everything else in Sylpheed way to much.