# qmail setup poblem

## thecooptoo

having tried (briefly) a load of MTAs i think qmail will do what i want

Eventually i want to host my own domains as virtualdomains ->user specific mailboxes and then POP (or IMAP) pickup from a Pegasus Mail  client (for SWMBO)

Ive got as far a TEST.deliver,  sent as root, to  postmaster@... root@...

seems to be successful but 

1.

qmail-inject puts emails where ? - mutt (as user says /home/paul/.maildir/ is not a mailbox.

mutt (as root and as paul) doesnt have any emails visible but i dont get an error message 

2.

a virtual domain goes into rcpthosts . Does it need to go anywhere else (?locals) . does it matter if it does? 

3. not clear, having read the howtos i can find,  how to setup home mailboxes for the virtualdomains

ie domain1.net

-user1(as catchall)

 -user2

 -user3

domain2.net

-user4 etc etc 

and get mail for user1@domain.net and user2@domain.net to  specifc mailboxes

thanks for any help , pointers

----------

## rjreb

It appears you already installed vpopmail, can you add run /var/vpopmail/bin/vadduser name@domain.com

----------

## thecooptoo

```
router bin # vadduser user@domain.net

Please enter password for user@domain.net

enter password again:

Error: Domain does not exist

```

 then

```
router bin # vadddomain domain.net

Please enter password for postmaster:

enter password again:

vmysql: error creating table 'dir_control': MySQL server has gone away

vmysql: sql error[b]: MySQL server has gone away

Failure while attempting to remove_line() the locals file

vmysql: error creating table 'dir_control': MySQL server has gone away

vmysql: error creating table 'dir_control': MySQL server has gone away

vmysql: sql error[b]: MySQL server has gone away

Error. Failed to add domain to assign file

Error: Could not update file

router bin #

```

thanks for the pointer working my way through the /docs directory 

- but i cant find anything that tells me how to set it up if i dont want a MySQL ( only got 3 domains do  its a KISS setup )

----------

## rjreb

 *thecooptoo wrote:*   

> - but i cant find anything that tells me how to set it up if i dont want a MySQL ( only got 3 domains do  its a KISS setup )

 

The first thing I'd do is put a 'USE ="-mysql"' in your make.conf and recompile vpopmail. I think MySQL is compiled in by default.

----------

## thecooptoo

but I need MySQL for other stuff - I was just going to keep it simple. I suspect it will cause me other problems if I remove the USE flag  ( wont it?)

Im happy to use a MySQL DB for this - but havent explicitly set one up ( fields? permissions? )for qmail

----------

## thecooptoo

Im not sure where the problem is  - 2nd ( or 3rd ) go at setting this up 

Im following this :

http://gentoo-wiki.com/Talk:HOWTO_Setup_QMAIL_RELAY-CTRL_VPOPMAIL

I got this far

```

router etc # chmod 4711 /var/vpopmail/bin/vchkpw

router etc # vadddomain mynewdomain.org.uk

Please enter password for postmaster:

enter password again:

vmysql: error creating table 'dir_control': MySQL server has gone away

vmysql: sql error[b]: MySQL server has gone away

Failure while attempting to remove_line() the locals file

vmysql: error creating table 'dir_control': MySQL server has gone away

vmysql: error creating table 'dir_control': MySQL server has gone away

vmysql: sql error[b]: MySQL server has gone away

Error. Failed to add domain to assign file

Error: Could not update file

router etc # /etc/init.d/mysql status

 * status:  started

router etc # mysql -u root -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 2759 to server version: 4.0.22

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use vpopmail

Database changed

mysql> SHOW TABLES;

Empty set (0.00 sec)

mysql> grant select, insert, update, delete, create, drop on vpopmail.* to vpopmail@localhost identified by 'your password';

Query OK, 0 rows affected (0.01 sec)

mysql> \q

Bye

router etc # nano /etc/vpopmail.conf

router etc # vadddomain mynewdomain.org.uk

Please enter password for postmaster:

enter password again:

Error: Domain already exists

router etc # vdeldomain mynewdomain.org.uk

Warning: Could not access (/var/vpopmail/domains/mynewdomain.org.uk)

Warning: Failed while attempting to delete domain from auth backend

Warning: Failed to delete directory tree: mynewdomain.org.uk

router etc # cd /var/popmail

-bash: cd: /var/popmail: No such file or directory

router etc #

 
```

ive got a DB but not got any tables in it (?)

isa this correct ?

Ive got a /var/popmail/domains directory but nothing in it.

dont know where it keeps information re registered domains

[edit] but when I look at the DB its got a table and the newdomain.org.uk added . However, trying to add a user  gives 

```
outer tcprules.d # /var/vpopmail/bin/vadduser paul@mynewdomain.org.uk

Please enter password for paul@mynewdomain.org.uk

enter password again:

Passwords do not match, try again

Please enter password for paul@mynewdomain.org.uk

enter password again:

vmysql: sql error[3]: Table 'vpopmail.vpopmail' doesn't exist

Error: Domain does not exist

router tcprules.d #      
```

and the table vpopmail doesnt exist 

however in the database Ive got a record with the label mynewdomain.org.uk , but nothing in /var/vpopmail/domains .

Is this correct ?

could the ebuild be doing something wrong ?

hmmmmmmmmmmmmmmmmm

----------

## leosgb

Hi people I am having a similar problem here. I currently have a working mail server under mydomain.homelinux.net. I get external delivery to my local users but I dont want to use that for security reasons. Instead I want to create an email alias that would forward to my local user. Say,

local user: my_local_user, this already have an email my_local_user@mydomain.homelinux.net

email address: user@mydomain.homelinux.net

I tried to follow a few hints I read in a few threads and this is what I get:

--if I try to add the domain:

vadddomain mydomain.homelinux.net

Please enter password for postmaster:

enter password again:

Error: (vadduser) Username exists

--if I try to add the user:

vadduser user@mydomain.homelinux.net

Please enter password for user@mydomain.homelinux.net:

enter password again:

Error: Domain does not exist

I followed the traditional howto: http://www.gentoo.org/doc/en/qmail-howto.xml and I believe I setup mysql correctly and everything else.

If there is an easier way to do this I wouldnt mind taking the easier path :)

All I want to do is not have my local user names in the email addresses they use.

I am thankful for any suggestions/help.

----------

