Does someone have a simple procmail snipit I can use for this?
TIA
Jonathan
Do you mean an empty body?
:0B
* ![a-zA-Z0-9]
/dev/null
Egrep the body for a letter or a number, and if you can't find one,
send it to /dev/null.
We on the right track?
AC
--
Pass-List -----> Block-List ----> Challenge-Response
The key to taking control of your mailbox.
http://www.uwasa.fi/~ts/info/spamfoil.html
http://tinyurl.com/3c3ag
Alan,
Thanks. So this recipe (just so I'm clear) invokes egrep? Sorry if that's
a stupid question.
Jonathan
One other question if you don't mind. Is there a way to save a copy
in a file? The recipe seems to work, but I'm paranoid at this point.
Regards,
Jonathan
To cover both of your posts ( and I well understand your caution...wise ).
Procmail has an internal egrep with a few features of its own. Gotta spend
some time with the excellent manpages: procmail procmailrc procmailex and
then there's the scoring one, which I don't use.
To save a backup copy of everything:
:0:
backup
:0h: to just save the headers.
At the top of your .procmailrc to catch everything. It won't get anything
that has been previously delivered, unless you put a c, for send a copy on,
in front of any recipes you have:
:0c:
Don't use a lockfile (the second :) for recipes that deliver to /dev/null.
Here's a cool webpage full of practical tips:
http://www.uwasa.fi/~ts/info/proctips.html
And a procmail links page: http://www.iki.fi/~era/procmail/links.html
And hit the procmail.org website for all sorts of info.
Have a good one,
>> :0B
>> * ![a-zA-Z0-9]
>> /dev/null
>>
>> Egrep the body for a letter or a number, and if you can't find one,
>> send it to /dev/null.
>Thanks. So this recipe (just so I'm clear) invokes egrep?
no. procmail uses an egrep-like syntax, which is to say extended regular
expressions.
--
a signature
Change the /dev/null to something else and it will be stored in that
mail file. Then you can review its contents at your leisure until
you're sure it's doing exactly what you want.
Procmail supports X plus making a copy and doing something else with
the copy, but that makes no sense here.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling
- - Spammers! http://www.spots.ab.ca/~keeling/spammers.html
http://learn.to/quote http://www.netmeister.org/news/learn2quote.html
ah...
Alan, Thanks. Right now I have it working with just dev/null (no "c"),
so I'm not sure what you mean by not including the ":" after the c if
going to dev/null. Did you mean not include the "c" and the ":"?
Sorry for all the newbie questions! And, thanks for the links!
Jonathan
<snip>
>
> Alan, Thanks. Right now I have it working with just dev/null (no "c"),
> so I'm not sure what you mean by not including the ":" after the c if
> going to dev/null. Did you mean not include the "c" and the ":"?
>
> Sorry for all the newbie questions! And, thanks for the links!
>
> Jonathan
>
What you need to do is read the man pages, particularly procmailrc.
>
And trim your posts.
Have a good one.
AC
--
ed(1) Check out the original tutorials by Brian W.
Kernighan at the Ed Home Page http://tinyurl.com/2aa6g
Alan Connor wrote:
> What you need to do is read the man pages, particularly procmailrc.
> And trim your posts.
To "trim you posts" means to remove the parts of the quoted text that
is not relevant to your reply. For a few examples of how wasteful it
is not to do this, check out the following:
http://groups.google.com/groups?as_umsgid=mOeUb.13263%24uM2...@newsread1.news.pas.earthlink.net
http://groups.google.com/groups?as_umsgid=RoJTb.9861%24F23...@newsread2.news.pas.earthlink.net
http://groups.google.com/groups?as_umsgid=nTfNb.8735%241e...@newsread2.news.pas.earthlink.net
http://groups.google.com/groups?as_umsgid=eC5Mb.4023%24zj...@newsread1.news.pas.earthlink.net
http://groups.google.com/groups?as_umsgid=SfZLb.1799%241e...@newsread2.news.pas.earthlink.net
As you can see, not trimming your posts wastes a lot of bandwidth
transferring irrelevant information, and it makes your posts harder
to read.
Bob
-----BEGIN PGP SIGNATURE-----
Comment: B. Johannessen <b...@db.org> - http://db.org/contact/en/
iD8DBQFAQZiPooisUyMOFlgRArfjAJ42D7193N/LS9809umW0Hab79GcrgCgqnIh
SKN0MdWVHfyA9497utRiHfk=
=XAdF
-----END PGP SIGNATURE-----
(the rest deleted useen -- score "9" = jerk/asshole)
Alan Connor wrote:
> On Sun, 29 Feb 2004 07:45:19 +0000, B. Johannessen <b...@db.org>
> wrote:
It seems you need some quoting lessons. Nothing I wrote was quoted
in that message...
> (the rest deleted useen -- score "9" = jerk/asshole)
This must be the Usenet equivalent of covering your ears and
going: na-na-na-na-na-na-na-na-na-na-na-na-na-na
Bob (jerk *and* asshole)
-----BEGIN PGP SIGNATURE-----
Comment: B. Johannessen <b...@db.org> - http://db.org/contact/en/
iD8DBQFAQbrpooisUyMOFlgRAlYrAKCiVvVvCGkiEdvu69oIp76F5c6smgCeNOi8
XlMwEnPpMbiSJ4mmpvCOslc=
=WdoW
-----END PGP SIGNATURE-----
I'm not sure whether it was Jonathan or Alan or someone else who said
the above, but I'm wondering WHY you shouldn't use a lockfile for
recipes sending mail to /dev/null. I have lots of such recipes, and
almost all of them use a lock file. The recipes work, but if there's
some reason I still shouldn't use a lock file, I'd love to know.
TIA
CQueen
I looked at Timo's page and so far I haven't found the reason
WHY. Can you give a direct link to the section that explains this
(or post an excerpt here) so I can link to it in my Procmail
Quick Start in this section:
<http://www.ii.com/internet/robots/procmail/qs/#delete>
At the moment I just say that it causes an extraneous-lockfile
error message, but I'd like to elaborate on that. My guess is
that it doesn't actually hurt anything to use a lockfile when
"delivering" to /dev/null, but I don't know for sure.
Thanks,
Nancy
--
Nancy McGough
Infinite Ink ~ <http://www.ii.com>
Deflexion & Reflexion ~ <http://deflexion.com>
| At the moment I just say that it causes an extraneous-lockfile
| error message, but I'd like to elaborate on that. My guess is
| that it doesn't actually hurt anything to use a lockfile when
| "delivering" to /dev/null, but I don't know for sure.
You can't use a local lockfile when you're delivering to /dev/null unless
you explicitly name one in another location, because unless you're running
your .procmailrc as root, procmail cannot create /dev/null.lock.
So it's a waste of effort even to try.
Suppose it were possible for an unprivileged uid to create and remove
/dev/null.lock; potentially every user on the system gets some unwanted mail,
so if two users got mail at almost the same time that they didn't want, why
should the second one wait around to dump it until the first one removes
/dev/null.lock?
I can't remember where I read it -- likely not in the man pages -- that
(not only for those reasons but also because there just plain is no point
in serializing writes to /dev/null) procmail ignores a request for an
implicitly named local lockfile when the action is to deliver to /dev/null.
So that second colon is a waste that procmail just has to read past.
But the main waste is the mental misunderstanding of a user who puts a
second colon on a dump to /dev/null to get a local lockfile for it.
Since nobody invokes procmail with more than one rcfile named on the command
line any more, the most efficient way to drop mail into the bit bucket is
not to file it in /dev/null but to unset HOST. But when you write recipes
for somebody else to use, delivery to /dev/null is much easier for the
beneficiary to understand.
--
David W. Tamkin
The reply address accepts mail until midnight US Central Time on 21Mar2004.
> > Never mind, I found the answer in Timo's FAQ at
> > http://www.uwasa.fi/~ts/info/proctips.html .
Actually, not there, as such.
> I looked at Timo's page and so far I haven't found the reason
> WHY. Can you give a direct link to the section that explains this
AFAIK, because if procmail gets to choose the name, it forms the
name based on the target file's name. In the case if /dev/null that
makes little sense. Now don't take this as authoritative. The true
explation is somewhere on the net, but I do not recall where.
All the best, Timo
--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html
Thank you very much for that post David! I now link to it here:
<http://www.ii.com/internet/robots/procmail/qs/#delete>
Here's the relevant part:
None of these three recipes need a lock and using one will cause
procmail to complain about an "extraneous lockfile." For details
about why it doesn't make sense to lock /dev/null, see David W.
Tamkin's 2004-03-14 message Re: looking for simple procmail
recipe in comp.mail.misc.
Note that I recommend that people set HOST to something like
'adios' rather than delivering to /dev/null or simply unsetting
HOST. For details, check it out -- and as always, feedback is
welcome.
Thank you,