@rout3rx
Well, original problem solved, some new challenges are present.
It is not entirely clear what you mean by
I add 127.0.0.0/128 , ::1/128 and my server ip/32 in whitelist
Which whitelist and why the "odd" 127.0.0.1/128 range?
Do you mean the "whitelist" as in the tab on "Server-wide mail settings"? If true, it is not necessary or should not be necessary to add any IP over there.
Please remove any entry from the whitelist: it is better to have no IPs whitelisted, than having a whitelist with badly formed IP ranges.
It also is not clear what you mean by
Server error: '454 4.7.1 <
[email protected]>: Relay access denied'
I suppose this is an error notification on the Gmail server side. Am I correct?
If true, you should note two things and one remark, so let´s start with the things to be noted:
- Gmail has a "learning algorithm" that can easily take some days to determine that specific mail is not spam (this is probably not relevant for your case)
- Gmail does not really require port 587, but it can be a pain-in-the-a** when trying to use the other port (465)
and the one remark is that Google has a decent "manual" at
https://support.google.com/mail/troubleshooter/1668960?hl=en&rd=1
Go for the IMAP option and use ports 465 (smtps) and 993 (imaps).
By the way, I would never recommend the POP3 option, since the advantage of IMAP is that one ends up with a "backup" of all mail (if properly configured though).
Hope the above helps a bit..... just let me know.
Regards...