Page 1 of 1

Filing email into subfolders using procmail

Posted: Mon May 07, 2018 10:19 am
by danielh
I am interested in automatically moving certain emails to specific imap folders when they arrive. It seems like procmail is the way to do this. I also see that there are recent changes to the MAIL dir path, etc.

Is it still possible to do what I want with procmail?

If yes, are there any pointers about how to set this up in a .procmailrc script?

Re: Filing email into subfolders using procmail

Posted: Mon May 07, 2018 12:06 pm
by procmail seeker
Hi,
I'm looking for the same information. There are a couple of posts about the basic setup under the "new shell server transition topic" but no information on the actual paths seems to be available. Support apparently can set up procmail access but does not know how to set up the paths (huh ?) and suggested posting in the forums.I do have a question out about it but no answers yet - Dane ?

Re: Filing email into subfolders using procmail

Posted: Mon May 07, 2018 12:07 pm
by warriorz
Hi,
I'm looking for the same information. There are a couple of posts about the basic setup under the "new shell server transition topic" but no information on the actual paths seems to be available. Support apparently can set up procmail access but does not know how to set up the paths (huh ?) and suggested posting in the forums.I do have a question out about it but no answers yet - Dane ?

Re: Filing email into subfolders using procmail

Posted: Tue May 08, 2018 4:28 pm
by scott
Hi folks,

We really need a wiki page to describe this better, but I posted how to do this last wednesday:

viewtopic.php?f=13&t=5350&start=192

Here is my response:
warriorz wrote:Thanks Scott,

One last clarification. I want to forward mail to the IMAP folders. What path do they appear under ?
Hi, sorry for my late reply -- had to make sure I knew how to do this properly first.

Basically, you set things up like this:

Code: Select all

LOGFILE=/home/s/scott/procmailrc.logfile
MAILDIR=/var/spool/mail/12/22/scott

:0
* proctest
.PROCTEST/
This will put mail with "proctest" in the header in the IMAP folder "PROCTEST". If the folder's spool directory doesn't exist, it will be created.

Note that you still need to subscribe to the folder with your IMAP client.

To find out the value for "MAILDIR", use the command "wheresthemail.pl" on either shell server, and remove the trailing slash from the path name.

I can see that this should be added to the wiki, and we'll do that.

Hope that helps. :)

-Scott

Re: Filing email into subfolders using procmail

Posted: Tue May 08, 2018 7:52 pm
by danielh2
I was able to get this to work. Thanks very much.

Re: Filing email into subfolders using procmail

Posted: Wed May 09, 2018 4:01 pm
by warriorz
Thanks Scott (and Drew)

Got this working correctly. There are a few tweaks if you are logging...