Solved

procmailrc not working

Posted on 2014-12-28
7
88 Views
Last Modified: 2014-12-30
Below is my $HOME/.procmailrc. All recipes work excep for "Subject: [SOGo]". All these messages end up in the inbox, none end up in the sogo folder. I can't figure out what's wrong.
# Send all mail with "[SPAM]" in the subject to spam folder, do not send to inbox.
:0:
* ^Subject: .*\[SPAM\]
/user/mfoley/mbox.spam

# Send all mail with "[SOGo]" in the subject to sogo folder AND send to inbox.
:0c:
* ^Subject:.*\[SOGo\]
/user/mfoley/2014/mail/sogo

# Send all mail with "Attempted Break-ins" in subject to breakin folder, do not send to inbox.
:0:
* ^Subject:.*Attempted Break-ins
mbox.sshBreakins

# Forward email to Android smart phone, except for:
:0Hc:
* ! From:.*jmarkfoley@hotmail
* ! From:.*mfoley@novatec
* ! From:.*sbsadmins@ohprs
* ! From:.*staples.com
* ! From:.*bestbuy.com
* ! From:.*smartdraw.com
* ! From:.*hprsportal@ohprs.org
* ! Subject:.*Attempted Break-ins
* ! Subject:.*backup.*OK
* ! Subject:.*completed OK
* ! Subject:.*Pension Checks
* ! Subject:.*New registration
* ! ^Subject:.*\[SPAM\]
* ! ^Subject:.*Need Part:
* ! ^Subject:.*\[SOGo\]
! droid

Open in new window

Here are some sample header from a SOGo message:
Date: Sun, 28 Dec 2014 18:48:13 -0500
From: Steve Ankeny <steve_a@cinergymetro.net>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
To: users@sogo.nu
Content-Type: text/plain; charset=utf-8; format=flowed
X-Validation-by: lmarcotte@inverse.ca
Subject: Re: [SOGo] Moving a SOGo installation to another server?
Reply-To: users@sogo.nu
X-Loop: users@sogo.nu

Open in new window

0
Comment
Question by:jmarkfoley
  • 3
  • 2
  • 2
7 Comments
 
LVL 78

Expert Comment

by:arnold
ID: 40522152
It is working as you configured it.  You are using the c flag meaning copy which it does and stores one message in the sogo mbox and the other copy continues through the remaining filters, failing to match any additional filters, it is delivered to the inbox.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40522904
Yes, that is what I *intended*, and it is ending up in the inbox, which is what I want, but it is *not* storing a message in the sogo mbox. That's the problem.
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 40522910
none end up in the sogo folder Are permissions OK? (writable by user ID of daemon)
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 34

Expert Comment

by:Duncan Roe
ID: 40522913
Is sogo an mbox (file) or directory?
0
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 40522916
Anything in syslog?
0
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 40523007
Procmailrc can have logging, which you could activate and disable around this filter
LOG=/path/to/where/you/want/logfile
VERBOSE=on # to activate
:0c:
* ^Subject:  .*\[SOGo\]
/home/mfoley/2014/sogo

VERBOSE=off # to deactivate

Run mkdir -p 2014/mail to makesure the directories in the path exist.
If you want the email differentiated by year, that can be achieved if needed.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40524991
> Run mkdir -p 2014/mail to makesure the directories in the path exist.

Doh! What a moron! That was my problem!!! My actual path should have been ~/mail/2014, not ~/2014/mail. I just wasn't seeing that. I switched to the correct path and all is well.

Thanks for the suggestion to check the path.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Pop culture is prime bait for hackers seeking to infect user’s computers and mobile devices with malicious malware. Hackers know exactly what the latest trends are online and know how to use them to their advantage.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

713 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