Christian Parigger wrote:
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) ?
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:
! 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
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 ...
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