Solved

procmailrc not working when Maildir has permissions 700

Posted on 2014-12-24
1
288 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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). …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now