Wooo, not much wrong then. Ok, lets slow this down and take things one at a time. Before I start I should say I'm not much of a Postfix expert, but I dont think this is really your problem.
Dovecot first; it's not an MTA (mail transport agent - sendmail and postfix are mta's), its a mail server that lets you access your mail by pop3 or imap. You need a mail transport first, and drop Dovecot on the top to let you read your emails from elsewhere (you can read mail locally on the server without Dovecot, but if you want squirrelmail, it'll need such transports). If you're going to use Squirrelmail with Dovecot, I recommend using the imap features, but dont worry about that just yet, to get this all working, you need to configure things in order:
- MTA (sendmail or postfix)
- Dovecot (there are alternative mail servers, btw)
- Squirrelmail (for which you will need apache installed and working, but I think you've got that already).
It sounds like you've already had Sendmail working to a degree; as I'm only familiar with sendmail, I can only help with that (I'm sure someone else will pick up the postfix mailer if needed).
You configure sendmail with the M4 language - I'm sure you've done this already. If you're doing this through webmin, you can probably enter these options directly through that interface, but if not, create yourself an M4 file for your domain that looks a bit like this:
Code:
divert(0)
include(`../m4/cf.m4')
OSTYPE(`linux')dnl
define(`confDEF_USER_ID',``8:12'')dnl
define(`confDOMAIN_NAME',`<your_domain>')dnl
define(`ALIAS_FILE',`/etc/mail/aliases,/etc/mail/majordomo')dnl
define(`confPRIVACY_FLAGS',`authwarnings,needmailhelo,noexpn,novrfy')dnl
define(`confTO_QUEUERETURN',`4d')dnl
define(`confTO_QUEUEWARN',`4h')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
FEATURE(`redirect')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`local_procmail')dnl
dnl FEATURE(`relay_hosts_only')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
FEATURE(`access_db',`hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(dnsbl,`cbl.abuseat.org',` Mail from $&(client_addr) rejected: see http://cbl.abuseat.org')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
You dont have to use the blacklist reciepients line if you dont want - I use real-time black holes to keep spam down; it's very effective. Dont forget to include your own domain name where I've indicated. I keep my m4 file in /usr/share/sendmail-cf/domain/' where I can compile it directly with 'm4 <mydomain>.m4 > sendmail.cf'
Next copy the sendmail.cf file to /etc/mail.
Edit /etc/mail/access to give any relaying access to machines on your LAN using their IP addresses - if you've a standalone machine this file should already contain localhost entries, so wouldn't need to be changed.
Edit your /etc/mail/aliases file to map email names to user names on the system, and /etc/mail/majordomo to mark out the special email accounts, then run 'newaliases'.
Edit /etc/mail/relay-domains to contain all the domains you want to relay mail for (i.e. your own domain).
Then it should be a simple matter of restarting sendmail (with 'service sendmail restart') and testing it.
Next up, set up Dovecot by editing its dovecot.conf; I found there was very little to change with the standard file - I think I changed only the directory name where the IMAP server stores it's mail in each user home directory. You can start Dovecot with 'service dovecot start'. Test your IMAP or POP3 connection with a regular mail reader such as evolution or kmail.
Run 'system-config-services' and make sure that dovecot and sendmail are started automatically in your default runlevel, and all should be well.
As far as getting squirrelmail to work goes, you'll have to follow the docs for that; I've only done it once, and that was a while ago. All I can say really is that if you're running it on an internet-based mail server, make sure you log into it using the SSL protocol (i.e. with https:// not
http://) to keep your password encrypted.