zone-eu / zone-mta Goto Github PK
View Code? Open in Web Editor NEW📤 Modern outbound MTA cross platform and extendable server application
License: European Union Public License 1.2
📤 Modern outbound MTA cross platform and extendable server application
License: European Union Public License 1.2
see topic
best regards,
Hi,
is there any command to restart after making configuration changes in default.js?
thanks
info Sender/default/30766 158e0fdcc80000ab4b.001 REJECTED[rate] from=xxxx@xxxxx[[email protected]] to=[email protected] mx=mx1.hotmail.com (421 RP-001 (SNT004-MC1F11) Unfortunately, some messages from xxxxxxxxx weren't sent. Please try again. We have limits for how many messages can be sent per hour and per day. You can also refer to http://mail.live.com/mail/troubleshooting.aspx#errors.)
/opt/zone-mta/lib/sender.js:716
if (/^mailer-daemon@/i.test(delivery.parsedEnvelope.from)) {
^
TypeError: Cannot read property 'from' of undefined
at Sender.sendBounceMessage (/opt/zone-mta/lib/sender.js:716:61)
at Immediate.setImmediate (/opt/zone-mta/lib/sender.js:301:45)
at runCallback (timers.js:574:20)
at tryOnImmediate (timers.js:554:5)
at processImmediate [as _immediateCallback] (timers.js:533:5)
ERR! Child/default/30766 Sender process a165af73786ed652063a for default exited with 1
Hello Sir,
I just successfully create services with wild duck, i have setup as per you give install script and same successes.
well i just wanted to integrate it my production lavel server like i have server with 1000 IP and 100 domains so can i able to configure the server with multiple IPs and multiple domains ?
For example i have 100 domain and 1000 IPs on the server so i wanted to assign 10 IP per domain with IP rotation and each domain with own email header ?
Is that Possible ...
Can i rotate IPs ?
if yes then where is detailed documentation ?
if not then please guide me to getting start ...
Thank You.
Hello,
is it normal that Zone-MTA keeps sending messages with an address-pool, that have all its IP-addresses blacklisted for a specific domain? If yes, does that mean i've to add these blacklisted domains manually to the suppression list to stop the transfer to them completely?
Thanks for help!
Hi ,
How should i know my zonemta is working or not ?.
How can i send a test mail through zone-mta ?
please tell me anyone??????
Would be good to have a way to reload the zones / pools configuration without restarting the server.
I have configured dkim (loads up, and have tested /get-config with a POST - all ok).
Line 941 in f80970c
console.log(delivery.dkim) ....
{ hashAlgo: 'sha256',
debug: null,
bodyHash: '8v/UdiUSlasCEmy3pq2egp6iEbNqzWb5mTQUQgBfRy4=' }
At this point, it can calculate the hash, but there is no delivery.dkim.keys - so it won't add the header.
Did I do something wrong in the configuration? It's all enabled as far as I can tell.
Currently all bounces are assigned here and pooled in counts (using zmta). Would like to have separate bounce queues per zone so that I can see the bounces separately per zone.
'core/email-bounce': {
enabled: 'main',
// From: address for the bounce emails
// EXAMPLE
zone1: {
mailerDaemon: {
name: 'Mail Delivery Subsystem',
address: 'mailer-daemon@[HOSTNAME]'
},
sendingZone: 'zone1-bounces'
},
zone2: {
mailerDaemon: {
name: 'Mail Delivery Subsystem',
address: 'mailer-daemon@[HOSTNAME]'
},
sendingZone: 'zone2-bounces'
},
....
},
I went through the documentation, i dont see an option where zonemta can push Delivery status updates into some queue ( Redis queue), so that the transaction can be updated into a database.
There seems to be an API for pulling the info, but is there a way to push the info from Zonemta to any queueing database.
Hi Folks,
I'm running ZoneMTA (using docker-compose) locally on my machine in order to test some configurations. In order to prevent ZoneMTA to actually send any message I'm trying to configure the default zone to forward all messages to a second MTA which is actually a mailhog linked container listening on port 1025.
For that I'm using this config/zones/default.toml
is:
[default]
preferIPv6=false
ignoreIPv6=true
processes=1
connections=5
host="mailhog"
port=1025
pool="default"
logger=true
logLevel="silly"
An in order to test this setup I'm trying to send a message to an invalid MX domain (hotmail.com.br) but instead of passing the message to my local mailhog ZoneMTA is trying to deliver the message to the actual IP of hotmail.com.br on the 1025 port as per the following docker log.
zonemta_1 | info Sender/default/22[1] Created sender instance
zonemta_1 | verb Queue 1618c997996000aec9.001 SHIFTED (key="lock 1618c997996000aec9 001" zone="default")
zonemta_1 | verb Sender/default/22[1] 1618c997996000aec9.001 FETCHED for delivery ([email protected] [email protected])
zonemta_1 | info Sender/default/22[1] 1618c997996000aec9.001 CONNECTING domain=hotmail.com.br port=1025
zonemta_1 | info Sender/default/22[2] Created sender instance
zonemta_1 | info Sender/default/22[3] Created sender instance
What am I doing wrong? How should I configure my default pool to deliver all messages to mailhog?
Thanks in advance,
Eric.
Hi!
This might be related to #91 perhaps.
I just configured Mailtrain to use ZoneMTA hosted on the same server. Works fine. But as soon as I enabled DKIM (API key, DKIM key, etc...), my mails got stuck in the default queue of ZoneMTA.
The logs tell me: TypeError: delivery.dkim.keys.push is not a function
at .../plugins/core/dkim.js:24
.
And indeed, delivery.dkim.keys
doesn't hold an Array at that point, but an object. By the way, a simple console.log
debug statement tells me that that object at that point already holds my domain, selector and private key, so I'm not sure why the code seems to want to push them in there again?
We currently have a custom solution that users Haraka and Nodemailer.
I am wondering if this new project can fit better @andris9
These are the basic requirements:
Thank you so much Andris!!
hello i want to configure zonemta for my vest panel iam building hosting for my classmates and wanna use zone mta has mta in vesta panel but how can i use it in that and want to configure it so that my friends can connect to its smtp from out of localhost
There is probably some kind of a race condition where events are not passed on properly in the stream, so when trying to rewrite large attachments, the stream sometimes stalls and does not continue. Not every time but sometimes
I am very new to zonemta, had a basic question, Is it possible to create a Transactional Email service (api and SMTP) like mailgun.com, sendgrid.com with zonemta
And, if possible, What needs to know? I think I can make the API with PHP and handle API, But I do not have any idea to build SMTP accounting and authentication, For example, build and monitor an SMTP account (bounce, deliver ...)
Thanks!
The queue counter mongo query does every time a full index scan because it uses: $ne
operator.
query: { sendingZone: { $ne: false }, queued: { $lte: new Date(1517931968511) } }
Can we improve this ?
Is it possible to configure a static smtp credential for each feeder interfaces by proving a user and pass in the Interfaces/feeder config instead of using external auth?
Tried the below in config/interfaces/feeder.toml, but any user/ pass is getting successful authenticated
smtpInterfaces:
{ feeder:
{ ...
authentication: true,
user: 'XXXX',
pass: 'XXXX',
Please clarify.
Would be good to have an option to disable same ip retry for a message.
Maybe adding a multi zone-mta connected as master/slaves
Would be useful in case you want use Multiple MX to send a large number of emails
Hi!
I'd like to create a plugin to know if a message queued was delivered without errors (like Amazon SNS for Amazon SES).
I can replicate almost everything from the http-bounce plugin (I mean for sending a notification via http), but i don't know if exists a hook that manage the message after the send. It exists?
There is any other way to make this? Eg: make an api call for searching the message by a custom header?
Thanks
I want ZMTA's senders to connect over ipv6. Are my configs correct ? What is ignoreIPv6 used for ? The mails are not going over ipv6.
"pools": {
"default": [{
"address": "MYIPV6ADDRESS",
"name": "MYSENDINGDOMAIN"
}]
},
"zones": {
"default": {
"processes": 1,
"preferIPv6" : true,
"ignoreIPv6" : false,
"connections": 1,
"throttling": "1 messages/minute",
"pool": "default"
},
verb HTTP /metrics
verb HTTP /metrics
info SMTP/feeder/2035 Connection from [IPOFMYMAINSERVER]:52906
info Queue/2035 15c2bec4016000a5c6 QUEUED (message-id=<f2a3fb479ba4ceef9055e4167fadf533@MYSENDINGDOMAIN> from=newsletter@MYSENDINGDOMAIN [email protected] source=IPOFMYMAINSERVER subject="Your Shipment Is On The Way" body=7616 md5=5035cd035db7)
verb Queue 15c2bec4016000a5c6.001 SHIFTED (key="lock 15c2bec4016000a5c6 001" zone="default")
verb Sender/default/2036 15c2bec4016000a5c6.001 FETCHED for delivery (from=newsletter@MYSENDINGDOMAIN [email protected])
info Sender/default/2036 15c2bec4016000a5c6.001 CONNECTING domain=mail-tester.com port=25
info Sender/default/2036 15c2bec4016000a5c6.001 CONNECTED domain=mail-tester.com mx=mail-tester.com[94.23.206.89]
verb Sender/default/2036 15c2bec4016000a5c6.001 INITIALIZING [B29LQuE6y0] (mx=94.23.206.89 mta=0.0.0.0)
verb Sender/default/2036 15c2bec4016000a5c6.001 INITIALIZED [B29LQuE6y0] (mx=94.23.206.89 mta=0.0.0.0)
verb Sender/default/2036 15c2bec4016000a5c6.001 [B29LQuE6y0] CONNECTED mx=mail-tester.com[94.23.206.89]
verb Sender/default/2036 15c2bec4016000a5c6.001 SENDING [B29LQuE6y0] (from=newsletter@MYSENDINGDOMAIN [email protected] size=9143)
info Sender/default/2036 15c2bec4016000a5c6.001 ACCEPTED from=newsletter@MYSENDINGDOMAIN[newsletter@MYSENDINGDOMAIN] [email protected] mx=mail-tester.com body=7616 md5=5035cd035db7[MD5_OK] (250 2.0.0 Ok: queued as 5ED1E9F7B3)
info Sender/default/2036 15c2bec4016000a5c6.001 SMTPCLOSE [B29LQuE6y0] Connection closed response="250 2.0.0 Ok: queued as 5ED1E9F7B3"
verb Queue Deleting unreferenced message 15c2bec4016000a5c6
verb Queue 15c2bec4016000a5c6 REMOVE
verb HTTP /metrics
verb HTTP /metrics
verb HTTP /metrics
verb HTTP /metrics
Just started exploring zone-mta .
Can this be integrated with email list management tool like interspire , mailwizz ?
thanks
I haven't been able to single out the cause yet, but when I use both text and html, the body hash is incorrect. I've attached two emails from my system that show the dkim pass/failure notice in the header. Has the hashing been tested for multipart messages?
Firstly.. cool project! Thanks!
I tried doing a post to /send of the json, but there's an instantiation bug for MailComposer. Tried doing it with the raw method and that worked fine.
{"code":"InternalError","message":"Class constructor MailComposer cannot be invoked without 'new'"}
Any chance for a quick patch? Looks like it needs to do a new, call compile() and return the envelope.
My system adds this header -
Received: from HOSTNAME [IPADDRESS] by zmtaserver-ip1 (ZMTAServer1) with ESMTP id 15c2209bb7c0003d52.001 for ; Fri, 19 May 2017 18:48:02 +0000
I need to remove the main/list management server's IP address and hostname. I tried editing the /usr/lib/node_modules/zone-mta/lib/sending-zone.js file
// from ehlokeyword
//'from' + (delivery.transhost ? ' ' + delivery.transhost : '') +
// [1.2.3.4]
//' ' + origin +
//(originhost ? '\r\n' : '') +
If user starting the server has no privileges to set uid or gid to defined in configuration, it is reported on "info" log level (isn't it a bit more important fact?) and does not halt starting the application.
It may result in running service from root
user, if starting from Sysvinit with wrong configuration.
Hello!
For example, i have RethinkDB/Mongo/*SQL with list of addresses i want to deliver messages to.
How can i write plugin for your module, that
I mean, how it is possible to write one more way to queue emails for your system, not POST hooks and not SMTP servers?
Can you provide any advices for it?
Thanks in advance
When sending email to an unavailable host (eg. firewall is blocking outbound connection) following error occurs:
info Feeder RECEIVED 1572028b61b000a5f3 (From: lenwe@localhost; To: [email protected])
info Sender/default/16398 Failed to connect to aspmx2.googlemail.com[64.233.189.27] for lenwe.net from default (edziu[0.0.0.0])
buffer.js:186
throw new TypeError('"encoding" must be a valid string encoding');
^
TypeError: "encoding" must be a valid string encoding
at fromString (buffer.js:186:11)
at Function.Buffer.from (buffer.js:94:12)
at getConnection (/home/jkramarz/zone-mta/lib/sender.js:150:48)
at tryConnectMX (/home/jkramarz/zone-mta/lib/sender.js:349:28)
at tryConnectIP (/home/jkramarz/zone-mta/lib/sender.js:365:36)
at SMTPConnection.connection.once.err (/home/jkramarz/zone-mta/lib/sender.js:419:40)
at SMTPConnection.g (events.js:286:16)
at emitOne (events.js:96:13)
at SMTPConnection.emit (events.js:188:7)
at SMTPConnection._onError (/home/jkramarz/zone-mta/node_modules/smtp-connection/lib/smtp-connection.js:518:10)
ERR! Child/default/16398 Sender process 0c30d0ee9771b84da546 for default exited with 1
Hi,
How can I increase rate limit to deliver messages to email addresses. Actually Its failing for one of the address, Not able to send and its giving these errors :-->
450-4.2.1 450-4.2.1 The user you are trying to contact is receiving mail at a rate that
450-prevents additional messages from being delivered. Please resend your
450-message at a later time. If the user is able to receive mail at that
How can change this limit so that i can send more messages without getting these errors.
Please Reply.
Thanks
Multiple dkim headers nowadays id a must. See Google Feedback-Id. Plugin required ?
It seems to be implementing a bit of RFC 6530 to allow internationalization of email addresses (unicode), but unfortunately it renders RCPT TO parsing invalid:
rcpt to: <"much.more unusual"@example.com>
are rejected with 501 Error: Bad recipient address syntax
)rcpt to: <δοκιμή@παράδειγμα.δοκιμή>
rejected with 553 The recipient address <δοκιμή@παράδειγμα.δοκιμή> is not a valid RFC-5321 address.
,onRcptTo
expects only one @
character in email address.In feeder-server.js:116
MX lookup for rcpt is being performed. Receiving SERVFAIL from DNS message should be deferred rather than rejected: it's probably not sender's fault. If it's persistent fault, I'd expect a standard bounce.
Just start try to install ZoneMTA but stuck at start when i run command $ npm start
i waited since last 2 hrs but nothing happened , its sucked at -
verb Plugins Initialized Default headers from <node_modules/zone-mta/plugins/core/default-headers> [load time 3ms]
verb Plugins Initialized DKIM signer from <node_modules/zone-mta/plugins/core/dkim> [load time 1ms]
verb Plugins Initialized Loop Breaker from <node_modules/zonemta-loop-breaker> [load time 1ms]
info Sender/bounces/2120 3 plugins loaded
info Sender/bounces/2120[1] Created sender instance
info Sender/default/2119[1] Created sender instance
info Sender/default/2119[2] Created sender instance
info Sender/default/2119[3] Created sender instance
info Sender/default/2119[4] Created sender instance
info Sender/bounces/2120[2] Created sender instance
info Sender/default/2119[5] Created sender instance
seems script stopped or something els !!
Building Wildduck yesterday, the docker image had a missing OS dependancy on build from the optional npm dependancies. As a result the docker port binding from host to container or proxy to container would not work. I am experiencing the same issue here however see no errors with the missing dependancy. Currently only testing the api port using the default 8080.
`FROM node:8.2.1-alpine
RUN apk update && apk upgrade &&
apk add --no-cache bash curl
WORKDIR /usr/src/app
RUN mkdir config
COPY package.json ./
RUN npm install -g --no-optional zone-mta
RUN zone-mta create /usr/src/app
CMD ["zone-mta", "run","-d","./data","-c","config.json"]`
`version: '3.3'
services:
wildduck:
image: houlagins/wildduck:test
ports:
- "993:993"
- "995:995"
networks:
- frontend
- backend
environment:
CONFIG: /wildduck.toml
configs:
- wildduck.toml
deploy:
mode: global
labels:
- "traefik.enable=true"
- "traefik.port=80"
- "traefik.docker.network=frontend"
- "traefik.backend=wildduck"
- "traefik.frontend.rule=Host:wildduck.localhost"
resources:
limits:
memory: 500M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
update_config:
parallelism: 1
delay: 5s
zonemta:
image: houlagins/zonemta:test
ports:
- "2525:2525"
- "8081:8081"
networks:
- frontend
- backend
configs:
- source: zonemta.json
target: /usr/src/app/data/config.json
deploy:
mode: global
labels:
- "traefik.enable=true"
- "traefik.port=8080"
- "traefik.docker.network=frontend"
- "traefik.backend=zonemta"
- "traefik.frontend.rule=Host:zonemta.localhost"
resources:
limits:
memory: 500M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
update_config:
parallelism: 1
delay: 5s
configs:
wildduck.toml:
external: true
zonemta.json:
external: true
networks:
backend:
external: true
frontend:
external: true`
Wildduck dockerfile:
`FROM node:8.2.1-alpine
RUN apk update && apk upgrade &&
apk add --no-cache bash curl
WORKDIR /usr/src/app
RUN mkdir config
COPY package.json ./
RUN npm install -q --no-optional --production
COPY . ./
CMD ["sh", "entrypoint.sh"]`
//entry point looks for config or not then runs
Curl localhost:2525 and Curl localhost:8080 work from with container however the binding to host or proxy via the docker networking seems to be failing. Again the same problem yesterday was resulting from missing OS dependancies make, g++ ect. I cannot seem to find the missing deps here.
Thank You,
The code is getting the key, headers and selector.
It is still not signing.
Is this still being maintained? See a lot of "fixes" in forks but never merged.
What is the retry policy for a message if it gets deferred ? Can it be tweaked ?
Hi,
Any idea to run zonemta permanent with forever command?
or is there any other way to keep it running once terminal closed?
thanks
Would you be interested in converting this project to TypeScript?
Hello!
I am new to Zone MTA. After finding no reference to replacing /usr/sbin/sendmail
:
Are there plans to have a CLI command that would act like a shim for sendmail?
Is action slowdown from bounces.txt implemented ? What does it do ?
Is it possible to add a module to set the same IP pair for the sender and recipient?
With a option to set the IPV6 as first option to try to send over it if the host has a IPV6. And/Or a option to disable IPV6 completely.
hello i wanna setup zonemta to connect from external ips with authentication like another smtp how can i do that please guide and iam very new to zonemta setup
dkim-relaxed-body.js
If the message is not a multipart mime it creates the body hash correctly.
If it is multipart the body hash is not generating correctly and is failing DKIM checks
This is great app.
It is most complete open source MTA which has enterprise level of features.
You can consider some core features for future release:
Automatic discard email based non-mx record
Discard bad emails from auto retry(hard bounce and add into suppression list).
Suppression list at MTA level (list of bad email ids which would not receive any future emails)
Retain Logs i.e. Delivered, Bounces etc. in Mongodb for further export.
Thanks
Hello,
We tried to secure the access to xxx.xxx.xxx.xxx/send, using config.json :
{
"api" : {
"user" : "USER",
"pass" : "PASS"
},
"smtpInterfaces" : {
"feeder" : {
"authentication" : true
}
},
"plugins": {
"core/default-headers": {
"enabled": ["sender"]
},
"core/http-auth": {
"enabled": true,
"url" : "http://xxx.xxx.xxx.xxx:PORT/send"
}
}
}
How to secure API access ?
Regards
I have ZoneMTA installed on an Ubuntu server running Mailtrain. I'd like to receive incoming SMTP mail. For example, I'd like email sent to [email protected] to go to my work email address. Normally I'd set this up in /etc/aliases. I'd also like cron to be able to send mail to my work email (via MAILTO=).
The ZoneMTA service configuration explicitly conflicts with postfix (and sendmail and exim):
Conflicts=sendmail.service exim.service postfix.service
Can ZoneMTA be configured to meet the requirements in the first paragraph? If not, what's the Right Way to achieve them? Thanks!
Hi,
I made changes in default.js and then I stop and start npm.
but the same does not reflect.
Do i need to compile the app with certain command? and start. I guess I missing some step.
thanks
Yahoo wants max 20 messages per connection. Can this be set in config or a plugin is required ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.