LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Procmail : incoming mail stored outside inbox/new (https://www.linuxquestions.org/questions/linux-software-2/procmail-incoming-mail-stored-outside-inbox-new-929843/)

paulbom 02-17-2012 02:11 AM

Procmail : incoming mail stored outside inbox/new
 
I use fetchmail, procmail and mutt under Cygwin. Now, I'd like procmail to handle separately my different accounts.
To begin with,
  • I moved the "sit" maildir to ~/mail/sit/ ;
  • created a conffile : ~/.procmail/sit.pmrc ;
  • added a line in .fetchmailrc that points to it : mda "/usr/bin/procmail -t -m ~/.procmail/sit.pmrc" ;
  • and set "invisible"
Now, incoming mail does arrive in ~/mail/sit/Inbox, but outside ~/mail/sit/Inbox/new (where I would expect):
Code:

$ ls mail/sit/Inbox/
cur/  msg.Q9L  msg.bUn  msg.cUn  msg.dUn  new/  tmp/

Could anyone give me a help ?

Here are my current settings :
Code:

# ~/.fetchmailrc
set daemon 900
set logfile .fetchmail-error
set syslog
set invisible
# First account (sit)
poll *** with proto pop3 username *** password *** keep
mda "/usr/bin/procmail -t -m ~/.procmail/sit.pmrc"

# ~/.procmail/sit.pmrc
MAILDIR=$HOME/mail/sit
DEFAULT=$MAILDIR/Inbox
LOGFILE=$HOME/.procmail.log
...
# rules (basic test)
:0
* ^TO(sit|logcheck|root)@*****.fr
$DEFAULT

:0
* ^To:.*lists.debian.org
$DEFAULT

:0:
$DEFAULT

EXITCODE=75
:0
/dev/null


repo 02-17-2012 02:24 AM

Welcome to LQ

Did you restart fetchmail and procmail after the changes?
Any pointers in the logfiles?
Try to add
Code:

VERBOSE = on
in the procmail.rc file

Kind regards

Doc CPU 02-17-2012 02:34 AM

Hi there,

Quote:

Originally Posted by paulbom (Post 4604760)
Now, incoming mail does arrive in ~/mail/sit/Inbox, but outside ~/mail/sit/Inbox/new (where I would expect):
Code:

$ ls mail/sit/Inbox/
cur/  msg.Q9L  msg.bUn  msg.cUn  msg.dUn  new/  tmp/


if you want procmail to deliver correctly into a maildir, you have to specify the directory name with a trailing slash in procmail's config.

Quote:

Originally Posted by paulbom (Post 4604760)
Code:

MAILDIR=$HOME/mail/sit
DEFAULT=$MAILDIR/Inbox


Try $MAILDIR/Inbox/ - that should do the trick.

[X] Doc CPU

paulbom 02-17-2012 03:03 AM

Thanks for your concern !
I did restart fetchmail daemon. Procmail is directly invoked by fetchmail, so I didn't do anything (but I certainly restarted windows7 to apply any new patch since yesterday !)

As for the logs, I don't see anything special :
Before the change I got : Folder: sit/Inbox/new/1329246880.7088_1.pcpaul
And now just : Folder: /home/paul/mail/sit/Inbox/msg.dUn

I also tried $DEFAULT/new instead of $DEFAULT in .procmail/sit.pmrc : it works, but it's nothing but a workaround.

Doc CPU 02-17-2012 03:39 AM

Hi there,

Quote:

Originally Posted by paulbom (Post 4604795)
I also tried $DEFAULT/new instead of $DEFAULT in .procmail/sit.pmrc : it works, but it's nothing but a workaround.

that's not what I said, and not what I meant, either.
Just specify the mail directory ($DEFAULT/Inbox in your setup) and add a trailing slash. Nothing more.

[X] Doc CPU

paulbom 02-17-2012 08:42 AM

To DOC CPU : Thanks for the Tip, that's it !


All times are GMT -5. The time now is 11:28 PM.