You would use apache to give users access to squirrelmail so to answer your question you would ask that in the apache forum. Now geting back to sendmail. Although many linux distros come with more than one mail server, sendmail is the one that is usually configured to start at bootup. That being the case, I won't go into the particulars of setting that up. Sendmail's main configuration file is /etc/mail/sendmail.mc and is the first thing we will edit. So open it with your favorite text editor. The first thing you need to do is look for these two lines:
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
If there is a dnl in front of them, that means they are commented out. The dnl means disregard everything until you come to a new line. Simply remove the dnl. The dnl at the end of the line is to get rid of the white space. Next look for a line like this:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
Either comment it out, remove it or edit 127.0.0.1 to your server's ip otherwise, sendmail will not look at the network device for mail.
Now you are all done with sendmail.mc but sendmail can't use it like this because a lot of info is missing. So what we will do now is build the configuration file using a macro compiler called m4. This takes sendmail.mc and other .mc files and compiles them into sendmail.cf. To do that issue this command:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Doesn't get any easier than that does it? Sendmail needs to know which domain this server will be providing mail for. To do that open /etc/mail/local-host-names and list all the domains your server will be hosting. You don't have to do anything to that file other than save it. Now you will need to make sure saslauthd is running and set to start at bootup. You will also need a pop3/imap server start at bootup. I like dovecot. It doesn't require any configuration at all. At this point you mail server should be up and running. However, the bad news, You need to create a table of users ant tell sendmail where that users mail goes. If you have a lot of users, I pitty you. ;-) What this table does is allow for virtual user names such as sales, webmaster, admin and so on. Here is a very short example of what the file looks like. Basically, each line has a virtual email address and a username or external e-mail address:
webmaster@domain1.com joe
joe@domain1.com joe
sales@domain1.com mike@otherdomain.net
mike@domain1.com mike
@domain1.com nouser This server does not allow spam!
You would do the same for each of your domains. Notice where some email points to a name. That name is a user on you linux system So for example, all mail for webmaster@domain1.com will go to /var/spool/mail/joe where joe is a file that contains all joes mail. When a user logs into his pop3 account with his username and password, this file get sent to that user's client where the file is converted to the standard email format of individual email messages. At the bottom, you will notice I added @domain1.com with no user name. This is a catchall. If mail comes in and there is no match an error message is returned with the text you put on that line. When you are done, save the file as /etc/mail/virtusertable. There may be one allready but it would be blank. Now you need to create the actual map sendmail will use. Just issue this command:
makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable. One more file you need to edit is /etc/aliases. Notice that most of the names are aliased to root. Then down at the bottom root is aliases to marc or some other name. Put you user name there and uncomment the line. To create /etc/aliases.db, simply type newaliases on the command line. This should get you up and running. Now all you need to do is configure your mail client. What you want to do is tell it to send you username and password to the outgoing server as well as the incoming server. Let me know if you need more spacific help with that. Let me know how things turn out and I will help you get spammassassin setup.