Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-reply body empty with multiline messages #57

Closed
kaiyou opened this issue Sep 3, 2016 · 11 comments
Closed

Auto-reply body empty with multiline messages #57

kaiyou opened this issue Sep 3, 2016 · 11 comments
Milestone

Comments

@kaiyou
Copy link
Member

kaiyou commented Sep 3, 2016

When the configured auto-reply body is a multiline string, the resulting reply email has an empty body.

@kaiyou kaiyou added the bug label Sep 3, 2016
@kaiyou
Copy link
Member Author

kaiyou commented Sep 14, 2016

After some investigation, it appears that the message is empty when leaving dovecot. There is no body send to postfix for the vacation message. Will investigate furter.

@kaiyou kaiyou added this to the 1.3 milestone Sep 27, 2016
@kaiyou
Copy link
Member Author

kaiyou commented Oct 9, 2016

I finally traced back the issue to the dict access to SQLite, the root cause sounds close. It could be related (even remotely) to this:

v2.2.17 2015-05-13  Timo Sirainen <tss@iki.fi>

    * dict server wasn't properly escaping/unescaping data. Fixing this
      broke backwards compatibility with data that contains line feeds.
      This hopefully affects only very few installations. If you're using
      dict to save multiline data (Sieve scripts to SQL), you may be
      affected.

It seems indeed that special characters will confuse the proxy protocol handler, notably new-line. Suggested solutions so far:

  1. encode the string inside SQLite and decode it in Sieve (ugly) (Sieve does not seem to have complex enough string manipulation capabilities to decode the string)
  2. disable the proxy and reference the dict directly

@kaiyou
Copy link
Member Author

kaiyou commented Oct 13, 2016

I was not yet able to disable the proxy and access the dict directly from the Dovecot process running sieve scripts. Sounds like the fix is going to be even trickier than expected.

@kaiyou
Copy link
Member Author

kaiyou commented Oct 16, 2016

After some more digging, it seems that despite my previous message and some warnings on the Dovecot IRC channel, the dictionary protocol is escaping data using t_str_tabescape and t_str_tabunescape.

Using strace and a debugger, I was able to confirm that the string container tabs and new lines is properly escaped by the server when sent over the proxy socket, then properly unescaped, the bug seems to be located somewhere in Dovecot. I will try and find the root cause then solve it upstream with the Dovecot team.

@kaiyou
Copy link
Member Author

kaiyou commented Oct 16, 2016

Here is the current status of the work upstream : http://www.dovecot.org/list/dovecot/2016-October/105700.html

@kaiyou
Copy link
Member Author

kaiyou commented Oct 18, 2016

This was fixed in dovecot/core@4f051c3

The patch will be included in Dovecot 2.2.26. I am working on a new Alpine package for Dovecot and will try to backport the patch to 2.2.25.

@kaiyou kaiyou closed this as completed Oct 18, 2016
@kaiyou kaiyou reopened this Oct 18, 2016
@kaiyou
Copy link
Member Author

kaiyou commented Oct 19, 2016

The patch was not included in 2.2.26-rc1. I will check that it is really going to be included in 2.2.26.

@kaiyou
Copy link
Member Author

kaiyou commented Oct 27, 2016

2.2.26 is finally there. Waiting for Alpine, maybe I will post tonight to patchwork :

http://www.dovecot.org/list/dovecot/2016-October/105867.html

@extremeshok
Copy link

Most excited about those 2.

  • fts: fts_autoindex=yes was broken in 2.2.25 unless
    fts_autoindex_exclude settings existed.
  • fts-solr: Fixed searching multiple mailboxes (patch by x16a0)

. https://eXtremeSHOK.com .

On 27-Oct-16 3:11 PM, kaiyou wrote:

2.2.26 is finally there. Waiting for Alpine, maybe I will post tonight
to patchwork :

http://www.dovecot.org/list/dovecot/2016-October/105867.html


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#57 (comment), or
mute the thread
https://github.com/notifications/unsubscribe-auth/AFrm0G0Y6RD1elYPiVSw-TbqAfF_vv-Nks5q4KLwgaJpZM4J0Rbs.

@kaiyou
Copy link
Member Author

kaiyou commented Oct 30, 2016

Alpine patch is awaiting review: http://patchwork.alpinelinux.org/patch/2508/

@kaiyou
Copy link
Member Author

kaiyou commented Nov 4, 2016

The patch is out, ready for tagging 1.3 tonight.

@kaiyou kaiyou closed this as completed Nov 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants