[PLUG] procmail country question
Sandy Herring
sandy at herring.org
Fri Dec 6 18:30:56 UTC 2002
regexp are your friend (or worst enemy)...
:0
* ^From.*\.pl$
{
LOG="(.pl) "
# EX_NOUSER = 67 from sysexits.h
EXITCODE = 67
:0
/dev/null
}
Note that the period before the "pl" is escaped so that it's not interpreted
as a regexp (match one anything). Note also that the extended regexp token
for end of a line "$". That's where you tripped. `man procmailrc' for more
details.
Sandy
On Fri, 06 Dec 2002, Robby Russell wrote:
> If I want to ignore emails and just kill them if they come from say, ".pl"
> How can I get the procmailrc to do that?
>
> I tried the following:
>
> #:0
> #* ^From.*.pl
> #{
> # LOG="(.pl) "
> # :0
> # /dev/null
> #}
>
> but it would end up blocking the plug list.
> I'm sure it's a simple mistake on my part, I am using the same method to
> block specific domains and thought it would work the same with the country
> code.
>
> Thanks in advance.
>
> -Robby
--
Sandy Herring, RHCE o sandy at herring.org
Peck of Pickled Pisces __ o http://herring.org/
UNIX or Web authoring questions? |\/ o\ o http://herring.org/finger.html
->http://herring.org/techie.html |/\__/ http://herring.org/pub-key.asc
*sh, Perl, C, VBA, PICK Assembler, Data/Basic, PROC & profanity spoken here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.pdxlinux.org/pipermail/plug/attachments/20021206/74ef4f0e/attachment.asc>
More information about the PLUG
mailing list