In DirectAdmin, are you receiving invalid characters in the mail autoresponder? We can help you resolve it.
This happens as, by default, no character encoding is specified for auto-replies or vacation messages.
Here at Bobcares, we often receive requests to fix errors relating to DirectAdmin as part of our Server Management Services for web hosts and online service providers.
Today, let’s see how to fix these invalid characters in the mail autoresponder.
How to fix DirectAdmin: Invalid characters in mail autoresponder
Now let’s take a look at how our Support Engineers resolve this error message.
Recently, one of our customers approached us saying to us that his clients were getting invalid characters on the mail autoreply message. The mail was wrongly formatted because of the special characters. The wrong characters display when we try and enter the correct text in autoresponder form and then save and opened again.
This happens because, by default, no character encoding is specified for auto-replies or vacation messages.
Here is how we resolve it.
1. For the Directadmin theme that is used, we have to set the correct encoding. For instance, in our case, we used the default “enhanced” theme. So, we edit it as below:
# vi /usr/local/directadmin/data/skins/enhanced/lang/en/lf_standard.html
Then we find the variable “LANG_ENCODING” and correct it to our needs. In our case, we corrected it to UTF-8:
LANG_ENCODING=UTF-8
2. Another option is to add the following code in the uservacation and userautoreply transport sections of /etc/exim.conf.
headers = Content-Type: text/plain; charset=”UTF-8″
Here, we adjust the charset value for the header as required.
Note: for the subject line, try this:
subject = “${if def:h_Subject: {Autoreply: \”${escape:${length_50:$rh_Subject:}}\”} {I am on vacation}}”
There are also reports of the use of $rh_Subject instead of $h_Subject working.
Another possible subject line:
subject = ${if def:h_subject: \ {Autoreply: ${rfc2047:${quote:${escape:${length_60:$h_subject:}} }} }\ {Autoreply Message} \ }
3. Another option is to change the default encoding to UTF-8 by editing exim.cfg by typing
headers = MIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit subject = ${if def:h_Subject: {Autoreply: ${quote:${escape:${length_50:$h_Subject:}}}} {Autoreply Message}}
[Need any further assistance in fixing DirectAdmin errors? – We’d be happy to help you]
Conclusion
Today, we saw how our Support Engineers resolve this invalid character error in mail-in DirectAdmin.
0 Comments