Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe db fields #359

Merged
merged 3 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,52 @@ For speedier DNS resolving there are two options. First (the default) is to cach
}
```

## Database fields

### Queue collection

By default is called as `zone-queue`.

Queue entries. Each recipient has a separate queue entry.

- `id`: email queue ID
- `seq`: incrementing recipient counter
- `domain`: target domain
- `sendingZone`: assigned [sending zone](https://github.com/zone-eu/zone-mta/tree/master#sending-zone) for this delivery
- `assigned`: Zone-MTA instance ID that is processing this message. "no" means unassigned.
- `recipient`: target email address
- `locked`: if `true`, then the message is currently processed for delivery
- `lockTime`: when message processing started
- `queued`: The message will not be processed for delivery until this time
- `created`: the time the queue entry was added

### Content storage collection

By default is called as `mail.files`.

[GridFS](https://www.mongodb.com/docs/manual/core/gridfs/) database. Each email has a single entry in mail.files, and 1...N entries in mailqueue collection.

- `_id`, `length`, `chunkSize`, `uploadDate`, `filename`, and `contentType` are GridFS-specific values
- `metadata`: contains email information
- `created`: when the email was added to the queue
- `data`:
- `id`: email queue ID
- `from`: email sender address
- `to`: list of all recipients from to/cc/bcc fields
- `interface`: Which component added this email to the queue
- `transtype`: How was the email added to the queue (SMTP or API)
- `time`: same as `metadata.created` but milliseconds timestamp
- `dkim`: DKIM signing info
- `userId`: WildDuck user ID of the sender
- `user`: Authentication username
- `reason`: why the message was added to the queue (user submit, autoreply, forward)
- `origin`: IP address of the sender
- `headers`: all email headers in correct order
- `parsedHeaders`: structured headers for easier usage
- `messageId`: Message-ID value of the email
- `date`: Date header of the message. If the email is scheduled to be sent in the future, then this header should be the actual delivery time. It is not the time the email was added to the queue.
- `bodySize`: email byte size without headers

## License

European Union Public License 1.2 ([details](http://ec.europa.eu/idabc/eupl.html)) or later
Expand Down
25 changes: 17 additions & 8 deletions config/bounces.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
# 550 5.7.1 Unfortunately, messages from [1.2.3.4] weren't sent. Please contact your Internet service provider since part of their network is on our block list (S3150). You can also refer
^550[ \-]5\.7\.\d+.*block list,defer,blacklist,Sender IP blocked

^550[ \-]5\.4\.1.*Recipient address rejected: Access denied.* \[.*\.prod\.protection\.outlook\.com,reject,recipient,Unknown user
^550[ \-]5\.4\.1.*Recipient address rejected: Access denied.* \[.*\.prod\.(protection\.)?outlook\.com,reject,recipient,Unknown user

# 550 5.7.606 Access denied, banned sending IP [1.2.3.4]. To request removal from this list please visit https://sender.office.com/ and follow the directions. For more information please go to http://go.microsoft.com/fwlink/?LinkID=526655 (AS16012609) [DB5EUR01FT031.eop-EUR01.prod.protection.outlook.com]
# 550 5.7.511 Access denied, banned sender[1.2.3.4]. To request removal from this list please forward this message to [email protected]. For more information please go to http://go.microsoft.com/fwlink/?LinkId=526653. AS(508) [AM5EUR02FT019.eop-EUR02.prod.protection.outlook.com]
Expand Down Expand Up @@ -488,20 +488,14 @@ IPTS04,defer,spam,temporarily deferred due to user complaints
^\d{3}[ \-]+5\.2\.1\b,reject,capacity,Mailbox Is Not Accepting New Messages
^\d{3}[ \-]+5\.2\.2\b,reject,capacity,Mailbox Is Full
^\d{3}[ \-]+5\.2\.3\b,reject,message,Message Is Too Long
^\d{3}[ \-]+5\.2\.4\b,defer,recipient,Mailbox Has A Mailing List System Issue
^\d{3}[ \-]+5\.3\.0\b,reject,recipient,Unknown Issue With The Receiving System
^\d{3}[ \-]+5\.3\.1\b,reject,capacity,Email System Is Full
^\d{3}[ \-]+5\.3\.2\b,defer,recipient,Receiving Email System Not Operable
^\d{3}[ \-]+5\.3\.3\b,reject,message,Message Features Not Supported
^\d{3}[ \-]+5\.3\.4\b,reject,message,Message Is Too Large
^\d{3}[ \-]+5\.3\.5\b,reject,config,Incorrect Configuration Of System
^\d{3}[ \-]+5\.3\.6\b,reject,message,Message Priority Issue
^\d{3}[ \-]+5\.4\.0\b,reject,network,Unknown Issue With Network Connection
^\d{3}[ \-]+5\.4\.1\b,defer,network,Network Is Busy
^\d{3}[ \-]+5\.4\.2\b,defer,network,Network Connection Timed Out
^\d{3}[ \-]+5\.4\.3\b,defer,network,Network Issue With The Receiving System
^\d{3}[ \-]+5\.4\.4\b,reject,network,Email Routing Issue Due To Network
^\d{3}[ \-]+5\.4\.5\b,defer,network,Overloaded Network
^\d{3}[ \-]+5\.4\.6\b,reject,network,Network Issue Caused A Mail Loop
^\d{3}[ \-]+5\.4\.7\b,reject,network,Message Expired Before Delivery Completed
^\d{3}[ \-]+5\.5\.0\b,reject,config,Unknown Issue With Your Email Server
Expand All @@ -513,7 +507,6 @@ IPTS04,defer,spam,temporarily deferred due to user complaints
^\d{3}[ \-]+5\.5\.6\b,reject,protocol,Messaging Command In Transmission Too Long
^\d{3}[ \-]+5\.6\.0\b,reject,message,Unknown Issue With The Message Content
^\d{3}[ \-]+5\.6\.1\b,reject,message,Message Content Or Attachment Not Supported
^\d{3}[ \-]+5\.6\.10\b,defer,protocol,Email Servers Are Not Responding Appropriately
^\d{3}[ \-]+5\.6\.2\b,reject,message,Message Content Not Accepted By Recipient Server
^\d{3}[ \-]+5\.6\.3\b,reject,message,Message Content Could Not Be Processed For Delivery
^\d{3}[ \-]+5\.6\.4\b,reject,network,Content Loss During Delivery
Expand All @@ -540,6 +533,22 @@ IPTS04,defer,spam,temporarily deferred due to user complaints
^\d{3}[ \-]+5\.7\.15\b,reject,message,Message Priority Level Too Low
^\d{3}[ \-]+5\.7\.16\b,reject,message,Message Too Large For Given Priority Level

^4\d{2}[ \-]+5\.2\.4\b,defer,recipient,Mailbox Has A Mailing List System Issue
^4\d{2}[ \-]+5\.3\.2\b,defer,recipient,Receiving Email System Not Operable
^4\d{2}[ \-]+5\.4\.1\b,defer,network,Network Is Busy
^4\d{2}[ \-]+5\.4\.2\b,defer,network,Network Connection Timed Out
^4\d{2}[ \-]+5\.4\.3\b,defer,network,Network Issue With The Receiving System
^4\d{2}[ \-]+5\.4\.5\b,defer,network,Overloaded Network
^4\d{2}[ \-]+5\.6\.10\b,defer,protocol,Email Servers Are Not Responding Appropriately

^5\d{2}[ \-]+5\.2\.4\b,reject,recipient,Mailbox Has A Mailing List System Issue
^5\d{2}[ \-]+5\.3\.2\b,reject,recipient,Receiving Email System Not Operable
^5\d{2}[ \-]+5\.4\.1\b,reject,network,Network Is Busy
^5\d{2}[ \-]+5\.4\.2\b,reject,network,Network Connection Timed Out
^5\d{2}[ \-]+5\.4\.3\b,reject,network,Network Issue With The Receiving System
^5\d{2}[ \-]+5\.4\.5\b,reject,network,Overloaded Network
^5\d{2}[ \-]+5\.6\.10\b,reject,protocol,Email Servers Are Not Responding Appropriately

# General errors
^450\b,defer,other,Mailbox unavailable
^451\b,defer,other,Local error in processing
Expand Down
Loading