procmail recipe causing "bounced mail"?
procmail recipe causing "bounced mail"?
am 01.01.2005 20:47:49 von kj
I subscribe to a few high-volume mailing lists, in which I participate
actively. However, I'm often away from e-mail for weeks at a time
(such as the last three weeks). Since my ISP account is one with
limited diskspace, before such occasions I activate (i.e. uncomment)
procmail rules like
:0
* ^TO_mega_volume@firehydrant.org
/dev/null
This has worked well before, but I just received an automated
message from the mailing list I most recently joined saying that
messages to me have been "bouncing" (i.e. they are getting mail
from my host's MAIL-DAEMON and the subject line "Undelivered Mail
Returned to Sender"). I'm sure the reason has to do with the
procmail rule above, but I don't understand why.
Now, I know that there are many solutions to the problem of
temporarily turning off incoming mail from high-volume lists that
don't require fussing with procmail rules, but finding a solution
to this problem is *not* the reason I'm posting this.
What I want is to *correct* my understanding of what procmail is
actually doing. I thought that the rule above would simply discard
the mail addressed to the list, not cause anything to be sent back
("bounced") in response. Is there anything I can do to the recipe
above to ensure that procmail simply deletes the matching mail
"silently" and doesn't "bounce" anything to the sender?
My system is Unix (NetBSD), and the incantation in my .forward file is
"|IFS=' ';exec /usr/local/bin/procmail||exit 75 #kyle30439"
Thanks!
kj
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
Re: procmail recipe causing "bounced mail"?
am 01.01.2005 22:00:37 von Alan Connor
On Sat, 1 Jan 2005 19:47:49 +0000 (UTC), kj
wrote:
> I subscribe to a few high-volume mailing lists, in which I
> participate actively. However, I'm often away from e-mail for
> weeks at a time (such as the last three weeks). Since my ISP
> account is one with limited diskspace, before such occasions I
> activate (i.e. uncomment) procmail rules like
>
>:0
> * ^TO_mega_volume@firehydrant.org
> /dev/null
>
> This has worked well before, but I just received an automated
> message from the mailing list I most recently joined saying
> that messages to me have been "bouncing" (i.e. they are
> getting mail from my host's MAIL-DAEMON and the subject line
> "Undelivered Mail Returned to Sender").
How come you can get mail from the listadmin but not the list?
> I'm sure the reason
> has to do with the procmail rule above, but I don't understand
> why.
>
No. It doesn't.
You REALLY need to read the procmail man pages.
> Now, I know that there are many solutions to the problem of
> temporarily turning off incoming mail from high-volume lists
> that don't require fussing with procmail rules, but finding a
> solution to this problem is *not* the reason I'm posting this.
>
> What I want is to *correct* my understanding of what procmail
> is actually doing. I thought that the rule above would simply
> discard the mail addressed to the list, not cause anything to
> be sent back ("bounced") in response.
That's exactly what it does.
Procmail can't cause your host's MTA to do anything.
If procmail has received the mail, then it wasn't bounced.
> Is there anything I can
> do to the recipe above to ensure that procmail simply deletes
> the matching mail "silently" and doesn't "bounce" anything to
> the sender?
Yes. Don't touch it.
AC
Re: procmail recipe causing "bounced mail"?
am 01.01.2005 23:22:32 von keeling
kj :
>
> I subscribe to a few high-volume mailing lists, in which I participate
> actively. However, I'm often away from e-mail for weeks at a time
> (such as the last three weeks). Since my ISP account is one with
> limited diskspace, before such occasions I activate (i.e. uncomment)
> procmail rules like
>
> :0
> * ^TO_mega_volume@firehydrant.org
> /dev/null
Why not just unsubscribe before you leave? As for procmail though:
VERBOSE=yes
:0
* ^TO_mega_volume@firehydrant.org
/dev/null
VERBOSE=no
will tell you what that's doing. Check your procmail log file.
Also, I see you have a leading space on lines 2 and 3 in your recipe
above. Could that be the problem?
Finally, there's lots of ways for people to post to lists, and they
may not all show that address. You might want to look at some of the
headers in them and find other distinguishing characteristics, such as
Newsgroups: lines, Delivered-To:, Received:, Posted-To:, & etc.
> My system is Unix (NetBSD), and the incantation in my .forward file is
>
> "|IFS=' ';exec /usr/local/bin/procmail||exit 75 #kyle30439"
..forward is specific to your MTA. man procmail mentions what your
..forward should look like for your MTA. Mine's exim, and my .forward
is:
|/usr/bin/procmail
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling Linux Counter #80292
- - http://www.ietf.org/rfc/rfc1855.txt
Spammers! http://www.spots.ab.ca/~keeling/autospam.html
Re: procmail recipe causing "bounced mail"?
am 02.01.2005 18:40:23 von Allodoxaphobia
On 1 Jan 2005 22:22:32 GMT, s. keeling wrote:
> kj :
>
>> :0
>> * ^TO_mega_volume@firehydrant.org
>> /dev/null
>
> Also, I see you have a leading space on lines 2 and 3 in your recipe
> above. Could that be the problem?
No. Being an ol' "Procedure Progrmmer", I started out coding
my procmail recipes this-a-way. There's no problem in this area.
But, getting back to the OP's problem. Maybe the list email is
coming in 'different' -- from a different MTA -- from a different
domain -- or with totally different looking headers. I.e., maybe
something changed on the other end.
Too, maybe your ISP, in the never ending attempt to thwart spammers,
is now blocking in a manner that gets cross-wise with the email list
you are on. That happened with me at my ISP with a email re-director
service from an organization I belong to. My ISP opened a hole for
me WRT that incoming traffic.
HNY
Jonesy
--
| Marvin L Jones | jonz | W3DHJ | linux
| Gunnison, Colorado | @ | Jonesy | OS/2 __
| 7,703' -- 2,345m | config.com | DM68mn SK
Re: procmail recipe causing "bounced mail"?
am 04.01.2005 18:47:09 von AK
Alan Connor wrote:
> On Sat, 1 Jan 2005 19:47:49 +0000 (UTC), kj
> wrote:
>
>
>>I subscribe to a few high-volume mailing lists, in which I
>>participate actively. However, I'm often away from e-mail for
>>weeks at a time (such as the last three weeks). Since my ISP
>>account is one with limited diskspace, before such occasions I
>>activate (i.e. uncomment) procmail rules like
>
>
>
>>:0
>>* ^TO_mega_volume@firehydrant.org
>>/dev/null
>>
>
>
>
>>This has worked well before, but I just received an automated
>>message from the mailing list I most recently joined saying
>>that messages to me have been "bouncing" (i.e. they are
>>getting mail from my host's MAIL-DAEMON and the subject line
>>"Undelivered Mail Returned to Sender").
>
>
> How come you can get mail from the listadmin but not the list?
>
>
>> I'm sure the reason
>>has to do with the procmail rule above, but I don't understand
>>why.
>>
>
>
>
> No. It doesn't.
>
> You REALLY need to read the procmail man pages.
>
>
>
>>Now, I know that there are many solutions to the problem of
>>temporarily turning off incoming mail from high-volume lists
>>that don't require fussing with procmail rules, but finding a
>>solution to this problem is *not* the reason I'm posting this.
>>
>>What I want is to *correct* my understanding of what procmail
>>is actually doing. I thought that the rule above would simply
>>discard the mail addressed to the list, not cause anything to
>>be sent back ("bounced") in response.
>
>
>
> That's exactly what it does.
>
> Procmail can't cause your host's MTA to do anything.
>
> If procmail has received the mail, then it wasn't bounced.
>
>
>> Is there anything I can
>>do to the recipe above to ensure that procmail simply deletes
>>the matching mail "silently" and doesn't "bounce" anything to
>>the sender?
>
>
> Yes. Don't touch it.
>
>
>
>
> AC
>
>
In Short Alan, the check is for the Message to be addressed to the list,
A notice from the admin is addressed to the recipient and not to the list.
AK
Re: procmail recipe causing "bounced mail"?
am 04.01.2005 18:51:41 von AK
kj wrote:
> I subscribe to a few high-volume mailing lists, in which I participate
> actively. However, I'm often away from e-mail for weeks at a time
> (such as the last three weeks). Since my ISP account is one with
> limited diskspace, before such occasions I activate (i.e. uncomment)
> procmail rules like
>
> :0
> * ^TO_mega_volume@firehydrant.org
> /dev/null
>
> This has worked well before, but I just received an automated
> message from the mailing list I most recently joined saying that
> messages to me have been "bouncing" (i.e. they are getting mail
> from my host's MAIL-DAEMON and the subject line "Undelivered Mail
> Returned to Sender"). I'm sure the reason has to do with the
> procmail rule above, but I don't understand why.
>
> Now, I know that there are many solutions to the problem of
> temporarily turning off incoming mail from high-volume lists that
> don't require fussing with procmail rules, but finding a solution
> to this problem is *not* the reason I'm posting this.
>
> What I want is to *correct* my understanding of what procmail is
> actually doing. I thought that the rule above would simply discard
> the mail addressed to the list, not cause anything to be sent back
> ("bounced") in response. Is there anything I can do to the recipe
> above to ensure that procmail simply deletes the matching mail
> "silently" and doesn't "bounce" anything to the sender?
>
> My system is Unix (NetBSD), and the incantation in my .forward file is
>
> "|IFS=' ';exec /usr/local/bin/procmail||exit 75 #kyle30439"
>
> Thanks!
>
> kj
>
>
How certain are you that the rejection occurs during the procmail
process and not before?
I believe someone has responded that you should enable logging to
determine the source. Are you sure that other than the high volume
mailing lists, nothing could have pushed your account overquota? What
happens to messages when your account is overquota? Do they get rejected?
AK
Re: procmail recipe
am 03.09.2006 02:11:17 von keeling
felmon davis :
> On Thu, 31 Aug 2006 06:19:04 +0000, Paul Colquhoun wrote:
>
>
> > That will match as long as there is one character on the line that is
> > not in the set '.@;'.
> >
> > Have you tried:
> >
> > * ^from[^\.\@\-]*$
> >
> > That requires every character in the line (after the 'from') to be in
> > the set "not '.@;'"
>
> this doesn't seem to work. here is the relevant snippet:
>
> :0 B:
> * ^from[^\.\@\-]*$
> | formail -A "X-NewTest: Yes">> SuspectSpam
>
> procmail.log says 'No match on "^from[^\.\@\-]*$"'.
For the record, comp.mail.misc is the right place to post procmail
questions. Followups set.
I note you're not allowing for spaces after the "from", and you're
insisting that "from" be at the start of the line. Is it? Why not
post the relevant "from" line that you're attempting to match?
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.
Spammers! http://www.spots.ab.ca/~keeling/emails.html
Re: procmail recipe
am 03.09.2006 09:16:58 von Garen Erdoisa
s. keeling wrote:
> felmon davis :
>> On Thu, 31 Aug 2006 06:19:04 +0000, Paul Colquhoun wrote:
>>
>>
>>> That will match as long as there is one character on the line that is
>>> not in the set '.@;'.
>>>
>>> Have you tried:
>>>
>>> * ^from[^\.\@\-]*$
>>>
>>> That requires every character in the line (after the 'from') to be in
>>> the set "not '.@;'"
>> this doesn't seem to work. here is the relevant snippet:
>>
>> :0 B:
The "B" flag here is telling the recipe to egrep the body of the message
and ignore the headers. Leaving this flag off, or using an "H" flag will
have the recipe egrep the headers and ignore the body.
>> * ^from[^\.\@\-]*$
>> | formail -A "X-NewTest: Yes">> SuspectSpam
>>
>> procmail.log says 'No match on "^from[^\.\@\-]*$"'.
>
> For the record, comp.mail.misc is the right place to post procmail
> questions. Followups set.
>
> I note you're not allowing for spaces after the "from", and you're
> insisting that "from" be at the start of the line. Is it? Why not
> post the relevant "from" line that you're attempting to match?
>
>
--
Garen
Re: procmail recipe
am 03.09.2006 19:51:11 von felmon davis
On Sun, 03 Sep 2006 00:11:17 +0000, s. keeling wrote:
> For the record, comp.mail.misc is the right place to post procmail
> questions. Followups set.
thanks.
> I note you're not allowing for spaces after the "from", and you're
> insisting that "from" be at the start of the line. Is it? Why not
> post the relevant "from" line that you're attempting to match?
the 'from' will be at the start of the line. the example is 'from hell' -
a two-word phrase starting with 'from' separated from a 2nd word,
there needs to be a space after 'from' therefore. I am not sure how to
mark that.
Felmon
Re: procmail recipe
am 03.09.2006 19:59:23 von felmon davis
On Sun, 03 Sep 2006 01:16:58 -0600, Garen Erdoisa wrote:
>>> :0 B:
>
> The "B" flag here is telling the recipe to egrep the body of the message
> and ignore the headers. Leaving this flag off, or using an "H" flag will
> have the recipe egrep the headers and ignore the body.
I wanted the headers ignored.
some emails come through with 'from word' as part of the headers -
exactly like that but replace 'word' with some random single word.
these emails are all spam.
I have been trying to test my recipe but doing the testing on the 'from
word' construct in the body, easier for me to test it that way. once I
have the right recipe, I would apply it to the headers.
I would be happy to learn a better way!
Felmon
Re: procmail recipe
am 04.09.2006 01:13:06 von AK
felmon davis wrote:
> On Sun, 03 Sep 2006 00:11:17 +0000, s. keeling wrote:
>
>
>>For the record, comp.mail.misc is the right place to post procmail
>>questions. Followups set.
>
>
> thanks.
>
>
>>I note you're not allowing for spaces after the "from", and you're
>>insisting that "from" be at the start of the line. Is it? Why not
>>post the relevant "from" line that you're attempting to match?
>
>
> the 'from' will be at the start of the line. the example is 'from hell' -
> a two-word phrase starting with 'from' separated from a 2nd word,
>
> there needs to be a space after 'from' therefore. I am not sure how to
> mark that.
>
> Felmon
>
>
you can test as follows for a two word line
:0
^ from[ ]*[a-z]+$
spam
AK
Re: procmail recipe
am 04.09.2006 01:55:32 von Garen Erdoisa
felmon davis wrote:
> On Sun, 03 Sep 2006 01:16:58 -0600, Garen Erdoisa wrote:
>
>>>> :0 B:
>> The "B" flag here is telling the recipe to egrep the body of the message
>> and ignore the headers. Leaving this flag off, or using an "H" flag will
>> have the recipe egrep the headers and ignore the body.
>
> I wanted the headers ignored.
>
> some emails come through with 'from word' as part of the headers -
> exactly like that but replace 'word' with some random single word.
> these emails are all spam.
>
> I have been trying to test my recipe but doing the testing on the 'from
> word' construct in the body, easier for me to test it that way. once I
> have the right recipe, I would apply it to the headers.
>
> I would be happy to learn a better way!
>
> Felmon
>
This is an example of how I construct procmail test recipes:
The advantage of this method is that it lets you test and fine tune
regular expressions or other procmail recipe parameters without having
to send any emails through your system.
---file /tmp/username/test.rc----
VERBOSE=yes
:0 H:
* ^()\/from[^\.\@\-]*$
| formail -A "X-NewTest: Yes">> /tmp/username/SuspectSpam
:0
/dev/null
---end of file---
---file /tmp/username/testmessage.txt ---
From: some_pattern
To: some_username@example.com
Some body text
---end of file---
Then to run your test recipe from the command line:
cd /tmp/username
cat testmessage.txt |procmail /tmp/username/test.rc
You can see the output directly on the terminal using this or a similar
method.
ie:
procmail: [20348] Sun Sep 3 17:34:20 2006
procmail: Assigning "MATCH="
procmail: Matched "From: some_pattern
"
procmail: Match on "^()\/from[^\.\@\-]*$"
procmail: Locking "/tmp/username/SuspectSpam.lock"
procmail: Executing " formail -A "X-NewTest: Yes">>
/tmp/scamper/SuspectSpam"
procmail: Assigning "LASTFOLDER= formail -A "X-NewTest: Yes">>
/tmp/username/SuspectSpam"
procmail: Unlocking "/tmp/username/SuspectSpam.lock"
Folder: formail -A "X-NewTest: Yes">> /tmp/username/SuspectSpam
66
If you use this method it's important not to forget to /dev/null by
default as the final part of your test recipe, else any such testing can
result in the test messages possibly being appended to a mailbox, or
some wierd filename in your home directory.
--
Garen
Re: procmail recipe
am 04.09.2006 08:50:57 von felmon davis
On Sun, 03 Sep 2006 17:55:32 -0600, Garen Erdoisa wrote:
>
> If you use this method it's important not to forget to /dev/null by
> default as the final part of your test recipe, else any such testing can
> result in the test messages possibly being appended to a mailbox, or
> some wierd filename in your home directory.
excellent! thank you for this tip, been needing it.
Felmon
[OT] s. keeling (was: re: procmail recipe)
am 04.09.2006 09:27:10 von Alan Connor
On comp.mail.misc, in , "s. keeling" wrote:
> Path: text.usenetserver.com!atl-c01.usenetserver.com!news.usenetse rver.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giga news.com!nntp.giganews.com!cyclone1.gnilink.net!gnilink.net! newsfeed2.telusplanet.net!newsfeed.telus.net!edtnps89.POSTED !53ab2750!not-for-mail
> Newsgroups: comp.os.linux.misc,comp.mail.misc
> From: "s. keeling"
http://groups.google.com/advanced_group_search
s. keeling
Results 1 - 100 of 213 posts in the last year
1 ab.jobs
9 alt.comp.linux
12 alt.os.linux
5 alt.os.linux.debian
3 alt.os.linux.slackware
1 alt.tv.stargate-sg1
1 calgary.jobs
1 calgary.test
2 comp.mail.misc
14 comp.os.linux.misc
1 comp.os.linux.security
5 comp.os.linux.setup
1 comp.unix.misc
1 gnu.utils.help
7 linux.debian.bugs.dist
2 linux.debian.curiosa
29 linux.debian.user
2 mailing.database.myodbc
2 news.software.readers
1 rec.arts.sf.written
Someone using the latest slrn who posts on almost nothing but
technical groups and edits his own headers and is therefore a
very experienced Useneter, expects us to believe that he has only
posted 213 times in the last year?
Spammers sure are stupid (see below)
> Subject: Re: procmail recipe
> References:
> Reply-To: keeling@spots.ab.ca
> Followup-To: comp.mail.misc
> X-UCE: I forward UCE/spam with ALL headers to abuse@your.isp UNREAD!
No you don't. It's almost impossible to determine the
originating IP of spam.
If it wasn't, spam wouldn't be anywhere near the problem it is.
DUH <<<<
> X-UCE2: Wow, are spammers ever stoopid!
They sure are. Unlike anyone else on the Usenet, they make a
big point of hating spam.
> X-PGP-Key: GPG key: http://keyserver.noreply.org:11371/pks/lookup?op=vindex&sear ch=0x48EE77B1AC94E4B7
Takes 2 minutes to create a GPG/PGP key. They are worthless
unless they are _very_ carefully investigated.
There's no point in it unless you are part of his circle of trust
and in that case you should just ignore it. It means nothing.
He's counting on your ignorance.
> Message-ID:
> User-Agent: slrn/0.9.8.1 (Debian)
> Lines: 35
> Date: Sun, 03 Sep 2006 00:11:17 GMT
> NNTP-Posting-Host: 209.115.174.241
$ host 209.115.174.241
Name: dsl2.spots.ab.ca
Port State Service
22/tcp filtered ssh << secure remote login
25/tcp open smtp << mail server
53/tcp filtered domain << whois server (don't believe a word of it)
80/tcp open http
135/tcp filtered loc-srv
139/tcp filtered netbios-ssn
443/tcp open https << secure webserver
445/tcp filtered microsoft-ds
587/tcp open submission
12345/tcp filtered NetBus
That's about what I'd expect a spammer's computer to run.
> X-Trace: edtnps89 1157242277 209.115.174.241 (Sat, 02 Sep 2006 18:11:17 MDT)
> NNTP-Posting-Date: Sat, 02 Sep 2006 18:11:17 MDT
> Xref: usenetserver.com comp.os.linux.misc:551087 comp.mail.misc:160273
> X-Received-Date: Sat, 02 Sep 2006 20:11:17 EDT (text.usenetserver.com)
http://slrn.sourceforge.net/docs/README.offline>
Alan
--
If you replied to an article of mine and are wondering
why I didn't respond to you, the fact is that I didn't
even download your article. For an explanation, see:
http://home.earthlink.net/~alanconnor/newsfilter.html
Information about "Alan Connor" - Was: [OT] s. keeling (was: re: procmail recipe)
am 04.09.2006 09:28:11 von unknown
Post removed (X-No-Archive: yes)
Re: procmail recipe
am 04.09.2006 10:18:48 von felmon davis
On Sun, 03 Sep 2006 19:13:06 -0400, AK wrote:
>
> you can test as follows for a two word line
> :0
> ^ from[ ]*[a-z]+$
> spam
>
> AK
I altered this for my purposes (two words: one is 'from' and the other
must not contain certain chars) but must have introduced an error; here is
what I have but it doesn't catch the flies:
:0 B
^from[ ]*[^\.\@\-]+$
|formail -A"X-NewTest: Yes">>SuspectSpam
(I've tried leaving 'B' off too.)
what am I flubbing?
Felmon
Re: procmail recipe
am 04.09.2006 13:12:33 von Garen Erdoisa
felmon davis wrote:
> On Sun, 03 Sep 2006 19:13:06 -0400, AK wrote:
>
>> you can test as follows for a two word line
>> :0
>> ^ from[ ]*[a-z]+$
>> spam
>>
>> AK
>
> I altered this for my purposes (two words: one is 'from' and the other
> must not contain certain chars) but must have introduced an error; here is
> what I have but it doesn't catch the flies:
>
> :0 B
> ^from[ ]*[^\.\@\-]+$
typo: this line should begin with an asterisk "*"
ie:
* ^from[ ]*[^\.\@\-]+$
> |formail -A"X-NewTest: Yes">>SuspectSpam
>
> (I've tried leaving 'B' off too.)
>
> what am I flubbing?
>
> Felmon
>
Also, keep in mind that Berkley mailbox format uses a line starting with
From[space] to separate mailbox messages.
If it finds a line beginning with "From " in the body of a message email
software will usually automatically perpend the line with an escape
character ie:
>From
This is so that plain text messages with such a line are not split into
separate messages by accident.
This might be messing up your testing if you aren't taking this into
account.
This example worked here:
---- file: /tmp/username/test.rc ----
NL="
"
VERBOSE=yes
:0 H
* ^()\/from:?[ ]*[a-z]+$
{ LOG="[$$]$_: Test matched${NL}" }
:0 E
{ LOG="[$$]$_: Test did not match${NL}" }
:0
/dev/null
---- end of file ----
cat testmessage.txt |procmail /tmp/username/test.rc
procmail: [2930] Mon Sep 4 05:07:56 2006
procmail: Assigning "MATCH="
procmail: Matched "From: somepattern
"
procmail: Match on "^()\/from:?[ ]*[a-z]+$"
procmail: Assigning "LOG=[2930]/tmp/username/test.rc: Test matched
"
[2930]/tmp/username/test.rc: Test matched
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"
Folder: /dev/null
--
Garen
Re: [OT] U. Beavis (was: re: procmail recipe)
am 04.09.2006 15:20:12 von Sam
This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.
--=_mimegpg-commodore.email-scan.com-27232-1157376011-0001
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Usenet Beavis writes:
> http://groups.google.com/advanced_group_search
> s. keeling
> Results 1 - 100 of 213 posts in the last year
Results 1 - 10 of 23,700 for usenet beavis (0.28 seconds)
You win, Beavis.
> Someone using the latest slrn who posts on almost nothing but
> technical groups and edits his own headers, thereby causing me
> to have a kookfart, and is therefore a very experienced Useneter,
> expects to smack my bitch up?
Smacking your bitch up isn't that complicated, Beavis. Anyone can do it.
> Beavises sure are stupid (see below)
And see above, left, and right.
>> X-UCE: I forward UCE/spam with ALL headers to abuse@your.isp UNREAD!
>
> No you don't. It's almost impossible to determine the
> originating IP of spam, because I'm a Beavis.
But he's not a Beavis, so he can figure it out fairly quickly.
> If it wasn't, spam wouldn't be anywhere near the problem it is.
Spam isn't anywhere the problem you think it is, Beavis.
> DUH <<<<
Double-duh.
>> X-UCE2: Wow, are spammers ever stoopid!
>
> I sure am. Unlike anyone else on the Usenet, I make a
> big point of being Usenet's village idiot.
And you're doing a good job of it.
>> X-PGP-Key: GPG key: http://keyserver.noreply.org:11371/pks/lookup?op=vindex&sear ch=0x48EE77B1AC94E4B7
>
> Takes 2 minutes to create a GPG/PGP key, but only because I'm a Beavis.
> They are worthless because I'm too stupid to understand how PGP works.
Don't strain your brain too much, Beavis. Or it'll deflate.
> There's no point in it unless you're not a Beavis. It's of no point to
> me because I'm too dumb to figure out how to use it.
Perhaps, Beavis, you should give it a try after you finally finish off "The
Little Engine That Could"?
>> Message-ID:
>> User-Agent: slrn/0.9.8.1 (Debian)
>> Lines: 35
>> Date: Sun, 03 Sep 2006 00:11:17 GMT
>> NNTP-Posting-Host: 209.115.174.241
>
> $ host 209.115.174.241
> Name: dsl2.spots.ab.ca
Beavis knows something about DNS. He's so smart.
> Port State Service
> 22/tcp filtered ssh << secure remote login
> 25/tcp open smtp << mail server
> 53/tcp filtered domain << whois server (don't believe a word of it)
> 80/tcp open http
> 135/tcp filtered loc-srv
> 139/tcp filtered netbios-ssn
> 443/tcp open https << secure webserver
> 445/tcp filtered microsoft-ds
> 587/tcp open submission
> 12345/tcp filtered NetBus
Looks like Beavis earned himself a complaint to abuse@earthlink.net, for
port scanning.
> That's about you I'd expect a Beavis to do.
Yup. And getting your account pulled on account of portscanning would be a
cherry on top.
>
Thank you for your kookfart, Beavis.
> Beavis
>
> --
> If you pointed your finger at me and laughed, and wondered why
> I'm such a Beavis, see http://www.pearlgates.net/nanae/kooks/ac/
--=_mimegpg-commodore.email-scan.com-27232-1157376011-0001
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQBE/CgLx9p3GYHlUOIRAorUAJ9y1KNK61+lciBi3LvcorM/AgAeIACf UMcR
ERGfCibZfdA9fkcxSDWFkkM=
=92nw
-----END PGP SIGNATURE-----
--=_mimegpg-commodore.email-scan.com-27232-1157376011-0001--
Re: procmail recipe
am 06.09.2006 08:10:50 von felmon davis
On Mon, 04 Sep 2006 05:12:33 -0600, Garen Erdoisa wrote:
>> I altered this for my purposes (two words: one is 'from' and the other
>> must not contain certain chars) but must have introduced an error; here is
>> what I have but it doesn't catch the flies:
>>
>> :0 B
>> ^from[ ]*[^\.\@\-]+$
>
> typo: this line should begin with an asterisk "*"
> ie:
>
> * ^from[ ]*[^\.\@\-]+$
thanks, I had caught that. what I have now is:
:0 B
* ^()from[ ]*[^\.\@\-]+$
|formail -A"X-NewTest: Yes">>SuspectSpam
(note I have an empty space in '[ ]' but no space in '()'. and remember I
want to catch two-word lines that do _not_ have certain chars.)
it doesn't seem to be working - it doesn't catch 'from hell'.
pardon my silence - I am right now a bit overwhelmed with work so I've
laid this aside but will come back to it tomorrow or Thursday.
ironically the spam mails I wanted to trap have ceased coming but
nonetheless I would like to understand how to write this filter.
I am all ears for any further advice.
Felmon
Re: procmail recipe
am 07.09.2006 07:22:42 von AK
felmon davis wrote:
> On Mon, 04 Sep 2006 05:12:33 -0600, Garen Erdoisa wrote:
>
>
>>>I altered this for my purposes (two words: one is 'from' and the other
>>>must not contain certain chars) but must have introduced an error; here is
>>>what I have but it doesn't catch the flies:
>>>
>>>:0 B
>>>^from[ ]*[^\.\@\-]+$
>>
>>typo: this line should begin with an asterisk "*"
>>ie:
>>
>>* ^from[ ]*[^\.\@\-]+$
>
>
> thanks, I had caught that. what I have now is:
>
> :0 B
> * ^()from[ ]*[^\.\@\-]+$
> |formail -A"X-NewTest: Yes">>SuspectSpam
>
> (note I have an empty space in '[ ]' but no space in '()'. and remember I
> want to catch two-word lines that do _not_ have certain chars.)
>
> it doesn't seem to be working - it doesn't catch 'from hell'.
>
> pardon my silence - I am right now a bit overwhelmed with work so I've
> laid this aside but will come back to it tomorrow or Thursday.
>
> ironically the spam mails I wanted to trap have ceased coming but
> nonetheless I would like to understand how to write this filter.
>
> I am all ears for any further advice.
>
> Felmon
>
>
Not really sure why you prefer the condition that do not certain
characters versus the condition of matching certain characters.
while procmail uses a "regex" similar syntax it is not competely
identical such that the [^\.] might not be seen as a negation.
The rule:
:0
* ^()from[ ]*[a-z]+$
stuff
should only match if a line starts with a from has any spaces followed
by one or more characters from a-z until the end of the line. If there
are any numbers, or other characters, the condition will not match.
AK
Re: procmail recipe
am 08.09.2006 04:58:18 von Garen Erdoisa
felmon davis wrote:
> On Mon, 04 Sep 2006 05:12:33 -0600, Garen Erdoisa wrote:
>
>>> I altered this for my purposes (two words: one is 'from' and the other
>>> must not contain certain chars) but must have introduced an error; here is
>>> what I have but it doesn't catch the flies:
>>>
>>> :0 B
>>> ^from[ ]*[^\.\@\-]+$
>> typo: this line should begin with an asterisk "*"
>> ie:
>>
>> * ^from[ ]*[^\.\@\-]+$
>
> thanks, I had caught that. what I have now is:
>
> :0 B
> * ^()from[ ]*[^\.\@\-]+$
> |formail -A"X-NewTest: Yes">>SuspectSpam
>
> (note I have an empty space in '[ ]' but no space in '()'. and remember I
> want to catch two-word lines that do _not_ have certain chars.)
>
> it doesn't seem to be working - it doesn't catch 'from hell'.
After doing some tests here, your recipe does seem to be working as you
intended it to work. I have it matching the string in the body of a message.
Is it possible that you might be running an early version of procmail
V3.22 that has the body/header flag bug in it?
That bugged version was distributed with several major distributions of
Linux and Unix OS's a couple of years ago, but has since been fixed in
the later updates to procmail. If you happen to be running one of the
older versions of an OS, you may still be running with the buggy version
of procmail.
The way that bug manifested itself is after the first use of a body or
header flag in a procmailrc file, subsequent recipes will scan both the
body and header of a message instead of just the body or the header
because the flags were not being reset in the hard code after use. It's
a rather nasty little bug and hard to spot unless you know it's there.
It can make your procmail recipes do all sorts of weird things like
trigger on header text when you are supposedly scanning only the body text.
A workaround if you are running a buggy version is to use the line by
line method for telling procmail to scan the body or the header of a
message.
ie:
# Workaround: scan the body of the message
:0
* B ?? ^()from[ ]*[^\.\@\-]+$
|formail -A"X-NewTest: Yes">>SuspectSpam
# Workaround: scan the header of the message
:0
* H ?? ^()from[ ]*[^\.\@\-]+$
|formail -A"X-NewTest: Yes">>SuspectSpam
>
> pardon my silence - I am right now a bit overwhelmed with work so I've
> laid this aside but will come back to it tomorrow or Thursday.
>
> ironically the spam mails I wanted to trap have ceased coming but
> nonetheless I would like to understand how to write this filter.
>
> I am all ears for any further advice.
If the above proves to the be the problem, then I'd recommend checking
for an update to procmail to get rid of the bug. If you don't have that
option, then I'd recommend using the workaround method as shown above,
though it's going to be a pain if you have huge procmailrc files, since
you'll have to go through and do a line by line re-write on your recipes.
--
Regards:
Garen
Re: procmail recipe
am 08.09.2006 05:31:02 von Garen Erdoisa
Garen Erdoisa wrote:
> felmon davis wrote:
>> On Mon, 04 Sep 2006 05:12:33 -0600, Garen Erdoisa wrote:
>>[snip]
>>
>> I am all ears for any further advice.
>
> If the above proves to the be the problem, then I'd recommend checking
> for an update to procmail to get rid of the bug. If you don't have that
> option, then I'd recommend using the workaround method as shown above,
> though it's going to be a pain if you have huge procmailrc files, since
> you'll have to go through and do a line by line re-write on your recipes.
>
Here is a test you can run to check for this bug:
----- file /tmp/username/test.rc -----
NL="
"
VERBOSE=no
# This will trigger the bug in subsequent recipes
:0 HB
* ^From.*$
{ LOG="[$$]$_: Begin Header/Body flag bug test${NL}" }
# Scan for a string in the body of the message. If we match
# the string in the header instead, then it's a version of procmail
# that has this Header/Body flag bug.
:0 B
* ^()\/X-procmailbugtest:.*$
{
STRING=${MATCH}
:0
* STRING ?? Header string
{ LOG="[$$]$_: Procmail version has the Header/Body flag bug${NL}" }
:0
* STRING ?? Body string
{ LOG="[$$]$_: Procmail version does not have the Header/Body flag
bug.${NL}" }
}
:0
/dev/null
----- end of file -----
----- file /tmp/username/testmessage.txt -----
From: nobody@example.com
To: nobody@example.com
X-procmailbugtest: Header string
X-procmailbugtest: Body string
----- end of file----
cd /tmp/username
procmail ./test.rc
[19240]./test.rc: Begin Header/Body flag bug test
[19240]./test.rc: Procmail version has the Header/Body flag bug
This test was run on a Fedora core1 Linux system that has the bug.
--
Garen
Re: procmail recipe
am 09.09.2006 09:42:17 von felmon davis
On Thu, 07 Sep 2006 01:22:42 -0400, AK wrote:
>
> Not really sure why you prefer the condition that do not certain
> characters versus the condition of matching certain characters.
the issue may be moot now since the emails I've been trying to trap have
stopped coming but I was getting nuisance email which had the
distinguishing feature of having a 'from', a space and an english word in
the headers.
the english word obviously contained only [a-zA-Z]. so I figured I would
look for a 'from' string followed by _one_ word such that the word
lacked special chars not '@', '.', etc.
there's probably a better way but I would now like to know how to filter
on this condition just so I could understand the syntax.
> while procmail uses a "regex" similar syntax it is not competely
> identical such that the [^\.] might not be seen as a negation.
it occurred to me this might be a problem; I should test on just one of
the chars at a time.
Felmon
Re: procmail recipe
am 09.09.2006 09:52:43 von felmon davis
On Thu, 07 Sep 2006 21:31:02 -0600, Garen Erdoisa wrote:
> This test was run on a Fedora core1 Linux system that has the bug.
this is great advice! I cannot work on this this moment but will test
later today!
hmm...; they are running
scoter:/home/davisf> procmail -v
procmail v3.22 2001/09/10
betcha I will be needing the workaround! the server is not mine to mangle.
will get back with the results of my testing!
this has been instructive!
Felmon
Re: procmail recipe
am 10.09.2006 06:42:24 von AK
felmon davis wrote:
> On Thu, 07 Sep 2006 01:22:42 -0400, AK wrote:
>
>
>>Not really sure why you prefer the condition that do not certain
>>characters versus the condition of matching certain characters.
>
>
> the issue may be moot now since the emails I've been trying to trap have
> stopped coming but I was getting nuisance email which had the
> distinguishing feature of having a 'from', a space and an english word in
> the headers.
>
> the english word obviously contained only [a-zA-Z]. so I figured I would
> look for a 'from' string followed by _one_ word such that the word
> lacked special chars not '@', '.', etc.
>
> there's probably a better way but I would now like to know how to filter
> on this condition just so I could understand the syntax.
>
>
>>while procmail uses a "regex" similar syntax it is not competely
>>identical such that the [^\.] might not be seen as a negation.
>
>
> it occurred to me this might be a problem; I should test on just one of
> the chars at a time.
>
> Felmon
The recipe:
:0
* ^()from[ ]*[a-z]+$
dostuff
will do what you wanted.
[ ]* means any number of spaces. This acts as a loop if there are
multiple spaces.
[a-z]+ one or more alphabetic characters (Note: procmail by default is
case insensitive). This acts as a loop until a character is not matched.
$ in this context means the end of the line. ()
i.e.
en entry such as From user@host.com will not match because the
condition will break at @ and will not reach the end of the line as
required by the recipe.
The condition will of course match on
>From spamsareus
AK
Re: procmail recipe
am 12.09.2006 09:52:12 von felmon davis
On Sun, 10 Sep 2006 00:42:24 -0400, AK wrote:
> .e.
> en entry such as From user@host.com will not match because the
> condition will break at @ and will not reach the end of the line as
> required by the recipe.
>
> The condition will of course match on
> >From spamsareus
>
> AK
this sounds like exactly what I need! I am snowed under with work until
thursday but I will check it out then.
I am grateful to you and Garen for this great instruction!
Felmon
Re: procmail recipe
am 16.09.2006 10:30:55 von felmon davis
On Sun, 10 Sep 2006 00:42:24 -0400, AK wrote:
>
> The recipe:
> :0
> * ^()from[ ]*[a-z]+$
> dostuff
>
> will do what you wanted.
> [ ]* means any number of spaces. This acts as a loop if there are
> multiple spaces.
> [a-z]+ one or more alphabetic characters (Note: procmail by default is
> case insensitive). This acts as a loop until a character is not matched.
> $ in this context means the end of the line. ()
>
> i.e.
> en entry such as From user@host.com will not match because the
> condition will break at @ and will not reach the end of the line as
> required by the recipe.
>
> The condition will of course match on
> >From spamsareus
didn't work. but look, I have to check for this bug in procmail that Garen
referred to. I intend to do that later today. if it is the buggy version,
that may bring my explorations to an end since, though I would like to be
able to use this filter syntax, there is no urgent need for it now while
my time is pretty constrained.
is '^()' saying 'no space at the beginning of the line'?
Felmon
Re: procmail recipe
am 17.09.2006 04:20:20 von Garen Erdoisa
felmon davis wrote:
> [snip]
> is '^()' saying 'no space at the beginning of the line'?
In regular expression syntax () is an empty atom. This equates to an
empty string, or zero length string. The syntax has a few special case
uses in procmail regular expressions, one of the uses is to override
procmail's normal behavior of ignoring leading tabs or spaces in
procmail regular expressions.
--
Garen