Converting from MBOX to Maildir broke procmail and Spamassasin and halted incoming mail

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Converting from MBOX to Maildir broke procmail and Spamassasin and halted incoming mail

dan28088
I could use some help here -

As I use Dovecot I started here when trying to figure out why I could  
not add new mail folders under my Mac's Mail program, but could under  
Thunderbird.

It was quickly pointed out that my system was set up to use MBOX and  
not MAILDIR, and some helpful links and notes were sent back and forth  
giving me a good clue as to how to perform the conversion process.

I did have success in getting my mail accounts converted from mbox to  
maildir, but then ran aground.

I could see all of my existing mail and create new folders, but I  
could not see any of my incoming mail.

What I was late in realizing was that I needed to also adjust the  
settings for my LDA, which as I am using sendmail is procmail, and it  
was suggested that I needed to adjust /etc/procmail to include the line

DEFAULT=$HOME/Maildir/

I did that, but new mail still didn't show up correctly.   I can only  
assume that I have something still not properly adjusted in my  
procmail settings.

Given that I got everything else to work, and even successfully  
upgraded dovecot, it was very frustrating to set everything back to  
square one with mbox so that I had a functioning system once again.    
I am about to have some time on my hands and am going to try again -  
but this time I thought I would ask for help before I possibly loose  
my ability to receive new mail - makes reading those suggestions very  
hard.

At present, my etc/procmailrc file is like this.
-----------
[dan@trailrunner etc]$ cat procmailrc
# send mail through SpamAssassin
:0 fw
* < 256000
| /usr/bin/spamc -f
-----------

In each users Home directory I have a .procmailrc file that further  
directs things on a user level.
For my directory this file is currently
---------------
[dan@trailrunner ~]$ cat .procmailrc
MAILDIR=$HOME/mail

PROBABLYJUNK = /home/dan/mail/probably-spam

:O H
* ^X-Spam-Status:.*Yes
{
EXITCODE=67
:0:
probably-spam
}
---------------

I admit that I set up Spamassasin some years ago and though I have  
updated things now and then, I don't recall all of the reasoning  
behind the setup - just know that it has been working.

Whether I put the new line "DEFAULT=$HOME/Maildir/" in one file, the  
other or both - I got no incoming mail.  My guess was that I had  
offended promail in one way or another.

So, as I prepare to do the MBOX to MAILDIR conversion once again, does  
anyone have any guidance to offer for how to properly adjust the  
procmail files so that I can continue to filter spam?

Much appreciated.

Cheers -
dan








Reply | Threaded
Open this post in threaded view
|

Re: Converting from MBOX to Maildir broke procmail and Spamassasin and halted incoming mail

Scott Silva
on 9-17-2008 11:39 AM Dan Roberts spake the following:

