0

I have a shell script which is looking for a mailbox path

result=`find /var/mailboxes -type d -name me@my-domain.com`
perl -pi -e 's/Folder-to-Remove//g' $result/subscriptions

but executing it via Dovecot Sieve I'm getting an error message:

lmtp: Error: find: `/var/mailboxes/63': Permission denied

where /var/mailboxes/63 is not even owned by me@my-domain.com

Shell script has permission to execute by others.

JackTheKnife
  • 371
  • 1
  • 6
  • 24

1 Answers1

1

The error means that the Unix user that is used to execute the script, does not have permissions to access /var/mailboxes/63 directory / file.

You need to find out some solution so that the directory / file permissions / ownership is set up so that the Dovecot Sieve user can access it. One has to keep security issues in mind.

In order to give a more complete answer, I need to see the ownership and permissions of the file / directory and the Unix user and the user's group used to run the Sieve script.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63