How to Display Postfix Mail Server Configuration

Posted on

This is an article where the main subject is just to show specifically about how to display Postfix Mail Server configuration. Off course the Postfix Mail Service must be installed first. After the installation of Postfix Mail Service, the next step is to configure Postfix Mail Service by editing the Postfix Mail Service located in /etc/postfix/main.cf.

After configuring the Postfix Mail Service which is specified before in a file located in/etc/postfix/main.cf, the next step is executing the following command :

postfconf -n

The above command, ‘postconf’ is actually a command where based on the manual Linux command can be explained or can be described as ‘Postfix Control Program’. And the additional parameter given which is ‘-n’ can be explained as in the manual command as a parameter to show only configuration parameters that have explicit name=value settings in main.cf. So, basically it is showing the content specified in the Postfix Mail Service’s configuration located in /etc/postfix with the file named ‘main.cf’. Below is the execution of the above command with the output generated :

[root@mailrelay ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = xxx.xxx.xxx.0/24, xxx.xxx.xxx.xxx/32, xxx.xxx.xxx.0/24, xxx.xxx.xxx.0/24, xxx.xxx.xxx.0/24, xxx.xxx.xxx.xxx/32, xxx.xxx.xxx.0/24, xxx.xxx.xxx.xxx/24
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
relayhost = xxx.xxx.xxx.xxx
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_CApath = /etc/ssl/certs
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP
unknown_local_recipient_reject_code = 550
[root@mailrelay ~]#

The above output generated is basically the one specified in the Postfix Mail Server’s configuration but the line configuration which is needed to be focused at is the following line :

The first line is ‘mynetworks’ option where in this line of configuration, it is actually specify any networks or hosts which can connect to the Postfix Mail Server in order to utilize the Postfix Mail Service as shown below :

mynetworks = xxx.xxx.xxx.0/24, xxx.xxx.xxx.xxx/32, xxx.xxx.xxx.0/24, xxx.xxx.xxx.0/24, xxx.xxx.xxx.0/24, xxx.xxx.xxx.xxx/32, xxx.xxx.xxx.0/24, xxx.xxx.xxx.xxx/24

The second line, the line consists of ‘relayhost’ option is actually a reference in the form of IP Address specifying the actual server running SMTP (Simple Mail Transfer Protocol) which is actually responsible for sending mail. It is shown as follows :

relayhost = xxx.xxx.xxx.xxx

One thought on “How to Display Postfix Mail Server Configuration

Leave a Reply