haraka / Haraka

A fast, highly extensible, and event driven SMTP server
https://haraka.github.io
MIT License
5.02k stars 662 forks source link

Mail not being delivered to wildduck #3369

Closed oldcsconcepts closed 3 months ago

oldcsconcepts commented 3 months ago

System Info

Running on Ubuntu with node version Node | v22.1.0

Issue info

I am able to run Haraka and receive emails from Gmail as well as local. I am planning to use Wilduck to save and view emails and users. But while the email is received by the Haraka instance, and the haraka-wildduck-plugin is also added, the email still fails to be saved in mongo db to be delivered to wilduck instance.

Here is my wilduck.yaml config:

## Connect to a master instance or Redis
redis:
    port: 6379
    host: '127.0.0.1'
    db: 3
    password: ""

mongo:
    # connection string for main messages database
    url: 'mongodb+srv://username:password@mymongourl.com/wildduck'
    ## database name or connection string for the users db
    # users: "users"

    ## database name or connection string for the attachments db
    # gridfs: "attachments"

    ## database name or connection string for the outbound queue
    # sender: 'zone-mta'

sender:
    # Push messages to ZoneMTA queue for delivery
    # if `false` then no messages are sent
    enabled: true

    # which ZoneMTA queue to use by default. This mostly affects forwarded messages
    zone: 'default'

    # Collection name for GridFS storage
    gfs: 'mail'

    # Collection name for the queue
    # see [dbs].sender option for choosing correct database to use for ZoneMTA queues
    # by default the main wildduck database is used
    collection: 'zone-queue'

    # Hashing secret for loop detection
    # Must be shared with wildduck
    # If not set then looping is not tracked
    #loopSecret: 'secret value'

srs:
    # must be shared with ZoneMTA SRS config, otherwise messages sent from ZoneMTA are not recognized by Haraka
    secret: 'secret value'

attachments:
    type: 'gridstore'
    bucket: 'attachments'
    decodeBase64: true

limits:
    windowSize: 3600 # 1 hour
    rcptIp: 100 # allowed messages for the same recipient from same IP during window size
    rcptWindowSize: 60 # 1 minute
    rcpt: 60 # allowed messages for the same recipient during window size

gelf:
    enabled: false
    # component: 'mx'
    # options:
    #     graylogPort: 12201
    #     graylogHostname: '127.0.0.1'
    #     connection: 'lan'

rspamd:
    # do not process forwarding addresses for messages with the following spam score
    forwardSkip: 10

    # if a message has one of the tags listed here with positive score, the message will be rejected
    blacklist:
        - DMARC_POLICY_REJECT

    # if a message has one of the tags listed here with positive score, the message will be soft rejected
    softlist:
        - RBL_ZONE

    # define special responses
    responses:
        DMARC_POLICY_REJECT: "Unauthenticated email from {host} is not accepted due to domain's DMARC policy"
        RBL_ZONE: '[{host}] was found from Zone RBL'

auth:
    dns:
        # How many DNS lookups to perform for SPF until considering the validation as failed
        # Probably should be 10 instead
        maxLookups: 50

    # If a public key has fewer bits than required, then DKIM and ARC keys are considered failing by policy
    minBitLength: 1024

# API settings
api:
  # Base URL for WildDuck API
  baseUrl: "http://localhost:8080"

  # API secret for authenticating requests
  secret: "mysecret"

Here is the content of plugin file:

syslog

helo.checks
tls

mail_from.is_resolvable
spf

rcpt_to.in_host_list

headers

dkim_verify

wildduck
msimerson commented 3 months ago

Per the documentation in haraka-plugin-wildduck, you should not have any other delivery plugins enabled. Specifically, you should remove rcpt_to.in_host_list. You should also remove dkim_verify and spf because WildDuck has built-in support for that.