hariktny 79 Posted February 24, 2013 (edited) This is specially for @tadios: Configure SMTP mail service according to the following requirement. a.your mail server should accept mail from remote host and local hosts. b.user2 must be able to receive mail from remote hosts. c. mail delivered to alice should spool into the default mail spool for alice /var/spool/mail/alice Ans: # rpm –q postfix #yum install –y postfix* #service postfix status # service postfix start #vim /etc/postfix/main.cf Go to 75th line -------- uncomment and edit Myhostname = station40.domain80.example.com Go to 83rd line ----- uncomment and edit Mydomain = domain80.example.com Go to 99thline ---- uncomment the line. Myorigin = $mydomain Go to 113thline ------ uncomment the line Inet_interfaces = all Go to 116 line ----- comment this line #inet_interfaces = localhost Go to 164th line ----- comment the line Go to 165th line ----- uncomment the line :wq # iptables -I INPUT -p tcp --dport 25 -j ACCEPT #service postfix restart #chkconfig postfix on # mail –v [email protected] subject : hi(can give anything) In body : ( type anything ) . and enter EOT #su – user2 #mail ------ will have mail here. # mail –[email protected] subject : hi(can give anything) In body : how are you ( can give anything ) . and enter EOT #su – alice #mail ------ will have mail here @tadios: Please PM me your mail id. @others: Correct if there are any mistakes. Edited February 24, 2013 by hariktny 1 Quote Share this post Link to post Share on other sites
hariktny 79 Posted February 24, 2013 Configure SMTP mail service according to the following requirement. A .your mail server should accept mail from remote host and local hosts. B. A user admin’s mail should be redirected to alice. #vim /etc/postfix/virtual Go to 159 line ----- copy this line virtual_alias_maps = hash:/etc/postfix/virtual #vim /etc/postfix/main.cf Paste that copied line (virtual_alias_maps = hash:/etc/postfix/virtual) at line 120. :wq # vim /etc/postfix/virtual Go to line 160 and type the following: [email protected]@domain80.station.example.com :wq #postmap /etc/postfix/virtual #service postfix restart # vim /etc/aliases admin alice :wq # newaliases Quote Share this post Link to post Share on other sites
tadios 1 Posted February 25, 2013 Can't thank you enough. You are my man! Quote Share this post Link to post Share on other sites
tadios 1 Posted February 25, 2013 (edited) One thing, I think you forgot to mention in your solution is: #postconf -e mail_spool_directory = /var/spool/mail Do we need to change the mydestination and mynetworks variable too? Thanks a million! Edited February 25, 2013 by tadios Quote Share this post Link to post Share on other sites
hariktny 79 Posted February 25, 2013 @tadios: no need man. But u can use #postconf command if u want to review the parameter values. Quote Share this post Link to post Share on other sites
zizi80 12 Posted February 26, 2013 /var/mail is linked to /var/spool/mail so you can leave it at that. Also, when testing from host machine, send test mail to <user>@FQDM which is usually <user>@station.domainXX.example.com Quote Share this post Link to post Share on other sites
Moazrefat 0 Posted April 11, 2013 thank you guys for you efforts , but is the question in exam come direct like this or not ? Quote Share this post Link to post Share on other sites
test4you 0 Posted April 11, 2013 @Moazrefat if you can exaplin to me #vim /etc/postfix/virtual Go to 159 line ----- copy this line virtual_alias_maps = hash:/etc/postfix/virtual #vim /etc/postfix/main.cf Paste that copied line (virtual_alias_maps = hash:/etc/postfix/virtual) at line 120. :wq # vim /etc/postfix/virtual Go to line 160 and type the following: [email protected]@domain80.station.example.com :wq #postmap /etc/postfix/virtual Quote Share this post Link to post Share on other sites
fooltruth 0 Posted April 11, 2013 @test4you If you want postfix to handle multiple domains then it is a good idea to enable virtual_alias_maps. For the exam you all have to do is ensure that mydestination parameter contains domain name. Quote Share this post Link to post Share on other sites
tiluoi 95 Posted May 19, 2013 Anyone take rhce and pass it recently? Is this correct answer to setup postfix? Thanks. Quote Share this post Link to post Share on other sites
tiluoi 95 Posted June 3, 2013 Follow instructions provided from to configure postfix to accept mail from remote host and local hosts. I able to receive mail from local hosts but did not receive mail from remote hosts. What steps are missing here? Anyone has the same problem with remote hosts? Quote Share this post Link to post Share on other sites
vanh 19 Posted June 3, 2013 Follow instructions provided from to configure postfix to accept mail from remote host and local hosts. I able to receive mail from local hosts but did not receive mail from remote hosts. What steps are missing here? Anyone has the same problem with remote hosts? Can you tell us what remote host did you use ? for eg different network ? Quote Share this post Link to post Share on other sites
tiluoi 95 Posted June 4, 2013 Any hosts besides the local host that you configure postfix. If it works, you should be sending mail from yahoo mail or gmail or whatever to your postfix mail server. @vanh: Have you taken RHCSA and RHCE yet? Any updates? Quote Share this post Link to post Share on other sites
vanh 19 Posted June 4, 2013 Any hosts besides the local host that you configure postfix. If it works, you should be sending mail from yahoo mail or gmail or whatever to your postfix mail server. @vanh: Have you taken RHCSA and RHCE yet? Any updates? It depends on the the DNS. The only different is DNS for remote host if DNS is working then postfix configuration shouldn't have any problem. It is the same as local host when we send email. No not yet. This week i will take rHCSA but not yet register for RHCE. Hope so they will organize RHCE soon in our location. It was cancelled several time because not enough people attended. Quote Share this post Link to post Share on other sites