Matt Pfeil | 4 Nov 2008 17:26

LMTP Question

Hi,

I'm using procmail behind xinetd as a LMTP server.  I'd like for procmail to hand off to maildrop.  However, I
need to pass the original RCPT TO to maildrop.

What variable can I access from the recipe file that contains this data?

Thank you for your help!

Matt

---
matt <at> mailtrust.com
757-619-3677

Mailtrust, a Division of Rackspace
Michelle Konzack | 2 Nov 2008 22:38

Avoiding big external bash script...

Hello,

I was running a self-coded statistic tool over my SPAM storage (7 GByte)
the last 3 weeks and it is realy interesting from whom I get it...

Since database access over the Etherne is to slow, I create a  file  per
"spam" or "backscatter" server and put only the UNIX timestamp into it.

I have gotten over 40000 UNIQUE (!!!) backscatters which are NOT counted
in my statistics but here are others, sending me per month  several  100
of it.

Now I like to catch those zombies...

I want to create a recipe, which allert me, if a "spam" or "backscatter"
send me more then a certain number of spams per period so I am  thinking
on something like

----8<-----------------------------------
:0
* ? line_counter --period=7d --alert=10
{  
  DUMMY_EXEC=`notifier`
  :0
  .ATTENTION.FLT_backscatter/
}
----8<-----------------------------------

so my problem is  the  "line_counter"  which  I  like  to  implement  in
procmail and it must:
(Continue reading)

Andreas Drastig | 10 Nov 2008 18:00
Picon

Search in a Attachment - Procmail

Hello, my english is not the best, but I hope u understand my problem ;o)

I get many mails each day.

If the text in the body e.g. "test" should include this email in the folder test will be postponed, it works
well. 

But now when an attachment is, then searched procmail even after this "test" but this should not happen, is
this possible?

Thanks for Help :o)
_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220
Dallman Ross | 10 Nov 2008 19:35

Re: Search in a Attachment - Procmail

On Mon, Nov 10, 2008 at 06:00:11PM +0100, Andreas Drastig wrote:

> But now when an attachment is, then searched procmail even after
> this "test" but this should not happen, is this possible?

The attachments are encoded.  They are most likely base64- or uu-encoded.

Procmail views the raw stream of message characters.  The only way
to see translated values of encoded files is to decode them.  This
is generally out of procmail's purview.  But you can use procmail
to pipe the message to a MIME-/uudecoder and view the results.  Check
the searchable archives of this list for some tips and ideas on doing
that.

You could alternatively look for the raw string-variants that might
decode to "test" once a message is decoded.  But there are three
variants for each identically-cased string.  And the ways to
mix capitals and small letters for a four-letter word are ...
quite a few (4**2):

  bash-3.2$ for L1 in T t; do for L2 in E e; do for L3 in S s; do for L4 in T t; do echo $L1$L2$L3$L4; done; done; done;
done             
  TEST
  TESt
  TEsT
  TEst
  TeST
  TeSt
  TesT
  Test
(Continue reading)

Barry D. Hassler | 10 Nov 2008 21:44
Picon

System-wide procmailrc vs user .procmailrc

If there is a system-wide /etc/procmailrc file existing, is a user .procmailrc file still used at all?


--
Barry D. Hassler

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail <at> lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
Adam Williams | 10 Nov 2008 21:48
Picon

Re: System-wide procmailrc vs user .procmailrc

yes.

Barry D. Hassler wrote:
If there is a system-wide /etc/procmailrc file existing, is a user .procmailrc file still used at all?


--
Barry D. Hassler

____________________________________________________________ procmail mailing list Procmail homepage: http://www.procmail.org/ procmail <at> lists.RWTH-Aachen.DE http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail <at> lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
Charles Gregory | 10 Nov 2008 22:54

Re: System-wide procmailrc vs user .procmailrc

On Mon, 10 Nov 2008, Adam Williams wrote:
> yes.
> Barry D. Hassler wrote:
> > If there is a system-wide /etc/procmailrc file existing, is a user 
> > .procmailrc file still used at all?

The ~/.procmailrc is processed after the /etc/procmailrc as long as
there is no rule in the system file that is considered 'delivering'. If
you want to disable users from specifying their own .procmailrc, then just
place a delivering recipe to default at the end of /etc/procmailrc....

- Charles
TLD Procmail | 13 Nov 2008 20:52
Favicon

variables and include files

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.

--

-- 
$DEFAULT.sig
Alan Clifford | 13 Nov 2008 22:19
Favicon

Re: variables and include files

On Thu, 13 Nov 2008, TLD Procmail wrote:

>
> 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?
>

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.

--

-- 
Alan
TLD Procmail | 13 Nov 2008 22:31
Favicon

Re: variables and include files

Alan Clifford wrote:
> 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.

   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. :)

--

-- 
$DEFAULT.sig

Gmane