Yes, that's correct; you should be entering the Apache directives in webmail.example.com, not example.com. I apologize for the typo and have corrected my previous post.
Given that you are indeed receiving permission denied errors, your configuration is correct thus far.
The issue now is the permissions on the /usr/share/squirrelmail
directory. More specifically, the user with whose credentials the webserver is running lacks sufficient access.
So, you need to set appropriate permissions on the /usr/share/squirrelmail
directory. To be able to do this correctly and securely, we need to know which PHP implementation are you using? Mod-PHP, Fast-CGI, SuPHP, etc.
Also, what are the current permissions on this directory? List out the parent directory's contents:
# ls -lah /usr/share
I'm looking for something like this:
drwxr-xr-x 4 root root 4.0K Aug 12 07:05 squirrelmail
It would also be helpful if you list the contents of the directory, too, e.g.:
# ls -lah /usr/share/squirrelmail
We'll await your response...