Configure Sendmail on Slackware 9.1

Share This:

Since I’m fairly new at Linux and I have successfully got sendmail working on my server for my domain, I thought I would write this walkthrough to help others configure sendmail a fairly easy way.

TOOLS NEEDED:
– Slackware 9.1 w/ Sendmail installed (obviously)
– Webmin (http://www.webmin.com/) for web-based configuration

WEBMIN SETUP:
– Download and install webmin. It should have documentation with it, and it’s fairly easy to setup.

M4 SETUP FOR SENDMAIL:
– CD /usr/share/sendmail/cf/cf
– MV * /usr/share/sendmail/cf
– CD /usr/share/sendmail/cf
– Makre sure everything got moved to /usr/share/sendmail/cf directory
– You should have M4 installed in /usr/share/sendmail/cf
– Run “m4 /usr/share/sendmail/cf/m4/cf.m4 /usr/share/sendmail/cf/sendmail-slackware.mc > config.cf ”
– CP sendmail-slackware.mc config.mc (if config.mc exists, then to “CP config.mc config.mc.old” first to back it up)
– CP config.cf /usr/share/sendmail/cf/m4/config.cf

SETUP WEBMIN FOR M4:
– Go into Webmin (default is http://localhost:10000)
– Go to Servers > Sendmail Configuration
– Click on Module Config towards the top-left
– Full path to sendmail.cf = /etc/mail/sendmail.cf
– Sendmail M4 base directory = /usr/share/sendmail/cf
– Full path to M4 config file = /usr/share/sendmail/cf/config.mc
– Everything else should be fine so Save the changes

CONFIGURE M4 IN WEBMIN:
– In Webmin > Servers > Sendmail Configuration go to Sendmail M4 Configuration
– Go to Edit File Manually button
– In the list of FEATURE’s add these lines:
FEATURE(`relay_local_from’)dnl
FEATURE(`relay_entire_domain’)dnl

-Make sure your “include” line looks like:
include(`/usr/share/sendmail/cf/m4/cf.m4′)

-Make sure your “SMART_HOST” and “LOCAL_DOMAIN” line has your domain in it

-Then Save and Rebuild Sendmail Configuration

CONFIGURE SENDMAIL:
– Go to Sendmail Options in the Sendmail Configuration in Webmin
– For “Send outgoing mail via host” put in your domain for your mail server then Save and Apply
– Go to Local Domains and add localhost and your domain and Save
– Go to Domain Masquerading and for “Masquerade as domain” put in your domain and for “Domains to be masqueraded” put in your computer name and Save
– Go to Outgoing Domains and add your domain and Save
– Go to Spam Control and click on “Edit Manually” and add and save:
localhost RELAY
domain_name RELAY

– Go to Relay Domains and add your domain and Save

Now you probably want to Stop and Start Sendmail

…and that’s it!!!


Share This:

 

Leave a Comment