Is there a way to block connections for incoming requests for GMAIL at port level? Is it that all protocols use same port for incoming and outgoing connections?

  • 2
    Please edit the question and define which email daemon are you using. – Rui F Ribeiro Sep 22 '16 at 12:47

Block incoming ports 25, 465 and 587. And you will have only outgoing mail from this server. Also you can consider to set the SMTP daemon to listen only to which will make it accept incoming mail only via localhost and send mail to the world

  • Thanks for the response... By doing so, can I restrict my Linux system from sending outgoing gmail? – ShreeVidhya Sep 22 '16 at 12:30
  • @ShreeVidhya, in your question you mention not to receive mail from google and send everywhere. If you want not to send to google you can check in your particular mail server configuration to blacklist google – Romeo Ninov Sep 22 '16 at 12:33
  • thanks Romeo Ninov... I would like to block the connections at port level... – ShreeVidhya Sep 22 '16 at 15:45
  • So make combination of port and IP (get all MX records for domain gmail.com, googlemail.com and so on) – Romeo Ninov Sep 22 '16 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.