Christian Parigger wrote:
Hi,
I use an aliases distribution list (sendmail) but want to restrict the use
of this list to senders within my domain only; I thought a procmail filter
could work (don't use SmartList at this time, v3.13.1 procmail currently) ?
Possibly.
One way that comes to mind is to have the alias go to procmail
instead, something like this in /etc/aliases:
magicList: "|/usr/bin/procmail /etc/magicList.procmail"
where /etc/magiclist.procmail might have something like:
:0
* ^From:(_dot_)*(_at_)myDomain$
* any_other_conditions
* to_ensure_this_is_a_good_message
! user1, user2, user3, etc
# The above could instead pipe the message to a script to,
# e.g., get the addresses from a file or something
# permission denied, EX_NOPERM from /usr/include/sysexits.h
EXITCODE=77
:0
/dev/null
Another idea might be to put something like what's on the procmail(1)
manpage into /etc/sendmail.cf, but I'm not sure exactly where to
insert the rules, given that there may be a couple of places where the
local delivery agent gets selected... i guess you might be able to do
something like this (UNTESTED!)
RmyList^I$#procmail $@/somewhere/myList.rc $:myList<@procmail>
RmyList<@ $=w>$*^I$#procmail $@/somewhere/myList.rc $:myList<@procmail>
R$*<@procmail>$*^I$1<@localhost>$3^IAlready filtered, map back
(the '^I's there are tab characters) and put the appropriate rule into
the /somewhere/myList.rc ...
cheers,
--
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information. Sorry.
Collin Park Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail