If you use Postfix, set up the Postfix service on a Linux host. The following steps are an example for a minimum configuration. For more information about your specific Linux deployment, see the
Postfix Documentation,
Steps
If your system has an active firewall, ensure that port 25 is open on the firewall. If necessary, open port 25 on the firewall:
# iptables -I INPUT -p tcp --dport 25 -j ACCEPT
Open
/etc/postfix/main.cf in an editor, and modify it as shown in the following examples:
Add the inet address of the virtual Ethernet adapter or network interface card (NIC) that is used for SMTP communication:
# RECEIVING MAIL
#
# Note: you need to stop/start Postfix when this parameter changes.
#
inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#inet_interfaces = localhost
NOTE:Ensure that you do not uncomment more than one inet_interface.
Add the fully qualified domain name (FDQN) of the host running the Postfix service:
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
myhostname = <FDQN of the host running the Postfix service>
Add the mail server name:
# INTERNET OR INTRANET
#
# The relayhost parameter specifies the default host to send mail to
# when no entry is matched in the optional transport (5) table. When
# no relayhost is given, mail is routed directly to the destination.
#
# On an intranet, specify the organizational domain name. If your
# internal DNS uses no MX records, specify the name of the intranet
# gateway host instead.
#
# In the case of SMTP, specify a domain, host, host:port, [host]:port,
# [address] or [address]:port; the form [host] turns off MX lookups.
# If you're connected via UUCP, see also the deafult_transport parameter.
#
relayhost = <mail server name>
#
If you receive a Relay Access denied message when sending email messages, check the
mynetworks property and set it appropriately:
# TRUST AND RELAY CONTROL
# The mynetworks parameter specifies the list of "trusted" SMTP
# clients that have more privileges than "strangers".
#
# In particular, "trusted" SMTP clients are allowed to relay mail
# through Postfix. See the smtpd_recipient_restrictions parameter
# in postconf(5).
#
# You can specify the list of "trusted" network addresses by hand
# or you can let Postfix do it for you (which is the default).
#
# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
# clients in the same IP subnetworks as the local machine.
# On Linux, this works correctly only with interfaces specified
# with the "ifconfig" command.
#
# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
# clients in the same IP class A/B/C networks as the local machine.
# Don't do this with a dialup site - it would cause Postfix to "trust"
# your entire provider's network. Instead, specify an explicit
# mynetworks list by hand, as described below.
#
# Specify "mynetworks_style = host" when Postfix should "trust"
# only the local machine.
#
# mynetworks_style = class
# mynetworks_style = subnet
# mynetworks_style = host
# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
#
# Specify an explicit list of network/netmask patterns, where the
# mask specifies the number of bits in the network part of a host
# address.
#
# You can also specify the absolute pathname of a pattern file instead
# of listing the patterns here. Specify type:table for table-based lookups
# (the value on the table right-hand side is not used).
#
mynetworks = 168.100.189.0/28, 127.0.0.0/8
# mynetworks = $config_directory/mynetworks
# mynetworks = hash:/etc/postfix/network_table
Reload the Postfix configuration file.
# postfix reload
Stop and start Postfix:
# postfix stop
# postfix start
Optionally, check the Postfix status:
# postfix status
Data is not available for the Topic
Please provide ratings (1-5 stars).
Please provide ratings (1-5 stars).
Please provide ratings (1-5 stars).
Please select whether the article was helpful or not.
Comments cannot contain these special characters: <>()\