High-performance HP server for business IT infrastructure and data management solutions.

Postfix cannot send or receive email from Google (GMail)

Today, I was troubleshooting a CentOS server for a customer experiencing issues with their Postfix mail server. The problem was that Gmail’s mail server was refusing the connection. After verifying that the Postfix configuration was correct, I was still unable to relay emails to Gmail. Upon further investigation, I discovered that the server was using CSF (ConfigServer Security & Firewall), which could be affecting the connection.

Here is a temporary fix…

In CSF make sure that those option a correctly setup

Allow gmail server IP in your ConfigServer Security & Firewall Allow List

As per today February 6th 2025, here is the official CIDR/IP list

64.233.160.0/19 # Google Gmail
66.102.0.0/20 # Google Gmail
66.249.80.0/20 # Google Gmail
72.14.192.0/18 # Google Gmail
74.125.0.0/16 # Google Gmail
108.177.8.0/21 # Google Gmail
108.177.96.0/19 # Google Gmail
172.217.0.0/19 # Google Gmail
173.194.0.0/16 # Google Gmail
207.126.144.0/20 # Google Gmail
209.85.128.0/17 # Google Gmail
216.58.192.0/19 # Google Gmail
216.239.32.0/19 # Google Gmail
108.177.16.0/24 # Google Gmail
108.177.17.0/24 # Google Gmail
142.250.220.0/24 # Google Gmail
142.250.221.0/24 # Google Gmail

Allow those IP and restart ConfigServer Security & Firewall

You should now be able to send and receive emails from a Gmail account. However, this is only a temporary solution until I resolve the IPv6 issue in ConfigServer Security & Firewall. If IPv6 is enabled, Gmail will prioritize it for email delivery. Make sure to open the necessary IPv6 ports used for sending and receiving emails to ensure proper functionality.

Ex.: TCP6_IN = 993,995 TCP6_OUT = 993,995


Fatal error: Uncaught Error: Class "DOMDocument" not found in /home/nciaari7/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Model/FrontImage.php:67 Stack trace: #0 /home/nciaari7/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Model/FrontImage.php(41): ShortPixel\Model\FrontImage->loadImageDom() #1 /home/nciaari7/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Controller/Front/CDNController.php(568): ShortPixel\Model\FrontImage->__construct() #2 /home/nciaari7/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Controller/Front/CDNController.php(366): ShortPixel\Controller\Front\CDNController->extractImageMatches() #3 [internal function]: ShortPixel\Controller\Front\CDNController->processFront() #4 /home/nciaari7/public_html/wp-includes/functions.php(5493): ob_end_flush() #5 /home/nciaari7/public_html/wp-includes/class-wp-hook.php(341): wp_ob_end_flush_all() #6 /home/nciaari7/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters() #7 /home/nciaari7/public_html/wp-includes/plugin.php(522): WP_Hook->do_action() #8 /home/nciaari7/public_html/wp-includes/load.php(1308): do_action() #9 [internal function]: shutdown_action_hook() #10 {main} thrown in /home/nciaari7/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Model/FrontImage.php on line 67