logo
down
shadow

Too many bad command: outbound emails with Haraka


Too many bad command: outbound emails with Haraka

By : user2948686
Date : November 15 2020, 06:54 AM
Hope that helps My solution is next:
Edit file max_unrecognized_commands - put biggest number than default (for example 20) and run swaks with following arguments:
code :


Share : facebook icon twitter icon
Grails: How to buffer outbound emails when SMTP server is temporarely down?

Grails: How to buffer outbound emails when SMTP server is temporarely down?


By : muthuraj
Date : March 29 2020, 07:55 AM
this one helps. OK, it wasn't that hard, after all. Easy steps first:
Step one: prepare database table to store pending email records:
code :
class PendingEmail {
    Date sentAt = new Date()
    String fileName

    static constraints = {
        sentAt nullable: false
        fileName nullable: false, blank:false
    }
}
import javax.mail.internet.MimeMessage

class BackgroundEmailSenderJob {

    def concurrent = false
    def mailSender

    static triggers = {
        simple startDelay:15000l, repeatInterval: 30000l, name: "Background Email Sender"
    }

    def execute(context){
        log.debug("sending pending emails via ${mailSender}")

        // 100 at a time only
        PendingEmail.list(max:100,sort:"sentAt",order:"asc").each { pe ->

            // FIXME: do in transaction
            try {
                log.info("email ${pe.id} is to be sent")

                // try to send
                MimeMessage mm = mailSender.createMimeMessage(new FileInputStream(pe.fileName))
                mailSender.send(mm)

                // delete message
                log.info("email ${pe.id} has been sent, deleting the record")
                pe.delete(flush:true)

                // delete file too
                new File(pe.fileName).delete();
            } catch( Exception ex ) {
                log.error(ex);
            }
        }
    }
}
import java.io.File;

import org.springframework.mail.MailMessage
import org.springframework.mail.javamail.MimeMailMessage

class MyMailService {
    def mmbf

    MailMessage sendMail(Closure callable) {
        log.info("sending mail using ${mmbf}")

        if (isDisabled()) {
            log.warn("No mail is going to be sent; mailing disabled")
            return
        } 

        def messageBuilder = mmbf.createBuilder(mailConfig)
        callable.delegate = messageBuilder
        callable.resolveStrategy = Closure.DELEGATE_FIRST
        callable.call()
        def m = messageBuilder.finishMessage()

        if( m instanceof MimeMailMessage ) {
            def fil = File.createTempFile("mail", ".mime")
            log.debug("writing content to ${fil.name}")
            m.mimeMessage.writeTo(new FileOutputStream(fil))

            def pe = new PendingEmail(fileName: fil.absolutePath)
            assert pe.save(flush:true)
            log.debug("message saved for sending later: id ${pe.id}")
        } else {
            throw new IllegalArgumentException("expected MIME")
        }
    }

    def getMailConfig() {
        org.codehaus.groovy.grails.commons.ConfigurationHolder.config.grails.mail
    }

    boolean isDisabled() {
        mailConfig.disabled
    }
}
beans = {
    mailService(MyMailService) {
        mmbf = ref("mailMessageBuilderFactory")
    }
}
Haraka not authorizing my authentication

Haraka not authorizing my authentication


By : mutexInterrupt
Date : March 29 2020, 07:55 AM
will be helpful for those in need First thing you want to try is to use -tls when invoking swaks. In the server logs I see that it advertises STARTTLS (and does not advertise AUTH) but the client immediately quits rather than negotiating TLS. If there is a real problem, this is hiding it from you.
How to parse email on Haraka?

How to parse email on Haraka?


By : user3008430
Date : March 29 2020, 07:55 AM
Any of those help Ive been exploring the haraka (http://haraka.github.io ) and Ive successfully install it on my linux machine. I'm wondering if there is a good tutorial on parsing an email meta headers and content body using haraka. Ive check on their manual but I couldnt find it. Any ideas/suggestions on how to do that would greatly appreciated. . , You can retrieve email body using below code
code :
connection.transaction.body.body_text_encoded
connection.transaction.body.bodytext
Using a node js module in order to read emails from Haraka SMTP server

Using a node js module in order to read emails from Haraka SMTP server


By : Norly
Date : November 04 2020, 04:00 PM
help you fix your problem Mailin looks as a quite usable option.
How to add a comma to a Mailgun from field for outbound emails?

How to add a comma to a Mailgun from field for outbound emails?


By : Tasneem
Date : March 29 2020, 07:55 AM
Does that help Wrap the name portion of the address in double quotes, like this:
from: '"Excited, User" ',
Related Posts Related Posts :
  • Serving multiple node apps with nginx on same domain
  • Waiting for user to enter input in Node.js
  • How to get instant changes in background from private api in mobile app?
  • Grunt.js: Fire livereload as soon a files are modified, before task completes
  • How to remove port number from appear in the url for node js application?
  • How to ignore libraries in browserify programmatic api
  • Node/Express/Jade style guides?
  • how do I return data from a node.js request call? (undefined is not a function)
  • res.sendfile() doesn't serve javascripts well
  • File path completion relative to the current file directory
  • Tuning node-mongodb-native connection pool size
  • Express Socket.io example server not working
  • node js can't install right on my Ubuntu computer
  • How can i do an "or" query in a Model.find on Sails?
  • Confused in starting a project in node.js with npm install
  • unit testing express route with async callback
  • Mongoose sum operation in collection
  • document save function not working in mongoose
  • Why is the zlib inflate function is not working in correct order in node.js?
  • Nested if inside each (Handlebars template in Express app)
  • How does the cookie-session middleware work in expressjs?
  • grunt-processhtml remove not working when specifying a target
  • Error: CERT_HAS_EXPIRED in Node.js request module (macu vs facebook)
  • Async web requests are making 'socket hangup' in node.js
  • ExpressJS: Middleware control flow for Router.param() & Router.use()
  • Glob recursive/zero or more directories, excluding directories
  • node.js v0.11.14 as service with --harmony
  • Running npm install from Sublime Text 2 doesn't work
  • update on a subdoc with mongoose
  • NodeJS Aerospike UDF execute memory leak
  • Alternative to path module that always uses forward-slashes?
  • How do you stream a csv file into a node web app?
  • How to modularize routing with Node.js Express
  • NodeJS - Modularising SQLite3
  • MongoDB / Node: Incorrect Arguments
  • How to use Aggregate in mongoose
  • How to generate multiple reports with mocha?
  • AWS Lambda making video thumbnails
  • MEAN stack on Ubuntu 14.04 suddenly stopped working
  • node.js/express/mongoose noob issue
  • Nodejs ssh convert output byte stream to a sliceable string
  • different behavior of process.argv
  • How to expose the Application model's register method
  • How to install FFMPEG on Node/Meteor server?
  • How Can I Use vhost to Redirect a Sub-Domain to an ExpressJS Route?
  • Gmail API not respecting UTF encoding in subject
  • installing Node modules on Docker: why are they disappearing?
  • How do I set up Node/Express to act as a STUN server?
  • What is the Linear Execution Model in Meteor?
  • connect-redis and express-session results in req.session undefined
  • Application Error Heroku - Problems with Deployment
  • How to pass node v8 args and script args to pm2?
  • Can it be necessary to require a module (child_process in this case) more than once?
  • what does require("child_process") actually do?
  • How can I list all my Amazon EC2 instances using Node.js in AWS Lambda?
  • Passing param to custom middleware
  • How do I debug "Error: spawn ENOENT" on node.js?
  • Proper way to combine route and api auth using loopback.js
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org