Link to home
Start Free TrialLog in
Avatar of Cyril_M
Cyril_MFlag for France

asked on

procmailrc not working when Maildir has permissions 700

Hi,

I run a centos 7 mail server with Postfix, Maildir delivery using procmail, dovecot-deliver and roundcube
I try to use .procmailrc to send vacation replies.

When my $HOME/Maildir has 600 permissions $HOME/.procmailrc is working and vacation messages are sent but rouncube cannot display my mails, i get the error :
"imap error : failed: Permission denied (euid=1000(cyril) egid=45(mailusers) missing +x perm: /home/cyril/Maildir, dir owner missing perms)

When I put permissions 700 on Maildir, roundcube and imap are working but procmail doesn't deliver the vacation messages anymore.

my /etc/procmail :
# file: /etc/procmailrc
# system-wide settings for procmail
SHELL="/bin/bash"
SENDMAIL="/usr/sbin/sendmail -oi -t"
LOGFILE="/var/log/procmail.log"
DELIVER="/usr/libexec/dovecot/deliver"
# fallback:
UMASK=007
DEFAULT="$HOME/Maildir/"
MAILDIR="$HOME/Maildir/"
:0 w
* ^X-Spam-Status: Yes
| $DELIVER -m spam
:0 w
| $DELIVER



My .procmailrc :
#logging - in case you want to troubleshoot (uncomment by deleting #)
LOGFILE=$HOME/procmail.log
VERBOSE=yes
#
##shell - otherwise, nothing will happen when we call formail

  SHELL=/bin/sh
  UMASK=077
  DROPPRIVS="YES"
  LOGFILE=$HOME/procmail.log
  VERBOSE=on

  FROM='Cyril <cyril@test.eu>'
  SUBJECT=`formail -zcxSubject:`

  :0 Whc: vacation.lock
  * !^FROM_DAEMON
  * !^X-Loop: ${LOGNAME}@${HOST}
  | formail -rD 8192 vacation.cache

    :0 ehc
    | (formail -rI"Precedence: junk" \
      -I"Subject: Out of Office: ${SUBJECT}" \
      -I"From: ${FROM}" \
      -A"X-Loop: ${LOGNAME}@${HOST}" ; \
      cat ${HOME}/.vacation.message ; \
      echo ""; \
      cat ${HOME}/.signature \
    ) | $SENDMAIL -oi -t -f cyril@test.eu


Can you help ?
ASKER CERTIFIED SOLUTION
Avatar of Cyril_M
Cyril_M
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial