Redis on existing MW install?

emailwrks

Member
Hey,

Just wanted to check whether it was possible to install redis on an existing mailwizz centos vps setup?

Been reading through the forum and I'm fairly unsure.

Thanks!
 
You can do it just fine, i don't see why not.
However, if Redis sounds overly complicated, you might have a look at https://github.com/twisted1919/mdp-go
I have just released the tool to the public a few days ago but it has been used by some other customers by over a year now, so it gets the job done and is easier to use.
 
Great thanks, looks cool

However does this configure just the MW setup for redis? Not actually install redis itself

Also at what stage does this run?

Mw
Redis
Twisted script?

Many thanks
 
The above doesn't run redis at all. What the above does, is to create a linux daemon that you can use with mailwizz for super fast delivery.
Quote from the github page:
How everything works:
When you start this daemon it does two main things:
1. it will start spawning the send-campaigns command from your Mailwizz APP, that is why you need to stop any cron that does this already
2. it will wait for emails to be written in the pickup directory so that it can start sending them using the servers you defined in config.json file
When a send-campaigns command is triggered by this daemon, it will choose a delivery server to send your email campaigns. While the campaign is running, the emails are actually written in the pickup directory instead of sending them directly. Because the daemon watches the pickup directory, when new emails are added, the daemon will pick them and will use the delivery servers you defined in the config.json file to do the actual delivery.
Doing like this we make sure Mailwizz doesn't have to wait for the actual delivery to happen, it's solely purpose is to write the emails in the pickup directory and then it's this daemon job to send them.
 
  1. Redis is an open source (BSD licensed), in-memory data structure store, used as database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries.
    Introduction to Redis – Redis
    redis.io/topics/introduction
 
I am using mdp and configured the config.json for multiple delivery server. But when I am sending mail. it always pick only one delivery server from config.json. Please advise, if any specific setting need to be done to achieve it.
Note: When I am starting my mdp, it sent test mail through all servers.
 
@twisted1919
Inside function pickupDelivery , it is not going inside 2nd for loop(mentioned in below code snnipet) and idx2 values are only [ ]. It go directly to outside for loop code and forced to select id=0.
func pickDeliveryServer() *deliveryServer {
...
..
for idx, server := range config.DeliveryServers {
for idx2, _ := range server.conns { // It seems some issue here
 
Not really no. the code is fine, thing is the second server is used only when all connections from first server are in use, and so on.
 
@twisted1919
I have given try with 78k subscriber with config.json configuration as below
Even after configuring 5 max connection ,I am not able to send through using two servers. :(
Need your help.
"DeliveryServers" : [
{
"Hostname" : "s1xxxxxxxxxxxxxxxx.com",
"Port" : 587,
"Username" : "XXXXXXXXXXXXXXXXXXX.com",
"Password" : "XXXXXXXXXXXXXXXXXXX",
"MaxConnections" : 5,
"MaxConnectionMessages" : 1,
"ConnectionTimeout" : 30,
"SendRetriesCount" : 3,
"TestConnection" : true,
"TestRecipientEmail" : "pxxxxxxxxx@msn.com"
},
{
"Hostname" : "s2xxxxxxxxxxxxxxxx.com",
"Port" : 587,
"Username" : "XXXXXXXXXXXXXXXXXXX.com",
"Password" : "XXXXXXXXXXXXXXXXXXX",
"MaxConnections" : 5,
"MaxConnectionMessages" : 1,
"ConnectionTimeout" : 30,
"SendRetriesCount" : 3,
"TestConnection" : true,
"TestRecipientEmail" : "pxxxxxxxxx@msn.com"
}
]
,

"Mailwizz" : [
{
"PhpCliBinaryPath" : "/usr/bin/php",
"ConsolePath" : "/var/www/html/xyz/apps/console/console.php",
"CommandName" : "send-campaigns",
"Campaigns" : [
{
"Type" : "regular",
"Processes" : 128,
"Limit" : 1,
"Offset" : 0,
"Pause" : 1
},
{
"Type" : "autoresponder",
"Processes" : 1,
"Limit" : 1,
"Offset" : 0,
"Pause" : 2
}
]
}
]
}
 
Try more messages per connection, MaxConnectionMessages: 10 for example
Anyway, you are pretty much on your own with MDP :)
 
@twisted1919 .. No Success. Can I add server.conns[idx].messagesCount as condition "OR" on condition to enter into another server connection ?? Hope that will help me to select server either on reaching maximum connection or reaching to maximum message count.
 
Back
Top