1

I am trying to enable antispam plugin for dovecot, but then dovecot stops working:

Jun  4 19:31:25 newmail dovecot: imap-login: Login: user=<tomasz_grobelny>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=30714, secured, session=<eNurOLYXuQB/AAAB>
Jun  4 19:31:25 newmail dovecot: imap(tomasz_grobelny): Fatal: master: service(imap): child 30714 returned error 3

How do I track down why "child returned error 3"? Any chance for more verbose logs or being able to attach debugger? Obviously without the antispam plugin everything works just fine.

3

It may be too late to answer but I bumped into the same problem just now.

You posted your problem here so I assume that you might have ran Dovecot on Ubuntu. The problem is that pipe instead of mailtrain should be used for backend under Debian.

plugin {
  #setting_name = value
  antispam_backend = pipe
  antispam_mail_spam = --spam
  antispam_mail_notspam = --ham
  antispam_mail_sendmail = /usr/bin/sa-learn-pipe.sh
  antispam_spam = Junk
  antispam_trash = Trash
}

What's more, if you were following the tutorial from http://wiki2.dovecot.org/Plugins/Antispam , the pipe script there lacks several link breaks. So it should be:

#!/bin/bash

echo /usr/bin/sa-learn $* /tmp/sendmail-msg-$$.txt
echo "$$-start ($*)" >> /tmp/sa-learn-pipe.log

#echo $* > /tmp/sendmail-parms.txt
cat<&0 >> /tmp/sendmail-msg-$$.txt

/usr/bin/sa-learn $* /tmp/sendmail-msg-$$.txt && rm -f /tmp/sendmail-msg-$$.txt &

echo "$$-end" >> /tmp/sa-learn-pipe.log

exit 0
1
  • I signed up on askubuntu just to upvote for this answer which is the correct one, you pulled me out of 3 hours of inefficient tryouts, source analysis an researches. Thanks a lot !
    – Antwan
    Mar 7 '16 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.