Interview Questions And Answers on Sendmail
Server
Here is a list of all Mostly Asked sendmail server
Interview Questions :
Q
1: - What is Sendmail ?
Ans:
Sendmail is an MTA, meaning it accepts email messages sent to it using the SMTP
proto-col and transports them to another MTA email server until the messages
reach their destinations. It also accepts email for the local network and
delivers them to local mail spools, one for each user.
Q
2: - What is the role of MUA ?
Ans:
An MUA (Mail User Agent) with access to the mailbox file, directly or through a
network file system, can read messages from the disk and display them for the
user. This is generally a console or webmail application running on the server.
Q
3: - On which ports sendmail and senmail with SSL works ?
Ans:
By default, Sendmail uses TCP and UDP port 25 for non-encrypted transfers. If
the
Sendmail server is configured to use SSL for
encrypting email sent and received, it uses
port 465.
Q
4: - How to start sendmail server ?
Ans:
service sendmail restart
Q
5 : - Explain use of "trusted-users" file ?
Ans:
List of users that can send email as other users without a warning including
system users such as apache for the Apache HTTP
Server.
Q
6 : - Explain the use of "local-host-names" file ?
Ans:
If the email server should be known by different hostnames, list the host-
names in this file, one line per hostname. Any email
sent to addresses at these
hostnames is treated as local mail. The FEATURE option
must
be enabled in the sendmail.mc file for this file to
be referenced.
Q
7: - Can we use SSL Encryption with Sendmail ?
Ans:
Yes, Sendmail can be configured to encrypt email sent and received using SSL
(secure sockets layer).
Q
8 : - explain the use of /etc/aliases file ?
Ans: /etc/aliases, can be used to redirect email
from one user to another. By default, it includes redirects for system accounts
to the root user. It can then be used to redirect all email for the root user
to the user account for the system administrator.
Q
9: - Which are the important configuration files for Sendmail server ?
Ans:
The /etc/mail/ directory contains all the Sendmail configuration files, with
sendmail.cf and submit.cf being the main configuration files. The sendmail.cf
file includes options for the mail transmission agent and accepts SMTP
connections for sending email. The submit.cf file configures the mail
submission program.
Q
10: - How to configure sendmail to accept mail for local delivery that is
addressed to other hosts?
Ans:
Create
a /etc/mail/local-host-names file. Put into that file the hostnames and domain
names for which sendmail should accept mail for local delivery. Enter the names
with one hostname or domain name per line. And also make sure that Sendmail
configuration file should contain "use_cw_file" option.
dnl Load class $=w with other names for the local
host
FEATURE(`use_cw_file')
Q
11 : - What is the name of spamassassin configuration file?
Ans:
/etc/mail/spamassassin/local.cf
Q
12 : - How to check mail Queue of sendmail?
Ans:
/usr/lib/sendmail
-bp
or
mailq
Q
13 : - How to use m4 macro processor to
generate a new sendmail.cf?
Ans:
m4
/etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Q
14 : - When an organization stores aliases on an LDAP server, how you will
configure sendmail to read aliases from the LDAP server?
Ans:
Use
"sendmail -bt -d0" command to check the sendmail compiler options. If
sendmail was not compiled with LDAP support, recompile and reinstall sendmail.
Add an ALIAS_FILE define, containing the string
ldap to the sendmail configuration.
# Set the LDAP cluster value
define(`confLDAP_CLUSTER', `wrotethebook.com')
# Tell sendmail that aliases are available via LDAP
define(`ALIAS_FILE', `ldap:')
Q
15 : - How to forward emails of a local user to external address?
Ans:
Add
an alias to the aliases file for each user whose mail must be forwarded to another
system. The recipient field of the alias entry must be a full email address
that includes the host part. After adding the desired aliases, rebuild the
aliases database file with the newaliases command.
Q
16 : - In which Sendmail configuration file we have to make changes?
Ans:
we
will make the changes only in the sendmail.mc file, and the changes will be
moved into the sendmail.cf file for us.
Q
17: - You have been asked to create a sendmail configuration that sends all
local mail to a mail hub, while directly delivering mail addressed to external
systems.
Ans:
Create
a sendmail configuration containing the MAIL_HUB define to identify the mail
relay host for local mail. Use the LOCAL_USER command to exempt the root user's
mail from relaying.
dnl Define a relay server for local mail
define(`MAIL_HUB', `smtp.test.com')
dnl Users whose mail is not passed to the mail hub
LOCAL_USER(root)
Rebuild and reinstall sendmail.cf, and then restart
sendmail.
Q
18: - How to set 25 recipients for each email?
Ans:
define(`confMAX_RCPTS_PER_MESSAGE',`50')dnl
Q
19: - Which antivirus you have integrated with sendmail ?
Ans:
ClaimAV
Q
20: - What is Clamav-Milter?
Ans:
Clamav-Milter
is a tool to integrate sendmail and clamAV antivirus.
Q
21: - How to disable certain SMTP
commands?
Ans:
Add
the confPRIVACY_FLAGS define to the sendmail configuration to set Privacy
Options that disable unwanted, optional SMTP commands. Here we will disables
the EXPN, VRFY, VERB, and ETRN commands.
dnl Disable EXPN, VRFY, VERB and ETRN
define(`confPRIVACY_FLAGS',
`noexpn,novrfy,noverb,noetrn')
Rebuild and reinstall sendmail.cf, and then restart
sendmail.
Q
22: - When Sendmail dispatches your
email, it places the servers hostname behind your username, which becomes the
"from address" in the email (ie. user@mail.test.com).But we want to
use the domain name and not the hostname?
Ans:
define(`confDOMAIN_NAME',
`test.com')dnl
FEATURE(`relay_entire_domain')dnl
Q
23: - What does /etc/mail/access file contains?
Ans:
The
access database ("/etc/mail/access") is a list of IP addresses and
domainnames of allowable connections.
FEATURE(`access_db',`hash -T<TMPF> -o
/etc/mail/access.db')dnl
and cat
/etc/mail/access
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
192.168.0 RELAY
test.com RELAY
Q
24: - How to restrict sendmail to sending a big file?
Ans:
define(`confMAX_MESSAGE_SIZE',`52428800')dnl
or If you are using a PHP based webmail application
like SquirrelMail, you can adjust the max file size in php.ini file.
vi php.ini
post_max_size = 50M
upload_max_filesize = 50M
memory_limit = 64M
Q
25: - Which configuration files are required to integrate sendmail and ClaimAV
antivirus?
Ans:
milter.conf
and clamav-milter
Q
26: - How to test sendmail integration with ClaimAV?
Ans:
grep
Milter /var/log/maillog
You have to get following type of messages.
sendmail: Milter add: header: X-Virus-Scanned: ClamAV
version 0.88.2, clamav-milter version 0.88.2 on mail.test.com
sendmail: Milter add: header: X-Virus-Status: Clean
Q
27: - Which tool you have used to block spamming?
Ans:
SpamAssassin
Q
28: - What does "/etc/mail/" directory contains?
Ans:
The
/etc/mail/ directory contain all the Sendmail configuration files, with
sendmail.cf and submit.cf being the main configuration files.
Q
29: - Explain the use of /etc/mail/relay-domains file?
Ans:
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.
.....Best Of Luck.....
Post a Comment