Installation Requisites - IMPORTANT NOTE: Always restart sendmail after altering config files.
sendmail | Mail Transfer Agent (Required) |
sendmail-cf | MTA Configuration (Required) |
mailmain | Mailing List Support/Client |
dovecot | IMAP & POP3 or Inbound Mail |
squirrelmail | Optional Web based email server(requires MySQL) |
spamassassin | Optional Spam Filter |
Configure /etc/mail/sendmail.mc
[root@server.domain ~]# nano /etc/mail/sendmail.mc
Now you must configure at minimum, these
following options for a proper sendmail.mc config. I will
show both the Default option and the reconfigured option.
Our Domain will be LinuxTruth.org as I used in my lab environment
with the Server's name as Boreas. Our administrators are
Jack and our user is Dave from the sales department. Jack
the admin also created a username called Sales. Always remember
to remove the Delete to
New Line (dnl) and know the difference between
` which is below the ESC key and ' which is near the Enter
Key if you delete too much of one line.
This is for an Outbound Mail Server
dnl define( `SMART_HOST',`smtp.domain.com')dnl
define( `SMART_HOST',`smtp.SmtpHostingSite.com')dnl
Revoke SMTP local only isolation and open SMTP Port
dnl Daemon Options (`Port=SMTP,Addr=127.0.0.1,
Name=MTA')dnl
Daemon Options (`Port=SMTP, Name=MTA')dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
MASQUERADE_DOMAIN(boreas)dnl
MASQUERADE_DOMAIN(boreas.linuxtruth.org)dnl
MASQUERADE_DOMAIN(linuxtruth.org)dnl
Final touches on Sendmail.mc, make sure these mailer
parameter lines do not have dnl before them.
MAILER(smtp)dnl
MAILER(procmail)dnl
Configure /etc/mail/virtusertable with Domain user mailboxes.
[Email Address] *Tab space* [Locally Created
User]
jack@linuxtruth.org jack
dave@linuxtruth.org dave
sales@linuxtruth.org sales
Configure /etc/aliases, this is where you can declare and make a distribution list.
User/Group: User
root: jack
postmaster: root
daemon: root
adm: root
lp: root
sales: dave
company: dave, jack
Now run this command and your server should be functional. Test with another PC. Telnet your Ports to verify connectivity.
[root@linuxtruth.org ~]# /sbin/service sendmail restart
First, Create an encryption certificate. If you're using Fedora, this directory should be fine. If you don't find this directory. Go ahead and create one.
[root@linuxtruth.org ~]# cd /etc/pki/tls/certs
[root@linuxtruth.org ~]# make filename.pem
Complete the form and fill out as instructed,
OU Name does not pertain to any LDAP functions.
Once you've created your certificate, sendmail needs to be instructed
to use the certificate. Remove DNL from the lines as instructed
and modify others. The first two edited lines inform Sendmail
that there will be a certificate encryption, the last 4, define
where to find the certificate.
[root@linuxtruth.org ~]# nano /etc/mail/sendmail.mc
dnl This part configures sendmail to use encryption but does
not define where the certificate is.dnl
TRUST_AUTH_MECH( `EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define( `confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5
LOGIN PLAIN')dnl
dnl This next part defines the Certificate's location for each
parameter. dnl
define( `confCACERT_PATH', `/etc/pki/tls/certs')dnl
define( `confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
define( `confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
define( `confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
By this part, I'm sure you're asking yourself, "Well now we're using certificates but aren't we supposed to configure the port assignment? Yes... we are. In fact, use this writing below and overwrite the previous DAEMON_OPTIONS listed above only for smtp.
[root@linuxtruth.org ~]# nano /etc/mail/sendmail.mc
DAEMON_OPTIONS( `Port=smtps, Name=TLSMTA, M=s')
Copyright © 2008-2011 itjournal-stevekline.com. All Rights Reserved.
If you enjoy the contents of IT Journal of Steve Kline and can afford
$1 to help keep this site and it's contents public, please make a donation.