Hello,
I'm trying to achieve the following scenario with dovecot + sieve + procmail.
Dovecot is set as LDA in postfix (if this makes any difference) I need to set sieve that after it has executed all it's scripts (including before, ~/.sieve etc) and if keep is in still in effect to call procmail to also execute the custom user filters and then return (if it is not forwarded elsewhere or some) to dovecot for normal delivery.
If you ask this I need this for backward compatibility. I now use procmail for local delivery,spam/virus filtering, and users have set a lot of custom filters/redirects.
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
I want to migrate to dovecot as lda and sieve for filtering but to keep procmail working for a while.
I have tried to follow (partially) this guide https://www.enricozini.org/blog/2022/debian/migrating-from-procmail-to-sieve... but procmail fails to execute
##########################
Aug 30 15:22:26 uk7 dovecot[112151]:
lda(test-uk7.teststring567.tk)<112151>
here some relative (on my opinion) configs: ################################ #/etc/dovecot/conf.d/90-sieve.conf plugin { sieve = file:~/sieve;active=~/.dovecot.sieve sieve_plugins = sieve_extprograms sieve_extensions = +vnd.dovecot.pipe sieve_pipe_bin_dir = /var/lib/dovecot/sieve-pipe sieve_after = /var/lib/dovecot/sieve_after sieve_trace_dir = ~/.sieve-trace sieve_trace_level = matching sieve_trace_debug = yes } #################################### #/var/lib/dovecot/sieve-pipe/procmail
#!/bin/sh exec /usr/bin/procmail ##################################### #/var/lib/dovecot/sieve_after/procmail.sieve require "vnd.dovecot.pipe";
pipe "procmail"; #####################################
#cat /etc/procmailrc
SHELL="/bin/bash" SENDMAIL="/usr/sbin/sendmail" SENDMAILFLAGS="-oi -t"" LOGFILE="/var/log/procmail.log" # fully define here so user .procmailrc can use it too DELIVER="/usr/libexec/dovecot/deliver -d $LOGNAME" # fallback: DEFAULT="$HOME/Maildir/" MAILDIR="$HOME/Maildir/"
# deliver spam to spam folder :0 w
- ^X-Spam-Status: Yes | $DELIVER -m spam
uncomment next line to support user .procmailrc files
INCLUDERC=$HOME/.procmailrc
# deliver to INBOX and stop :0 w | $DELIVER #########################################
Thank you in advance
Hi all!
On 31/08/2022 11:40, George Asenov wrote: [...]> Aug 30 15:22:26 uk7 dovecot[112153]:
lda(test-uk7.teststring567.tk)<112151>
: Fatal: execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission denied
That looks like a permission problem - no x Bits set on the executable and/or directories to it (for the dovecot user)?
Kind regards, Bernd
Bernd Petrovitsch Email : bernd@petrovitsch.priv.at There is NO CLOUD, just other people's computers. - FSFE LUGA : http://www.luga.at
[root@uk7 ~]# stat /usr/bin/procmail File: /usr/bin/procmail Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 12/ mail)
[root@uk7 ~]# stat /usr/bin/ File: /usr/bin/ Access: (0555/dr-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
[root@uk7 ~]# stat /usr File: /usr Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
For me it seems that everything with the permissions is ok. Others also can execute it?
Other suggestions? Is the config correct?
I forgot to mention # dovecot --version 2.3.16 (7e2e900c1a) On # cat /etc/redhat-release Rocky Linux release 8.6 (Green Obsidian)
On 31-Aug-22 1:16 PM, Bernd Petrovitsch wrote:
Hi all!
On 31/08/2022 11:40, George Asenov wrote: [...]> Aug 30 15:22:26 uk7 dovecot[112153]:
lda(test-uk7.teststring567.tk)<112151>
: Fatal: execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission denied That looks like a permission problem - no x Bits set on the executable and/or directories to it (for the dovecot user)?
Kind regards, Bernd
-- Warm regards George A. WPXHosting
You are trying to execute /var/lib/dovecot/sieve-pipe/procmail though...
Aki
On 31/08/2022 14:14 EEST George Asenov george.asenov@wpx.net wrote:
[root@uk7 ~]# stat /usr/bin/procmail File: /usr/bin/procmail Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 12/ mail)
[root@uk7 ~]# stat /usr/bin/ File: /usr/bin/ Access: (0555/dr-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
[root@uk7 ~]# stat /usr File: /usr Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
For me it seems that everything with the permissions is ok. Others also can execute it?
Other suggestions? Is the config correct?
I forgot to mention # dovecot --version 2.3.16 (7e2e900c1a) On # cat /etc/redhat-release Rocky Linux release 8.6 (Green Obsidian)
On 31-Aug-22 1:16 PM, Bernd Petrovitsch wrote:
Hi all!
On 31/08/2022 11:40, George Asenov wrote: [...]> Aug 30 15:22:26 uk7 dovecot[112153]:
lda(test-uk7.teststring567.tk)<112151>
: Fatal: execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission denied That looks like a permission problem - no x Bits set on the executable and/or directories to it (for the dovecot user)?
Kind regards, Bernd
-- Warm regards George A. WPXHosting
Thanks that was the reason for the permissions error. Unfortunately the next error comes that isn't explanatory:
##########################################
Starting execution of actions
Executing actions
Executing pipe action
Debug: sieve: action pipe: running program: procmail
Error: sieve: action pipe: failed to execute program procmail': vnd.dovecot.pipe extension is unconfigured Finished executing pipe action (status=ok, keep=canceled) Finished executing actions (status=ok, keep=none) Finished executing result (no commit, status=ok, keep=no) Debug: sieve: multi-script: Sequence ended Debug: sieve: multi-script: Finishing sequence (status=ok) Executing result (status=ok, commit=yes) Starting execution of actions Executing actions Finished executing actions (status=ok, keep=none) Finalizing actions Finalize pipe action (status=ok, action_status=ok, commit_status=ok, pre-commit=yes) Commit pipe action Error: sieve: failed to pipe message to program
procmail': refer to
server log for more information. [2022-08-31 13:58:54]
Finished finalizing actions (status=failure, keep=none)
Finalize implicit keep (failure=yes)
Execute implicit keep (failure=yes)
Start storing into mailbox INBOX
Executing implicit keep action
Execute storing into mailbox 'INBOX'
Saving to mailbox 'INBOX' successful so far
Finished executing implicit keep action (status=ok)
Finalize implicit keep action(status=ok, action_status=ok,
commit_status=ok)
Commit implicit keep action
Commit storing into mailbox 'INBOX'
stored mail into mailbox 'INBOX'
Finish implicit keep action
Finishing actions
Finish pipe action
Finished executing result (final, status=failure, keep=no)
Debug: sieve: multi-script: Sequence finished (status=failure, keep=no)
Debug: sieve: multi-script: Destroy
Error: sieve: Execution of script
/var/lib/dovecot/sieve_after/procmail.sieve failed, but implicit keep
was successful
##########################################
On 31-Aug-22 2:27 PM, Aki Tuomi wrote:
You are trying to execute /var/lib/dovecot/sieve-pipe/procmail though...
Aki
On 31/08/2022 14:14 EEST George Asenov george.asenov@wpx.net wrote:
[root@uk7 ~]# stat /usr/bin/procmail File: /usr/bin/procmail Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 12/ mail)
[root@uk7 ~]# stat /usr/bin/ File: /usr/bin/ Access: (0555/dr-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
[root@uk7 ~]# stat /usr File: /usr Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
For me it seems that everything with the permissions is ok. Others also can execute it?
Other suggestions? Is the config correct?
I forgot to mention # dovecot --version 2.3.16 (7e2e900c1a) On # cat /etc/redhat-release Rocky Linux release 8.6 (Green Obsidian)
On 31-Aug-22 1:16 PM, Bernd Petrovitsch wrote:
Hi all!
On 31/08/2022 11:40, George Asenov wrote: [...]> Aug 30 15:22:26 uk7 dovecot[112153]:
lda(test-uk7.teststring567.tk)<112151>
: Fatal: execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission denied That looks like a permission problem - no x Bits set on the executable and/or directories to it (for the dovecot user)?
Kind regards, Bernd
-- Warm regards George A. WPXHosting
-- Warm regards George A. WPXHosting
Hello
You need to activate vnd.dovecot.pipe extention in dovecots sieve.
Kind regards, Christian Mack
Am 31.08.22 um 15:13 schrieb George Asenov:
Thanks that was the reason for the permissions error. Unfortunately the next error comes that isn't explanatory:
########################################## Starting execution of actions Executing actions Executing pipe action Debug: sieve: action pipe: running program: procmail Error: sieve: action pipe: failed to execute program
procmail': vnd.dovecot.pipe extension is unconfigured Finished executing pipe action (status=ok, keep=canceled) Finished executing actions (status=ok, keep=none) Finished executing result (no commit, status=ok, keep=no) Debug: sieve: multi-script: Sequence ended Debug: sieve: multi-script: Finishing sequence (status=ok) Executing result (status=ok, commit=yes) Starting execution of actions Executing actions Finished executing actions (status=ok, keep=none) Finalizing actions Finalize pipe action (status=ok, action_status=ok, commit_status=ok, pre-commit=yes) Commit pipe action Error: sieve: failed to pipe message to program
procmail': refer to server log for more information. [2022-08-31 13:58:54] Finished finalizing actions (status=failure, keep=none) Finalize implicit keep (failure=yes) Execute implicit keep (failure=yes) Start storing into mailbox INBOX Executing implicit keep action Execute storing into mailbox 'INBOX' Saving to mailbox 'INBOX' successful so far Finished executing implicit keep action (status=ok) Finalize implicit keep action(status=ok, action_status=ok, commit_status=ok) Commit implicit keep action Commit storing into mailbox 'INBOX' stored mail into mailbox 'INBOX' Finish implicit keep action Finishing actions Finish pipe action Finished executing result (final, status=failure, keep=no) Debug: sieve: multi-script: Sequence finished (status=failure, keep=no) Debug: sieve: multi-script: Destroy Error: sieve: Execution of script /var/lib/dovecot/sieve_after/procmail.sieve failed, but implicit keep was successful ##########################################On 31-Aug-22 2:27 PM, Aki Tuomi wrote:
You are trying to execute /var/lib/dovecot/sieve-pipe/procmail though...
Aki
On 31/08/2022 14:14 EEST George Asenov george.asenov@wpx.net wrote:
[root@uk7 ~]# stat /usr/bin/procmail File: /usr/bin/procmail Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 12/ mail)
[root@uk7 ~]# stat /usr/bin/ File: /usr/bin/ Access: (0555/dr-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
[root@uk7 ~]# stat /usr File: /usr Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
For me it seems that everything with the permissions is ok. Others also can execute it?
Other suggestions? Is the config correct?
I forgot to mention # dovecot --version 2.3.16 (7e2e900c1a) On # cat /etc/redhat-release Rocky Linux release 8.6 (Green Obsidian)
On 31-Aug-22 1:16 PM, Bernd Petrovitsch wrote:
Hi all!
On 31/08/2022 11:40, George Asenov wrote: [...]> Aug 30 15:22:26 uk7 dovecot[112153]:
lda(test-uk7.teststring567.tk)<112151>
: Fatal: execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission denied That looks like a permission problem - no x Bits set on the executable and/or directories to it (for the dovecot user)?
Kind regards, Bernd
-- Warm regards George A. WPXHosting
-- Christian Mack Universität Konstanz Kommunikations-, Informations-, Medienzentrum (KIM) Abteilung IT-Dienste Forschung, Lehre, Infrastruktur 78457 Konstanz +49 7531 88-4416
On 31-8-2022 17:20, Christian Mack wrote:
Hello
You need to activate vnd.dovecot.pipe extention in dovecots sieve. And you need to configure it; i.e. specify where the scripts can be found.
Kind regards, Christian Mack
Am 31.08.22 um 15:13 schrieb George Asenov:
Thanks that was the reason for the permissions error. Unfortunately the next error comes that isn't explanatory:
########################################## Starting execution of actions Executing actions Executing pipe action Debug: sieve: action pipe: running program: procmail Error: sieve: action pipe: failed to execute program
procmail': vnd.dovecot.pipe extension is unconfigured Finished executing pipe action (status=ok, keep=canceled) Finished executing actions (status=ok, keep=none) Finished executing result (no commit, status=ok, keep=no) Debug: sieve: multi-script: Sequence ended Debug: sieve: multi-script: Finishing sequence (status=ok) Executing result (status=ok, commit=yes) Starting execution of actions Executing actions Finished executing actions (status=ok, keep=none) Finalizing actions Finalize pipe action (status=ok, action_status=ok, commit_status=ok, pre-commit=yes) Commit pipe action Error: sieve: failed to pipe message to program
procmail': refer to server log for more information. [2022-08-31 13:58:54] Finished finalizing actions (status=failure, keep=none) Finalize implicit keep (failure=yes) Execute implicit keep (failure=yes) Start storing into mailbox INBOX Executing implicit keep action Execute storing into mailbox 'INBOX' Saving to mailbox 'INBOX' successful so far Finished executing implicit keep action (status=ok) Finalize implicit keep action(status=ok, action_status=ok, commit_status=ok) Commit implicit keep action Commit storing into mailbox 'INBOX' stored mail into mailbox 'INBOX' Finish implicit keep action Finishing actions Finish pipe action Finished executing result (final, status=failure, keep=no) Debug: sieve: multi-script: Sequence finished (status=failure, keep=no) Debug: sieve: multi-script: Destroy Error: sieve: Execution of script /var/lib/dovecot/sieve_after/procmail.sieve failed, but implicit keep was successful ##########################################On 31-Aug-22 2:27 PM, Aki Tuomi wrote:
You are trying to execute /var/lib/dovecot/sieve-pipe/procmail though...
Aki
On 31/08/2022 14:14 EEST George Asenov george.asenov@wpx.net wrote:
[root@uk7 ~]# stat /usr/bin/procmail File: /usr/bin/procmail Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 12/ mail)
[root@uk7 ~]# stat /usr/bin/ File: /usr/bin/ Access: (0555/dr-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
[root@uk7 ~]# stat /usr File: /usr Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
For me it seems that everything with the permissions is ok. Others also can execute it?
Other suggestions? Is the config correct?
I forgot to mention # dovecot --version 2.3.16 (7e2e900c1a) On # cat /etc/redhat-release Rocky Linux release 8.6 (Green Obsidian)
On 31-Aug-22 1:16 PM, Bernd Petrovitsch wrote:
Hi all!
On 31/08/2022 11:40, George Asenov wrote: [...]> Aug 30 15:22:26 uk7 dovecot[112153]:
lda(test-uk7.teststring567.tk)<112151>
: Fatal: execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission denied That looks like a permission problem - no x Bits set on the executable and/or directories to it (for the dovecot user)? Kind regards, Bernd
Warm regards George A. WPXHosting
You are right, after configuration now procmail is started and piped the message. Unfortunately some loop happen after starting procmail
sieve: Started running script
/var/lib/dovecot/sieve_after/procmail.svbin' sieve: Finished running script
ok'
(status=/var/lib/dovecot/sieve_after/procmail.svbin, resource usage: no
usage recorded)
sieve: multi-script: Execute result
sieve: msgid=20220901093826.065F32C7@servername.com: Executing
result (status=ok, commit=no)
sieve: msgid=20220901093826.065F32C7@servername.com: Starting
execution of actions
sieve: msgid=20220901093826.065F32C7@servername.com: Executing actions
sieve: msgid=20220901093826.065F32C7@servername.com: Executing pipe
action
sieve: action pipe: running program: procmail
program exec:/var/lib/dovecot/sieve-pipe/procmail: Created
program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment:
USER=test@uk7.teststring567.tk
program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment:
HOME=/home/uk7/homes/test
program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment:
HOST=servername.com
program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment:
RECIPIENT=test@uk7.teststring567.tk
program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment:
ORIG_RECIPIENT=test@uk7.teststring567.tk
sieve: msgid=20220901093826.065F32C7@servername.com: Finished
executing pipe action (status=ok, keep=canceled)
sieve: msgid=20220901093826.065F32C7@servername.com: Finished
executing actions (status=ok, keep=none)
sieve: msgid=20220901093826.065F32C7@servername.com: Finished
executing result (no commit, status=ok, keep=no)
sieve: multi-script: Sequence ended
sieve: multi-script: Finishing sequence (status=ok)
sieve: msgid=20220901093826.065F32C7@servername.com: Executing
result (status=ok, commit=yes)
sieve: msgid=20220901093826.065F32C7@servername.com: Starting
execution of actions
sieve: msgid=20220901093826.065F32C7@servername.com: Executing actions
sieve: msgid=20220901093826.065F32C7@servername.com: Finished
executing actions (status=ok, keep=none)
sieve: msgid=20220901093826.065F32C7@servername.com: Finalizing actions
sieve: msgid=20220901093826.065F32C7@servername.com: Finalize pipe
action (status=ok, action_status=ok, commit_status=ok, pre-commit=yes)
sieve: msgid=20220901093826.065F32C7@servername.com: Commit pipe action
program exec:/var/lib/dovecot/sieve-pipe/procmail: Establishing connection
program exec:/var/lib/dovecot/sieve-pipe/procmail: Forked child process
program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Connected
to program
program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Finished
streaming payload to program
program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Finished
input to program
program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Disconnected
program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Waiting
for program to finish after 0 msecs (timeout = 10000 msecs)
procmail[152746]: Error while writing to "/var/log/procmail.log"
program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Child
process ended
program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Destroy
dovecot[152745]:
lda(test@uk7.teststring567.tk)<152745>procmail' sieve: msgid=<20220901093826.065F32C7@servername.com>: Finished finalizing actions (status=ok, keep=none) sieve: msgid=<20220901093826.065F32C7@servername.com>: Finishing actions sieve: msgid=<20220901093826.065F32C7@servername.com>: Finish pipe action sieve: msgid=<20220901093826.065F32C7@servername.com>: Finished executing result (final, status=ok, keep=no) sieve: multi-script: Sequence finished (status=ok, keep=no) sieve: multi-script: Destroy auth-master: conn unix:/run/dovecot/auth-userdb (pid=152676,uid=0): Disconnected: Connection closed (fd=25) program exec:/var/lib/dovecot/sieve-pipe/procmail (152744): Child process ended program exec:/var/lib/dovecot/sieve-pipe/procmail (152744): Destroy dovecot[152743]: lda(test@uk7.teststring567.tk)<152743><0nIfDZJ9EGOnVAIAsVjU+A>: sieve: msgid=<20220901093826.065F32C7@servername.com>: pipe action: piped message to program
procmail'
sieve: msgid=20220901093826.065F32C7@servername.com: Finished
finalizing actions (status=ok, keep=none)
sieve: msgid=20220901093826.065F32C7@servername.com: Finishing actions
sieve: msgid=20220901093826.065F32C7@servername.com: Finish pipe action
sieve: msgid=20220901093826.065F32C7@servername.com: Finished
executing result (final, status=ok, keep=no)
sieve: multi-script: Sequence finished (status=ok, keep=no)
sieve: multi-script: Destroy
auth-master: conn unix:/run/dovecot/auth-userdb (pid=152676,uid=0):
Disconnected: Connection closed (fd=24)
program exec:/var/lib/dovecot/sieve-pipe/procmail (152742): Child
process ended
program exec:/var/lib/dovecot/sieve-pipe/procmail (152742): Destroy
############################################
On 31-Aug-22 10:58 PM, Stephan Bosch wrote:
On 31-8-2022 17:20, Christian Mack wrote:
Hello
You need to activate vnd.dovecot.pipe extention in dovecots sieve. And you need to configure it; i.e. specify where the scripts can be found.
Kind regards, Christian Mack
Am 31.08.22 um 15:13 schrieb George Asenov:
Thanks that was the reason for the permissions error. Unfortunately the next error comes that isn't explanatory:
########################################## Starting execution of actions Executing actions Executing pipe action Debug: sieve: action pipe: running program: procmail Error: sieve: action pipe: failed to execute program
procmail': vnd.dovecot.pipe extension is unconfigured Finished executing pipe action (status=ok, keep=canceled) Finished executing actions (status=ok, keep=none) Finished executing result (no commit, status=ok, keep=no) Debug: sieve: multi-script: Sequence ended Debug: sieve: multi-script: Finishing sequence (status=ok) Executing result (status=ok, commit=yes) Starting execution of actions Executing actions Finished executing actions (status=ok, keep=none) Finalizing actions Finalize pipe action (status=ok, action_status=ok, commit_status=ok, pre-commit=yes) Commit pipe action Error: sieve: failed to pipe message to program
procmail': refer to server log for more information. [2022-08-31 13:58:54] Finished finalizing actions (status=failure, keep=none) Finalize implicit keep (failure=yes) Execute implicit keep (failure=yes) Start storing into mailbox INBOX Executing implicit keep action Execute storing into mailbox 'INBOX' Saving to mailbox 'INBOX' successful so far Finished executing implicit keep action (status=ok) Finalize implicit keep action(status=ok, action_status=ok, commit_status=ok) Commit implicit keep action Commit storing into mailbox 'INBOX' stored mail into mailbox 'INBOX' Finish implicit keep action Finishing actions Finish pipe action Finished executing result (final, status=failure, keep=no) Debug: sieve: multi-script: Sequence finished (status=failure, keep=no) Debug: sieve: multi-script: Destroy Error: sieve: Execution of script /var/lib/dovecot/sieve_after/procmail.sieve failed, but implicit keep was successful ##########################################On 31-Aug-22 2:27 PM, Aki Tuomi wrote:
You are trying to execute /var/lib/dovecot/sieve-pipe/procmail though...
Aki
On 31/08/2022 14:14 EEST George Asenov george.asenov@wpx.net wrote:
[root@uk7 ~]# stat /usr/bin/procmail File: /usr/bin/procmail Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 12/
mail)[root@uk7 ~]# stat /usr/bin/ File: /usr/bin/ Access: (0555/dr-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/
root)[root@uk7 ~]# stat /usr File: /usr Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/
root)For me it seems that everything with the permissions is ok. Others also can execute it?
Other suggestions? Is the config correct?
I forgot to mention # dovecot --version 2.3.16 (7e2e900c1a) On # cat /etc/redhat-release Rocky Linux release 8.6 (Green Obsidian)
On 31-Aug-22 1:16 PM, Bernd Petrovitsch wrote:
Hi all!
On 31/08/2022 11:40, George Asenov wrote: [...]> Aug 30 15:22:26 uk7 dovecot[112153]: > lda(test-uk7.teststring567.tk)<112151>
: > Fatal: > execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission > denied That looks like a permission problem - no x Bits set on the executable and/or directories to it (for the dovecot user)? Kind regards, Bernd
Warm regards George A. WPXHosting
-- Warm regards George A. WPXHosting
Basically I need to achieve the behavior described here: https://www.concordia.ca/ginacody/aits/support/faq/procmail_and_sieve.html Could someone explain in details how to ?
On 01-Sep-22 12:54 PM, George Asenov wrote:
You are right, after configuration now procmail is started and piped the message. Unfortunately some loop happen after starting procmail
sieve: Started running script
/var/lib/dovecot/sieve_after/procmail.svbin' sieve: Finished running script
ok' (status=/var/lib/dovecot/sieve_after/procmail.svbin, resource usage: no usage recorded) sieve: multi-script: Execute result sieve: msgid=20220901093826.065F32C7@servername.com: Executing result (status=ok, commit=no) sieve: msgid=20220901093826.065F32C7@servername.com: Starting execution of actions sieve: msgid=20220901093826.065F32C7@servername.com: Executing actions sieve: msgid=20220901093826.065F32C7@servername.com: Executing pipe action sieve: action pipe: running program: procmail program exec:/var/lib/dovecot/sieve-pipe/procmail: Created program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment: USER=test@uk7.teststring567.tk program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment: HOME=/home/uk7/homes/test program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment: HOST=servername.com program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment: RECIPIENT=test@uk7.teststring567.tk program exec:/var/lib/dovecot/sieve-pipe/procmail: Pass environment: ORIG_RECIPIENT=test@uk7.teststring567.tk sieve: msgid=20220901093826.065F32C7@servername.com: Finished executing pipe action (status=ok, keep=canceled) sieve: msgid=20220901093826.065F32C7@servername.com: Finished executing actions (status=ok, keep=none) sieve: msgid=20220901093826.065F32C7@servername.com: Finished executing result (no commit, status=ok, keep=no) sieve: multi-script: Sequence ended sieve: multi-script: Finishing sequence (status=ok) sieve: msgid=20220901093826.065F32C7@servername.com: Executing result (status=ok, commit=yes) sieve: msgid=20220901093826.065F32C7@servername.com: Starting execution of actions sieve: msgid=20220901093826.065F32C7@servername.com: Executing actions sieve: msgid=20220901093826.065F32C7@servername.com: Finished executing actions (status=ok, keep=none) sieve: msgid=20220901093826.065F32C7@servername.com: Finalizing actions sieve: msgid=20220901093826.065F32C7@servername.com: Finalize pipe action (status=ok, action_status=ok, commit_status=ok, pre-commit=yes) sieve: msgid=20220901093826.065F32C7@servername.com: Commit pipe action program exec:/var/lib/dovecot/sieve-pipe/procmail: Establishing connection program exec:/var/lib/dovecot/sieve-pipe/procmail: Forked child process program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Connected to program program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Finished streaming payload to program program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Finished input to program program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Disconnected program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Waiting for program to finish after 0 msecs (timeout = 10000 msecs) procmail[152746]: Error while writing to "/var/log/procmail.log" program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Child process ended program exec:/var/lib/dovecot/sieve-pipe/procmail (152746): Destroy dovecot[152745]: lda(test@uk7.teststring567.tk)<152745>: sieve: msgid=20220901093826.065F32C7@servername.com: pipe action: piped message to program procmail' sieve: msgid=<20220901093826.065F32C7@servername.com>: Finished finalizing actions (status=ok, keep=none) sieve: msgid=<20220901093826.065F32C7@servername.com>: Finishing actions sieve: msgid=<20220901093826.065F32C7@servername.com>: Finish pipe action sieve: msgid=<20220901093826.065F32C7@servername.com>: Finished executing result (final, status=ok, keep=no) sieve: multi-script: Sequence finished (status=ok, keep=no) sieve: multi-script: Destroy auth-master: conn unix:/run/dovecot/auth-userdb (pid=152676,uid=0): Disconnected: Connection closed (fd=25) program exec:/var/lib/dovecot/sieve-pipe/procmail (152744): Child process ended program exec:/var/lib/dovecot/sieve-pipe/procmail (152744): Destroy dovecot[152743]: lda(test@uk7.teststring567.tk)<152743><0nIfDZJ9EGOnVAIAsVjU+A>: sieve: msgid=<20220901093826.065F32C7@servername.com>: pipe action: piped message to program
procmail' sieve: msgid=20220901093826.065F32C7@servername.com: Finished finalizing actions (status=ok, keep=none) sieve: msgid=20220901093826.065F32C7@servername.com: Finishing actions sieve: msgid=20220901093826.065F32C7@servername.com: Finish pipe action sieve: msgid=20220901093826.065F32C7@servername.com: Finished executing result (final, status=ok, keep=no) sieve: multi-script: Sequence finished (status=ok, keep=no) sieve: multi-script: Destroy auth-master: conn unix:/run/dovecot/auth-userdb (pid=152676,uid=0): Disconnected: Connection closed (fd=24) program exec:/var/lib/dovecot/sieve-pipe/procmail (152742): Child process ended program exec:/var/lib/dovecot/sieve-pipe/procmail (152742): Destroy ############################################On 31-Aug-22 10:58 PM, Stephan Bosch wrote:
On 31-8-2022 17:20, Christian Mack wrote:
Hello
You need to activate vnd.dovecot.pipe extention in dovecots sieve. And you need to configure it; i.e. specify where the scripts can be found.
Kind regards, Christian Mack
Am 31.08.22 um 15:13 schrieb George Asenov:
Thanks that was the reason for the permissions error. Unfortunately the next error comes that isn't explanatory:
########################################## Starting execution of actions Executing actions Executing pipe action Debug: sieve: action pipe: running program: procmail Error: sieve: action pipe: failed to execute program
procmail': vnd.dovecot.pipe extension is unconfigured Finished executing pipe action (status=ok, keep=canceled) Finished executing actions (status=ok, keep=none) Finished executing result (no commit, status=ok, keep=no) Debug: sieve: multi-script: Sequence ended Debug: sieve: multi-script: Finishing sequence (status=ok) Executing result (status=ok, commit=yes) Starting execution of actions Executing actions Finished executing actions (status=ok, keep=none) Finalizing actions Finalize pipe action (status=ok, action_status=ok, commit_status=ok, pre-commit=yes) Commit pipe action Error: sieve: failed to pipe message to program
procmail': refer to server log for more information. [2022-08-31 13:58:54] Finished finalizing actions (status=failure, keep=none) Finalize implicit keep (failure=yes) Execute implicit keep (failure=yes) Start storing into mailbox INBOX Executing implicit keep action Execute storing into mailbox 'INBOX' Saving to mailbox 'INBOX' successful so far Finished executing implicit keep action (status=ok) Finalize implicit keep action(status=ok, action_status=ok, commit_status=ok) Commit implicit keep action Commit storing into mailbox 'INBOX' stored mail into mailbox 'INBOX' Finish implicit keep action Finishing actions Finish pipe action Finished executing result (final, status=failure, keep=no) Debug: sieve: multi-script: Sequence finished (status=failure, keep=no) Debug: sieve: multi-script: Destroy Error: sieve: Execution of script /var/lib/dovecot/sieve_after/procmail.sieve failed, but implicit keep was successful ##########################################On 31-Aug-22 2:27 PM, Aki Tuomi wrote:
You are trying to execute /var/lib/dovecot/sieve-pipe/procmail though...
Aki
On 31/08/2022 14:14 EEST George Asenov george.asenov@wpx.net wrote:
[root@uk7 ~]# stat /usr/bin/procmail File: /usr/bin/procmail Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 12/ mail)
[root@uk7 ~]# stat /usr/bin/ File: /usr/bin/ Access: (0555/dr-xr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
[root@uk7 ~]# stat /usr File: /usr Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
For me it seems that everything with the permissions is ok. Others also can execute it?
Other suggestions? Is the config correct?
I forgot to mention # dovecot --version 2.3.16 (7e2e900c1a) On # cat /etc/redhat-release Rocky Linux release 8.6 (Green Obsidian)
On 31-Aug-22 1:16 PM, Bernd Petrovitsch wrote: > Hi all! > > On 31/08/2022 11:40, George Asenov wrote: > [...]> Aug 30 15:22:26 uk7 dovecot[112153]: >> lda(test-uk7.teststring567.tk)<112151>
: >> Fatal: >> execvp(/var/lib/dovecot/sieve-pipe/procmail) failed: Permission >> denied > That looks like a permission problem - no x Bits set on the > executable > and/or directories to it (for the dovecot user)? > > Kind regards, > Bernd Warm regards George A. WPXHosting
-- Warm regards George A. WPXHosting
participants (5)
-
Aki Tuomi
-
Bernd Petrovitsch
-
Christian Mack
-
George Asenov
-
Stephan Bosch