How does iOS7 detect mail settings?
I'm not really sure whether the iOS discovery algorithm is documented anywhere public in its entirety.

The standard way of doing this though is to setup SRV records in DNS to let clients know, which servers are available.

For IMAP (without SSL as you requested) you would setup a SRV record such as:

_imap._tcp     SRV 0 1 143 imap.mycompany.com.

For POP3 you could have a record like this:

_pop3._tcp     SRV 10 1 110 pop3.mycompany.com.

The priority in those two lines are 0 and 10, meaning that the client should prefer IMAP over POP3.

A different way of going about this could be to add a SRV record for Microsofts autodiscover mechanism. That SRV record redirects the client to a file called autodiscover.xml that you must host on a web server. That XML-file then contains the details of your servers.