IMAP authentication

Installation
Download the latest version of mod_auth_imap:

cd /extra/src
wget http://ben.brillat.net/files/projects/mod_auth_imap2/mod_auth_imap2-current.tar.gz
tar zxf mod_auth_imap2-current.tar.gz
cd mod_auth_imap2-2.2.0

If you use Dovecot, you'll need apply a patch:

wget http://www.productionmonkeys.net/sites/productionmonkeys.net/files/dovecot_mod_auth_imap.patch
patch < ../dovecot_mod_auth_imap.patch

Use Apache's apsx program to build the module. if you have previously installed mod_auth_imap, don't use the "-a" flag to APXS, as you already have the necessary changes in httpd.conf.

/usr/local/apache2/bin/apxs -i -a -c mod_auth_imap.c

Restart Apache

svc -t /service/apache

Virtualhost configuration

<Directory /home/httpd/html>
  #Turn on IMAP Authentication
  Auth_IMAP_Enabled on

  #Give a name to the authentication domain, whatever you want:
  AuthName "something.com"

  #Only basic authentication is supported for now:
  AuthType Basic

  #If you feel like it, restrict the users or allow all "valid-user"
  Require user user1 user2

  #Make IMAP Authentication authoritative for this .htaccess file:
  Auth_IMAP_Authoritative on

  #Set the IMAP Server to which you want to connect (default=localhost):
  Auth_IMAP_Server imap.something.com

  #Set the port on which the imap server is running (default=143):
  Auth_IMAP_Port 143

  #Turn on some extra logging (login attempts, etc.) in Apache's Error Log
  Auth_IMAP_Log on
</Directory>

Resources
Add support for Dovecot to mod_auth_imap2

AttachmentSize
File dovecot_mod_auth_imap.patch738 bytes

Recent Updates

  • 1 year 12 months ago
  • 1 year 12 months ago
  • 1 year 12 months ago
    php 8.x
  • 1 year 12 months ago
    10.6.7
  • 2 years 17 hours ago
    Drop Centos 5/6 stuff