<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://permalink.gmane.org/gmane.mail.procmail">
    <title>gmane.mail.procmail</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19290"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19289"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19288"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19287"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19286"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19285"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19284"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19283"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19282"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19281"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19280"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19279"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19278"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19277"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19276"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19275"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19274"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19273"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19272"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.mail.procmail/19271"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19290">
    <title>Re: Checking if a header exists</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19290</link>
    <description>
Oh, Doh! &lt;/facepalm&gt;

</description>
    <dc:creator>LuKreme</dc:creator>
    <dc:date>2008-12-03T16:08:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19289">
    <title>Re: Checking if a header exists</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19289</link>
    <description>
Make sure there's whitespace between the closing quotes of the first 
argument and the second.  Otherwise, you're likely to end up with the 
second header just being part of the first (and with a -i in there to boot).

I'll betcha that fixes your problem.


The casing has to do with whether any existing header is preserved by 
renaming, or if it is simply replaced.  -a, -A, -i, -I all perform a 
similar function (adding headers), but they handle the presence of existing 
headers in different ways. -i should be fine in your instance.

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: &lt;http://www.professional.org/procmail/disclaimer.html&gt;
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.
</description>
    <dc:creator>Professional Software Engineering</dc:creator>
    <dc:date>2008-12-03T15:56:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19288">
    <title>Checking if a header exists</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19288</link>
    <description>I have a recipe to check for a header and if it is NOT found, to send  
a copy of the mail to an external address.  Trouble is, I'm doing  
something wrong:

first, I do this with all the mail that 'falls through' a bunch of  
checks:

:0fw
| formail -i"Status: RO"-i"X-Kreme: NO"

then, later on, I go to forward on the mail that I've not tagged.

    :0c
    * ! ^X-Kreme:
    ! me&lt; at &gt;somewhere.else.tld

however, the header isn't getting added.  I'm pretty sure I've seen  
that syntax of adding multiple headers before (although all the  
example I can find are using -I instead of -I; but that shouldn't  
matter, should it?) but something must be wrong.

</description>
    <dc:creator>LuKreme</dc:creator>
    <dc:date>2008-12-03T15:39:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19287">
    <title>RE: envelope address delivering mail via smtp</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19287</link>
    <description>Professional Software Engineering wrote Sunday, November 30, 2008 4:46 PM:


I'm pretty sure you meant to type a bang ("!") instead
of a pipe.

Yeah, the -f option is very useful.

Dallman
</description>
    <dc:creator>Dallman Ross</dc:creator>
    <dc:date>2008-11-30T19:26:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19286">
    <title>Re: envelope address delivering mail via smtp</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19286</link>
    <description>This is almost enough: i need to delivery the mail using, as envelope

Note that the pipe delivery action in procmail invokes the program defined 
in $SENDMAIL, so you can actually do:

:0
* conditions
| -f $sender recipient(s)


It is important to note that unless the sending account (the UID which mail 
is being processed for, and thus the UID which is invoking sendmail) is 
part of the TRUSTED class in sendmail, it'll tack a warning about the use 
of the -f parm INTO THE SENT MESSAGE HEADERS.

If you're forwarding to yourself someplace else and don't care about the 
extra header, no biggie.  If you administer the machine where mail is being 
forwarded in this fashion, just ensure that account is part of the trusted 
class in the sendmail configuration (though that also gains access to 
viewing the full mailqueue and other things).  Or, do the forwarding from 
the global procmailrc while the privileges are still elevated...

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: &lt;h</description>
    <dc:creator>Professional Software Engineering</dc:creator>
    <dc:date>2008-11-30T15:45:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19285">
    <title>Re: envelope address delivering mail via smtp</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19285</link>
    <description>With sendmail, you can specify the envelope sender using the -f switch, 
for example /usr/lib/sendmail -f $sender
Other mailers may use different parameters.

</description>
    <dc:creator>Klaus Johannes Rusch</dc:creator>
    <dc:date>2008-11-29T20:50:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19284">
    <title>envelope address delivering mail via smtp</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19284</link>
    <description>Hi alls,

I'm using fetchmail + procmail to set up a filtered pop2smtp gateway.

Fetchmail works fine. Messages are fetched via POP and passed to procmail.

Now, I have a really simple recipe ($1 is the correct recipient, passed
with -a- option):

:0
* !^foo:bar
| $1

This is almost enough: i need to delivery the mail using, as envelope
sender, the *original envelope sender*.

Correctly, the recipe action will use, as envelope sender, the user
running procmail process.

Sorry for this stupid question: i'm wasting hours reading man pages and
searching for documentation, without luck.

How can i set the original envelop sender on recipe action? Or do i have
to use other tools to forward the mail to the next MTA?

thanks, br

</description>
    <dc:creator>Federico Tomassini</dc:creator>
    <dc:date>2008-11-28T22:39:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19283">
    <title>Re: Host lookups</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19283</link>
    <description>

