# [SOLVED] server Rebuild qmail/vpopmail/imap not working

## sweatje

I am hosting a server at RackSpace and want to upgrade to their NextGen server.  After some trial and error, I found their automatic upgrade procedure does not work for Gentoo, and the recommended process is to rebuild everything from their new default Gentoo image.

I was able to migrate apache and mysql without a problem, however the email side of the equation is being a pain in the posterior.

On the older server, I have qmail, vpopmail, courier-imap, courier-authlib, qmailadmin and squirrelmail living happily together.

I tried to follow http://www.gentoo.org/doc/en/qmail-howto.xml as I have done in the past, including any tweaks to configurations I put in place to get the old server running.  I was not able to get courier working, so I am trying dovecot for imap connectivity as recommended by http://wiki.gentoo.org/wiki/Qmail#dovecot

After tweaking some (primarily setting the password_query and user_query to

```

user_query = \

SELECT CONCAT(pw_name, '@', pw_domain) AS username,             \

pw_passwd AS cryptpw,                                           \

pw_passwd AS password,                                          \

'' AS clearpw,                                                  \

'89' AS uid,                                                    \

'89' AS gid,                                                    \

pw_dir AS home,                                                 \

CONCAT(pw_dir, '/.maildir') AS maildir,                         \

'' AS quota,                                                    \

pw_gecos AS fullname,                                           \

'disablewebmail=0,disablepop3=0,disableimap=0' AS options       \

FROM vpopmail                                                   \

WHERE                                                           \

pw_name = '%n'                                                  \

AND                                                             \

pw_domain = '%d';

```

 which is the hack I had put into place in my old courier-authlib configuration.  I was able to pass authentication in squirrelmail, but it does not show any emails or folders for my account.    I tried /var/vpopmail/bin/vpopmail-Maildir-dotmaildir-fix.sh both ways but neither helped.

To the best of my knowledge, here are the packages I have installed which are relevant to this issue:

```
[I] mail-mta/netqmail

     Available versions:  1.05-r4^t 1.05-r8^t 1.06^t ~1.06-r1^t 1.06-r2^t {authcram gencertdaily highvolume noauthcram qmail-spp ssl vanilla}

     Installed versions:  1.06-r2^t(17:29:50 09/02/13)(authcram gencertdaily qmail-spp ssl -highvolume -vanilla)

[I] net-mail/qmailadmin

     Available versions:  1.2.10^u ~1.2.12^u 1.2.15^u 1.2.15-r1^u ~1.2.16^u {maildrop vhosts}

     Installed versions:  1.2.15-r1^u(18:56:06 09/10/13)(vhosts -maildrop)

[I] mail-filter/qmail-scanner

     Available versions:  1.25-r1^u 2.05^u ~2.06^u ~2.08^u {clamav spamassassin}

     Installed versions:  2.05^u(21:55:08 09/10/13)(spamassassin -clamav)

[I] virtual/qmail

     Available versions:  1.03

     Installed versions:  1.03(17:33:34 09/02/13)

[I] net-mail/vpopmail

     Available versions:  5.4.16^u 5.4.30-r1 ~5.4.30-r2 5.4.33 ~5.4.33-r1 {clearpasswd ipalias maildrop mysql postgres spamassassin}

     Installed versions:  5.4.33(18:01:49 09/11/13)(ipalias maildrop mysql spamassassin -clearpasswd)

[I] net-libs/courier-authlib

     Available versions:  0.63.0-r1^tu 0.64.0^tu 0.65.0-r3^tu {berkdb crypt debug gdbm ldap mysql pam postgres sqlite static-libs vpopmail}

     Installed versions:  0.65.0-r3^u(03:12:56 09/11/13)(berkdb crypt gdbm mysql -debug -ldap -pam -postgres -sqlite -static-libs -vpopmail)

[I] net-mail/dovecot

     Available versions:  2.0.19 2.1.9 2.1.15 2.1.16 ~2.1.16-r1 ~2.1.17 ~2.2.1 ~2.2.3 ~2.2.4 ~2.2.4-r1 ~2.2.4-r2 2.2.5 {bzip2 caps cydir doc imapc ipv6 kerberos ldap lucene +maildir managesieve mbox mdbox mysql pam pop3c postgres sdbox selinux sieve solr sqlite (+)ssl static-libs suid tcpd vpopmail zlib}

     Installed versions:  2.2.5(19:31:36 09/11/13)(bzip2 maildir mysql ssl tcpd vpopmail zlib -caps -cydir -doc -imapc -ipv6 -kerberos -ldap -lucene -managesieve -mbox -mdbox -pam -pop3c -postgres -sdbox -selinux -sieve -solr -sqlite -static-libs -suid)

[I] mail-client/squirrelmail

     Available versions:

     (1.4.22) 1.4.22

     (1.4.23_pre20121024) [M]~1.4.23_pre20121024

       {filter ldap mysql nls postgres spell ssl vhosts}

     Installed versions:  1.4.22(1.4.22)(18:53:02 09/10/13)(mysql nls spell ssl vhosts -filter -ldap -postgres)

```

My key problems are:

1) svscan does not listen on port 25 and pass to qmail  :Sad: 

2) qmailadmin will not accept postmaster password

3) squirrelmail does not display and emails or subdirectories from my vpopmail structure

Any additional information I should provide, and any suggestions on what I should change next?

Regards,

----------

## sweatje

So I fixed

 *Quote:*   

> 3) squirrelmail does not display and emails or subdirectories from my vpopmail structure
> 
> 

 

It was a permissions issue in /var/vpopmail/domains

Still seeking advice on other issues.  Thanks for any help.

Regards,

[/code]

----------

## sweatje

So I was able to fix  *Quote:*   

> 1) svscan does not listen on port 25 and pass to qmail

 

I forgot to put the symlink to /var/qmail/supervise/qmail-smtpd in /services

----------

## sweatje

I was able to fix  *Quote:*   

> 2) qmailadmin will not accept postmaster password 

  by emerging the keyword masked net-mail/qmailadmin-1.2.16

----------

