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

Fix sendCommand line splitup #456

Merged
merged 1 commit into from Mar 1, 2014

Conversation

Projects
None yet
3 participants
@asdil12
Contributor

asdil12 commented Feb 28, 2014

When sending a command it would be sent like this:

PKG1: 1 STARTTLS
PKG2: \r\n

Some mailservers don't accept commands across packets - they expect:

PKG1: 1 STARTTLS\r\n

I verified that using tcpdump: http://hastebin.com/tavamepodi

@obra

This comment has been minimized.

Show comment
Hide comment
@obra

obra Feb 28, 2014

Member

For completion's sake, can you tell us which mailservers don't like this?

I've never run into this problem with Dovecot, which is what it looks like you're using.

On Fri, Feb 28, 2014 at 08:10:51AM -0800, Dominik Heidler wrote:

When sending a command it would be sent like this:

PKG1: 1 STARTTLS
PKG2: \r\n

Some mailservers don't accept commands across packets:

PKG1: 1 STARTTLS\r\n

I verified that using tcpdump: http://hastebin.com/tavamepodi
You can merge this Pull Request by running:

git pull https://github.com/asdil12/k-9 single_pkg_command

Or you can view, comment on it, or merge it online at:

#456

-- Commit Summary --

  • Fix sendCommand line splitup

-- File Changes --

M src/com/fsck/k9/mail/store/ImapStore.java (4)

-- Patch Links --

https://github.com/k9mail/k-9/pull/456.patch
https://github.com/k9mail/k-9/pull/456.diff


Reply to this email directly or view it on GitHub:
#456

Member

obra commented Feb 28, 2014

For completion's sake, can you tell us which mailservers don't like this?

I've never run into this problem with Dovecot, which is what it looks like you're using.

On Fri, Feb 28, 2014 at 08:10:51AM -0800, Dominik Heidler wrote:

When sending a command it would be sent like this:

PKG1: 1 STARTTLS
PKG2: \r\n

Some mailservers don't accept commands across packets:

PKG1: 1 STARTTLS\r\n

I verified that using tcpdump: http://hastebin.com/tavamepodi
You can merge this Pull Request by running:

git pull https://github.com/asdil12/k-9 single_pkg_command

Or you can view, comment on it, or merge it online at:

#456

-- Commit Summary --

  • Fix sendCommand line splitup

-- File Changes --

M src/com/fsck/k9/mail/store/ImapStore.java (4)

-- Patch Links --

https://github.com/k9mail/k-9/pull/456.patch
https://github.com/k9mail/k-9/pull/456.diff


Reply to this email directly or view it on GitHub:
#456

@asdil12

This comment has been minimized.

Show comment
Hide comment
@asdil12

asdil12 Feb 28, 2014

Contributor

The mailserver in the back is Dovecot but there is some odd transparent IMAP proxy in the network of the university, which catches all connections on that port. If it receives the \r\n in a seperate pkg, it will do nothing and the connection will time out.

The only thing I can tell you is that the MAC address of the default gw belongs to Fortinet.

Contributor

asdil12 commented Feb 28, 2014

The mailserver in the back is Dovecot but there is some odd transparent IMAP proxy in the network of the university, which catches all connections on that port. If it receives the \r\n in a seperate pkg, it will do nothing and the connection will time out.

The only thing I can tell you is that the MAC address of the default gw belongs to Fortinet.

@obra

This comment has been minimized.

Show comment
Hide comment
@obra

obra Feb 28, 2014

Member

It's worth updating the commit message to give this detail. I don't object to the changes, but we don't want to have to spend time reverse engineering why we made them later if something comes up.

On Fri, Feb 28, 2014 at 09:11:31AM -0800, Dominik Heidler wrote:

The mailserver in the back is Dovecot but there is some odd transparent IMAP proxy in the network of the university, which catches all connections on that port. If it receives the \r\n in a seperate pkg, it will do nothing and the connection will time out.

The only thing I can tell you is that the MAC address of the default gw belongs to Fortinet.


Reply to this email directly or view it on GitHub:
#456 (comment)

Member

obra commented Feb 28, 2014

It's worth updating the commit message to give this detail. I don't object to the changes, but we don't want to have to spend time reverse engineering why we made them later if something comes up.

On Fri, Feb 28, 2014 at 09:11:31AM -0800, Dominik Heidler wrote:

The mailserver in the back is Dovecot but there is some odd transparent IMAP proxy in the network of the university, which catches all connections on that port. If it receives the \r\n in a seperate pkg, it will do nothing and the connection will time out.

The only thing I can tell you is that the MAC address of the default gw belongs to Fortinet.


Reply to this email directly or view it on GitHub:
#456 (comment)

Fix sendCommand line splitup for some imap proxys
When sending a command it would be sent like this:
PKG1: 1 STARTTLS
PKG2: \r\n

Some imap proxys (maybe from Fortinet?) don't accept commands across packets:
PKG1: 1 STARTTLS\r\n
@asdil12

This comment has been minimized.

Show comment
Hide comment
@asdil12

asdil12 Feb 28, 2014

Contributor

Changed the commit message

Contributor

asdil12 commented Feb 28, 2014

Changed the commit message

cketti added a commit that referenced this pull request Mar 1, 2014

@cketti cketti merged commit 47e09c9 into k9mail:master Mar 1, 2014

@cketti

This comment has been minimized.

Show comment
Hide comment
@cketti

cketti Mar 1, 2014

Member

Thanks!

We had the same problem at a different location before: 6fb5946

Member

cketti commented Mar 1, 2014

Thanks!

We had the same problem at a different location before: 6fb5946

@asdil12 asdil12 deleted the asdil12:single_pkg_command branch Mar 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment