REMOTE MAIL CONFIGURATION ------------------------- 1. Let's configure our postfix to accept mail for our newly created domain! * First, find out what domains postfix is already configured to accept: # postconf -d mydestination You should see: mydestination = $myhostname, localhost.$mydomain, localhost * Let's add our domain -- the one we created in the DNS delegation exercises For example, if your domain is "phil": # cd /usr/local/etc/postfix/ # postconf -e mydestination='$myhostname, localhost.$mydomain, localhost, phil.ws3.conference.sanog.org' (of course, use your own domain here, NOT phil!) * View the contents of main.cf, and make sure that the new configuration for "mydestination" is there: # tail main.cf ... mydestination = $myhostname, localhost.$mydomain, localhost, phil.ws3.conference.sanog.org * Tell postfix to reload the configuration # postfix reload 2. Send an email to the user "sanog" at your domain: # echo "test to my new domain" | mail sanog@phil.ws3.conference.sanog.org # tail /var/log/maillog * As "sanog": $ mutt * Check that the mail has arrived in your mailbox 3. Reconfigure your DNS so that you have an MX for your domain. * If your domain is called "YOURDOMAIN" (YOURDOMAIN.ws3.conference.sanog.org), and your PC/WS is "ws15", then, add the following to your /etc/namedb/master/YOURDOMAIN.ws3.conference.sanog.org, (for example, after the NS records) ... NS ws15.ws3.conference.sanog.org. NS ws16.ws3.conference.sanog.org. MX 10 ws15.ws3.conference.sanog.org. ; <<<- MX for mail ... * MAKE SURE that you are pointing to YOUR ws and not someone else's! * REMEMBER THE SERIAL! * Reload your zone (rndc reload ...) 4. Use dig to verify that you have configured the DNS correctly: # dig @wsXX MX YOURDOMAIN.ws3.conference.sanog.org (where XX is your own WS, but also the slaves of your zone!) * Is your MX published ? * Do your slaves have the MX as well ? 5. You still need to tell Postfix to use your new domain name as its Origin -- meaning, what the mails coming out will have after @: * edit main.cf myorigin = YOURDOMAIN.$mydomain ... $mydomain is always "ws3.conference.sanog.org" (if your hostname is set correctly) * Now reload postfix # postfix reload 6. Send mail to others # echo "hello from here" | mail -s "hello from YOURDOMAIN" sanog@THEIRDOMAIN.ws3.conference.sanog.org (THEIRDOMAIN = someone else's domain in the room) * Check that they receive your mail AND that the email they see from you is: sanog@YOURDOMAIN.ws3.conference.sanog.org 6. Now, ask others to send mail to "sanog@YOURDOMAIN.ws3.conference.sanog.org" # echo "hello from there" | mail -s "hello from THEIRDOMAIN" sanog@YOURDOMAIN.ws3.conference.sanog.org 7. Check that you are receiving the mail in your sanog account: $ mutt 8. Try and send mail to sanog@YOURDOMAIN.ws3.conference.sanog.org from the rest of the world (GMAIL, Hotmail, ...)