How do I change the max signature length limit in ZD?

General discussion about Zimbra Desktop.
Juliand
Posts: 2
Joined: Sat Sep 13, 2014 2:01 am

How do I change the max signature length limit in ZD?

Post by Juliand »

All

I am using ZD with a google apps account using IMAP. I was as frustrated as you guys but have managed to solve this for my setup without destroying my account. I edited the zimbra-attrs.xml and initially only changed the default value from 10240 to 20480 then tried my longer html signature and got the same error even after quitting and re-starting ZD. Then I theorised that in fact there was no 'value=' argument in the attr line even though there was one in the previous attribute so I added value="0" saved the file then re-started ZD and tried again but still got the same error. However, I then changed the format of my signature from HTML back to plain text then changed it back to html again, re-added my image reference and saved the longer html signature without problem!
Not sure whether it was the adding of the value argument or making the client re-check the attrs file by changing from html to text to html but it worked for me.
Hope this helps some of you.
ken2johnson
Posts: 28
Joined: Sat Sep 13, 2014 2:03 am

How do I change the max signature length limit in ZD?

Post by ken2johnson »

I found that none of the previously offered solutions worked for me in Windows Vista. So, I dug into the Zimbra source files to find out why.
Zimbra uses a variable named zimbraMailSignatureMaxLength to limit the length of the HTML signature you can use. There seems to be no logical reasoning behind this limit and increasing it doesn't seem to have any negative side effects. This variable needs to be changed in multiple files in order for the maximum limit warning message to go away. Just increase the number I've highlighted in bold below for the line I specify in each file to increase the limit. For my needs, I changed it to 10240 and that was good enough for my signature to not exceed the limit. Here are the file locations and the lines in those files that you will need to modify. This is for the 7.01 version, but should work for some previous versions as well.
C:UsersYOURUSERNAMEAppDataLocalimbraimbra Desktopconfattrszimbra-attrs.xml

(NOTE: In XP it would be "C:Documents and SettingsYOUUSERNAMELocal SettingsApplication Dataimbraimbra Desktopconfattrszimbra-attrs.xml".)



1024

maximum length of mail signature, 0 means unlimited. If not set, default is 1024


C:Program Filesimbraimbra DesktopjettywebappszimbrajsNewWindow_2_all.js

name:"zimbraMailSignatureMaxLength",type:ZmSetting.T_COS,dataType:ZmSetting.D_INT,defaultValue:1024}
C:Program Filesimbraimbra DesktopjettywebappszimbrajsStartup1_2_all.js

name:"zimbraMailSignatureMaxLength",type:ZmSetting.T_COS,dataType:ZmSetting.D_INT,defaultValue:1024}
C:Program Filesimbraimbra DesktopjettywebappszimbrajszimbraMailprefsmPreferencesApp.js settings.registerSetting("SIGNATURE_MAX_LENGTH", {name:"zimbraMailSignatureMaxLength", type:ZmSetting.T_COS, dataType:ZmSetting.D_INT, defaultValue:1024});
Restart Zimbra Desktop after making these changes. You should now have a much larger HTML Signature limit of 10KB instead of the default of 1KB. It's also worth noting that when you install an update for Zimbra it is very likely that it will overwrite these changes. So, you will need to go back and edit them again. Hope this helps anyone else fighting with this issue.
Juliand
Posts: 2
Joined: Sat Sep 13, 2014 2:01 am

How do I change the max signature length limit in ZD?

Post by Juliand »

Ken

Thanks for your solution !
I have tried it and it works well also on the Mac as well. My previous solution seems to be hit and miss the more thorough solution from Ken works well. ;)
All the files on the mac are located in the Zimbra Desktop directory on the mac (not in the application support directory where other apps store this sort of file). Use Ken's directory structure from there and you should find everything. You will need to give yourself permission to change the files in the directories using the get info command even if you are the administrator as the default permissions only allow the system to change these files.
ken2johnson
Posts: 28
Joined: Sat Sep 13, 2014 2:03 am

How do I change the max signature length limit in ZD?

Post by ken2johnson »

This is still not fixed even in the 7.1.3 Beta.
Here is where you can find the files you need to modify in Linux. You edit the same lines in the Linux files as in the Windows ones. Incidentally, on a fresh install the first file was set to 10240, which is more than big enough. So, it looks like they tried to resolve this. However, as we have discovered, this is only one of the places they need to change this value to really fix the problem.
The first file that you probably don't need to modify is here ~/zdesktop/conf/attrs/zimbra-attrs.xml
Here are the other files you will need to modify as I specified in my previous post:

/opt/zimbra/zdesktop/jetty/webapps/zimbra/js/NewWindow_2_all.js

/opt/zimbra/zdesktop/jetty/webapps/zimbra/js/Startup1_2_all.js

/opt/zimbra/zdesktop/jetty/webapps/zimbra/js/zimbraMail/prefs/Z mPreferencesApp.js
I hope this helps.
MDovali
Posts: 1
Joined: Sat Sep 13, 2014 2:53 am

How do I change the max signature length limit in ZD?

Post by MDovali »

Hi, I had tried many suggestions explained in many threads and I haven´t any success. Finally I tried something that works, I don´t understand why but it works.
1. I reset the MailSignatureMaxLength value to min="0" (the default value).
2. I define the signature with a name and with the text lines in Plain Text format, and (this is the tricky step) saved it. No error occurs.
3. I reedit the signature, cahging the format to HTML and modifyng the font size and color of the text lines and adding the URL of the logo´s image, and saved it. NO ERROR OCCURS!!!. I tried first copy&paste the HTML signature from the Zimbra Web Application, but it doesn´t work.
I hope this will work for you, good luck.
stevewb
Posts: 3
Joined: Sat Sep 13, 2014 3:21 am

How do I change the max signature length limit in ZD?

Post by stevewb »

It worked for me! I very happy chap I am now
esparanz
Posts: 1
Joined: Sat Sep 13, 2014 3:22 am

How do I change the max signature length limit in ZD?

Post by esparanz »

Hi,

I am setting up a html signature for a pop account. I am getting the same error as mentioned in the threads. Tried all the methods but still the error persists.
Any workaround to this one?
Thanks in advance.
Rahul
braindead
Posts: 3
Joined: Tue Mar 14, 2017 11:28 pm

Re: How do I change the max signature length limit in ZD?

Post by braindead »

Hi, this still works with 7.2.8 Win 10. I wasn't really paying attention but I'm not sure the default was set 10240 but 1024. I can't remember if I overwrote it.

A real life saver this solution, thanks to original poster (Ken2Johnson) I am most grateful :)

UPDATE ZIMBRA DESKTOP 7.3.1

Sigs worked ok after update from 7.2.8 but unable to effect any sort of edit to sigs without repeating Ken2Johnson's procedure to all 4 files (I increased maxsize to 40960 as I have a number business logos/endorsements; I tried setting default=0 but that didn't work, my knowledge of js is not good enough (I am a businessman with a little programming knowledge, not a techie like you guys)). Which is fine if irritating but one wonders why a large corporation like Zimbra or Syncor can't assign a software engineer to permanently cure this bug. Max 30 mins programming and generously 60 mins for testing :?:
Post Reply