bogo + maildrop

foudfou foudil.newbie+bogo at gmail.com
Thu Jun 23 18:34:48 CEST 2016


Hallo Matthias!

Thanks for your kind interest!

> Is the script, or the parts that invoke maildrop, up somewhere on the
> web to see?  How exactly have you been executing maildrop without a
> shell, and then again with a shell?

Here's the part where the maildrop process is executed:

https://github.com/foudfou/imapfetch/blob/master/index.js#L56

and the corresponding nodejs documentation:

https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options

Here is how to call maildrop through a shell:

diff --git a/index.js b/index.js
index 65f34ab..1762f72 100755
--- a/index.js
+++ b/index.js
@@ -55,7 +55,7 @@ function fetchMessages(criteria) {
       console.info('Downloaded message #%d', seqno);
       msg.on('body', function(stream, info) {
         var mda = child.spawn(config.mda.cmd, config.mda.args,
-                              {stdio: ['pipe', 1, 2]});
+                              {stdio: ['pipe', 1, 2], shell: true});
         mda.on('error', function(err) {
           console.error('Failed to start MDA: ' + err);
         });


There is an example of piping streams with node-imap on the README (search for 'pipe') on https://github.com/mscdex/node-imap.
maildrop is used in so called "manual" mode. I don't think from the man that I should use the -m "embedded" mode or the "-d" delivery mode.

Cheers


More information about the bogofilter mailing list