procmail
[Top] [All Lists]

Re: calling formail is not adding all intended headers

2007-06-21 06:50:52
Dallman Ross wrote:
Bart Schaefer wrote Thursday, June 21, 2007 3:21 AM:

  
That [. . .] makes me think that you're using a UW IMAP server
and you're trying to fool it [. . . .]
    

  
It's possible, even probable, that the IMAP server has
recognized that a message that it has never seen before has
somehow acquired a keyword, and is therefore deleting it, so
that a malicious sender can't change the way your email is
processed.  The server has no way to know that you added the
header yourself with procmail.
    

I think this is right.  Some servers use the Message-ID and
delete subsequent copies of cached values.  Personally, I
don't like the approach.  (I asked my ISP to disable the
"feature" for my account, and it did so.)  I'd suggest
either disabling that behavior on the server or, as a
workaround, rewriting the Message-ID.  Formail can do the
latter, as long as you're using it.
  

I'm not following your logic here. :-)

I have other recipes which successfully add X-Keywords: $Label1 headers 
and they have the desired effect. Those recipes are in /etc/procmailrc

*This* recipe operates outside /etc/procmailrc and after an explicit 
DROPPRIVS=YES. Once I receive the message at my own server, my ISP is 
out of the picture... I just do not see the connection with what my ISP 
may do with Message-Id.

If Dovecot IMAP server is truly removing some X-Keyword: headers just 
because a message is new, I'll open a bug report against it. I 
understand the argument for preventing somebody from sending those 
headers to possibly influence message delivery, but if that is truly a 
problem, I can start my /etc/procmailrc with a "remove X-Keywords" 
recipe....

That risk is no greater than people sending any other header, such as 
Importance:, X-Priority etc.

I also have trouble with this theory because I don't see how Dovecot 
could keep track of which messages are new and thus be subject to this 
header-extraction. Based on Message-Id? Are you suggesting Dovecot keeps 
track of every message-id it's ever seen? I suppose the CLIENT could do 
it.... perhaps there's an IMAP trace I could use to see if the 
X-Keywords headers are being removed.

I could also "unsubscribe" to that particular folder and check it 
"manually" with vim to see if the X-Keywords headers are there, if so, 
subscribe to the folder again, and see if the X-Keywords headers are 
still there.

But, if that's the case, why do some recipes work while this one does not?

In the case that works correctly, the recipe adds only an X-Keywords: 
$Label1 when the message already has an X-Priority: (1|2) or Importance: 
High header.  What I'm thinking now is to add the X-Priority: 1 before 
adding the X-Keywords: header. It's a stretch, but an interesting 
experiment. Header order is not supposed to matter.

Well, everybody loves a good mystery. :-)

Thanks.
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail