Managing email with LinuxConf on RedHat 6.0
by Dan Potter
1999.09.13.01
Sendmail Software Installation
The installation of the email software itself should have occured during initial RedHat setup; the relevant RPM file is sendmail-8.9.3-10.
Preliminary setup in Linuxconf
Email is handled in RedHat by the ubiquitous sendmail program. As with most other things in this course, we'll be configuring email the easy way, with Linuxconf.
Two settings need to set in the basic email setup. Cursor down in Linuxconf to the heading Mail delivery system (sendmail), then go down to Basic and basic information. Press ENTER on that line. In the "Present your system as" field, enter the domain name your server is handling (for example, "company.com"). This information was decided earlier in the install and that information needs to match this information. The next line is a checkbox that says "Accept email for ...". Press SPACE on this line. TAB to "Accept" at the bottom of the screen and hit ENTER. A dialog box will pop up asking if you'd like to generate a new sendmail.cf; press ENTER to accept. Another dialog may appear asking if you'd like to general sendmail.cf for the first time; again press ENTER to accept. A notice will pop up confirming the action. You should now be back on the main Linuxconf screen.
Finding the accounts section in Linuxconf
Even though there is an entire section for configuring email, most of the default settings in that section are just fine for most setups. Most of the dirty work will be done in the User Accounts section, located under Config. You'll need to cursor down a ways to see that section. Do that now.
Adding an email account
To add an email account, you'll need to add an actual login to the system. This process will cause the server to receive email for that user, and to allow them to check their mail remotely with the common POP-3 protocol.
The account should now be ready to go.
Turning forwarding on or off
Later on you may want to enable or disable forwarding for a particular account. Here is the procedure; this assumes the same starting place as the above step.
The changes should be done.
Enabling and disable email accounts
Later on you may want to enable or disable a particular account. Here is the procedure; this assumes the same starting place as the above steps.
The changes should be done.
Testing the server
To do a really quick check on your email accounts, use the following procedure from a shell prompt:
mail -s Testing bob@company.comNote: Please replace "bob@company.com" with the full email address of the account you wish to test.
ls -l /var/spool/mailYou should see an entry for the user you just added, by the login name. If you don't want them to receive your test message, then use this command:
rm /var/spool/mail/userand then confirm the remove. Note: Replace "user" in the above with the user name, such as "bob". Note that this will not work for forwarded accounts, since the mail will have been bounced to that address already.
If that worked, you should be ready to go!
Removing an account
You may eventually need to remove an account as well. Unfortunately Linuxconf hasn't added that functionality yet. Free software is good but there aren't always enough people to work on the lesser used functions. Here is how to do it from the shell prompt:
/usr/sbin/userdel -r username
This will delete the user whose login name is username (this is the first part of their email address, before the @ sign).
Relevant information for further investigation
Like other parts of this course, you may want to explore the inner workings of sendmail and user accounts more closely than we cover in class. Here are some relevant files and directories for editing the config directly. Please exercise caution when exploring these files, should you decide to do that.