authentication.txt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. **********************************************
  2. IMAP AND SMTP AUTHENTICATION WITH SQUIRRELMAIL
  3. $Id$
  4. Chris Hilts tassium@squirrelmail.org
  5. **********************************************
  6. Prior to SquirrelMail 1.3.3, only plaintext logins for IMAP and SMTP were
  7. supported. With the release of SquirrelMail 1.3.3, support for the
  8. CRAM-MD5 and DIGEST-MD5 auth mechanisms has been added. TLS support has
  9. also been added. It is possible to use different methods for both IMAP and
  10. SMTP. TLS is able to be enabled on a per-service basis as well.
  11. Unless the administrator changes the authentication methods, SquirrelMail
  12. will default to the "classic" plaintext methods, without TLS.
  13. Note: There is no point in using TLS if your IMAP server is localhost. You need
  14. root to sniff the loopback interface, and if you don't trust root, or an attacker
  15. already has root, the game is over. You've got a lot more to worry about beyond
  16. having the loopback interface sniffed.
  17. REQUIREMENTS
  18. ------------
  19. CRAM/DIGEST-MD5
  20. * SquirrelMail 1.3.3 or higher
  21. * If you have the mhash extension to PHP, it will automatically
  22. be used, which may help performance on heavily loaded servers.
  23. ** NOTE: mhash is optional and no longer a requirement **
  24. TLS
  25. * SquirrelMail 1.3.3 or higher
  26. * PHP 4.3.0 or higher (Check Release Notes for PHP 4.3.x information)
  27. * The "STARTTLS" command is NOT supported. The server you wish to use TLS
  28. on must have a dedicated port listening for TLS connections. (ie. port
  29. 993 for IMAP, 465 for SMTP)
  30. CONFIGURATION
  31. -------------
  32. All configuration is done using conf.pl, under main menu option #2.
  33. conf.pl can now attempt to detect which mechanisms your servers support.
  34. You must have set the host and port before attempting to detect, or you
  35. may get inaccurate results, or a long wait while the connection times out.
  36. If you get results that you know are wrong when you use auto-detection, I
  37. need to know about it. Please send me the results you got, the results you
  38. expected, and server type, name, and version (eg. "imap, Cyrus, v2.1.9").
  39. KNOWN ISSUES
  40. ------------
  41. DIGEST-MD5 has three different methods of operation. (qop options "auth",
  42. "auth-int" and "auth-conf"). This implementation currently supports "auth"
  43. only. Work is being done to add the other two modes.
  44. DIGEST-MD5 _may_ fail when authenticating with servers that supply more
  45. than one "realm". I have no servers of this type to test on, so if you do
  46. and it fails, let me know! (A big help would be for you to telnet to your
  47. server, start a DIGEST-MD5 auth session, and include the challenge from the
  48. server in your bug report.)
  49. To get the challenge with IMAP:
  50. telnet <your server> imap
  51. [server says hello]
  52. A01 AUTHENTICATE DIGEST-MD5
  53. <copy the gobbledygook that the server sends - this is what I need>
  54. *
  55. [server says auth aborted]
  56. A02 LOGOUT
  57. [server says goodbye, closes connection]
  58. To get the challenge with SMTP:
  59. telnet <your server> smtp
  60. [server sends some sort of "hello" banner]
  61. EHLO myhostname
  62. [server will probably list a bunch of capabilities]
  63. AUTH DIGEST-MD5
  64. <copy the gobbledygook that the server sends - this is what I need>
  65. *
  66. [server says auth aborted]
  67. QUIT
  68. [server says bye, closes connection]
  69. OPTIONAL SMTP AUTH CONFIGURATION
  70. --------------------------------
  71. If you need all users to send mail via an upstream SMTP provider
  72. (your ISP, for example), and that ISP requires authentication,
  73. there are two variables that can be added to config_local.php
  74. that will specify a sitewide SMTP username and password.
  75. Set up SMTP authentication to the remote server according to the
  76. instructions above, then add the following to config_local.php,
  77. replacing <smtp_user> and <smtp_pass> with the username and password
  78. you'd like to use for the entire site:
  79. $smtp_sitewide_user = '<smtp_user>';
  80. $smtp_sitewide_pass = '<smtp_pass>';
  81. These values will be used to connect to the SMTP server as long
  82. as the authentication mechanism is something besides 'none', i.e.
  83. 'login','plain','cram-md5', or 'digest-md5'.
  84. [End]