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 -n 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 "MYNAME.ws.nsrc.org": # cd /etc/postfix/ # postconf -e mydestination='$myhostname, localhost.$mydomain, localhost, MYNAME.ws.nsrc.org' (of course, use your own domain here, NOT MYNAME!) * View the contents of main.cf, and make sure that the new configuration for "mydestination" is there: # grep mydestination main.cf ... mydestination = $myhostname, localhost.$mydomain, localhost, MYNAME.ws.nsrc.org * Tell postfix to reload the configuration # postfix reload 2. Send an email to the user "sysadm" at your domain: # su - sysadm $ echo "test to my new domain" | mutt -s "test to MYNAME" sysadm@MYNAME.ws.nsrc.org $ tail /var/log/maillog $ mutt * Check that the mail has arrived in your mailbox! Remember the 'h' command. 3. Reconfigure your DNS so that you have an MX for your domain. * If your domain is called "MYNAME" (MNAME.ws.nsrc.org), and your PC is "pcX", then, add the following to your /etc/bind/db.MYNAME.ws.nsrc.org (for example, after the NS records) ... NS pcX.ws.nsrc.org. NS pcY.ws.nsrc.org. MX 10 pcX.ws.nsrc.org. ... * MAKE SURE that you are pointing to YOUR ws and not someone else's! * REMEMBER THE SERIAL NUMBER! * Reload your zone (rndc reload ...) 4. Use dig to verify that you have configured the DNS correctly: # dig @pcX MX MYNAME.ws.nsrc.org (where X is your own PC, 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 /etc/postfix/main.cf, find the line: myorigin = /etc/mailname So the name if stored in the file /etc/mailname. Change the contents of /etc/mailname, and put in: MYNAME.ws.nsrc.org * Now reload postfix # postfix reload 6. Send mail to others # echo "hello from here" | mail -s "hello from MYNAME" sysadm@OTHERNAME.ws.nsrc.org (OTHERNAME = someone else's domain in the room) * Check that they receive your mail AND that the email they see from you is: sysadm@MYNAME.ws.nsrc.org 7. Now, ask others to send mail to "sysadm@MYNAME.ws.nsrc.org" # echo "hello from there" | mail -s "hello from OTHERNAME" sysadm@MYNAME.ws.nsrc.org 8. Check that you are receiving the mail in your sysadm account: $ mutt We probably don't have a connection to the Internet, but if we did, we could send mail FROM "gmail.com" or somewhere else, and send mail TO our new domain.