Giter Site home page Giter Site logo

Cannot send emails about docker HOT 10 CLOSED

anonaddy avatar anonaddy commented on May 22, 2024
Cannot send emails

from docker.

Comments (10)

willbrowningme avatar willbrowningme commented on May 22, 2024

Is port 25 open?

Check by running sudo ufw status

from docker.

Coderdude112 avatar Coderdude112 commented on May 22, 2024

I am unsure of where to run this.

I am exposing port 25 on the docker container with these lines:

ports:
  - 25:25/tcp
  - 8098:8000/tcp

And I am forwarding port 25 on my router to my server.

EDIT:
Though I'm not entirely sure if my ISP is allowing port 25.

from docker.

KevinRoebert avatar KevinRoebert commented on May 22, 2024

It is unusual to run a mail server over a private Internet connection because this usually does not work.

There are several reasons for this. First, the IP address range of the end customer ISPs is on almost all blocklists. This is done to prevent mass spam from infected bots.

So you need an IP address from your ISP that is not in its default address range.

Furthermore, the IPv4 addresses of a private connection usually change after a certain time or a router restart. This is not suitable for email servers. Most mail servers work with a reverse DNS record check. To do this, you need to have your ISP create a reverse DNS record for your fixed IPv4 address. You cannot create this entry yourself. The reverse DNS record points from your IP address to your domain name (not the other way around as is usual with DNS - hence reverse DNS).

You can check it with this tool. Just enter your IPv4 address. What is the output?: https://mxtoolbox.com/ReverseLookup.aspx

What do you get as output from this tool? https://ssl-tools.net/mailservers

from docker.

Coderdude112 avatar Coderdude112 commented on May 22, 2024

Yeah I just got off the phone with my ISP and can't change the rDNS record without a business acc & static IP so like 160+ a month. So that's an end right there.

Though, its a little silly as I've had the same IP for literally years, through long blackouts and many router restarts.

Anyway, I'm gonna get a VPS that has port 25 open and allows me to set custom rDNS records. (Vultr is who I'm thinking of going with)

Thanks for all the help everyone

from docker.

Coderdude112 avatar Coderdude112 commented on May 22, 2024

