Help needed for email direct reply

Description

Server Setup Information

  • Version of Rocket.Chat Server: 3.16.0
  • Operating System: K8s
  • Deployment Method:
  • Number of Running Instances: 1
  • DB Replicaset Oplog: enabled
  • NodeJS Version:
  • MongoDB Version:
  • Proxy:
  • Firewalls involved:

Any additional Information

I’ve set up direct reply in Adminstrator > Email > Direct Reply with the following credentials:

Enable Direct Reply: True
Debug Direct Reply: True
Protocol: IMAP
Host: imap.google.com
Port: 993
Separator: +
Username: our_email_account_email
reply to: our_email_account_email
password: our_password

So I’m able to receive an email notification but when I reply to it, I get the email in the configured email inbox however no message is received in the chat, and I receive a rare error in the logs which shows up from time to time but not everytime.

The error begins with Error: getaddrinfo ENOTFOUND imap.google.com
I’m unable to reproduce it currently but will add the logs once it reappears.

We’re using k8s and this is our values.yaml

# Default values for temp.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicas: 1
projectName: rocketchat
namespace: dev

image:
  repository: docker.io/library/rocket.chat
  tag: 3.16.2
  pullPolicy: IfNotPresent

secret:
  name: rocketchat-secrets
  data:
    MONGO_SERVER_CONNECT_STR: mongodb://mongo-svc/chat

configmap:
  name: rocketchat-config
  data:
    ROOT_URL: <our-api-domain>/rc
    MONGO_URL: mongodb://mongo-svc/chat
    MONGO_OPLOG_URL: mongodb://mongo-svc/local?replSet=rs0
    MONGO_OPTIONS: '{ "serverSelectionTimeoutMS": 30000 }'
    PORT: 3000

service:
  name: rocketchat-svc
  targetPort: 3000
  port: 3000
  imapPort: 993
  imapTargetPort: 993

ingress:  
  name: rocketchat-ing
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx-dev
    nginx.ingress.kubernetes.io/proxy-body-size: 50m
  path: /rc/?(.*)
  hosts:
    - <our-api-domain-without-https://-prefix>

That will most likely be a DNS lookup error from INSIDE the container.

Shell into the docker Rocket instance and try to ping the server and you will most likely get a lookup failure.

1 Like

I’m unable to install the ping command as it says

rocketchat@rocketchat-59455dd5f6-ts462:/app/bundle$ ping imap.google.com
bash: ping: command not found
rocketchat@rocketchat-59455dd5f6-ts462:/app/bundle$ apt-get install ping
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

You need root permissions - either use su or sudo