Fernando Gozalo | 2 Nov 2010 14:08
Picon
Favicon

lookup function with no regular expresion

Hello,

I need to know if there is an 'option' I can pass to the builtin 
'lookup' function such as it treat 'expr' as pure text and not as a 
regular expression.

Regards.
Fernando.

--

-- 
---------------------------------------------------------------
Fernando Gozalo Rodrigo - Analista de Sistemas

     Centro de Sistemas Informáticos
Universidad Nacional de Educación a Distancia

---------------------------------------------------------------
Por favor, no envíe adjuntos de WORD, EXCEL o POWERPOINT
Vea http://www.gnu.org/philosophy/no-word-attachments.es.html
---------------------------------------------------------------

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
Sam Varshavchik | 2 Nov 2010 23:02
Gravatar

Re: lookup function with no regular expresion

Fernando Gozalo writes:

> Hello,
> 
> I need to know if there is an 'option' I can pass to the builtin 
> 'lookup' function such as it treat 'expr' as pure text and not as a 
> regular expression.

Use the escape() function, then pass the result to lookup().

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Courier-maildrop mailing list
Courier-maildrop <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Fernando Gozalo | 5 Nov 2010 09:39
Picon
Favicon

Re: lookup function with no regular expresion

Hello,

>> I need to know if there is an 'option' I can pass to the builtin
>> 'lookup' function such as it treat 'expr' as pure text and not as a
>> regular expression.
>
> Use the escape() function, then pass the result to lookup().

I don't get the results that I expect. I want to find email addresses in 
a file.

[fgozalo <at> lunes ~]$ cat archivo
fgozalo <at> csi.uned.es
fgozalo+prueba1 <at> csi.uned.es

-  Without escape():

lookup("fgozalo <at> csi.uned.es", "archivo")         ==> MATCH
lookup("fgozalo+prueba1 <at> csi.uned.es", "archivo") ==> NO MATCH

-  With escape():

lookup("fgozalo <at> csi\.uned\.es", "archivo")          ==> NO MATCH
lookup("fgozalo\+prueba1 <at> csi\.uned\.es", "archivo") ==> NO MATCH

--

-- 
Un saludo.
Fernando.

---------------------------------------------------------------
(Continue reading)

Sam Varshavchik | 6 Nov 2010 01:11
Gravatar

Re: lookup function with no regular expresion

Fernando Gozalo writes:

> Hello,
> 
>>> I need to know if there is an 'option' I can pass to the builtin
>>> 'lookup' function such as it treat 'expr' as pure text and not as a
>>> regular expression.
>>
>> Use the escape() function, then pass the result to lookup().
> 
> I don't get the results that I expect. I want to find email addresses in 
> a file.
> 
> [fgozalo <at> lunes ~]$ cat archivo
> fgozalo <at> csi.uned.es
> fgozalo+prueba1 <at> csi.uned.es
> 
> 
> -  Without escape():
> 
> lookup("fgozalo <at> csi.uned.es", "archivo")         ==> MATCH
> lookup("fgozalo+prueba1 <at> csi.uned.es", "archivo") ==> NO MATCH
> 
> -  With escape():
> 
> lookup("fgozalo <at> csi\.uned\.es", "archivo")          ==> NO MATCH
> lookup("fgozalo\+prueba1 <at> csi\.uned\.es", "archivo") ==> NO MATCH

Sorry -- I got confused a little bit, here.

(Continue reading)

Sam Varshavchik | 7 Nov 2010 21:56
Gravatar

Minor releases of courier, sqwebmail, maildrop packages

Download: http://www.courier-mta.org/download.php

Minor release.

Changes:

• Fixed some formatting issues in man pages.

• Tweaks to configure and RPM build scripts. Configure script to use gpg2 if 
gpg is not available. Some default distros may be installing gnupg 2.x as 
gpg2.

• Format of Received: headers more closely aligned with RFC 3848.

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Courier-maildrop mailing list
Courier-maildrop <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Fernando Gozalo | 8 Nov 2010 09:19
Picon
Favicon

Re: lookup function with no regular expresion

El 06/11/10 01:11, Sam Varshavchik escribió:
> Fernando Gozalo writes:
>
>> Hello,
>>
>>>> I need to know if there is an 'option' I can pass to the builtin
>>>> 'lookup' function such as it treat 'expr' as pure text and not as a
>>>> regular expression.
>>>
>>> Use the escape() function, then pass the result to lookup().
>>
>> I don't get the results that I expect. I want to find email addresses
>> in a file.
>>
>> [fgozalo <at> lunes ~]$ cat archivo
>> fgozalo <at> csi.uned.es
>> fgozalo+prueba1 <at> csi.uned.es
>>
>>
>> - Without escape():
>>
>> lookup("fgozalo <at> csi.uned.es", "archivo") ==> MATCH
>> lookup("fgozalo+prueba1 <at> csi.uned.es", "archivo") ==> NO MATCH
>>
>> - With escape():
>>
>> lookup("fgozalo <at> csi\.uned\.es", "archivo") ==> NO MATCH
>> lookup("fgozalo\+prueba1 <at> csi\.uned\.es", "archivo") ==> NO MATCH
>
> Sorry -- I got confused a little bit, here.
(Continue reading)

