[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

procmailrc not working when Maildir has permissions 700

Posted on 2014-12-24
1
Medium Priority
?
425 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

656 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