Hmmmm.  I read that; wasn't sure how to go about it.  And I couldn't find 
anything like what I wanted in 'man procmailex.'

Thanks.


Thanks for the heads up.


I believe it is.


I don't know.  I get my mail through my leased server; so I don't think my 
SMTP host really sees it until after the fact (during mail downloads).

Thank you Dallman!  I'll play with the above.

 - fleet -
</description>
    <dc:creator>Fleet Teachout</dc:creator>
    <dc:date>2008-11-28T13:39:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19282">
    <title>Re: Host lookups</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19282</link>
    <description>

I already know it will be empty as to XXX.  You are using wrong
syntax.  Suggest you do a quick review of the man page.


  |      Starts the specified program, possibly in $SHELL if any  of  the
         characters  $SHELLMETAS are spotted.  You can optionally prepend
         this pipe symbol with variable=, which will cause stdout of  the
         program  to  be  captured  in the environment variable (procmail
         will not terminate processing the rcfile at this point).

Try

    XXX=| host "$MATCH" | cut -d' ' -f5

And you would not need the c-flag at the start of the recipe.

However, there is a serious bug in many procmail binaries making
the above syntax unsafe.  Random memory will be eaten unless you
have applied a patch.  So the alternative below is recommended:

  :0
  * conditions
  { XXX = `shell command` }

(You don't need the c-flag there, either.  Nested brace sets
are not delivering recipes, and the assignment therein is also
not a delivering action.)

I believe the latter is what you</description>
    <dc:creator>Dallman Ross</dc:creator>
    <dc:date>2008-11-28T12:31:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19281">
    <title>Host lookups</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19281</link>
    <description>I have a little php script that sends me the following when someone "hits" 
a particular page:

Wed Nov 26 20:39:43 EST 2008
Remote = 75.104.35.214
Remote Name =
Referer = http://www.mydomain.com/journal/
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 
MindSpring Internet Serv$

I've recently switched servers.  The old server did host lookups.  The new 
one doesn't.  I'm trying to use procmail to do the host lookup so I can 
see the "Remote Name."  So far I have:


Everything works until I get to the | XXX line.  Nothing gets assigned to 
XXX.  MATCH shows in the log as - procmail: Matched "75.104.35.214" for 
example.

Log shows:

procmail: Executing " XXX=`host $MATCH | cut -d' ' -f5`"
procmail: Assigning "LASTFOLDER= XXX=`host $MATCH | cut -d' ' -f5`"
  Subject: Journal hit
   Folder:  XXX=`host $MATCH | cut -d' ' -f5` 
1035
procmail: Assigning "LOG=
      "

procmail: Assigning "LASTFOLDER=results"

So how do I get the output of the host lookup into that XXX variable, 
please?

 - </description>
    <dc:creator>Fleet Teachout</dc:creator>
    <dc:date>2008-11-28T07:14:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19280">
    <title>Re: [pro] how to strip down a subject line</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19280</link>
    <description>
   You are right that single quotes protect the variable from expanding.
However, the single quotes are part of the shell execution string and
therefore passed straight to the shell.  In this case, this is because
they are inside the "".  Without them, the shell will interpret spaces
and special symbols, which is definitely not wanted.  :)

   Dallman's suggestion worked well, so I'll stick with that, instead
of my own perl script.  I appreciate the reply though!

</description>
    <dc:creator>TLD Procmail</dc:creator>
    <dc:date>2008-11-20T21:05:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19279">
    <title>Re: [pro] how to strip down a subject line</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19279</link>
    <description>
I believe, as per shell rules, those single quotes *protect* the variable
from being substituted. Try omitting the quotes. Or execute it directly
with the parameter in double-quotes:

SUBJECT2=`/usr/local/bin/subject.stripper.pl "${SUBJECT}"`

- Charles
</description>
    <dc:creator>Charles Gregory</dc:creator>
    <dc:date>2008-11-20T20:54:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19278">
    <title>RE: how to strip down a subject line</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19278</link>
    <description>"TLD Procmail" wrote Thursday, November 20, 2008 8:25 PM:


I suggest you take a refersher in some basic Unix shell
command and their possibilities.  You certainly do not need
to write anything in perl to do this.  Just use /usr/bin/tr.



I don't know about "obviously," but: is your script chmodded right?
Etc.  I again say, though: you don't need any such thing as this.
Just do:

  SUBJECT2 = `echo "$SUBJECT" | tr -dc 'a-zA-Z '`  # space and tab are in there too

</description>
    <dc:creator>Dallman Ross</dc:creator>
    <dc:date>2008-11-20T19:52:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19277">
    <title>how to strip down a subject line</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19277</link>
    <description>I've got a variable definition recipe in my /etc/procmailrc
which defines SUBJECT, as:

:0
* ^Subject:\/.*
{ SUBJECT = $MATCH }

Now, what I want to do is make a copy of this, but strip
out everything but letters and spaces.  So, I wrote a
simple perl script (since I have no clue if this can be
done in procmail):