> I could use some help here -
>
> As I use Dovecot I started here when trying to figure out why I could
> not add new mail folders under my Mac's Mail program, but could under
> Thunderbird.
>
> It was quickly pointed out that my system was set up to use MBOX and not
> MAILDIR, and some helpful links and notes were sent back and forth
> giving me a good clue as to how to perform the conversion process.
>
> I did have success in getting my mail accounts converted from mbox to
> maildir, but then ran aground.
>
> I could see all of my existing mail and create new folders, but I could
> not see any of my incoming mail.
>
> What I was late in realizing was that I needed to also adjust the
> settings for my LDA, which as I am using sendmail is procmail, and it
> was suggested that I needed to adjust /etc/procmail to include the line
>
> DEFAULT=$HOME/Maildir/
>
> I did that, but new mail still didn't show up correctly.   I can only
> assume that I have something still not properly adjusted in my procmail
> settings.
>
> Given that I got everything else to work, and even successfully upgraded
> dovecot, it was very frustrating to set everything back to square one
> with mbox so that I had a functioning system once again.   I am about to
> have some time on my hands and am going to try again - but this time I
> thought I would ask for help before I possibly loose my ability to
> receive new mail - makes reading those suggestions very hard.
>
> At present, my etc/procmailrc file is like this.
> -----------
> [dan@trailrunner etc]$ cat procmailrc
> # send mail through SpamAssassin
> :0 fw
> * < 256000
> | /usr/bin/spamc -f
> -----------
>
> In each users Home directory I have a .procmailrc file that further
> directs things on a user level.
> For my directory this file is currently
> ---------------
> [dan@trailrunner ~]$ cat .procmailrc
> MAILDIR=$HOME/mail
>
> PROBABLYJUNK = /home/dan/mail/probably-spam
>
> :O H
> * ^X-Spam-Status:.*Yes
> {
> EXITCODE=67
> :0:
> probably-spam
> }
> ---------------
>
> I admit that I set up Spamassasin some years ago and though I have
> updated things now and then, I don't recall all of the reasoning behind
> the setup - just know that it has been working.
>
> Whether I put the new line "DEFAULT=$HOME/Maildir/" in one file, the
> other or both - I got no incoming mail.  My guess was that I had
> offended promail in one way or another.
>
> So, as I prepare to do the MBOX to MAILDIR conversion once again, does
> anyone have any guidance to offer for how to properly adjust the
> procmail files so that I can continue to filter spam?
>
> Much appreciated.
>
> Cheers -
> dan
>
How old is the distro on the system?
Older versions of procmail don't support maildir.


--
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!