Sam Varshavchik | 8 Nov 2010 12:47
Gravatar

Re: lookup function with no regular expresion

Fernando Gozalo writes:

> El 06/11/10 01:11, Sam Varshavchik escribió:
>> Fernando Gozalo writes:
>>
>>> Hello,
>>>
>>>>> I need to know if there is an 'option' I can pass to the builtin
>>>>> 'lookup' function such as it treat 'expr' as pure text and not as a
>>>>> regular expression.
>>>>
>>>> Use the escape() function, then pass the result to lookup().
>>>
>>> I don't get the results that I expect. I want to find email addresses
>>> in a file.
>>>
>>> [fgozalo <at> lunes ~]$ cat archivo
>>> fgozalo <at> csi.uned.es
>>> fgozalo+prueba1 <at> csi.uned.es
>>>
>>>
>>> - Without escape():
>>>
>>> lookup("fgozalo <at> csi.uned.es", "archivo") ==> MATCH
>>> lookup("fgozalo+prueba1 <at> csi.uned.es", "archivo") ==> NO MATCH
>>>
>>> - With escape():
>>>
>>> lookup("fgozalo <at> csi\.uned\.es", "archivo") ==> NO MATCH
>>> lookup("fgozalo\+prueba1 <at> csi\.uned\.es", "archivo") ==> NO MATCH
(Continue reading)

Angel L. Mateo | 16 Nov 2010 12:50
Picon
Favicon

Problem filtering some mails

Hello,

	I've been using maildrop for years to filter mail without any apparent 
problem.

	I had a system filter (/etc/maildroprc) to filter all messages tagged 
as spam (from spamassassin) to user's spam folder. The filter is like:

if (/^X-Spam-Flag: YES/)
exception {
         to $HOME/Maildir//.SPAM/
}

	Now we have another (more) spamassasin filter that tag spam with the 
header 'X-Spamina-Destination: spam', so we have added the rule:

if (/^X-Spamina-Destination:\s*spam/)
exception {
         to $HOME/Maildir//.SPAM/
}

	but this rule isn't working correctly. Some messages are correctly 
delivered to the spam folder, but others don't and they delivered to the 
inbox.

	Is there any way to debug this? (I have attached maildroprc file)

--

-- 
Angel L. Mateo Martínez
Sección de Telemática
(Continue reading)

Sam Varshavchik | 16 Nov 2010 13:00
Gravatar

Re: Problem filtering some mails

Angel L. Mateo writes:

> Hello,
> 
> 	I've been using maildrop for years to filter mail without any apparent 
> problem.
> 
> 	I had a system filter (/etc/maildroprc) to filter all messages tagged 
> as spam (from spamassassin) to user's spam folder. The filter is like:
> 
> if (/^X-Spam-Flag: YES/)
> exception {
>          to $HOME/Maildir//.SPAM/
> }
> 
> 	Now we have another (more) spamassasin filter that tag spam with the 
> header 'X-Spamina-Destination: spam', so we have added the rule:
> 
> if (/^X-Spamina-Destination:\s*spam/)
> exception {
>          to $HOME/Maildir//.SPAM/
> }
> 
> 	but this rule isn't working correctly. Some messages are correctly 
> delivered to the spam folder, but others don't and they delivered to the 
> inbox.
> 
> 	Is there any way to debug this? (I have attached maildroprc file)

You cannot debug this without also looking at a sample message that you 
(Continue reading)

Angel L. Mateo | 16 Nov 2010 13:08
Picon
Favicon

Re: Problem filtering some mails

El 16/11/10 13:00, Sam Varshavchik escribió:
> Angel L. Mateo writes:
>
>> Hello,
>>
>> I've been using maildrop for years to filter mail without any apparent
>> problem.
>>
>> I had a system filter (/etc/maildroprc) to filter all messages tagged
>> as spam (from spamassassin) to user's spam folder. The filter is like:
>>
>> if (/^X-Spam-Flag: YES/)
>> exception {
>> to $HOME/Maildir//.SPAM/
>> }
>>
>> Now we have another (more) spamassasin filter that tag spam with the
>> header 'X-Spamina-Destination: spam', so we have added the rule:
>>
>> if (/^X-Spamina-Destination:\s*spam/)
>> exception {
>> to $HOME/Maildir//.SPAM/
>> }
>>
>> but this rule isn't working correctly. Some messages are correctly
>> delivered to the spam folder, but others don't and they delivered to
>> the inbox.
>>
>> Is there any way to debug this? (I have attached maildroprc file)
>
(Continue reading)


Gmane