main.cf<\/code> file:<\/p>\npostconf -e \"myhostname = $(hostname -f)\"\r\n \r\npostconf -e \"virtual_mailbox_domains = sqlite:\/etc\/postfix\/sqlite_virtual_domains_maps.cf\"\r\npostconf -e \"virtual_alias_maps = sqlite:\/etc\/postfix\/sqlite_virtual_alias_maps.cf, sqlite:\/etc\/postfix\/sqlite_virtual_alias_domain_maps.cf, sqlite:\/etc\/postfix\/sqlite_virtual_alias_domain_catchall_maps.cf\"\r\npostconf -e \"virtual_mailbox_maps = sqlite:\/etc\/postfix\/sqlite_virtual_mailbox_maps.cf, sqlite:\/etc\/postfix\/sqlite_virtual_alias_domain_mailbox_maps.cf\"\r\n \r\npostconf -e \"smtpd_tls_cert_file = \/etc\/pki\/tls\/certs\/localhost.crt\"\r\npostconf -e \"smtpd_tls_key_file = \/etc\/pki\/tls\/private\/localhost.key\"\r\npostconf -e \"smtpd_use_tls = yes\"\r\npostconf -e \"smtpd_tls_auth_only = yes\"\r\n \r\npostconf -e \"smtpd_sasl_type = dovecot\"\r\npostconf -e \"smtpd_sasl_path = private\/auth\"\r\npostconf -e \"smtpd_sasl_auth_enable = yes\"\r\npostconf -e \"smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination\"\r\n \r\npostconf -e \"mydestination = localhost\"\r\npostconf -e \"mynetworks = 127.0.0.0\/8\"\r\npostconf -e \"inet_protocols = ipv4\"\r\npostconf -e \"inet_interfaces = all\"\r\n\r\npostconf -e \"virtual_transport = lmtp:unix:private\/dovecot-lmtp\"\r\n<\/pre>\nOpen the master.cf<\/code> file, find submission inet n<\/code> and smtps inet n<\/code> sections and edit as follows:<\/p>\nnano \/etc\/postfix\/master.cf<\/pre>\nsubmission inet n - n - - smtpd\r\n -o syslog_name=postfix\/submission\r\n -o smtpd_tls_security_level=encrypt\r\n -o smtpd_sasl_auth_enable=yes\r\n# -o smtpd_reject_unlisted_recipient=no\r\n# -o smtpd_client_restrictions=$mua_client_restrictions\r\n# -o smtpd_helo_restrictions=$mua_helo_restrictions\r\n# -o smtpd_sender_restrictions=$mua_sender_restrictions\r\n# -o smtpd_recipient_restrictions=\r\n -o smtpd_relay_restrictions=permit_sasl_authenticated,reject\r\n -o milter_macro_daemon_name=ORIGINATING\r\nsmtps inet n - n - - smtpd\r\n -o syslog_name=postfix\/smtps\r\n# -o smtpd_tls_wrappermode=yes\r\n -o smtpd_sasl_auth_enable=yes\r\n# -o smtpd_reject_unlisted_recipient=no\r\n# -o smtpd_client_restrictions=$mua_client_restrictions\r\n# -o smtpd_helo_restrictions=$mua_helo_restrictions\r\n# -o smtpd_sender_restrictions=$mua_sender_restrictions\r\n# -o smtpd_recipient_restrictions=\r\n -o smtpd_relay_restrictions=permit_sasl_authenticated,reject\r\n -o milter_macro_daemon_name=ORIGINATING\r\n\r\n<\/pre>\nEnable and restart the postfix service<\/p>\n
systemctl enable postfix\r\nsystemctl restart postfix\r\n<\/pre>\n