# Imap: invalid header in response while in http auth state

**URL:** <https://www.ruby-forum.com/t/imap-invalid-header-in-response-while-in-http-auth-state/227228>\
**Category:** NGINX\
**Created:** [March 7, 2013, 10:56pm UTC](https://www.ruby-forum.com/t/imap-invalid-header-in-response-while-in-http-auth-state/227228 "2013-03-07T22:56:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 7, 2013, 10:56pm UTC](https://www.ruby-forum.com/t/imap-invalid-header-in-response-while-in-http-auth-state/227228/1 "2013-03-07T22:56:10Z")

</div>

I’m using imapproxy and trying to switch to nginx. courier is  
listening on port 143.

mail {  
auth\_http localhost:143;  
proxy on;  
server {  
listen 144;  
protocol imap;  
}  
}

I get:

auth http server 127.0.0.1:143 sent invalid header in response while  
in http auth state, client: 127.0.0.1, server: 0.0.0.0:144

Does anyone know what’s wrong?

- Grant

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 10, 2013, 5:33pm UTC](https://www.ruby-forum.com/t/imap-invalid-header-in-response-while-in-http-auth-state/227228/2 "2013-03-10T17:33:28Z")

</div>

Hello!

On Thu, Mar 07, 2013 at 01:55:35PM -0800, Grant wrote:

> }
> 
> I get:
> 
> auth http server 127.0.0.1:143 sent invalid header in response while  
> in http auth state, client: 127.0.0.1, server: 0.0.0.0:144
> 
> Does anyone know what’s wrong?

You are trying to use auth\_http with imap port, which is wrong.  
It is expected to be http service with headers used for  
communication, see here:

> **[Module ngx\_mail\_auth\_http\_module](http://nginx.org/en/docs/mail/ngx_mail_auth_http_module.html)**

–  
Maxim D.

> **[nginx: donation](http://nginx.org/en/donation.html)**