#!/usr/bin/perl
#MAIN
{
   my($subject) = shift(&lt; at &gt;ARGV) || '';
   my($newsubj) = '';
   #  we want to keep only letters and spaces
   for(my $x = 0; $x &lt; length($subject); $x++) {
     if(substr($subject, $x, 1) =~ /[A-Za-z ]/) {
       $newsubj .= substr($subject, $x, 1);
     }
   }
   print $newsubj;
   exit;
}
#

Then, I tried to assign the output of this script into SUBJECT2.
It doesn't want to work, the SUBJECT2 is always blank.  I think
maybe it's passing out a blank.  Here is what I put into my
/etc/procmailrc:

STRIPCMD="/usr/local/bin/subject.stripper.pl '${SUBJECT}'"
LOG="STRIPCMD(${STRIPCMD})"
SUBJECT2=`$STRIPCMD`
LOG="SUBJECT2(${SUBJECT2})"

Now, STRIPCMD looks great and the log file sh</description>
    <dc:creator>TLD Procmail</dc:creator>
    <dc:date>2008-11-20T19:24:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19276">
    <title>Re: variables and include files (fwd)</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19276</link>
    <description>---------- Forwarded message ----------
Date: Fri, 14 Nov 2008 11:32:39 -0600
From: TLD Procmail &lt;tld.procmail&lt; at &gt;stimulacra.com&gt;
To: procmail&lt; at &gt;lists.RWTH-Aachen.DE
Subject: Re: variables and include files

Alan Clifford wrote:

   Well, it turns out that indeed, the variables assigned retain their
value within include files.

TLD
</description>
    <dc:creator>Alan Clifford</dc:creator>
    <dc:date>2008-11-14T23:01:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19275">
    <title>Re: variables and include files</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19275</link>
    <description>
   Well, it turns out that indeed, the variables assigned retain their
value within include files.

TLD
</description>
    <dc:creator>TLD Procmail</dc:creator>
    <dc:date>2008-11-14T17:32:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19274">
    <title>Re: variables and include files</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19274</link>
    <description>
   So, at the beginning when I assign a value to LOG, it is writing it
out right then and there?  Interesting, I didn't know that.  OK, that's
good to know!  I appreciate the info!  now to go test...

</description>
    <dc:creator>TLD Procmail</dc:creator>
    <dc:date>2008-11-13T22:03:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19273">
    <title>Re: variables and include files</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19273</link>
    <description>


LOG="${DUMMY}"

That doesn't define your log file.  Assigning a value to LOG writes that 
value to your log file.  It doesn't need to be within a recipe.

</description>
    <dc:creator>Alan Clifford</dc:creator>
    <dc:date>2008-11-13T21:48:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19272">
    <title>Re: variables and include files</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19272</link>
    <description>
   Alan, thanks for the reply.

   At the beginning of /etc/procmailrc, I define the LOG used by all
the recipes.  I guess the question is, how can I put that into an
included rc file without changing the global LOG?  Something like this
perhaps?

:0c
{
   LOG="${DUMMY}"
}

But since it doesn't have an action line, will it even do anything?
I'm afraid my knowledge of procmail recipe formating is enough to make
me dangerous. :)

</description>
    <dc:creator>TLD Procmail</dc:creator>
    <dc:date>2008-11-13T21:31:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19271">
    <title>Re: variables and include files</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19271</link>
    <description>


If you define a variable DUMMY="hello", you can write it later with 
LOG="${DUMMY}" to the log file.  So you can test and see if the correct 
value is written to the log file.

</description>
    <dc:creator>Alan Clifford</dc:creator>
    <dc:date>2008-11-13T21:19:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.mail.procmail/19270">
    <title>variables and include files</title>
    <link>http://permalink.gmane.org/gmane.mail.procmail/19270</link>
    <description>At the beginning of my /etc/procmailrc, I define a few variables
as such:

OR  = "9876543210^0"
AND = ""
IF  = $OR

:0
* ^Subject:\/.*
{ SUBJECT = $MATCH }

:0
* ^From:\/.*
{ FROMC = $MATCH }

:0
* ^From[^:]\/.*
{ FROM = $MATCH }

:0
* ^Return-Path:\/.*
{ RETPATH = $MATCH }

I use these in a number of the recipes in the file.  I also
have some include calls to other rc files to help keep the
main file uncluttered.

My first question is this:  Will includes also see these
variables as defined?  Or do I need to include this at the
beginning of each include?

I gut tells me all includes will see them but I wanted to make
sure before making appropriate changes to the includes.

My second question is:  If I put this stuff into an include
at the top of the /etc/procmailrc, will the main file then
see it?  I would assume yes if the answer to the previous
question is also yes.

</description>
    <dc:creator>TLD Procmail</dc:creator>
    <dc:date>2008-11-13T19:52:10</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.mail.procmail">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.mail.procmail</link>
  </textinput>
</rdf:RDF>
