User Tools

Site Tools


install_postfix_on_fedora_server_29

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
install_postfix_on_fedora_server_29 [2019/01/22 01:13]
root
install_postfix_on_fedora_server_29 [2019/01/24 00:12]
root [Spam Control]
Line 18: Line 18:
   dnf install mailx   dnf install mailx
   mailx   mailx
 +
 +To check Postfix logs: (remove ''​f''​ to not follow)
 +
 +  journalctl -fu postfix
  
 To enable Postfix on next boot: To enable Postfix on next boot:
  
   systemctl enable postfix   systemctl enable postfix
 +
 +===== Log Analysis =====
 +
 +  dnf install postfix-perl-scripts
 +  pflogsumm -d today /​var/​log/​maillog --problems-first --rej-add-from --verbose-msg-detail
 +
 +===== Spam Control =====
 +
 +Reference: https://​www.linuxbabe.com/​mail-server/​block-email-spam-postfix
 +
 +Install ''​pypolicyd-spf'':​
 +
 +  dnf install pypolicyd-spf
 +
 +Prepare a user account for it:
 +
 +  useradd -r policyd-spf
 +  usermod -L policyd-spf
 +  usermod -s /​sbin/​nologin policyd-spf
 +  usermod -d / policyd-spf
 +
 +Append to ''/​etc/​postfix/​master.cf'':​
 +
 +  policy-spf unix - n n - - spawn
 +  user=policyd-spf
 +  argv=/​usr/​libexec/​postfix/​policyd-spf
 +
 +Append to ''/​etc/​postfix/​main.cf'':​
 +
 +  strict_rfc821_envelopes = yes
 +  smtpd_helo_required = yes
 +  smtpd_helo_restrictions = permit_mynetworks
 +  permit_sasl_authenticated
 +  reject_non_fqdn_helo_hostname
 +  reject_unknown_helo_hostname
 +  smtpd_sender_restrictions = permit_mynetworks
 +  permit_sasl_authenticated
 +  reject_unknown_sender_domain
 +  reject_unknown_reverse_client_hostname
 +  reject_unknown_client_hostname
 +  smtpd_recipient_restrictions = reject_unauth_destination
 +  check_policy_service unix:​private/​policy-spf
 +
  
install_postfix_on_fedora_server_29.txt ยท Last modified: 2019/01/24 00:16 by root