SlideShare a Scribd company logo
1 of 17
Configuring Linux Mail ServersConfiguring Linux Mail Servers
Objectives
◦ This chapter will show you how to install and use
Mailservers
Contents
◦ An Overview Of How Sendmail Works
◦ Sendmail configruation files
◦ Relaying
◦ Sendmail Masquerading
◦ Using Sendmail to Change the Sender's Email Address
Practical
◦ Setting up mailserver
Getting SENDMAILGetting SENDMAIL
 Installing Sendmail
◦ You will need to make sure that the sendmail, sendmail-cf and m4 software
RPMs are installed.
rpm –ivh sendmail-8.12.8-4.i386.rpm (The client/server)
rpm –ivh sendmail-cf-8.12.8-4.i386.rpm (Config files)
rpm –ivh sendmail-devel-8.12.8-4.i386.rpm (Optional)
rpm –ivh sendmail-doc-8.12.8-4.i386.rpm (Optional)
 Starting/Stopping Sendmail
◦ You can use the chkconfig command to get Sendmail configured to start at
boot:
◦ To start/stop/restart sendmail after booting
◦ You need to restart sendmail after changing sendmail.cf
# chkconfig sendmail on# chkconfig sendmail on
# service sendmail start
# service sendmail stop
# service sendmail restart
# service sendmail start
# service sendmail stop
# service sendmail restart
The /etc/mail/sendmail.mc FileThe /etc/mail/sendmail.mc File
How to Put Comments in sendmal.mc
◦ The sendmail.mc file doesn't use the "#" for
commenting, but instead uses the string "dnl".
Configuring the DNS for sendmail
◦ MakeYour Mail Server The Mail Server ForYour
Domain in DNS
Disabled statements due to "dnl" commenting
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
Incorrectly disabled statement
# DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
Active statement
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
Disabled statements due to "dnl" commenting
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
Incorrectly disabled statement
# DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
Active statement
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
IN MX 10 mail.my-site.comIN MX 10 mail.my-site.com
# host mail.my-site.com
mail.my-site.com has address 192.168.0.1
# host mail.my-site.com
mail.my-site.com has address 192.168.0.1
Sendmail & name resolutionSendmail & name resolution
All hosts that are not the nameserver should
have /etc/resolv.conf file like this:
And incorrectly configured resolv.conf
◦ file can lead to errors like this when running the
m4
The /etc/hosts File must have loopback address
domain my-site.com
nameserver 192.168.0.1
domain my-site.com
nameserver 192.168.0.1
WARNING: local host name (smallfry) is not qualified;
fix $j in config file
WARNING: local host name (smallfry) is not qualified;
fix $j in config file
127.0.0.1 bigboy.my-site.com bigboy localhost.localdomain 
localhost
127.0.0.1 bigboy.my-site.com bigboy localhost.localdomain 
localhost
How To Configure Linux SendmailHow To Configure Linux Sendmail
All Linux mail clients in your home or company
need to know which server is the mail server.
◦ In /etc/mail/sendmail.mc file:
Converting From a Mail Client to a Mail Server
◦ Determine Which NICs Sendmail Is Running On
◦ We can verify that sendmail is running by first
using the pgrep command
define(`SMART_HOST',`mail.my-site.com')define(`SMART_HOST',`mail.my-site.com')
# pgrep sendmail
22131
# netstat -an | grep :25 | grep tcp
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
# pgrep sendmail
22131
# netstat -an | grep :25 | grep tcp
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
Convert the sendmail client toConvert the sendmail client to
serverserver
Edit sendmail.mc To Make Sendmail Listen
On All Interfacesdnl This changes sendmail to only listen on the loopback device
127.0.0.1
dnl and not on any other network devices. Comment this out if you
want
dnl to accept email over the network.
-> dnl DAEMON_OPTIONS(`Port=smtp,Addr=mail.my-site.com, Name=MTA')
dnl NOTE: binding both IPv4 and IPv6 daemon to the same port
requires
dnl a kernel patch
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6,
Family=inet6')
dnl We strongly recommend to comment this one out if you want to
protect
dnl yourself from spam. However, the laptop and users on
computers that do
dnl not have 24x7 DNS do need this.
-> dnl FEATURE(`accept_unresolvable_domains')dnl
dnl FEATURE(`relay_based_on_MX')dnl
dnl This changes sendmail to only listen on the loopback device
127.0.0.1
dnl and not on any other network devices. Comment this out if you
want
dnl to accept email over the network.
-> dnl DAEMON_OPTIONS(`Port=smtp,Addr=mail.my-site.com, Name=MTA')
dnl NOTE: binding both IPv4 and IPv6 daemon to the same port
requires
dnl a kernel patch
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6,
Family=inet6')
dnl We strongly recommend to comment this one out if you want to
protect
dnl yourself from spam. However, the laptop and users on
computers that do
dnl not have 24x7 DNS do need this.
-> dnl FEATURE(`accept_unresolvable_domains')dnl
dnl FEATURE(`relay_based_on_MX')dnl
Convert the sendmail client toConvert the sendmail client to
serverserver
Comment out the "SMART_HOST" Entry In
sendmail.mc
RegenerateThe sendmail.cf File & Restart sendmail
◦ This step can be accomplished by running the script we
created at the beginning of the chapter.
Now Make Sure Sendmail Is Listening On All
Interfaces
dnl define(`SMART_HOST',`mail.my-site.com')dnl define(`SMART_HOST',`mail.my-site.com')
# netstat -an | grep :25 | grep tcp
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
# netstat -an | grep :25 | grep tcp
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
# ./smmake# ./smmake
A General Guide To Using The sendmail.mc FileA General Guide To Using The sendmail.mc File
Primary rule, nice and clean sendmail.mc
with comments
◦ Masquerade rewrites all mail
from hosts to coming from domain
◦ FEATURE adds functionallity to
sendmail
dnl ***** Customised section 1 start *****
Dnl
Dnl
FEATURE(delay_checks)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(allmasquerade)dnl
FEATURE(masquerade_entire_domain)dnl
dnl
dnl
dnl ***** Customised section 1 end *****
dnl ***** Customised section 1 start *****
Dnl
Dnl
FEATURE(delay_checks)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(allmasquerade)dnl
FEATURE(masquerade_entire_domain)dnl
dnl
dnl
dnl ***** Customised section 1 end *****
Sendmail feature filesSendmail feature files
 The /etc/mail/relay-domains File
 The /etc/mail/access File
◦ Keywords include RELAY, REJECT, OK (not ACCEPT) and DISCARD
 The /etc/mail/local-host-names File
◦ Also recieve mail from my other site
◦ In DNS we need to enter:
my-other-site.com
my-site.com
my-other-site.com
my-site.com
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
192.168.1.16 RELAY
192.168.1.17 RELAY
192.168.2 RELAY
my-site.com RELAY
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
192.168.1.16 RELAY
192.168.1.17 RELAY
192.168.2 RELAY
my-site.com RELAY
my-site.com
my-other-site.com
my-site.com
my-other-site.com
my-other-site.com. MX 10 mail.my-site.com.my-other-site.com. MX 10 mail.my-site.com.
Which User Should Really Receive The Mail?Which User Should Really Receive The Mail?
 The /etc/mail/virtusertable file
 The /etc/aliases File
 Allways run command newaliases after working with
aliases
webmaster@my-other-site.com   webmasters
@my-other-site.com            marc
sales@my-site.com             sales@my-other-site.com
paul@my-site.com              paul
finance@my-site.com           paul
@my-site.com                  error:nouser User unknown
webmaster@my-other-site.com   webmasters
@my-other-site.com            marc
sales@my-site.com             sales@my-other-site.com
paul@my-site.com              paul
finance@my-site.com           paul
@my-site.com                  error:nouser User unknown
. . .
manager:              root
abuse:                root
# trap decode to catch security attacks
decode:               root
# Person who should get root's mail
root:                 marc,webmaster@my-site.com
# My mailing list file
admin-list:     ":include:/home/mailings/admin-list"
. . .
manager:              root
abuse:                root
# trap decode to catch security attacks
decode:               root
# Person who should get root's mail
root:                 marc,webmaster@my-site.com
# My mailing list file
admin-list:     ":include:/home/mailings/admin-list"
Sendmail Masquerading ExplainedSendmail Masquerading Explained
 If you want your mail to appear to come from
◦ user@mysite.com and not user@bigboy.mysite.com
You can in that case:
a) Configure your email client, such as Outlook Express, to
set your email address to user@mysite.com
b) Set up masquerading to modify the domain name of all
traffic originating from and passing trough your mail
server
 Configuring masquerading
◦ This can be solved by editing your sendmail.mc
configuration file and adding some masquerading
commands:
FEATURE(always_add_domain)dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
MASQUERADE_AS(`my-site.com')dnl
MASQUERADE_DOMAIN(`my-site.com.')dnl
MASQUERADE_DOMAIN(localhost)dnl
MASQUERADE_DOMAIN(localhost.localdomain)dnl
FEATURE(always_add_domain)dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
MASQUERADE_AS(`my-site.com')dnl
MASQUERADE_DOMAIN(`my-site.com.')dnl
MASQUERADE_DOMAIN(localhost)dnl
MASQUERADE_DOMAIN(localhost.localdomain)dnl
Sendmail Masquerading ExplainedSendmail Masquerading Explained
  Testing Masquerading
◦ You should also tail the /var/log/maillog file to
verify that the masquerading is operating
 Other Masquerading Notes
◦ By default, user "root" will not be
masqueraded.This is achieved with the:
◦ in /etc/mail/sendmail.mc
mail -v usernamemail -v username
EXPOSED_USER(`root')dnlEXPOSED_USER(`root')dnl
Using Sendmail to Change the Sender's Email AddressUsing Sendmail to Change the Sender's Email Address
 Add these statements to your
/etc/mail/sendmail.mc
◦ In order to rewrite emails origin address, you
need some features:
◦ In /etc/mail/sendmail.mc
 Create a /etc/mail/generics-domains
 Create your /etc/mail/genericstable
FEATURE(`genericstable',`hash -o 
/etc/mail/genericstable.db')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl
FEATURE(`genericstable',`hash -o 
/etc/mail/genericstable.db')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl
my-site.com
my-other-site.com
bigboy.my-site.com
my-site.com
my-other-site.com
bigboy.my-site.com
#linux-username       username@new-domain.com
alert          security-alert@my-site.com
peter          urgent-message@my-site.com
#linux-username       username@new-domain.com
alert          security-alert@my-site.com
peter          urgent-message@my-site.com
Fighting SPAM, add featuresFighting SPAM, add features
 RFC-Ignorant valid IP address checker.
 Easynet open proxy list.
 The Open Relay Database open mail relay list.
 Spamcop spammer blacklist.
 Spamhaus spammer blacklist.
FEATURE(`dnsbl', `ipwhois.rfc-ignorant.org',`"550 Mail from " $&{client_addr} 
" refused. Rejected for bad WHOIS info on IP of your SMTP server - see 
http://www.rfc-ignorant.org/"')
FEATURE(`dnsbl', `ipwhois.rfc-ignorant.org',`"550 Mail from " $&{client_addr} 
" refused. Rejected for bad WHOIS info on IP of your SMTP server - see 
http://www.rfc-ignorant.org/"')
FEATURE(`dnsbl', `proxies.blackholes.easynet.nl', `"550 5.7.1 ACCESS DENIED to 
OPEN PROXY SERVER "$&{client_name}" by easynet.nl 
DNSBL  (http://proxies.blackholes.easynet.nl/errors.html)"', `')dnl
FEATURE(`dnsbl', `proxies.blackholes.easynet.nl', `"550 5.7.1 ACCESS DENIED to 
OPEN PROXY SERVER "$&{client_name}" by easynet.nl 
DNSBL  (http://proxies.blackholes.easynet.nl/errors.html)"', `')dnl
FEATURE(`dnsbl', `relays.ordb.org', `"550 Email rejected due to sending server 
misconfiguration - see http://www.ordb.org/faq/#why_rejected"')dnl
FEATURE(`dnsbl', `relays.ordb.org', `"550 Email rejected due to sending server 
misconfiguration - see http://www.ordb.org/faq/#why_rejected"')dnl
FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} " 
refused - see http://spamcop.net/bl.shtml"')
FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} " 
refused - see http://spamcop.net/bl.shtml"')
FEATURE(`dnsbl',`sbl.spamhaus.org',`Rejected - see http://spamhaus.org/')dnFEATURE(`dnsbl',`sbl.spamhaus.org',`Rejected - see http://spamhaus.org/')dn
SpamassassinSpamassassin
 Downloading & Installing Spamassassin
 Starting Spamassassin
 Configuring Procmail for Spamassassin
 Startup Spamassassin
◦ Combine spamassasin with sendmail features
cp /etc/mail/spamassassin/spamassassin-spamc.rc /etc/procmailrccp /etc/mail/spamassassin/spamassassin-spamc.rc /etc/procmailrc
# /etc/init.d/spamassassin start# /etc/init.d/spamassassin start
# chkconfig --level 35 spamassassin on# chkconfig --level 35 spamassassin on
# rpm –ivh spamassassin-2.60-2.i386.rpm.# rpm –ivh spamassassin-2.60-2.i386.rpm.
Thank youThank you

More Related Content

What's hot

Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...wensheng wei
 
Implementing DNS in Samba PDC
Implementing DNS in Samba PDCImplementing DNS in Samba PDC
Implementing DNS in Samba PDCJalpa Soni
 
Samba power point presentation
Samba power point presentationSamba power point presentation
Samba power point presentationMd Maksudur Rahman
 
DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)Tola LENG
 
samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)Rohit malav
 
1. primary dns using bind for a and cname record for ipv4 and ipv6
1. primary dns using bind for a and cname record for ipv4 and ipv61. primary dns using bind for a and cname record for ipv4 and ipv6
1. primary dns using bind for a and cname record for ipv4 and ipv6Piyush Kumar
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installationfranbow
 
DSpace Manual for BALID Trainee
DSpace Manual for BALID Trainee DSpace Manual for BALID Trainee
DSpace Manual for BALID Trainee Nur Ahammad
 
SquirrelMail for webmail
SquirrelMail for webmailSquirrelMail for webmail
SquirrelMail for webmailAryman Gautam
 
DNS server configurationDns server configuration
DNS server configurationDns server configurationDNS server configurationDns server configuration
DNS server configurationDns server configurationThamizharasan P
 
Network File System (NFS)
Network File System (NFS)Network File System (NFS)
Network File System (NFS)abdullah roomi
 
How to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuHow to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuAditya Gusti Tammam
 
Membangun web server,_e-mail_server_dan_ftp_server
Membangun web server,_e-mail_server_dan_ftp_serverMembangun web server,_e-mail_server_dan_ftp_server
Membangun web server,_e-mail_server_dan_ftp_serverIwan Kurniarasa
 
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
Cent os 5.1  - configuring samba 3.0 to use the ads security modeCent os 5.1  - configuring samba 3.0 to use the ads security mode
Cent os 5.1 - configuring samba 3.0 to use the ads security modeB Sasi Kumar
 

What's hot (20)

Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...Samba Optimization and Speed Tuning f...
Samba Optimization and Speed Tuning f...
 
Implementing DNS in Samba PDC
Implementing DNS in Samba PDCImplementing DNS in Samba PDC
Implementing DNS in Samba PDC
 
Rhel4
Rhel4Rhel4
Rhel4
 
Samba power point presentation
Samba power point presentationSamba power point presentation
Samba power point presentation
 
DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)
 
Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9
 
samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)samba server setup Pts ppt (rohit malav)
samba server setup Pts ppt (rohit malav)
 
Modul quick debserver
Modul quick debserverModul quick debserver
Modul quick debserver
 
1. primary dns using bind for a and cname record for ipv4 and ipv6
1. primary dns using bind for a and cname record for ipv4 and ipv61. primary dns using bind for a and cname record for ipv4 and ipv6
1. primary dns using bind for a and cname record for ipv4 and ipv6
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
 
DSpace Manual for BALID Trainee
DSpace Manual for BALID Trainee DSpace Manual for BALID Trainee
DSpace Manual for BALID Trainee
 
SquirrelMail for webmail
SquirrelMail for webmailSquirrelMail for webmail
SquirrelMail for webmail
 
DNS server configurationDns server configuration
DNS server configurationDns server configurationDNS server configurationDns server configuration
DNS server configurationDns server configuration
 
Network File System (NFS)
Network File System (NFS)Network File System (NFS)
Network File System (NFS)
 
How to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuHow to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntu
 
Membangun web server,_e-mail_server_dan_ftp_server
Membangun web server,_e-mail_server_dan_ftp_serverMembangun web server,_e-mail_server_dan_ftp_server
Membangun web server,_e-mail_server_dan_ftp_server
 
Apache1.ppt
Apache1.pptApache1.ppt
Apache1.ppt
 
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
Cent os 5.1  - configuring samba 3.0 to use the ads security modeCent os 5.1  - configuring samba 3.0 to use the ads security mode
Cent os 5.1 - configuring samba 3.0 to use the ads security mode
 
main
mainmain
main
 
Apache HTTP Server
Apache HTTP ServerApache HTTP Server
Apache HTTP Server
 

Similar to Linux corporate-training-in-mumbai

Install iRedMail on Red Hat Enterprise Linux, CentOS
Install iRedMail on Red Hat Enterprise Linux, CentOSInstall iRedMail on Red Hat Enterprise Linux, CentOS
Install iRedMail on Red Hat Enterprise Linux, CentOSInfoExcavator
 
Install iRedMail on Red Hat Enterprise Linux, CentOS
Install iRedMail on Red Hat Enterprise Linux, CentOSInstall iRedMail on Red Hat Enterprise Linux, CentOS
Install iRedMail on Red Hat Enterprise Linux, CentOSMd Meherab Hossen
 
Build your own secure mail server on the cloud using Amazon Web Services
Build your own secure mail server on the cloud using Amazon Web ServicesBuild your own secure mail server on the cloud using Amazon Web Services
Build your own secure mail server on the cloud using Amazon Web Servicesponukumatla joel nishanth
 
Mail server configuration
Mail server configurationMail server configuration
Mail server configurationchacheng oo
 
Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8Kaan Aslandağ
 
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platform
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platformDrupal camp South Florida 2011 - Introduction to the Aegir hosting platform
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platformHector Iribarne
 
DNSPresentation.pptx
DNSPresentation.pptxDNSPresentation.pptx
DNSPresentation.pptxKailashTayde
 
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...Chanaka Lasantha
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guideSeungmin Shin
 
A Comprehensive Guide for DNS Cluster Configurations
A Comprehensive Guide for DNS Cluster ConfigurationsA Comprehensive Guide for DNS Cluster Configurations
A Comprehensive Guide for DNS Cluster ConfigurationsHTS Hosting
 
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...addame
 
Eyeball XMPP Server Administrator Guide
Eyeball XMPP Server Administrator GuideEyeball XMPP Server Administrator Guide
Eyeball XMPP Server Administrator GuideEyeball Networks
 

Similar to Linux corporate-training-in-mumbai (20)

Install iRedMail on Red Hat Enterprise Linux, CentOS
Install iRedMail on Red Hat Enterprise Linux, CentOSInstall iRedMail on Red Hat Enterprise Linux, CentOS
Install iRedMail on Red Hat Enterprise Linux, CentOS
 
Install iRedMail on Red Hat Enterprise Linux, CentOS
Install iRedMail on Red Hat Enterprise Linux, CentOSInstall iRedMail on Red Hat Enterprise Linux, CentOS
Install iRedMail on Red Hat Enterprise Linux, CentOS
 
Build your own secure mail server on the cloud using Amazon Web Services
Build your own secure mail server on the cloud using Amazon Web ServicesBuild your own secure mail server on the cloud using Amazon Web Services
Build your own secure mail server on the cloud using Amazon Web Services
 
Mail server configuration
Mail server configurationMail server configuration
Mail server configuration
 
SFScon 22 - Dashamir Hoxha - Manage your own DNS.pdf
SFScon 22 - Dashamir Hoxha - Manage your own DNS.pdfSFScon 22 - Dashamir Hoxha - Manage your own DNS.pdf
SFScon 22 - Dashamir Hoxha - Manage your own DNS.pdf
 
DNS,SMTP and POP3
DNS,SMTP and POP3DNS,SMTP and POP3
DNS,SMTP and POP3
 
Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8Configuration of BIND DNS Server On CentOS 8
Configuration of BIND DNS Server On CentOS 8
 
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platform
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platformDrupal camp South Florida 2011 - Introduction to the Aegir hosting platform
Drupal camp South Florida 2011 - Introduction to the Aegir hosting platform
 
DNSPresentation.pptx
DNSPresentation.pptxDNSPresentation.pptx
DNSPresentation.pptx
 
Windows 2003 Server
Windows 2003 ServerWindows 2003 Server
Windows 2003 Server
 
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
Configuring apache, php, my sql, ftp, ssl, ip tables phpmyadmin and server mo...
 
Dns
DnsDns
Dns
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guide
 
A Comprehensive Guide for DNS Cluster Configurations
A Comprehensive Guide for DNS Cluster ConfigurationsA Comprehensive Guide for DNS Cluster Configurations
A Comprehensive Guide for DNS Cluster Configurations
 
FreeBSD and Hardening Web Server
FreeBSD and Hardening Web ServerFreeBSD and Hardening Web Server
FreeBSD and Hardening Web Server
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
 
Eyeball XMPP Server Administrator Guide
Eyeball XMPP Server Administrator GuideEyeball XMPP Server Administrator Guide
Eyeball XMPP Server Administrator Guide
 

More from Unmesh Baile

java-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbaijava-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbaiUnmesh Baile
 
Php mysql training-in-mumbai
Php mysql training-in-mumbaiPhp mysql training-in-mumbai
Php mysql training-in-mumbaiUnmesh Baile
 
Java course-in-mumbai
Java course-in-mumbaiJava course-in-mumbai
Java course-in-mumbaiUnmesh Baile
 
Robotics corporate-training-in-mumbai
Robotics corporate-training-in-mumbaiRobotics corporate-training-in-mumbai
Robotics corporate-training-in-mumbaiUnmesh Baile
 
Corporate-training-for-msbi-course-in-mumbai
Corporate-training-for-msbi-course-in-mumbaiCorporate-training-for-msbi-course-in-mumbai
Corporate-training-for-msbi-course-in-mumbaiUnmesh Baile
 
Professional dataware-housing-training-in-mumbai
Professional dataware-housing-training-in-mumbaiProfessional dataware-housing-training-in-mumbai
Professional dataware-housing-training-in-mumbaiUnmesh Baile
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiUnmesh Baile
 
Selenium-corporate-training-in-mumbai
Selenium-corporate-training-in-mumbaiSelenium-corporate-training-in-mumbai
Selenium-corporate-training-in-mumbaiUnmesh Baile
 
Weblogic-clustering-failover-and-load-balancing-training
Weblogic-clustering-failover-and-load-balancing-trainingWeblogic-clustering-failover-and-load-balancing-training
Weblogic-clustering-failover-and-load-balancing-trainingUnmesh Baile
 
Advance-excel-professional-trainer-in-mumbai
Advance-excel-professional-trainer-in-mumbaiAdvance-excel-professional-trainer-in-mumbai
Advance-excel-professional-trainer-in-mumbaiUnmesh Baile
 
Best corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiBest corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiUnmesh Baile
 
R-programming-training-in-mumbai
R-programming-training-in-mumbaiR-programming-training-in-mumbai
R-programming-training-in-mumbaiUnmesh Baile
 
Corporate-data-warehousing-training
Corporate-data-warehousing-trainingCorporate-data-warehousing-training
Corporate-data-warehousing-trainingUnmesh Baile
 
Sas-training-in-mumbai
Sas-training-in-mumbaiSas-training-in-mumbai
Sas-training-in-mumbaiUnmesh Baile
 
Microsoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbaiMicrosoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbaiUnmesh Baile
 
Linux-training-for-beginners-in-mumbai
Linux-training-for-beginners-in-mumbaiLinux-training-for-beginners-in-mumbai
Linux-training-for-beginners-in-mumbaiUnmesh Baile
 
Corporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiCorporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiUnmesh Baile
 
Corporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiCorporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiUnmesh Baile
 
Best-robotics-training-in-mumbai
Best-robotics-training-in-mumbaiBest-robotics-training-in-mumbai
Best-robotics-training-in-mumbaiUnmesh Baile
 
Best-embedded-system-classes-in-mumbai
Best-embedded-system-classes-in-mumbaiBest-embedded-system-classes-in-mumbai
Best-embedded-system-classes-in-mumbaiUnmesh Baile
 

More from Unmesh Baile (20)

java-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbaijava-corporate-training-institute-in-mumbai
java-corporate-training-institute-in-mumbai
 
Php mysql training-in-mumbai
Php mysql training-in-mumbaiPhp mysql training-in-mumbai
Php mysql training-in-mumbai
 
Java course-in-mumbai
Java course-in-mumbaiJava course-in-mumbai
Java course-in-mumbai
 
Robotics corporate-training-in-mumbai
Robotics corporate-training-in-mumbaiRobotics corporate-training-in-mumbai
Robotics corporate-training-in-mumbai
 
Corporate-training-for-msbi-course-in-mumbai
Corporate-training-for-msbi-course-in-mumbaiCorporate-training-for-msbi-course-in-mumbai
Corporate-training-for-msbi-course-in-mumbai
 
Professional dataware-housing-training-in-mumbai
Professional dataware-housing-training-in-mumbaiProfessional dataware-housing-training-in-mumbai
Professional dataware-housing-training-in-mumbai
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbai
 
Selenium-corporate-training-in-mumbai
Selenium-corporate-training-in-mumbaiSelenium-corporate-training-in-mumbai
Selenium-corporate-training-in-mumbai
 
Weblogic-clustering-failover-and-load-balancing-training
Weblogic-clustering-failover-and-load-balancing-trainingWeblogic-clustering-failover-and-load-balancing-training
Weblogic-clustering-failover-and-load-balancing-training
 
Advance-excel-professional-trainer-in-mumbai
Advance-excel-professional-trainer-in-mumbaiAdvance-excel-professional-trainer-in-mumbai
Advance-excel-professional-trainer-in-mumbai
 
Best corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbaiBest corporate-r-programming-training-in-mumbai
Best corporate-r-programming-training-in-mumbai
 
R-programming-training-in-mumbai
R-programming-training-in-mumbaiR-programming-training-in-mumbai
R-programming-training-in-mumbai
 
Corporate-data-warehousing-training
Corporate-data-warehousing-trainingCorporate-data-warehousing-training
Corporate-data-warehousing-training
 
Sas-training-in-mumbai
Sas-training-in-mumbaiSas-training-in-mumbai
Sas-training-in-mumbai
 
Microsoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbaiMicrosoft-business-intelligence-training-in-mumbai
Microsoft-business-intelligence-training-in-mumbai
 
Linux-training-for-beginners-in-mumbai
Linux-training-for-beginners-in-mumbaiLinux-training-for-beginners-in-mumbai
Linux-training-for-beginners-in-mumbai
 
Corporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiCorporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbai
 
Corporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbaiCorporate-informatica-training-in-mumbai
Corporate-informatica-training-in-mumbai
 
Best-robotics-training-in-mumbai
Best-robotics-training-in-mumbaiBest-robotics-training-in-mumbai
Best-robotics-training-in-mumbai
 
Best-embedded-system-classes-in-mumbai
Best-embedded-system-classes-in-mumbaiBest-embedded-system-classes-in-mumbai
Best-embedded-system-classes-in-mumbai
 

Recently uploaded

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

Linux corporate-training-in-mumbai

  • 1.
  • 2. Configuring Linux Mail ServersConfiguring Linux Mail Servers Objectives ◦ This chapter will show you how to install and use Mailservers Contents ◦ An Overview Of How Sendmail Works ◦ Sendmail configruation files ◦ Relaying ◦ Sendmail Masquerading ◦ Using Sendmail to Change the Sender's Email Address Practical ◦ Setting up mailserver
  • 3. Getting SENDMAILGetting SENDMAIL  Installing Sendmail ◦ You will need to make sure that the sendmail, sendmail-cf and m4 software RPMs are installed. rpm –ivh sendmail-8.12.8-4.i386.rpm (The client/server) rpm –ivh sendmail-cf-8.12.8-4.i386.rpm (Config files) rpm –ivh sendmail-devel-8.12.8-4.i386.rpm (Optional) rpm –ivh sendmail-doc-8.12.8-4.i386.rpm (Optional)  Starting/Stopping Sendmail ◦ You can use the chkconfig command to get Sendmail configured to start at boot: ◦ To start/stop/restart sendmail after booting ◦ You need to restart sendmail after changing sendmail.cf # chkconfig sendmail on# chkconfig sendmail on # service sendmail start # service sendmail stop # service sendmail restart # service sendmail start # service sendmail stop # service sendmail restart
  • 4. The /etc/mail/sendmail.mc FileThe /etc/mail/sendmail.mc File How to Put Comments in sendmal.mc ◦ The sendmail.mc file doesn't use the "#" for commenting, but instead uses the string "dnl". Configuring the DNS for sendmail ◦ MakeYour Mail Server The Mail Server ForYour Domain in DNS Disabled statements due to "dnl" commenting dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') Incorrectly disabled statement # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') Active statement DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') Disabled statements due to "dnl" commenting dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') Incorrectly disabled statement # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') Active statement DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') IN MX 10 mail.my-site.comIN MX 10 mail.my-site.com # host mail.my-site.com mail.my-site.com has address 192.168.0.1 # host mail.my-site.com mail.my-site.com has address 192.168.0.1
  • 5. Sendmail & name resolutionSendmail & name resolution All hosts that are not the nameserver should have /etc/resolv.conf file like this: And incorrectly configured resolv.conf ◦ file can lead to errors like this when running the m4 The /etc/hosts File must have loopback address domain my-site.com nameserver 192.168.0.1 domain my-site.com nameserver 192.168.0.1 WARNING: local host name (smallfry) is not qualified; fix $j in config file WARNING: local host name (smallfry) is not qualified; fix $j in config file 127.0.0.1 bigboy.my-site.com bigboy localhost.localdomain localhost 127.0.0.1 bigboy.my-site.com bigboy localhost.localdomain localhost
  • 6. How To Configure Linux SendmailHow To Configure Linux Sendmail All Linux mail clients in your home or company need to know which server is the mail server. ◦ In /etc/mail/sendmail.mc file: Converting From a Mail Client to a Mail Server ◦ Determine Which NICs Sendmail Is Running On ◦ We can verify that sendmail is running by first using the pgrep command define(`SMART_HOST',`mail.my-site.com')define(`SMART_HOST',`mail.my-site.com') # pgrep sendmail 22131 # netstat -an | grep :25 | grep tcp tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN # pgrep sendmail 22131 # netstat -an | grep :25 | grep tcp tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
  • 7. Convert the sendmail client toConvert the sendmail client to serverserver Edit sendmail.mc To Make Sendmail Listen On All Interfacesdnl This changes sendmail to only listen on the loopback device 127.0.0.1 dnl and not on any other network devices. Comment this out if you want dnl to accept email over the network. -> dnl DAEMON_OPTIONS(`Port=smtp,Addr=mail.my-site.com, Name=MTA') dnl NOTE: binding both IPv4 and IPv6 daemon to the same port requires dnl a kernel patch dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6') dnl We strongly recommend to comment this one out if you want to protect dnl yourself from spam. However, the laptop and users on computers that do dnl not have 24x7 DNS do need this. -> dnl FEATURE(`accept_unresolvable_domains')dnl dnl FEATURE(`relay_based_on_MX')dnl dnl This changes sendmail to only listen on the loopback device 127.0.0.1 dnl and not on any other network devices. Comment this out if you want dnl to accept email over the network. -> dnl DAEMON_OPTIONS(`Port=smtp,Addr=mail.my-site.com, Name=MTA') dnl NOTE: binding both IPv4 and IPv6 daemon to the same port requires dnl a kernel patch dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6') dnl We strongly recommend to comment this one out if you want to protect dnl yourself from spam. However, the laptop and users on computers that do dnl not have 24x7 DNS do need this. -> dnl FEATURE(`accept_unresolvable_domains')dnl dnl FEATURE(`relay_based_on_MX')dnl
  • 8. Convert the sendmail client toConvert the sendmail client to serverserver Comment out the "SMART_HOST" Entry In sendmail.mc RegenerateThe sendmail.cf File & Restart sendmail ◦ This step can be accomplished by running the script we created at the beginning of the chapter. Now Make Sure Sendmail Is Listening On All Interfaces dnl define(`SMART_HOST',`mail.my-site.com')dnl define(`SMART_HOST',`mail.my-site.com') # netstat -an | grep :25 | grep tcp tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN # netstat -an | grep :25 | grep tcp tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN # ./smmake# ./smmake
  • 9. A General Guide To Using The sendmail.mc FileA General Guide To Using The sendmail.mc File Primary rule, nice and clean sendmail.mc with comments ◦ Masquerade rewrites all mail from hosts to coming from domain ◦ FEATURE adds functionallity to sendmail dnl ***** Customised section 1 start ***** Dnl Dnl FEATURE(delay_checks)dnl FEATURE(masquerade_envelope)dnl FEATURE(allmasquerade)dnl FEATURE(masquerade_entire_domain)dnl dnl dnl dnl ***** Customised section 1 end ***** dnl ***** Customised section 1 start ***** Dnl Dnl FEATURE(delay_checks)dnl FEATURE(masquerade_envelope)dnl FEATURE(allmasquerade)dnl FEATURE(masquerade_entire_domain)dnl dnl dnl dnl ***** Customised section 1 end *****
  • 10. Sendmail feature filesSendmail feature files  The /etc/mail/relay-domains File  The /etc/mail/access File ◦ Keywords include RELAY, REJECT, OK (not ACCEPT) and DISCARD  The /etc/mail/local-host-names File ◦ Also recieve mail from my other site ◦ In DNS we need to enter: my-other-site.com my-site.com my-other-site.com my-site.com localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY 192.168.1.16 RELAY 192.168.1.17 RELAY 192.168.2 RELAY my-site.com RELAY localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY 192.168.1.16 RELAY 192.168.1.17 RELAY 192.168.2 RELAY my-site.com RELAY my-site.com my-other-site.com my-site.com my-other-site.com my-other-site.com. MX 10 mail.my-site.com.my-other-site.com. MX 10 mail.my-site.com.
  • 11. Which User Should Really Receive The Mail?Which User Should Really Receive The Mail?  The /etc/mail/virtusertable file  The /etc/aliases File  Allways run command newaliases after working with aliases webmaster@my-other-site.com   webmasters @my-other-site.com            marc sales@my-site.com             sales@my-other-site.com paul@my-site.com              paul finance@my-site.com           paul @my-site.com                  error:nouser User unknown webmaster@my-other-site.com   webmasters @my-other-site.com            marc sales@my-site.com             sales@my-other-site.com paul@my-site.com              paul finance@my-site.com           paul @my-site.com                  error:nouser User unknown . . . manager:              root abuse:                root # trap decode to catch security attacks decode:               root # Person who should get root's mail root:                 marc,webmaster@my-site.com # My mailing list file admin-list:     ":include:/home/mailings/admin-list" . . . manager:              root abuse:                root # trap decode to catch security attacks decode:               root # Person who should get root's mail root:                 marc,webmaster@my-site.com # My mailing list file admin-list:     ":include:/home/mailings/admin-list"
  • 12. Sendmail Masquerading ExplainedSendmail Masquerading Explained  If you want your mail to appear to come from ◦ user@mysite.com and not user@bigboy.mysite.com You can in that case: a) Configure your email client, such as Outlook Express, to set your email address to user@mysite.com b) Set up masquerading to modify the domain name of all traffic originating from and passing trough your mail server  Configuring masquerading ◦ This can be solved by editing your sendmail.mc configuration file and adding some masquerading commands: FEATURE(always_add_domain)dnl FEATURE(`masquerade_entire_domain')dnl FEATURE(`masquerade_envelope')dnl FEATURE(`allmasquerade')dnl MASQUERADE_AS(`my-site.com')dnl MASQUERADE_DOMAIN(`my-site.com.')dnl MASQUERADE_DOMAIN(localhost)dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl FEATURE(always_add_domain)dnl FEATURE(`masquerade_entire_domain')dnl FEATURE(`masquerade_envelope')dnl FEATURE(`allmasquerade')dnl MASQUERADE_AS(`my-site.com')dnl MASQUERADE_DOMAIN(`my-site.com.')dnl MASQUERADE_DOMAIN(localhost)dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
  • 13. Sendmail Masquerading ExplainedSendmail Masquerading Explained   Testing Masquerading ◦ You should also tail the /var/log/maillog file to verify that the masquerading is operating  Other Masquerading Notes ◦ By default, user "root" will not be masqueraded.This is achieved with the: ◦ in /etc/mail/sendmail.mc mail -v usernamemail -v username EXPOSED_USER(`root')dnlEXPOSED_USER(`root')dnl
  • 14. Using Sendmail to Change the Sender's Email AddressUsing Sendmail to Change the Sender's Email Address  Add these statements to your /etc/mail/sendmail.mc ◦ In order to rewrite emails origin address, you need some features: ◦ In /etc/mail/sendmail.mc  Create a /etc/mail/generics-domains  Create your /etc/mail/genericstable FEATURE(`genericstable',`hash -o  /etc/mail/genericstable.db')dnl GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl FEATURE(`genericstable',`hash -o  /etc/mail/genericstable.db')dnl GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl my-site.com my-other-site.com bigboy.my-site.com my-site.com my-other-site.com bigboy.my-site.com #linux-username       username@new-domain.com alert          security-alert@my-site.com peter          urgent-message@my-site.com #linux-username       username@new-domain.com alert          security-alert@my-site.com peter          urgent-message@my-site.com
  • 15. Fighting SPAM, add featuresFighting SPAM, add features  RFC-Ignorant valid IP address checker.  Easynet open proxy list.  The Open Relay Database open mail relay list.  Spamcop spammer blacklist.  Spamhaus spammer blacklist. FEATURE(`dnsbl', `ipwhois.rfc-ignorant.org',`"550 Mail from " $&{client_addr}  " refused. Rejected for bad WHOIS info on IP of your SMTP server - see  http://www.rfc-ignorant.org/"') FEATURE(`dnsbl', `ipwhois.rfc-ignorant.org',`"550 Mail from " $&{client_addr}  " refused. Rejected for bad WHOIS info on IP of your SMTP server - see  http://www.rfc-ignorant.org/"') FEATURE(`dnsbl', `proxies.blackholes.easynet.nl', `"550 5.7.1 ACCESS DENIED to  OPEN PROXY SERVER "$&{client_name}" by easynet.nl  DNSBL  (http://proxies.blackholes.easynet.nl/errors.html)"', `')dnl FEATURE(`dnsbl', `proxies.blackholes.easynet.nl', `"550 5.7.1 ACCESS DENIED to  OPEN PROXY SERVER "$&{client_name}" by easynet.nl  DNSBL  (http://proxies.blackholes.easynet.nl/errors.html)"', `')dnl FEATURE(`dnsbl', `relays.ordb.org', `"550 Email rejected due to sending server  misconfiguration - see http://www.ordb.org/faq/#why_rejected"')dnl FEATURE(`dnsbl', `relays.ordb.org', `"550 Email rejected due to sending server  misconfiguration - see http://www.ordb.org/faq/#why_rejected"')dnl FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} "  refused - see http://spamcop.net/bl.shtml"') FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} "  refused - see http://spamcop.net/bl.shtml"') FEATURE(`dnsbl',`sbl.spamhaus.org',`Rejected - see http://spamhaus.org/')dnFEATURE(`dnsbl',`sbl.spamhaus.org',`Rejected - see http://spamhaus.org/')dn
  • 16. SpamassassinSpamassassin  Downloading & Installing Spamassassin  Starting Spamassassin  Configuring Procmail for Spamassassin  Startup Spamassassin ◦ Combine spamassasin with sendmail features cp /etc/mail/spamassassin/spamassassin-spamc.rc /etc/procmailrccp /etc/mail/spamassassin/spamassassin-spamc.rc /etc/procmailrc # /etc/init.d/spamassassin start# /etc/init.d/spamassassin start # chkconfig --level 35 spamassassin on# chkconfig --level 35 spamassassin on # rpm –ivh spamassassin-2.60-2.i386.rpm.# rpm –ivh spamassassin-2.60-2.i386.rpm.

Editor's Notes

  1. Most RedHat and Fedora Linux software products are available in the RPM format. Downloading and installing RPMs isn't hard. If you need a refresher, the chapter on RPMs covers how to do this in detail. You will need to make sure that the sendmail, sendmail-cf and m4 software RPMs are installed. When searching for the RPMs, remember that the filename usually starts with the software package name by a version number like this: sendmail-8.12.10-1.1.1.i386.rpm. Remember to restart the sendmail process every time you make a change to the configuration files for the changes to take effect on the running process. You can also test whether the sendmail process is running with the pgrep command, you should get a response of plain old process ID numbers: pgrep sendmail In this chapter we'll see that Sendmail uses a variety of configuration files which require different treatments in order for their commands to take effect. This little script encapsulates all the required post configuration steps: vi smmake #!/bin/bash cd /etc/mailmakem4 /etc/mail/sendmail.mc > /etc/sendmail.cf        # RH Ver 7.3- m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf   # RH Ver 8.0+ newaliases/etc/init.d/sendmail restart Once completed, use this command to make the script executable. chmod 700 smmake You'll need to run the script each time you change any of the sendmail configuration files described in the sections to follow.
  2. Most of sendmail's configuration parameters are set in this file with the exception of mailing list and mail relay security features. It is often viewed as an intimidating file with its series of structured "directive" statements that get the job done. Fortunately in most cases you won't have to edit this file very often. Remember that you will never receive mail unless you have configured DNS for your domain to make your new Linux box mail server the target of the DNS domain's MX record. See either the Static DNS or Dynamic DNS pages on how to do this. You will need to fix your DNS server's entries if the resolution isn't correct.
  3. As stated above, the sendmail program expects DNS to be configured correctly on the DNS server. The MX record for your domain must point to the IP address of the mail server. Sendmail also expects the files used by the mail server's DNS client to be configured correctly. The first one is the /etc/resolv.conf file in which there must be a "domain" directive that matches one of the domains the mail server is expected to handle mail for. Sendmail also expects a "nameserver" directive which points to the IP address of the DNS server the mail server should use to get its DNS information. For example, if the mail server is handling mail for my-site.com, and the IP address of the DNS server is 192.168.1.100, there must be directives that looks like this: domain my-site.com nameserver 192.168.0.1 The entry for 127.0.0.1 must always be followed by the fully qualified domain name (FQDN) of the server. In the case above it would be bigboy.my-site.com. You can then add any aliases or nicknames the server may have. Finally, at the very end, you MUST have an entry for localhost and localhost.localdomain. Linux will not function properly if the 127.0.0.1 entry in /etc/hosts doesn't also include localhost and localhost.localdomain.
  4. All Linux mail clients in your home or company need to know which server is the mail server. This is configured in the sendmail.mc file by setting the SMART_HOST statement to include the mail server. In the example below, the mail server has been set to mail.my-site.com, the mail server for the my-site.com domain. If you don't have a mail server on your network, you can either create one, or use the one offered by your ISP. Once this is done, the sendmail.mc file needs to be processed and sendmail must be restarted. This step can be accomplished by running the script we created at the beginning of the chapter. All Linux systems have a virtual loopback interface that only lives in memory with an IP address of 127.0.0.1. As mail must be sent to a target IP address even when there is no NIC in the box, Sendmail therefore uses the loopback address to send mail between users on the same Linux server. To become a mail server, and not a mail client, Sendmail needs to be also configured to listen for messages on NIC interfaces. We can also see the interfaces on which Sendmail is listening with the "netstat" command.  Sendmail listens on TCP port 25, so we use "netstat" and "grep" for "25" to see a default configuration listening only on IP address 127.0.0.1 (loopback).
  5. If sendmail is only listening on the loopback interface you'll have to comment out the daemon_options line in the /etc/mail/sendmail.mc file with "dnl" statements. It is also good practice to take precautions against SPAM by not accepting mail from domains that don't exist by commenting out the "accept_unresolvable_domains" feature too. See the italicized lines in the example below. You need to be careful with the accept_unresolvable_names feature. In our sample network, bigboy the mail server will not accept email relayed from any of the other PCs on your network if they are not in DNS. The chapter on DNS shows how to create your own internal domain just for this purpos
  6. The mail server doesn't need a SMART_HOST entry in its sendmail.mc file and this must be commented out with a "dnl" at the beginning. Sendmail should start listening on all interfaces (0.0.0.0)
  7. The sendmail.mc file can seem jumbled. To make it less cluttered I usually create two easily identifiable sections in it with all the custom commands I've ever added. The first section is near the top where the FEATURE statements usually are, and the second section is at the very bottom. Sometimes sendmail will archive this file when you do a version upgrade. Having easily identifiable modifications in this file will make post upgrade reconfiguration much easier. Here is a sample:
  8. The /etc/mail/relay-domains file is used to determine domains from which it will relay mail. The contents of the relay-domains file should be limited to those domains that can be trusted not to originate spam. By default, this file does not exist in a standard RedHat / Fedora install. In this case, all mail sent from my-super-duper-site.com and not destined for this mail server will be forwarded. One disadvantage of this file is that it can only control mail based on the source domain which can be spoofed by SPAM email servers. The /etc/mail/access file has more capabilities, such as restricting relaying by IP address or network range and is more commonly used. If you delete /etc/mail/relay-domains, then relay access is fully determined by the /etc/mail/access file. The sendmail script we configured at the beginning of the chapter will need to be run for these changes to take effect.
  9. Sendmail checks the contents of the virtusertable and then the aliases files to determine who the ultimate recipient of mail will be. If there is no match in the virtusertable file, sendmail will check for the full email address in the /etc/aliases file.
  10. In the DNS configuration, we made bigboy the mailserver for the domain my-site.com. You now have to tell bigboy in the sendmail configuration file sendmail.mc that all outgoing mail originating on bigboy should appear to be coming from my-site.com, if not, based on our settings in the /etc/hosts file, it will appear to come from mail.my-site.com. This isn't terrible, but you may not want your website site to be remembered with the word "mail" in front of it. In other words you may want your mail server to handle all email by assigning a consistent return address to all outgoing mail, no matter which server originated the email.
  11. The best way of testing masquerading from the Linux command line is to use the "mail -v username" command. I have noticed that "sendmail -v username" ignores masquerading altogether. You should also tail the /var/log/maillog file to verify that the masquerading is operating correctly and check the envelope and header of test email received by test email accounts.
  12. Sometimes masquerading isn't enough. There are times when you may need to change not only the domain of the sender but also the username portion of the sender's email address. For example, the need to do this could occur after buying a program for your SOHO office that sends out notifications to your staff, but the sender's address inserted by the program is its own, and not that of the IT person. Sendmail allows you to change both the domain and username on a case by case basis using the genericstable feature. Create your /etc/mail/genericstable file. First sendmail searches the /etc/mail/generics-domains file mentioned in the previous step for a list of domains to reverse map. It then looks at the /etc/mail/genericstable file for an individual email address from a matching domain.
  13. Using Public SPAM Blacklists With Sendmail There are many publicly available lists of known open mail relay servers and spam generating mail servers on the Internet. Some are maintained by volunteers, others are managed by public companies, but in all cases they rely heavily on complaints from spam victims. Some spam blacklists simply try to determine whether the email is coming from a legitimate IP address. The IP addresses of offenders usually remain on the list for six months to two years. In some cases, to provide additional pressure on the spammers, the blacklists will include not only the offending IP address but also the entire subnet or network block to which it belongs. This prevents the spammers from easily switching their server's IP address to the next available one on their network. Also, if the spammer uses a public datacenter, it is possible that their activities would also cause the IP addresses of legitimate emailers to be black listed too. It is hoped that these legitimate users will pressure the datacenter's management to evict the spamming customer. You can configure sendmail to use its `dnsbl' feature to both query these lists and reject the mail if a match is found. Here are some sample entries you can add to your /etc/sendmail.mc file, they should all be on one line. You can visit the URLs listed to learn more about the individual services.
  14. Spamassasin Once Sendmail receives an email message, it hands it over to procmail which is the application that actually places the email in mailboxes of the users on the mail server. It is possible to make procmail temporarily hand over control to another program such as a SPAM filter, the most commonly used one being Spamassassin. Note: Spamassassin doesn't delete SPAM, it merely adds the word "SPAM" to the beginning of the subject line of suspected SPAM emails. You can then configure the email filter rules in Outlook Express or any other mail client to either delete it or store it in a special SPAM folder.