Score:0

Whitelisting Gmail SMTP in CSF

bg flag

In my csf.deny, I have 0.0.0.0/0 blocked to prevent requests being sent to the raw server IP. This creates issues with sending e-mails. I utilize Google SMTP to send e-mail. I can't seem to figure out how to whitelist Gmail's SMTP while blocking 0.0.0.0/0. My Gmail SMTP settings are correct, and send e-mail properly when I don't have 0.0.0.0/0 blocked.

I've tried a variety of things to try to allow Gmail's SMTP through, including:

  • Only blocking incoming requests to all ports from 0.0.0.0/0 with no rules on outgoing requests
  • Performing nslookup smtp.gmail.com, and whitelisting those IPs
  • Whitelisting smtp.gmail.com in csf.dyndns

No matter what I try, if 0.0.0.0/0 is in csf.deny, e-mail will not be sent. Any suggestions?

anx avatar
fr flag
anx
Maybe you want to share a little more context/configuration and the direction of connections, its unclear why you would employ *IPv4* firewall rules to configure your *SMTP-level* policies. Which probably encompass SMTP traffic in both IPv4 & IPv6 anyway. Who initializes the connection? What criteria do you *actually* want to base your decisions on, as it sounds like IP addresses were merely an attempt to match something else?
Score:0
ug flag

Whitelist smtp.gmail.com in csf.dyndns, and in csf.conf verify you have DYNDS = "300", and DYNDNS_IGNORE = "1"

  • DYNDNS is the number of seconds for CSF to poll for a change in the IP address of your specific FQDN (smtp.gmail.com)
  • DYNDNS_IGNORE will ignore csf.dyndns IP addresses from lfd blocking.
anxiety avatar
bg flag
Thanks. Apparently the issue was with the DYNDNS, and DYNDNS_IGNORE values
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.