Forum Moderators: phranque
Not sure if I am supposed to do this but you need to start very basic if you do not know the commands. Here is some beginner type stuff to get you going...
This ought to get you started.
Add edited .......... I'll sticky the urls instead. Don't want to get in trouble :-)
[edited by: webdude at 1:51 pm (utc) on Oct. 14, 2004]
1. become root to be able to edit the file
2. change into the right directory
3. copy the sendmail.cf to make a backup in case it all goes pear-shaped (this bit is very important!)
4. open the file in a simple text editor to make the changes
5. save the file and leave the editor
6. restart sendmail
7. exit from being root
Here we go:
1. Type:
su and enter your root password at the prompt.
2. Type:
cd /etc/mail (or whetever directory the sendmail.cf file is in)
3. Make the backup copy:
cp sendmail.cf sendmail.cf.backup1 (or whatever filename you find appropriate - you could use dates or sequetial numbers for the backup files)
4. To edit the file, don't try vi because you'll lose your sanity. The best simple text editor is "pico" or "nano" - the second is a clone of the first, so if one isn't available, try the other. If neither are there, you will need to install one of them.
Type
pico sendmail.cf (or
nano sendmail.cf) Pico/nano are easy to use - for the commands, you use Control plus the letter as listed at the bottom of the screen.
5. Once done, you can press
Control + O to save ("Write out") and Control + X to exit. 6. To restart sendmail, type:
service sendmail stop then:
service sendmail restart 7. To stop being root and go back to being a normal user, type:
exit If it all goes wrong, then you can switch back to the original sendmail.cf file that you backed up beforehand:
1. Rename the broken file:
mv sendmail.cf sendmail.cf.broken 2. Rename the good backup to sendmail.cf:
mv sendmail.cf.backup1 sendmail.cf 3. Restart sendmail as per step 6 above.
Hope that helps.