Red_Hat
RH302 · Question #109
RH302 Question #109: Real Exam Question with Answer & Explanation
Answers: 1. vi /etc/mail/local-host-names example.com 2. vi /etc/mail/sendmail.mc dnl # DEAMON_OPTIONS(Port=smtp,Addr=127.0.0.1,Name=MTA')dnl MASQUERADE_AS(example.com')dnl define(SMART_HOST', smtp.abc.com') 3. m4 /etc/mail/sendmail.mc >/etc/mail/sendmail.cf 4. vi /etc/mail/virtu
Question
Your Local Domain is example.com. Configure the send mail server for you local LAN by following these conditions: i. Any mail going from Local LAN should be masquerade to example.com ii. Any incoming mail for [email protected] virtual address should be mapped to [email protected] iii. All outgoing mail should be send via smtp.abc.com mail server.
Explanation
Answers:
- vi /etc/mail/local-host-names example.com
- vi /etc/mail/sendmail.mc
dnl # DEAMON_OPTIONS(
Port=smtp,Addr=127.0.0.1,Name=MTA')dnl MASQUERADE_AS(example.com')dnl define(SMART_HOST',smtp.abc.com') - m4 /etc/mail/sendmail.mc >/etc/mail/sendmail.cf
- vi /etc/mail/virtuser table [email protected] [email protected]
- vi /etc/mail/access 192.168.0 RELAY /etc/mail/local-host-names file contains the aliases to hostname. Mail server program reads the /etc/mail/sendmail.cf. To change the configuration on mail server, we should edit the /etc/mail/sendmail.mc file and should generate the sendmail.cf using m4 command. By default sendmail server allows to connect to local host only. So we should edit the /etc/mail/sendmail.mc file to allow connect to other hosts. By default sendmail server will not forward mail. we should specify on /etc/mail/access to relay or to block mail coming from domain or network or individual email address. By default dovecot service start only the imap protocol. To start pop protocol with dovecot, we should write in /etc/dovecot.conf file. To masquerade the address, MASQUERADE_AS option is in /etc/mail/sendmail.mc. SMART_HOST deliver all local mail locally and outgoing mail through another mail server. /etc/mail/virtusertable file is used map virtual address to real address. Eg. [email protected] [email protected] [email protected] [email protected]
Community Discussion
No community discussion yet for this question.