[EDIT]
Ok I am an idiot. I should NOT have uncommented the lines in /etc/pam.d/imap. Leaving them as they were would have been the way to go. I suck

Now at least imapd without ssl works.
I'll leave the post here, maybe someone who has the same problem stumbles across it and can fix it this way.
imapd-ssl still gives the same error as mentioned below though
[/EDIT]
Ok, I've been at this for 2 days now, having found this guide just in time. Really, really, really, really great work! Thanks! This is supposed to save me a lot of trouble and time. Thanks!
I have a couple of problems though, nonetheless
I believe the postfix/sasl part will work, haven't tried it out yet, but configuartion seems to have been ok.
Courier-IMAP. Brrrrr! I am doing this on a nice FreeBSD 5.1 machine, but it should not matter. I know where the differences are and how to work around them (for example, it seems that /etc/pam.d/imap should not be touched at all, or at least only have the 4 lines already in there uncommented).
Running imapd-ssl and trying to authenticate against PAM (or whichever method, tried them all):
Squirrelmail times out and tells me the "imap server has dropped the connection". The log files state something like:
imapd-ssl: couriertls: accept: error:140760FC:SSL routines: SSL23_GET_CLIENT_HELLO: unknown protocol
Running plain imapd without SSL and trying to authenticate against PAM:
Squirrelmail tells me that either user or password are incorrect (I am sure they are both correct

) and the log files say
imapd: Connection, ip=[::ffff:127.0.0.1]
imapd: LOGIN FAILED, ip=[blah]
imapd: DISCONNECTED, ip=[blah]
Now I have no idea why this could or should happen. I am very sure that I followed the guide in 4.3, 4.4 and 7 very thoroughly, although it is late and I might have screwed something up...don't think so though.
Can you help me finding what I am not doing right? Maybe it's something obvious but I don't see it. Help is greatly appreciated!
And thanks again for this really good guide!
I hope someone still reads this
