Vacation and autoreply error and solution

kriak

Verified User
Joined
Jun 22, 2004
Messages
25
I just found an error in exim.conf and I provide the solution.

When some users sends email to an address on the server having a vacation message or an autoreply, they receieved an error message saying something like :

Expansion of "${if def:h_Subject: {Autoreply: $h_Subject:} {Autoreply Message}}" in userautoreply transport contains non-printing character 233

To correct this, you must edit exim.conf and use the fonction "quote" for the rewrite of the subject. Replace :

subject = "${if def:h_Subject: {Autoreply: $h_Subject:} {I am on vacation}}"

with :

subject = "${if def:h_Subject: {Autoreply: ${quote:$h_Subject:}} {I am on vacation}}"

AND :

subject = "${if def:h_Subject: {Autoreply: $h_Subject:} {Autoreply Message}}"

with :

subject = "${if def:h_Subject: {Autoreply: ${quote:$h_Subject:}} {Autoreply Message}}"


Restart exim and it's done. It would be important to correct this in the distribution of directadmin.
 
The current exim.conf file (unless it's been changed in the most recent DA release, which I haven't seen yet) is the one I wrote.

I'd like to know what char 233 is, and if anyone else is having the problem, before making the change.

I can make the change today, and pass it on to DA, but it won't get installed automatically until the next release.

Please address my two questions above, and please direct me to your source for the fix so I can take care of this as soon as possible.

Thanks.

Jeff
 
Thanks.

I'll take a look at those pages today, and implement the change on my testbed server.

After I see it doesn't cause problems on my testbed I'll try it on my personal production server.

After it works there, I'll release the change (perhaps along with a few others I've been working on) and make it available to DA for the next update.

(Of course I have to look at what changes DA made to implement their per-user SpamAssassin, if any, first, but that's going on my testbed today.)

Jeff
 
Finally after some more tests, I found out that the real solution would be something more like :

In exim.conf, add in the beginning of the file :

print_topbitchars = true

and modifiy the subject = lines for this :

subject = "${if def:h_Subject: {Autoreply: ${escape:${length_50:$h_Subject:}}} {I am on vacation}}"

and :

subject = "${if def:h_Subject: {Autoreply: ${escape:${length_50:$h_Subject:}}} {Autoreply Message}}"

It will prevent most, if not all, errors that may occur.
To test it, I sent a message from my Outlook (French) with a long subject containing special chars like :

Special characters test (éêè) Special characters test (éêè) Special characters test (éêè) Special characters test (éêè) Special characters test (éêè)

That's it.
 
Back
Top