WebFaction
Community site: login faq

Hello.

I am very new to Procmail scripts, and am actually quite lost. I need to do something very simple (so it seems). I was wondering if anyone could provide a simple script for the following scenario:

"Given any incoming email, the email needs to be copied to several folders and marked as unread".

Lets just say that the folders are called "acc1" and "acc2".

I would very much appreciate your help. Obviously I am going to use this with the mailbox feature of WebFaction.

Thank you, Mo.

asked 26 May '11, 11:20

mofirouz
1112
accept rate: 0%


I had this exact issue when I first started using procmail. Here's what you need to copy the messages to each folder:

:0c:
.acc1/

:0c:
.acc2/

By default messages are always marked as unread, so there's no extra processing to be done there.

permanent link

answered 26 May '11, 11:34

David L ♦♦
1.4k13
accept rate: 45%

Thank you!!! One last step that I forgot to mention is that the emails need to be deleted from the root inbox folder. How do you go about doing that?

Also, the "acc1" and "acc2" folders are under Inbox. Do I need to change ".acc1/" to ".Inbox/acc1/"?

Thank you again!

(26 May '11, 11:41) mofirouz

One last step that I forgot to mention is that the emails need to be deleted from the root inbox folder. How do you go about doing that?

Ah. Then you'll also want to throw it into the bitbucket. Add this to the end of your rules:

:0
/dev/null

Also, the "acc1" and "acc2" folders are under Inbox. Do I need to change ".acc1/" to ".Inbox/acc1/"?

Yep, that'll do it :)

(26 May '11, 11:46) David L ♦♦

Thank you, thank you, THANK YOU :)

(26 May '11, 12:20) mofirouz

Please note that there must be no whitespace between "0" and "c". Also, you need to prepend ".Inbox/" only if your root folder has a subfolder named Inbox, and that subfolder has subfolders "acc1" and "acc2" (in other words, this is not the general case).

There is no log that you can look at, as the procmail processing does not happen on the hosting server that you have access to.

permanent link

answered 30 May '11, 05:38

tie
1.4k13
accept rate: 44%

First of, thank you all for the replies and help.

Here is the current script that makes it work:

:0c: .acc1/

:0c: .acc2/

:0 /dev/null

This will copy the messages to root folders 'acc1' and 'acc2'. These folders are NOT under the main Inbox folder. Then it will delete that email from the Inbox folder. Make sure that you are subscribed to those folders.

Hope this will come useful for someone out there.

Thanks, Mo.

permanent link

answered 30 May '11, 07:47

mofirouz
1112
accept rate: 0%

Sorry, I came back again.

I just put this into use, and it doesn't seem to have any effects. Could you please help me with this?

I have added

[code] :0 c: .Inbox/acc1/

:0 c: .Inbox/acc2/ [/code]

Is there any logs that I can look at, to see if there were any errors? Am I doing something wrong?

Thank you, Mo.

permanent link

answered 30 May '11, 05:27

mofirouz
1112
accept rate: 0%

Ok. Thanks.

Done that, but it only duplicates the current email and puts into the root Inbox folder (not moved to the sub folders).

The current script is this:

:0c: acc1/ :0c: acc2/

Thanks. Mo.

(30 May '11, 06:13) mofirouz

Please do not forget the dot in front of the folder name. It should be

.acc1/

rather than:

acc1/

For some sample rule syntax, you can check: http://docs.webfaction.com/user-guide/email.html#automatically-filtering-email

(30 May '11, 06:37) tie
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×17

question asked: 26 May '11, 11:20

question was seen: 5,683 times

last updated: 30 May '11, 07:47

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2021 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM