Solved

procmailrc not working when Maildir has permissions 700

Posted on 2014-12-24
1
357 Views
Last Modified: 2014-12-24
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 ?
0
Comment
Question by:Cyril_M
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
Cyril_M earned 0 total points
ID: 40516152
Working with
INCLUDERC="$HOME/.procmailrc"
in /etc/procmailrc
when $HOME/Maildir has permissions 700

This line's not necessary wen Maildir has permissions 600.

Don't know why but it's working now.
0

Featured Post

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question