Re: Procmail funnyness...



I don't know for your problem with sendmail because I use procmail
independently of balsa. But I would advise you to use the field X-BeenThere
to filter balsa mails, something like :

* ^X-BeenThere:.*balsa-list@gnome.org 

In a more general way, all (correctly configured) mailing lists have an
entry X-Mailing-List or X-BeenThere in the header and you can see it by
setting "view all headers" in your message window.

Christophe

Le mer, 01 aoû 2001 03:42:33, John Anderson a écrit :
> Okay, my config now looks like:
> 
> PATH=/bin:/usr/bin:/sbin:/usr/sbin
> SHELL=/bin/sh
> MAILDIR=$HOME/mail
> DEFAULT=/var/spool/mail/$LOGNAME
> PMDIR=$HOME/.procmail
> LOGFILE=$PMDIR/log
> VERBOSE=on
> 
> :0:
> * ^TObalsa
> Lists/Balsa
> 
> But there is one thing I don't understand, why do I need SendMail in
> order
> to use Procmail?  I thought that the point was Balsa would "pipe" each
> message received through Procmail, which would then move the message to
> the
> appropriate folder...  Is this not correct?  For example, procmail works
> when I do the following:
> 
> (neptune->cobalt) ~ $ cat /var/spool/mail/cobalt | procmail
> You have mail in /var/spool/mail/cobalt
> (neptune->cobalt) ~ $ cat /var/spool/mail/cobalt
> 
> This ends up duplicating whatever is in /var/spool/mail/cobalt a second
> time, I had one message, now I have two messages, exactly the same.  If I
> did it again, I think I'd have 4...
> 
> And I don't even have SendMail installed, nor do I have a SENDMAIL
> variable
> in ~/.procmailrc, but procmail SEEMS to work from the command line (I
> haven't had the chance to see if it would move the message to my Balsa
> mailbox)...  I guess either I'm incompetent in this, or it's that my
> setup
> of all this is just wrong and I've been mislead...  Do I need to have
> SendMail get my mail for me, or fetchmail or something like that, instead
> of Balsa?
> 
> John Anderson
> 
> 
> On 2001.07.31 17:53 John Merryweather Cooper wrote:
> > On 2001.07.31 17:05 John Anderson wrote:
> > > Thanks for posting the diff, I actually grepped through and found it
> > like
> > > 5
> > > minutes before you posted, but it was nice to see that I changed the
> > > right
> > > thing...
> > > 
> > > Well, I still have the problem after recompiling and installing Balsa
> > > after
> > > making it pclose() rather than fclose()...
> > > 
> > > If I have no new mail on my pop3 server, everything works perfect.
> > > 
> > > If I have mail on my pop3 server, it tries to download it.  While the
> > box
> > > comes up saying it is checking mail, Balsa just hangs, stops
> redrawing,
> > > and
> > > must be killed.  In the options for my pop3 account, I have "Filter
> > > messages through procmail" checked...  My ~/.procmailrc looks like
> > this:
> > > 
> > > --START--
> > > 
> > > SHELL=/bin/sh
> > > MAILDIR=$HOME/mail
> > > VERBOSE=yes
> > > 
> > > :0:
> > > * ^TO:.*balsa-list@gnome.org
> > > Lists/Balsa
> > > 
> > > --END--
> > > 
> > > My intentions here are to make all the balsa-list stuff go to the
> Balsa
> > > folder I have setup as $HOME/mail/Lists/Balsa.
> > >
> > 
> > The first thing I notice is that VERBOSE=yes should be VERBOSE=on
> > (options
> > are "on" and "off."  The second problem I notice is you don't have a
> PATH
> > defined--procmail nukes the environment on startup--about the only
> thing
> > you can count on being defined is LOGNAME and HOME.  This is done as a
> > security feature.
> > 
> > Second, where is sendmail (or whatever you're using) on your system?
> > "procmail" needs an absolute path to your MTA in the SENDMAIL variable,
> > and
> > that path should also be int the PATH variable.
> > 
> > Third, I notice you're attempting to do logging (with VERBOSE=on), but
> > you have no LOGFILE defined.  This could be very problematic.
> > 
> > Fourth, your filter recipe is over-specified (see mine).
> > 
> > I've attached my .procmailrc for additional guidance.  Note that I'm
> > running
> > FreeBSD 4.3-STABLE, so some of the paths maybe different, etc.
> > 
> >  
> > > The crash that happens leaves my pop3 mailbox locked, so I have to
> wait
> > > for
> > > circa 10 minutes before it becomes unlocked due to timeout (anyone
> know
> > > why
> > > the pop3 timeout is so high in the RFC?)...  Am I missing the point
> of
> > > how
> > > procmail works, or do I have my ~/.procmailrc setup wrong?  I don't
> > know
> > > what is going on...  Any suggestions or fixes for this?  Do I have to
> > > have
> > > procmail running as a service or something?  Do I need to be using
> > > fetchmail to get my mail rather than Balsa's internal pop3 retreival
> > > method?
> > > 
> > > John Anderson
> > > 
> > > 
> > > On 2001.07.31 15:35 John Merryweather Cooper wrote:
> > > > On 2001.07.31 14:47 John Anderson wrote:
> > > > > Hi there, I've been trying to setup procmail to put the Balsa
> > Mailing
> > > > > List
> > > > > emails into their own mail box...  I still haven't gotten that to
> > > work,
> > > > > but
> > > > > I think I've found a smallish (?) problem with the way mail is
> > > filtered
> > > > > through procmail...  It seems that balsa waits for procmail to be
> > > done
> > > > > before it can do anything else...  I'll explain better...
> > > > > 
> > > > > When I try to download mail with a bad ~/.procmailrc Balsa will
> log
> > > > onto
> > > > > my
> > > > > pop3 server, get mail, and it seems to lock itself into the
> > > transaction
> > > > > state of the pop3 session, because I think it is trying to filter
> > > each
> > > > > message through procmail the second it gets it...  I think that
> > this
> > > is
> > > > > bad
> > > > > behaviour, because what is happening with me is that it is
> logging
> > > into
> > > > > my
> > > > > pop3 server, getting a message, passing it to procmail, and
> > somewhere
> > > > in
> > > > > there either balsa becomes dead, or balsa is not threaded in a
> way
> > to
> > > > > handle procmail not returning (at least that's what it seems
> like).
> > 
> > > So
> > > > > then balsa is locked up it seems, and it won't refresh it's
> display
> > > or
> > > > > anything, and I have to kill it and start over.  Of course the
> > > problem
> > > > is
> > > > > that it never closed the transaction with my pop3 server, so I
> have
> > > to
> > > > > wait
> > > > > for at least 10 minutes (the timeout period on pop3 stuff),
> before
> > I
> > > > can
> > > > > try to get mail again, hoping that I fixed my procmail recipes...
> 
> > > Did
> > > > > all
> > > > > that make sense?  I hope that my diagnosis of what is happening
> > isn't
> > > > > totally off...
> > > > > 
> > > > > John Anderson
> > > > > 
> > > > > _______________________________________________
> > > > > balsa-list mailing list
> > > > > balsa-list@gnome.org
> > > > > http://mail.gnome.org/mailman/listinfo/balsa-list
> > > > > 
> > > > 
> > > > And here's the diff, if you can't find it on the list:
> > > > 
> > > > jmc--- libbalsa/pop3.c	Fri Jul 13 01:45:04 2001
> > > > +++ libbalsa/pop3.c.new	Tue Jul 24 17:40:42 2001
> > > > @@ -507,7 +507,7 @@
> > > >  	
> > > >  	err = fetch_single_msg(s, msg, i, first_msg, msgs,
> > &num_bytes,
> > > 
> > > >  			       tot_bytes, prog_cb);
> > > > -	if (fclose (msg) != 0 && err == POP_OK) err =
> > > POP_PROCMAIL_ERR;
> > > > +	if (pclose (msg) != 0 && err == POP_OK) err =
> > > POP_PROCMAIL_ERR;
> > > >  	
> > > >  	if (err != POP_OK)  break; /* the 'for' loop */
> > > >  	if (delete_on_server) delete_msg(s, i); /* ignore errors
> */
> > > > 
> > > 
> > 
> 
> _______________________________________________
> balsa-list mailing list
> balsa-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/balsa-list
> 
-- 
Christophe Barbé
Software Engineer - christophe.barbe@lineo.fr
Lineo France - Lineo High Availability Group
42-46, rue Médéric - 92110 Clichy - France
phone (33).1.41.40.02.12 - fax (33).1.41.40.02.01
http://www.lineo.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]