signature.asc (258 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Converting from MBOX to Maildir broke procmail and Spamassasin and halted incoming mail

Scott Silva
In reply to this post by dan28088
on 9-17-2008 11:39 AM Dan Roberts spake the following:

> I could use some help here -
>
> As I use Dovecot I started here when trying to figure out why I could
> not add new mail folders under my Mac's Mail program, but could under
> Thunderbird.
>
> It was quickly pointed out that my system was set up to use MBOX and not
> MAILDIR, and some helpful links and notes were sent back and forth
> giving me a good clue as to how to perform the conversion process.
>
> I did have success in getting my mail accounts converted from mbox to
> maildir, but then ran aground.
>
> I could see all of my existing mail and create new folders, but I could
> not see any of my incoming mail.
>
> What I was late in realizing was that I needed to also adjust the
> settings for my LDA, which as I am using sendmail is procmail, and it
> was suggested that I needed to adjust /etc/procmail to include the line
>
> DEFAULT=$HOME/Maildir/
>
> I did that, but new mail still didn't show up correctly.   I can only
> assume that I have something still not properly adjusted in my procmail
> settings.
>
> Given that I got everything else to work, and even successfully upgraded
> dovecot, it was very frustrating to set everything back to square one
> with mbox so that I had a functioning system once again.   I am about to
> have some time on my hands and am going to try again - but this time I
> thought I would ask for help before I possibly loose my ability to
> receive new mail - makes reading those suggestions very hard.
>
> At present, my etc/procmailrc file is like this.
> -----------
> [dan@trailrunner etc]$ cat procmailrc
> # send mail through SpamAssassin
> :0 fw
> * < 256000
> | /usr/bin/spamc -f
> -----------
>
> In each users Home directory I have a .procmailrc file that further
> directs things on a user level.
> For my directory this file is currently
> ---------------
> [dan@trailrunner ~]$ cat .procmailrc
> MAILDIR=$HOME/mail
>
> PROBABLYJUNK = /home/dan/mail/probably-spam
>
> :O H
> * ^X-Spam-Status:.*Yes
> {
> EXITCODE=67
> :0:
> probably-spam
> }
> ---------------
>
> I admit that I set up Spamassasin some years ago and though I have
> updated things now and then, I don't recall all of the reasoning behind
> the setup - just know that it has been working.
>
> Whether I put the new line "DEFAULT=$HOME/Maildir/" in one file, the
> other or both - I got no incoming mail.  My guess was that I had
> offended promail in one way or another.
>
> So, as I prepare to do the MBOX to MAILDIR conversion once again, does
> anyone have any guidance to offer for how to properly adjust the
> procmail files so that I can continue to filter spam?
>
> Much appreciated.
>
> Cheers -
> dan
>
Dan,
I found this page with lots of procmail stuff.

http://www.ii.com/internet/robots/procmail/qs/

Have a look!



--
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!


signature.asc (258 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Converting from MBOX to Maildir broke procmail and Spamassasin and halted incoming mail

dan28088
In reply to this post by Scott Silva
Hi Scott -

How would I tell?   I built the box from scratch and set up CentOS  
Linux 5 up on it - over one year, probably not more than three.

I had been running with a RedHat system prior to that - and I may well  
have copied the procmailrc settings from that -- don't actually  
recall.   But Dovecot, Procmail and Spamassasin all came up fresh with  
the install of CentOS.


On Sep 17, 2008, at 1:41 PM, Scott Silva wrote:

> on 9-17-2008 11:39 AM Dan Roberts spake the following:
>> I could use some help here -
>> As I use Dovecot I started here when trying to figure out why I  
>> could not add new mail folders under my Mac's Mail program, but  
>> could under Thunderbird.
>> It was quickly pointed out that my system was set up to use MBOX  
>> and not MAILDIR, and some helpful links and notes were sent back  
>> and forth giving me a good clue as to how to perform the conversion  
>> process.
>> I did have success in getting my mail accounts converted from mbox  
>> to maildir, but then ran aground.
>> I could see all of my existing mail and create new folders, but I  
>> could not see any of my incoming mail.
>> What I was late in realizing was that I needed to also adjust the  
>> settings for my LDA, which as I am using sendmail is procmail, and  
>> it was suggested that I needed to adjust /etc/procmail to include  
>> the line
>> DEFAULT=$HOME/Maildir/
>> I did that, but new mail still didn't show up correctly.   I can  
>> only assume that I have something still not properly adjusted in my  
>> procmail settings.
>> Given that I got everything else to work, and even successfully  
>> upgraded dovecot, it was very frustrating to set everything back to  
>> square one with mbox so that I had a functioning system once  
>> again.   I am about to have some time on my hands and am going to  
>> try again - but this time I thought I would ask for help before I  
>> possibly loose my ability to receive new mail - makes reading those  
>> suggestions very hard.
>> At present, my etc/procmailrc file is like this.
>> -----------
>> [dan@trailrunner etc]$ cat procmailrc
>> # send mail through SpamAssassin
>> :0 fw
>> * < 256000
>> | /usr/bin/spamc -f
>> -----------
>> In each users Home directory I have a .procmailrc file that further  
>> directs things on a user level.
>> For my directory this file is currently
>> ---------------
>> [dan@trailrunner ~]$ cat .procmailrc
>> MAILDIR=$HOME/mail
>> PROBABLYJUNK = /home/dan/mail/probably-spam
>> :O H
>> * ^X-Spam-Status:.*Yes
>> {
>> EXITCODE=67
>> :0:
>> probably-spam
>> }
>> ---------------
>> I admit that I set up Spamassasin some years ago and though I have  
>> updated things now and then, I don't recall all of the reasoning  
>> behind the setup - just know that it has been working.
>> Whether I put the new line "DEFAULT=$HOME/Maildir/" in one file,  
>> the other or both - I got no incoming mail.  My guess was that I  
>> had offended promail in one way or another.
>> So, as I prepare to do the MBOX to MAILDIR conversion once again,  
>> does anyone have any guidance to offer for how to properly adjust  
>> the procmail files so that I can continue to filter spam?
>> Much appreciated.
>> Cheers -
>> dan
> How old is the distro on the system?
> Older versions of procmail don't support maildir.
>
>
> --
> MailScanner is like deodorant...
> You hope everybody uses it, and
> you notice quickly if they don't!!!!
>


Reply | Threaded
Open this post in threaded view
|

Re: Converting from MBOX to Maildir broke procmail and Spamassasin and halted incoming mail

Scott Silva
on 9-17-2008 12:52 PM Dan Roberts spake the following:

> Hi Scott -
>
> How would I tell?   I built the box from scratch and set up CentOS Linux
> 5 up on it - over one year, probably not more than three.
>
> I had been running with a RedHat system prior to that - and I may well
> have copied the procmailrc settings from that -- don't actually
> recall.   But Dovecot, Procmail and Spamassasin all came up fresh with
> the install of CentOS.
>
Everything should be new enough to work.
I can't help you with the procmail recipe as I do all my spam and virus
scanning with MailScanner. All done before the LDA.

Your setting of DEFAULT=$HOME/Maildir/ should have worked unless either the
Maildir directory in the users home was not there or not accessible due to
permissions.

The link to the procmail page might nudge you in the right direction.

--
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!


signature.asc (258 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Converting from MBOX to Maildir broke procmail and Spamassasin and halted incoming mail

Karsten Bräckelmann-2
In reply to this post by dan28088
On Wed, 2008-09-17 at 12:39 -0600, Dan Roberts wrote:

> I did have success in getting my mail accounts converted from mbox to  
> maildir, but then ran aground.
>
> I could see all of my existing mail and create new folders, but I  
> could not see any of my incoming mail.
>
> What I was late in realizing was that I needed to also adjust the  
> settings for my LDA, which as I am using sendmail is procmail, and it  
> was suggested that I needed to adjust /etc/procmail to include the line
>
> DEFAULT=$HOME/Maildir/
>
> I did that, but new mail still didn't show up correctly.   I can only  
> assume that I have something still not properly adjusted in my  
> procmail settings.
[...]

> In each users Home directory I have a .procmailrc file that further  
> directs things on a user level.
> For my directory this file is currently
> ---------------
> [dan@trailrunner ~]$ cat .procmailrc
> MAILDIR=$HOME/mail
>
> PROBABLYJUNK = /home/dan/mail/probably-spam
                           ^^^^^^^^^^^^^^^^^^ ^^
> :O H
> * ^X-Spam-Status:.*Yes
> {
> EXITCODE=67
> :0:
> probably-spam
  ^^^^^^^^^^^^^ ^^

This makes procmail deliver mail into mbox format files. You most likely
want delivery action lines like this:
  .probably-spam/

Note the leading dot and the trailing slash. That makes procmail use
Maildir format. You will have to adjust each and every delivery action.
Please see 'man procmailrc'.

Moreover, your ${PROBABLYJUNK} variable doesn't match your ${DEFAULT}.
You'd better not provide absolute, full paths there.


Given the above snippets, I guess procmail actually *did* deliver your
mail. It's just been dumped in mbox format files, which dovecot with
your changed settings doesn't recognize. And probably scattered in
multiple directories...

  guenther


--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}

Reply | Threaded
Open this post in threaded view
|

Re: Converting from MBOX to Maildir broke procmail and Spamassasin and halted incoming mail

Asheesh Laroia
In reply to this post by dan28088
On Wed, 17 Sep 2008, Dan Roberts wrote:

> It was quickly pointed out that my system was set up to use MBOX and not
> MAILDIR, and some helpful links and notes were sent back and forth
> giving me a good clue as to how to perform the conversion process.
>
> I did have success in getting my mail accounts converted from mbox to
> maildir, but then ran aground.
>
> I could see all of my existing mail and create new folders, but I could
> not see any of my incoming mail.

http://markmail.org/message/4wghlnywxuljwmnh - you will want to start
/etc/procmailrc with

DROPPRIVS=YES

My working /etc/procmailrc is as such:

paulproteus@rose:~ $ cat /etc/procmailrc
DROPPRIVS=YES
LOGFILE="${HOME}/procmail-log"
MAILDIR="${HOME}/Maildir"
DEFAULT="./"
paulproteus@rose:~ $

I should be using Dovecot Deliver but haven't still gotten around to it.

-- Asheesh.

--
If wishes were horses, then beggars would be thieves.