Re: crm114 and procmail: eating mails

"Ger Hobbelt" <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
On Wed, Apr 23, 2008 at 9:00 AM, Antoine Junod <[email protected]> wrote:
>  The following [1] says it's the size of the message in bytes.

Ah, thanks!

>  >>  # Mailfilter.cf
>  >>  :log_to_allmail.txt:  /yes/
>  >
>  > The line above means that each of those munched emails that passed
>  > through the crm114 filter (yeah, I checked up on the procmail manual
>  > to decode that recipe stuff, didn't find info on that 'Folder: ...
>  > logline though...) must also show up in the file (mailfilter.crm
>  > snippet follows ~ line 210:)
>
>  Zip boum. That's not the case. Even if everybody can read / write the
>  file and the folder in wich is the file.

Whoops?! If I get you right, it stays empty all the time? That means
we can reduce the issue down to the first two areas I indicated: (a)
mishap during mail-feeding to crm114, plus area (b) crm114 doesn't get
to line 210 at all.


>  Thanks for the tip but don't worry for that, I'm a backup fanatic :)

okidoki :-)


>  > :0cfw:
>  > | tee /usr/share/crm114/blubber.txt
>  >
>  > :0
>  > /your-var-mail-dump-dir-etc
[...]
>  With these lines in my .procmailrc, the test mail is well copied in
>  the /usr/share/crm114/blubber.txt file and delivered into the mailbox.

Okay, that at least means the pipe/filter thingy to feed mail to a
tool works as expected - in other words, we can drop area (a)
mentioned above from the suspect list for now.
Which brings us to the crm114 script, i.e. Mr. (B).

>  Other point: my setup crap is on a 64 bit architecture. Could it be a
>  problem?

Well... as the Germans say: "Jein", literally 'yo' = 'yes'.'no'-'esn'
For the /script/ it shouldn't matter all that much - and it differs
per classifier. You may find slightly other pR results on a 64-bit box
than on a 32-bitter, and some (experimental) classifiers may just go
bonkers, but in THIS particular case, I don't think 64-bittyness is a
factor. But I have been proven wrong before, so don't take this as
gospel.


The thing that /really/ bothers me it that I'm not one who's lost for
words all that quickly, but the combined efforts of Jason and you here
today have got me speechless. At least technically.
Holy cow.
You didn't coordinate this with each other, did you? ;-))


Anyway, yours seems like the easier issue of the two... *bing!* ...
just an idea, total underbelly, but it just might /if/ I'm right about
this...

Can you test this slight change to the recipe:

### ->
:0fw: .lockmsg
| /usr/bin/crm114 -u /usr/share/crm114/ --fileprefix
/usr/share/crm114/ mailfilter.crm 2>&1

:0
/var/vpopmail/domains/my.domain.com/tickets/.maildir/
### <-

(= added the 2>&1 up there)
Because I'm out on a limb there regarding procmail as I never used it
before, so to verify my assumptions about allowable redirection in
recipes, you might test my idea using our trusted 'tee' command there
first:

  | tee /usr/share/crm114/blubber.txt 1>&2

Note the reversal of the 1 and 2 in the stdio redirection in this
line, because I want 'tee' to echo stdin to stderr instead of stdout.
This new 'tee' filter line should get you
(a) a filled 'blubber.txt'
(b) a Folder: xxxxxxx 0 (zero!) logline from procmail

The idea is that crm114 has something to say and does so on stderr,
which might not be caught by the pipe-filter, so we redirect stderr 2
to stdout 1 before returning to procmail.
It's all hunch and a bit of burning incense waving, but this is the
best I can do for you at this moment.


If the crm114 2>&1 delivers something /else/ than Folder....0 (i.e. a
different number), it is mighty interesting to see /what/ /exactly/
was spit out by crm114.


I'll be listening for your latest results.


-- 
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web: http://www.hobbelt.com/
 http://www.hebbut.net/
mail: [email protected]
mobile: +31-6-11 120 978
--------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.