root
, you can either uninstall Postfix or use the following command to switch to Sendmail:
alternatives --config mta
systemctl enable|disable service.service
/usr/sbin/postfix
. This daemon launches all related processes needed to handle mail delivery.
/etc/postfix/
directory. The following is a list of the more commonly used files:
access
— Used for access control, this file specifies which hosts are allowed to connect to Postfix.
main.cf
— The global Postfix configuration file. The majority of configuration options are specified in this file.
master.cf
— Specifies how Postfix interacts with various processes to accomplish mail delivery.
transport
— Maps email addresses to relay hosts.
aliases
file can be found in the /etc/
directory. This file is shared between Postfix and Sendmail. It is a configurable list required by the mail protocol that describes user ID aliases.
Configuring Postfix as a server for other clients
/etc/postfix/main.cf
file does not allow Postfix to accept network connections from a host other than the local computer. For instructions on configuring Postfix as a server for other clients, refer to Section 10.3.1.2, “Basic Postfix Configuration”.
postfix
service after changing any options in the configuration files under the /etc/postfix
directory in order for those changes to take effect. To do so, run the following command as root
:
systemctl restart postfix.service
root
to enable mail delivery for other hosts on the network:
/etc/postfix/main.cf
file with a text editor, such as vi
.
mydomain
line by removing the hash sign (#
), and replace domain.tld with the domain the mail server is servicing, such as example.com
.
myorigin = $mydomain
line.
myhostname
line, and replace host.domain.tld with the hostname for the machine.
mydestination = $myhostname, localhost.$mydomain
line.
mynetworks
line, and replace 168.100.189.0/28 with a valid network setting for hosts that can connect to the server.
inet_interfaces = all
line.
inet_interfaces = localhost
line.
postfix
service.
/etc/postfix/main.cf
configuration file. Additional resources including information about Postfix configuration, SpamAssassin integration, or detailed descriptions of the /etc/postfix/main.cf
parameters are available online at http://www.postfix.org/.
LDAP
directory as a source for various lookup tables (e.g.: aliases
, virtual
, canonical
, etc.). This allows LDAP
to store hierarchical user information and Postfix to only be given the result of LDAP
queries when needed. By not storing this information locally, administrators can easily maintain it.
LDAP
to look up the /etc/aliases
file. Make sure your /etc/postfix/main.cf
contains the following:
alias_maps = hash:/etc/aliases, ldap:/etc/postfix/ldap-aliases.cf
/etc/postfix/ldap-aliases.cf
file if you do not have one created already and make sure it contains the following:
server_host = ldap.example.com search_base = dc=example, dc=com
ldap.example.com
, example
, and com
are parameters that need to be replaced with specification of an existing available LDAP
server.
The /etc/postfix/ldap-aliases.cf file
/etc/postfix/ldap-aliases.cf
file can specify various parameters, including parameters that enable LDAP
SSL
and STARTTLS
. For more information, refer to the ldap_table(5)
man page.
LDAP
, refer to Section 11.1, “OpenLDAP”.