# HELP courier-imap simple configuration needed

## Moriah

I have been running uw-imap with sendmail and cyrus-sasl for ages.  I am building a replacement for my 7 year old server, and decided to go with a more popular and modern imap implementation.  The gentoo wiki article I found uses either postgresql or mysql to authenticate imap logins.  This is gross overkill for my situation.  I want to use pam, just like I have been doing.  All my users are already set up for it, and I do not want them to see any difference other than a performance improvement.  If I switch from pam to a database, then they have to re-enter their passwords, which will be a major pain.  If I must go with a database, I would use mysql, since squirrelmail requires it, even though my own personal preference would be for postgresql, but using pam would be the best way to authenticate, given my setup.

Can anyone point me to a howto for setting up courier-imap using pam to authenticate?

----------

## 86me

There is an "authpam" module built into courier-imap. There's also an /etc/pam.d/imap file provided by mailbase (if you have the pam USE flag enabled). Courier will be looking for the pam configuration in that imap file.

There shouldn't be too much to configure to get pam working with courier-imap. I'm currently using a combination of dovecot/postfix/spamassassin/procmail on my server, so most of my advice comes from this document, and some quick poking around on my system.

Good luck!

----------

## Moriah

Thanks!  I have been running sendmail since 1995, and added spamassassin and clamav over time.  The current incarnation of my mail server is running on a 7 year old machine, and I am putting together a new machine to replace it.  I want to change as little as possible, but I do want to switch to maildir format.  The old system is running wu-imap, but support is getting weak for that so I decided to go with the more recent flow and switch to courrier-imap.

I will hopefully be able to get courier-imap running with pam authorization thanks to your help.    :Very Happy: 

----------

## JC99

I've been using courier for years, works great. To use authpam I had to edit the following files...

 *Quote:*   

> /etc/courier/authlib/authdaemonrc
> 
> /etc/courier/authlib/authdaemonrc.dist

 

The following lines have a bunch of stuff in them. Edit them so they look like this...

```
authmodulelist="authpam"

authmodulelistorig="authpam"
```

----------

## Moriah

Thanks for the tip!

PS:  Good to see another old Warner Bros. cartoon fan!   :Very Happy: 

----------

## Moriah

JC99: I made the changes you suggested, but it is not connecting when I try to access it from another machine using thunderbird.  BTW I need to use ssl for imap as well as for sendmail.  I am using cyrus-sasl on the old mail server together with uw-imap on port 993 with starttls, and I want to do the same thing on the new mail server, only with cyrus-imap.  It is proving to be more complicated than I envisioned, mainly due to the extreme flexibility of cyrus-imap.  All email users also have a shell account on this machine, which doubles as a web server, and the username is the same for the shell account as it is for the email account.

----------

## cach0rr0

 *Moriah wrote:*   

> I want to do the same thing on the new mail server, only with cyrus-imap.  It is proving to be more complicated than I envisioned, mainly due to the extreme flexibility of cyrus-imap.

 

assume the bolded above is a typo and you meant courier-imap? If so, I bow out, as that's completely foreign to me. If not, well, I can help with cyrus-imap, but I'll save the keystrokes if that's a typo

----------

## Moriah

It was a typo.  I got confused because I also use cyrus-sasl, and the both start with "c".    :Embarassed: 

----------

