# How do I *completly* remove a package (courier)

## Gav

I've been having immense problems in getting courier-imap to authenticate anything. I figure that somehow I've done something that's screwed something up or missed something...   :Confused: 

So what I think I'd like to try next is removing everything to do with couier-imap (and courier - I put that on first, then umerged it before emerging courier-imap). Perhaps PAM too? or could that be disasterous if I didn't get it working and needed to reboot? Then if I can find a surefire up-to-date install and configuration guide for courier-imap for gentoo with PAM authentication I hope to be able to get it working. If I can't then I'll be leaving gentoo to go back to Red Hat, which I'd rather not have to do - but I really want to have a working IMAP server. I know there are other IMAP servers, but it's more the authentication issue and configuration - if you want to tell me of a surefire IMAP server install/configuration and support me through doing it then you're welcome - don't jsut say use Cynus or whatever...

So what can I do to completly remove courier? And I don't want to start from the LiveCD as I haven't got a stage 2 or 3 that worked (european mirros always gave my MD5 errors, the one I got from the US wouldn't save on my system using lynx) - as I don't want to spend another week or two compiling from stage 1 onwards (my gentoo machine is a Celeron 300A with 128MB RAM).

----------

## fyerk

if emerge unmerge courier-imap doesn't work, I'd use qpkg to view a list of the files that it installed, and then remove those by hand. 

```

# qpkg -f courier-imap > imap_files

# emerge unmerge courier-imap

[look at imap_files and and delete anything unmerge didn't get]

```

As far as IMAP servers go, UW-IMAP is probably the easiest to get working. It's built to work "out-of-the-box" so you just emerge it and go. There are no configure files save adding the startup options to [x]inetd.

----------

## Gav

Thanks for that - I'll check out UW-IMAP and see...  :Rolling Eyes: 

I can't seem to find (in a quick 5 min google after trying it) the qpkg command. Is it part of something else? Where can I get it?

 *Quote:*   

>  from the UW-IMAP documentation
> 
> Is there support for qmail and the maildir format?
> 
> There is no support for qmail or the maildir format in our distribution, nor are there any plans to add such support. Maildir support may be available from third parties.
> ...

 

I was hoping to use maildir's as that's what I've started with and see its advantages.  :Crying or Very sad:   I think I'll see if I can get UW-IMAP workin though and then switch back once I can get an IMAP server that's maildir friendly working...  :Smile: 

----------

## fyerk

qpkg is part of gentoolkit

```

# emerge gentoolkit

```

----------

## Gav

I've emerged uw-imap, but it doesn't seem to have the /etc/init.d/ startup routines... How do I start it?

{edit} I've found some documentation saying about /etc/xinetd.d/imap, but it seems I don't have permissions as root to run it???Last edited by Gav on Mon Nov 11, 2002 8:35 pm; edited 1 time in total

----------

## Gav

I've got the gentoolkit installed. The resulting imap_files is nothing - the file is empty. I don't believe it as I still have (at least) an /etc/courier-imap directory with the configuration files in... ANd yes, I did stop courier-imap first!

----------

## fyerk

UW-Imap is started via the xinetd superdaemon, so to start it, run xinetd

```

# /etc/init.d/xinetd start

```

unmerge most likely did not remove the /etc/courier-imap directory because it contains config files. If you really want to get rid of courier, just remove that directory by hand.

```

# rm -r /etc/courier-imap

```

----------

## Gav

 *edge wrote:*   

> UW-Imap is started via the xinetd superdaemon, so to start it, run xinetd
> 
> ```
> 
> # /etc/init.d/xinetd start
> ...

 

no such file or directory ???

 *Quote:*   

> 
> 
> unmerge most likely did not remove the /etc/courier-imap directory because it contains config files. If you really want to get rid of courier, just remove that directory by hand.
> 
> ```
> ...

 

okay...

----------

## fyerk

Hmm, looks like you need to go ahead and install xinetd too  :Smile: 

```

# emerge xinetd

```

----------

## Gav

 *edge wrote:*   

> Hmm, looks like you need to go ahead and install xinetd too 

 

That worked - thanks for all your help!  :Razz: 

I tried cleaning out courier and then reinstalling it. I actually tried the pop3 service and it worked, but not the IMAP. I would like courier-imap to be my IMAP server rather than UW etc, as I more-or-less have the other parts I want (to use maildir's) working now - just this annoying IMAP authentication problem... Anyone with courier-imap working please post your config files!

----------

