Web Hosting Talk







View Full Version : QMAIL and default domain user


rbouchard
05-01-2002, 11:32 AM
Hi all,

I have a QMAIL server with over 500 virtual domains and I need to setup an account for a domain that will recevie ALL email send to this domain. For example, if you write to test@example.com, hello@example.com and 1234214@exemple.com, all these email will automaticaly go in admin@example.com mail box without having to specify each possible address in the alias table.

I know this was possible with sendmail, but I can't find it anywhere in qmail documentation.

Thanks for helping me.



__________________
René Bouchard

cperciva
05-01-2002, 11:55 AM
control/virtualdomains

S2 Web Design
05-01-2002, 01:29 PM
You will only need the one owner for each virtual domain in the "/var/qmail/control/virtualdomains" file. Once that is setup, you can use the "/var/qmail/users/assign" file for individual addresses and this is also where you would want to setup your catchall address. For example, lets assume you have one valid address on a virtual domain and you want the rest to be forwarded to a catchall account. Your "virtualdomains" file will have one entry as follows:

/var/qmail/control/virtualdomains
example.com:owner

Your "assign" file would have two entries as follows:

/var/qmail/users/assign
+owner-:owner:UID:GID:/home/owner:::
=owner-test:owner:UID:GID:/home/owner/test:::
.

::IMPORTANT:: Make sure you have the period on the last line of the "assign" file.

As you can probably tell, the "+" in front of a line is a wildcard and the "=" is used to match the address. The "/home/admin" and "/home/admin/test" would be the directories where qmail can find the respective ".qmail" files. Mail will be sent according to the entries you make in those ".qmail" files.

Be sure to run "/var/qmail/bin/qmail-newu" each time you change the "assign" file. I think I metioned all that needs to be done and will add to this if I missed anything. Good Luck!

priyadi
05-02-2002, 01:40 AM
Add the example.com domain to /var/qmail/control/virtualdomains as usual. Then, put a .qmail-default file inside the home directory of the owner of example.com, containing 'admin@example.com'. You also need to add .qmail-admin file as well.

MotleyFool
05-02-2002, 04:57 AM
Or use vpopmail and and qmailadmin and post in WHT with the time saved