[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
howtos:network_services:postfix_dovecot_mysql:postfix [2015/02/16 01:26 (UTC)] astrogeekhowtos:network_services:postfix_dovecot_mysql:postfix [2015/02/16 07:15 (UTC)] astrogeek
Line 42: Line 42:
 <code>installpkg {path-to/}postfix-2.11.3-x86_64-1_SBo.tgz</code> <code>installpkg {path-to/}postfix-2.11.3-x86_64-1_SBo.tgz</code>
 ===== Configuring The Postfix MTA ===== ===== Configuring The Postfix MTA =====
-You should become familiar with the [[http://www.postfix.org/documentation.html|postfix documentation]] in order to properly configure and administer your mail server.+You must become familiar with the [[http://www.postfix.org/documentation.html|postfix documentation]] in order to properly configure and administer your mail server. Additionally, a complete set of online documentation for your version is installed from the package to /usr/doc/postfix-2.11.3/html/, learn what is there. 
 + 
 +<note important>You //must// become familiar with the tools available to you in order to safely admin and maintain your mail server! Take the time necessary to //read the man pages// - man postfix, man postconf, man master at minimum. And become familiar with the resources available through **man postfix:SEE ALSO** section, //before// you start your mail server! </note>
  
 What follows is a minimum configuration to safely operate a virtual email server on the internet, but you will surely want to adapt it to your specific needs. What follows is a minimum configuration to safely operate a virtual email server on the internet, but you will surely want to adapt it to your specific needs.
Line 57: Line 59:
 vi /etc/postfix/master.cf vi /etc/postfix/master.cf
  
-//Uncomment the following lines...//+Uncomment the following lines #
 smtp      inet  n                               smtpd smtp      inet  n                               smtpd
 submission inet n                               smtpd submission inet n                               smtpd
Line 70: Line 72:
 vi /etc/postfix/main.cf vi /etc/postfix/main.cf
  
-//Now enter the following lines...//+# Enter the following lines #
  
 mynetworks_style = host mynetworks_style = host
 myorigin = $mydomain myorigin = $mydomain
  
-#Change my-domain.com to the actual domain name of your server+# Change my-domain.com to the actual domain name of your server #
 mydomain = my-domain.com mydomain = my-domain.com
  
-#mydestination must be localhost only to allow postfix to deliver non-virtual system mail+# mydestination must be localhost only to allow postfix to deliver non-virtual system mail #
 mydestination = localhost mydestination = localhost
  
 #IMPORTANT - relay_domains should be empty to prevent your server from becoming a spam relay! #IMPORTANT - relay_domains should be empty to prevent your server from becoming a spam relay!
 #If you actually need to relay to other domains READ THE DOCUMENTATION CAREFULLY! #If you actually need to relay to other domains READ THE DOCUMENTATION CAREFULLY!
- relay_domains =+relay_domains =
  
 +# We have no local users, so no local notifications #
 biff = no biff = no
-append_dot_mydomain = no 
 </code> </code>
  
 Now we need to configure the secure aspects of our mail server, again in main.cf: Now we need to configure the secure aspects of our mail server, again in main.cf:
- 
 <code> <code>
 vi /etc/postfix/main.cf vi /etc/postfix/main.cf
  
-//Enter the following lines...//+Enter the following lines #
  
-#SSL certificates will be created at these locations when we configure dovecot+# SSL certificates will be created at these locations when we configure dovecot #
 smtpd_tls_cert_file = /etc/ssl/localcerts/dove.pem smtpd_tls_cert_file = /etc/ssl/localcerts/dove.pem
 smtpd_tls_key_file = /etc/ssl/localcerts/dove.key smtpd_tls_key_file = /etc/ssl/localcerts/dove.key
Line 119: Line 120:
 vi /etc/postfix/main.cf vi /etc/postfix/main.cf
  
-//Enter the following lines...//+Enter the following lines #
  
 #Tell postfix to use dovecot lmtp for virtual mail delivery #Tell postfix to use dovecot lmtp for virtual mail delivery
Line 129: Line 130:
 virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
  
-#Set localhost destinations+#Set localhost aliases path
 alias_maps = hash:/etc/aliases alias_maps = hash:/etc/aliases
 </code> </code>
  
-The last four files do not yet exist on the system and so, must be created. The virtual files tell postfix how to interact with the mysql database. The final alias_maps file tells the postfix process where to send operational messages.+The last four files do not yet exist on the system and so, must be created. The files prefixed with "virtual" tell postfix how to interact with the mysql database. The final alias_maps file tells the postfix process where to send operational messages.
  
 First we must tell postfix how to identify which virtual domains it handles mail for by providing a proper query of the virtual database. This query must return true if the domain is in the database: First we must tell postfix how to identify which virtual domains it handles mail for by providing a proper query of the virtual database. This query must return true if the domain is in the database:
Line 140: Line 141:
 vi /etc/postfix/mysql-virtual-mailbox-domains.cf vi /etc/postfix/mysql-virtual-mailbox-domains.cf
  
-//Enter the following lines...// +Enter the following lines #
 user= mailuser user= mailuser
 password = {your mailuser password} password = {your mailuser password}
Line 160: Line 160:
 vi /etc/postfix/mysql-virtual-mailbox-maps.cf vi /etc/postfix/mysql-virtual-mailbox-maps.cf
  
-//Enter the following lines...// +Enter the following lines #
 user= mailuser user= mailuser
 password = {your mailuser password} password = {your mailuser password}
Line 178: Line 177:
 vi /etc/postfix/mysql-virtual-alias-maps.cf vi /etc/postfix/mysql-virtual-alias-maps.cf
  
-//Enter the following lines...// +Enter the following lines #
 user= mailuser user= mailuser
 password = {your mailuser password} password = {your mailuser password}
Line 196: Line 194:
 vi /etc/aliases vi /etc/aliases
  
-//Enter the following lines...//+Enter the following lines #
 postmaster: root postmaster: root
-root: myself+root: root
 </code> </code>
  
 howtos:network_services:postfix_dovecot_mysql:postfix ()