Tutorial: Setting Up a Basic Postfix Mail Server

As with most of the server software documented here, Postfix has an intimidatingly large number of options and features. But, as we’ve already seen with BIND and Apache, even complex software can be easy and quick to set up if you know just what to do to get started. Postfix is no different. At the end of this short section you’ll have a fully functioning mail server, capable of sending and receiving mail on behalf of one or more domains.

In most environments, only three configuration details are needed to begin providing mail service with Postfix. First, browse the General Options page of the module. The top two options, What domain to use in outbound mail and What domains to receive mail for, need to be configured to suit your environment.

For the first option, you will likely want to select Use domainname in order to select the domain name of your server as the source of email sent from it. For example, if my mail server is named mail.swelltech.com and I selected this option, mail will appear to originate from swelltech.com.

The second option specifies the domains for which you will receive email. The default is probably too restrictive in that it will only permit receipt of mail to $mydomainname and localhost.$mydomain, or the server itself. While this depends on your environment and needs, it is likely that you will want to at least add the $mydomain variable to the list of accepted domains.

The last step to making Postfix fully functional for sending and receiving mail is to ensure the Local networks parameter is set appropriately. If you only have one network block, this will already be set appropriately, as the default is to accept mail for delivery from all attached networks (i.e., all configured and active network addresses). However, if you have a public and private network interface, you’ll likely want to remove to the public interface to prevent other clients of your ISP from being able to relay mail through your server.

Click the Save and Apply button to make your changes take effect. It is, of course, a good idea to test your changes to make sure things are working as intended. First, assuming an appropriate DNS MX record has already been configured as discussed in the BIND tutorials, you can send yourself an email at the new domain. Watch the maillog in the System Logs module for errors and to see if the message is delivered as expected. Next configure your mail client to send through your new mail server, to ensure it is working for sending mail, as well. The maillog will likely give clues about what is wrong in the event of problems.



The Book of Webmin... or How I Learned to Stop Worrying and Love UNIX
The Book of Webmin: Or How I Learned to Stop Worrying and Love UNIX
ISBN: 1886411921
EAN: 2147483647
Year: 2006
Pages: 142
Authors: Joe Cooper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net