Ok so I've got Anonaddy setup on a VPS but am still having problems sending the verification email for my account.
Here are the errors that appear when I try and send a verification email (I only edited the parts that say [REDACTED]

July 30 14:17:52 mail postfix/smtpd[975]: connect from unknown [127.0.0.1]
July 30 14:17:52 mail postfix/smtpd[975]: lost connection after STARTTLS from unknown[127.0.0.1]
July 30 14:17:52 mail postfix/smtpd[975]: disconnect from unknown[127.0.0.1] ehlo=1 starttls=0/1 commands=1/2

I have ensured that port 25 is open and my hosting provider isn't blocking things. I'm not sure if I've messed up other things so below are my config files. For reference I am trying to use anonaddy at lake.[DOMAIN]


docker-compose.yml

version: "3.5"
services:
  app:
    container_name: the_lake
    depends_on:
      - db
      - redis
    env_file:
      - ./the_lake.env
    image: anonaddy/anonaddy:latest
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.anonaddy.entrypoints=https"
      - "traefik.http.routers.anonaddy.rule=Host(`lake.[DOMAIN]`)"
      - "traefik.http.routers.anonaddy.tls=true"
      - "traefik.http.routers.anonaddy.tls.certresolver=letsencrypt"
      - "traefik.http.routers.anonaddy.tls.domains[0].main=lake.[DOMAIN]"
      - "traefik.http.services.anonaddy.loadbalancer.server.port=8000"
    ports:
      - 25:25/tcp
    restart: unless-stopped
    volumes:
      - ./data:/data
  db:
    container_name: the_lake_db
    command:
      - "mysqld"
      - "--character-set-server=utf8mb4"
      - "--collation-server=utf8mb4_unicode_ci"
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
      MYSQL_DATABASE: the_lake_db
      MYSQL_USER: the_lake_db_user
      MYSQL_PASSWORD: "[PASSWORD]"
    image: mariadb:10.5
    restart: unless-stopped
    volumes:
      - ./db:/var/lib/mysql
  redis:
    container_name: the_lake_redis
    image: redis:4.0-alpine
    restart: unless-stopped
  proxy:
    container_name: the_lake_proxy
    command:
      - "--global.checknewversion=false"
      - "--global.sendanonymoususage=false"
      - "--log=true"
      - "--log.level=INFO"
      - "--entrypoints.http=true"
      - "--entrypoints.http.address=:80"
      - "--entrypoints.http.http.redirections.entrypoint.to=https"
      - "--entrypoints.http.http.redirections.entrypoint.scheme=https"
      - "--entrypoints.https=true"
      - "--entrypoints.https.address=:443"
      - "--certificatesresolvers.letsencrypt"
      - "--certificatesresolvers.letsencrypt.acme.storage=acme.json"
      - "--certificatesresolvers.letsencrypt.acme.email=the_lake-lets_encrypt--webmaster@[DOMAIN]"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=http"
      - "--providers.docker"
      - "--providers.docker.watch=true"
      - "--providers.docker.exposedbydefault=false"
    image: traefik:2.3
    ports:
      - 80:80
      - 443:443
    restart: unless-stopped
    volumes:
      - ./acme.json:/acme.json
      - /var/run/docker.sock:/var/run/docker.sock

the_lake.env

# General
TZ=[TZ]
PUID=1000
PGID=1000
MEMORY_LIMIT=256M
UPLOAD_MAX_SIZE=30M
OPCACHE_MEM_SIZE=128
REAL_IP_FROM=0.0.0.0/32
REAL_IP_HEADER=X-Forwarded-For
LOG_IP_VAR=remote_addr

# App
APP_NAME=The_Lake
APP_KEY=[KEY]
APP_DEBUG=false
APP_URL=https://lake.[DOMAIN]

# AnonAddy
ANONADDY_RETURN_PATH=bounces@[DOMAIN]
ANONADDY_ADMIN_USERNAME=[NAME]
ANONADDY_ENABLE_REGISTRATION=true
ANONADDY_DOMAIN=[DOMAIN]
ANONADDY_ALL_DOMAINS=[DOMAIN]
ANONADDY_HOSTNAME=lake.[DOMAIN]
ANONADDY_DNS_RESOLVER=9.9.9.9
ANONADDY_SECRET=[SECRET]
ANONADDY_LIMIT=200
ANONADDY_BANDWIDTH_LIMIT=524288000
ANONADDY_NEW_ALIAS_LIMIT=10
ANONADDY_ADDITIONAL_USERNAME_LIMIT=50

# Database
DB_HOST=db
DB_DATABASE=the_lake_db
DB_USERNAME=the_lake_db_user
DB_PASSWORD=[PASSWORD]

# Redis
REDIS_HOST=redis

# E-Mail
MAIL_FROM_NAME=The_Lake
MAIL_FROM_ADDRESS=the_lake@[DOMAIN]

# Postfix
POSTFIX_DEBUG=false
POSTFIX_SMTPD_TLS=false
POSTFIX_SMTP_TLS=false

# DMARC
DMARC_ENABLE=true
DMARC_FAILURE_REPORTS=true
DMARC_MILTER_DEBUG=0

DNS records

Please note my rDNS record is set to lake.[DOMAIN]

Edited

from docker.

KevinRoebert avatar KevinRoebert commented on May 22, 2024

Try Version 0.7.5

from docker.

Coderdude112 avatar Coderdude112 commented on May 22, 2024

Yep, changed from the latest version to 0.7.5 and it worked immediately.

from docker.

crazy-max avatar crazy-max commented on May 22, 2024

Tracked in #70

from docker.

abdooo9 avatar abdooo9 commented on May 22, 2024

Try Version 0.7.5

Version of what?
I have same problem

from docker.

Coderdude112 avatar Coderdude112 commented on May 22, 2024

@abdooo9 At the time I tried using version 0.7.5 of Anonaddy on my server, I believe version 0.9+ is out by now so using the latest version is prob your best bet. This issue was due to my ISP blocking connections on port 25 & my inability to set rDNS records. I would look into both of these things to see if its the issue.

PS. Self-hosting email is kinda a pain in the butt. If it fits your needs, see if you can use Anonaddy or ProtonMail or both.

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.