anonaddy / docker

AnonAddy Docker image
MIT License
519 stars 56 forks source link

"This email was sent to ..." notice NOT removed #254

Open working-name opened 10 months ago

working-name commented 10 months ago

Support guidelines

I've found a bug and checked that ...

Description

The receiver can see the This email was sent to ... notice in my reply from Postbox - I just hit reply and allowed the email client to quote the prior content. Addy may not be stripping that notice because the quote level changed?

And then of course there's the issue of things like Roundcube (webmail) that replace URLs with [1] references so now the notice doesn't look the same.

This might need to be a configurable item to have it disabled for self-hosters. We know what the alias is about... <-- this is already a thing, I found it. awkward

Expected behaviour

This email was sent to ... notice should be stripped.

Actual behaviour

Notice is seen on the receiving end along with the URL to disable the alias.

Steps to reproduce

  1. Configure your stuff as per documentation
  2. docker compose up -d
  3. create an account
  4. send a test email from Postbox
  5. reply from the receiver's end
  6. reply back using Postbox's "reply" function, and not touching the default quoted content, just adding your reply.
  7. check second reply on the receiver's end and it will contain the This email was sent to... notice.

Docker info

Client: Docker Engine - Community
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 35
  Running: 35
  Paused: 0
  Stopped: 0
 Images: 36
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dd1e886e55dd695541fdcd67420c2888645a495
 runc version: v1.1.10-0-g18a0cb0
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.1.0-17-amd64
 Operating System: Debian GNU/Linux 12 (bookworm)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.34GiB
 Name: geek23
 ID: 7fd8fafc-b2b6-4f8f-92da-10e0e3f7aa94
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Docker Compose config

name: addy
services:
  addy:
    container_name: addy
    depends_on:
      db:
        condition: service_started
        required: true
      redis:
        condition: service_started
        required: true
    environment:
      ANONADDY_ADDITIONAL_USERNAME_LIMIT: "10"
      ANONADDY_ADMIN_USERNAME: unsafead
      ANONADDY_ALL_DOMAINS: my.domain
      ANONADDY_BANDWIDTH_LIMIT: "1004857600"
      ANONADDY_DNS_RESOLVER: 1.1.1.1
      ANONADDY_DOMAIN: my.domain
      ANONADDY_ENABLE_REGISTRATION: "true"
      ANONADDY_HOSTNAME: mail.my.domain
      ANONADDY_LIMIT: "600"
      ANONADDY_NEW_ALIAS_LIMIT: "10"
      ANONADDY_RETURN_PATH: bounces@my.domain
      ANONADDY_SECRET: [redacted]
      APP_DEBUG: "true"
      APP_KEY: base64:[redacted]
      APP_URL: https://mail.my.domain
      DB_DATABASE: addy
      DB_HOST: db
      DB_PASSWORD: addy
      DB_USERNAME: addy
      LOG_IP_VAR: remote_addr
      MAIL_FROM_ADDRESS: contact@my.domain
      MAIL_FROM_NAME: my.domain.Email
      MEMORY_LIMIT: 512M
      OPCACHE_MEM_SIZE: "128"
      PGID: "1001"
      POSTFIX_DEBUG: "true"
      POSTFIX_MESSAGE_SIZE_LIMIT: "26214400"
      POSTFIX_SMTP_TLS: "true"
      POSTFIX_SMTPD_TLS: "true"
      POSTFIX_SMTPD_TLS_CERT_FILE: /certs/my.domain-chain.pem
      POSTFIX_SMTPD_TLS_KEY_FILE: /certs/my.domain-key.pem
      PUID: "1001"
      REAL_IP_FROM: 0.0.0.0/32
      REAL_IP_HEADER: X-Forwarded-For
      REDIS_HOST: redis
      RSPAMD_ENABLE: "true"
      RSPAMD_WEB_PASSWORD: [redacted]
      TZ: America/Chicago
      UPLOAD_MAX_SIZE: 25M
    image: anonaddy/anonaddy:latest
    networks:
      default: null
    ports:
    - mode: ingress
      host_ip: 172.17.0.1
      target: 25
      published: "25"
      protocol: tcp
    - mode: ingress
      host_ip: 172.17.0.1
      target: 8000
      published: "18085"
      protocol: tcp
    - mode: ingress
      host_ip: 172.17.0.1
      target: 11334
      published: "18086"
      protocol: tcp
    restart: always
    volumes:
    - type: bind
      source: /home/dockerizer/apps/addy.io/examples/compose/data
      target: /data
      bind:
        create_host_path: true
    - type: bind
      source: /home/dockerizer/utils/yaac/certs
      target: /certs
      bind:
        create_host_path: true
  db:
    command:
    - mysqld
    - --character-set-server=utf8mb4
    - --collation-server=utf8mb4_unicode_ci
    container_name: addy_db
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
      MYSQL_DATABASE: addy
      MYSQL_PASSWORD: addy
      MYSQL_USER: addy
    image: mariadb:10.5
    networks:
      default: null
    restart: always
    volumes:
    - type: bind
      source: /home/dockerizer/apps/addy.io/examples/compose/db
      target: /var/lib/mysql
      bind:
        create_host_path: true
  redis:
    container_name: addy_redis
    image: redis:4.0-alpine
    networks:
      default: null
    restart: always
networks:
  default:
    name: addy_default

Logs

not applicable

Additional info

No response

working-name commented 10 months ago

By the way, this bug applies to your live service too. It fails to strip that, although your FAQ states it.

willbrowningme commented 10 months ago

The regular expression that is used to remove the banner is here - https://github.com/anonaddy/anonaddy/blob/master/app/Mail/ReplyToEmail.php#L226-L238

If an email client (or user) is modifying the banner text then this can cause the regex not to match it any longer. Unfortunately I do not know of a perfect "fool-proof" method of always matching the banner even when it has been altered.

The deactivate alias link can only be used when you are logged in to your account.

As you've mentioned the banner can also be turned off in your account settings.