I cannot send emails to Gmail due to Postgrey - Postfix Greylisting Policy Server. I know this package is deprecated, but please provide alternate. I have checked that Postfix has its own built-in greylisting named Postscreen. Is it possible to use with Webmin & Virtualmin?
what error does gmail bounce? Postgrey shouldn’t be available in RH10 as far as I’m aware, and its the first I’ve heard of Postscreen, and never heard it been configure in virtualmin.
Also postgrey should only effect incoming mail not outgoing.
Postscreen is real sinple to setup and works quite well all you have to do is add the command to master.cf smtp inet n - y - 1 postscreen
And remove comment out the orginal smtp line
Then in main.cf
And restart posfix and you should be working.
Note the line in master.cf maybe space specific so I copy the original line and just replace the values with the postscreen ones
Curious why you’d jump to the conclusion that postgrey is the issue.
You don’t a valid PTR for your IP, that’s the reason Google is bouncing your emails.
Also check your DKIM.
This isn’t a Postgrey issue. Gmail is rejecting the server because it’s sending directly from 223.178.223.4, and that IP isn’t accepted for direct delivery.
There’s also no reverse DNS (PTR) record for the IP, which is a common reason for Gmail to reject outbound mail. Your SPF record also needs correcting: v=spf1 a mx a:projectok.com ip4:192.168.1.53 ip4:223.178.223.4 all
192.168.1.53 is a private address and has no place in a public SPF record. The record also ends with all instead of -all or ~all, so it’s invalid as written.
The fix is to use a proper mail server IP with valid forward and reverse DNS, or to send outbound mail through your provider’s SMTP relay.
I know I don’t have a PTR record, and I didn’t get the PTR record from the ISP due to the reason of PLANS of isp. I made my server in RHEL 9.0, then upgraded to RHEL 9.7. Till RHEL 9.7 postgrey is enabled from RHEL 9.0 to RHEL 9.7. I can send emails to Gmail. Sometimes emails were going to the inbox or the spam folder of Gmail, but were delivered successfully. I have now installed RHEL 10.1 on a new system. I get this error while sending emails to Gmail.
As already mentioned a couple of time, Postgrey only relates to incoming emails, not outgoing. It’s coincidence not evidence that not having it in EL10 is the cause of your problems.
Also as mentioned, you don’t have PTR record.
Host 4.223.178.223.in-addr.arpa. not found: 3(NXDOMAIN)
Without it, you will always have problems with sending mail. Gmail today, but more systems will require it soon.
You either need to use a plan with your ISP that has a PTR record, or go to another ISP that offers PTR or use a smarthost, or don’t have a reliable mail server.
Last month i did the same setup that i was done with the rhel 9.0 setup that time. Emails were delivered sucessfull to gmail. I will setup rhel 9.0 again then i will try.