1

Topic: OpenBSD Auto learn spam/ham crontab

- iRedMail version 1.6.8 PGSQL edition
- Deployed with downloadable installer
- OpenBSD 7.3 GENERIC.MP#5 amd64
- Store mail accounts in PGSQL
- Web server Nginx
- Manage mail accounts with iRedAdmin & command line

Please note that in your excellent support documents for auto learn spam/ham crontab:

docs.iredmail.org/dovecot.imapsieve.html#setup-cron-job-to-scan-and-learn-spamham-messages

In the crontab section:

Run command crontab -e -u root to setup cron job for root user, scan emails every 10 minutes:

# iRedMail: Scan reported mails.
*/10   *   *   *   *   /bin/bash /etc/dovecot/sieve/scan_reported_mails.sh

results in error: "/bin/sh: /bin/bash: not found"

I think the crontab (for OpenBSD) might need to be changed to:

# iRedMail: Scan reported mails.
*/10   *   *   *   *   /bin/sh /etc/dovecot/sieve/scan_reported_mails.sh

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: OpenBSD Auto learn spam/ham crontab

Now I have new errors:

rmdir: /var/vmail/imapsieve_copy/processing/spam: Directory not empty
rmdir: /var/vmail/imapsieve_copy/processing/ham: Directory not empty

3

Re: OpenBSD Auto learn spam/ham crontab

Neovana wrote:

results in error: "/bin/sh: /bin/bash: not found"

Updated doc to mention using /usr/local/bin/bash instead of /bin/bash on FreeBSD/OpenBSD.

The shell script is written in Bash shell syntax, so neither /bin/sh nor /bin/ksh is ok (although ksh usually works fine).

4

Re: OpenBSD Auto learn spam/ham crontab

Updated doc to mention using /usr/local/bin/bash instead of /bin/bash on FreeBSD/OpenBSD.

The shell script is written in Bash shell syntax, so neither /bin/sh nor /bin/ksh is ok (although ksh usually works fine).

That fix seems to have resolved my issue, thank you for this solution, and for all of the work that you do!