3 messages in net.sourceforge.lists.courier-users[courier-users] maildropfilter foreach
FromSent OnAttachments
Jimmy OttJul 26, 2007 11:01 am 
Jay LeeJul 26, 2007 11:25 am 
Jimmy OttJul 26, 2007 1:12 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] maildropfilter foreachActions...
From:Jimmy Ott (adm@onnet.ch)
Date:Jul 26, 2007 11:01:29 am
List:net.sourceforge.lists.courier-users

hello to everyone,

i try to implement a simple autoresponder as many of you already did or use. i have a global maildroprc which redirects spam to other folder and local .mailfilter for user filters.

now i want to do the following, as an example a file called "aliases" has email addresses of one user in it like follows:

in@mydomain.org sal@mydomain.org off@mydomain.org

i now would like to see if the receiving email is addressed to one of these email addresses to exclude mass mail senders. to check one email address i did that with the hasaddr() function. how is it possible to iterate through a file and check it with hasaddr()? i don't understand the foreach documentation in the manual, i think. is it just for regexp matches of the email headers?

in a shellscript i would do that as follows:

addresses=`cat aliases` for address in ${addresses[@]} do if [ hasaddr($address) ] then found=1 fi done

but i'm really to stupid to do that in maildropfilters language/syntax

thanks in advance for any help jimmy