LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   small help :) (https://www.linuxquestions.org/questions/linux-general-1/small-help-738349/)

a7mlinux 07-11-2009 06:30 AM

Quote:

Originally Posted by repo (Post 3604172)
Can't you change the PATH to the inbox in procmailrc?

I have this
Code:

MAILDIR=$HOME/mail
do I need to chanege it with:
$HOME/%u/mail??
and I need to put procmailrc in /etc/skel to be for every user, I couldn't write the username in .procmailrc and put mit in /etc/skel

repo 07-11-2009 06:33 AM

Where does dovecat search for the inbox?

a7mlinux 07-11-2009 06:37 AM

Quote:

Originally Posted by repo (Post 3604179)
Where does dovecat search for the inbox?

Code:

default_mail_env = maildir:~/Maildir
default_mail_env = mbox:%h/mail:INBOX=/var/spool/mail/%u


repo 07-11-2009 07:02 AM

Then adjust the procmailrc file, or adjust dovecot

repo 07-11-2009 07:03 AM

Take a look at
http://wiki.dovecot.org/procmail

a7mlinux 07-11-2009 07:24 AM

Quote:

Originally Posted by repo (Post 3604202)

I got this but I didn't understand it:
Code:

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

did they mean to put procmailrc file in /etc

repo 07-11-2009 07:29 AM

If you put it in /etc, it will be system wide. You will have 1 conf file for all users.
If you want a seperate procmailrc for every user, put it in the users home directory.

a7mlinux 07-11-2009 07:43 AM

Quote:

Originally Posted by repo (Post 3604217)
put it in the users home directory.

then I couldn't put it in /etc/skel to be copied automatically in every user home directoey when I use "useradd", because I must specify the username here:
Code:

DEFAULT="$HOME/username/Maildir/"
MAILDIR="$HOME/username/Maildir/"

am I right?

a7mlinux 07-11-2009 08:40 AM

still suffering
 
I used this in /home/username/.procmailrc:
Code:


SHELL="/bin/bash"
SENDMAIL="/usr/sbin/sendmail -oi -t"
LOGFILE="/var/log/procmail.log"
DELIVER="/usr/libexec/dovecot/deliver"
# fallback:
DEFAULT="$HOME/%u/Maildir/"
MAILDIR="$HOME/%u/Maildir/"
:0 w
* ^X-Spam-Status: Yes
| $DELIVER -m spam
:0 w
| $DELIVER

and I used this in dovecot.conf:
Code:

mail_location = mbox:/%h/%u/Maildir:INBOX=/%h/%u/Maildir
there is still nothing working!

repo 07-11-2009 09:58 AM

Quote:

there is still nothing working!
WHAT doesn't work?
How do you know?


Look in the logfiles for pointers (LOGFILE="/var/log/procmail.log")
However you need to enable logging
add this to procmailrc
Quote:

VERBOSE = on
Quote:

$HOME equals /home/user/
maildir:~/Maildir =>~/Maildir equals /home/user/Maildir

Start with a simpel procmailrc without the dovecot, and see if that works, then continue from there


All times are GMT -5. The time now is 05:16 AM.