need some help with mail system and virtual users

i am new to email systems. i have set up a machine via the perfect server howto on this site for ubuntu 8.04. i did not install the control panel at the end. i did install squirrelmail, and my mail account works, i can send and recieve emails. i would like to be able to add more mail users but want to be able to store the users with mysql. i would like for all the users to still be part of my domain though. can somebody help me with this.

i found the how to telling me how to set this up with virtual users and domains. i want all users to be on my domain. is this possible.

Yes, it's possible, but you must remove your domain from mydestination in main.cf and add it to the database. Also, you might have to remove your system user.

is there a how to and what all would be different in my situation.

i am trying to add mail to an existing web site so that users that are already logged in can just click a mail link and go to there mail box. is squirrelmail the best choice for this kind of idea or is there something better.

ok i have added the link to /bin/sh. that problem should be fixed. thanks.

but i still have a couple more questions, i want to switch mail to virtual users, but on my domain only but i still want a fully functioning mail system.

to switch my system over to virtual users, if i were to follow the virtual users and domains how-to. would i need all four tables that u describe there. and what other changes would i have to make to my system. i have ubuntu 8.04 server, bind9, apache2, mysql, php5, squirlmail 1.4.13, and i set up my mail system via the perfect server how-to.

i know very little about the mail system and how it works.
can somebody please give me some insight on the inner workings of a mail system.

like
1. how does mail get recieved and how does squirrelmail retrieve it, or how is mail recieved.

2. how is mail sent out and how does squirrelmail send it, or how is mail sent.

i have set up my mail system. there is only my account on the system. other than root. before i add any users i would like to set up the mail system to handle virtual users. all my users will be virtual users. just they will all be my domain.........