procmail
[Top] [All Lists]

Re: filtering non-local aliases with procmail

1999-01-10 22:59:05
Jerry Preeper <preeper(_at_)cts(_dot_)com> writes:
...
I have a feeling that the only way to do this is going to be to create
local user accounts for all of them because like I said earlier, some have
accounts that give them ftp access (and they are chrooted to a subdirectory
of the htdocs area) but some of them just have email aliases that I simply
edit /etc/virtusertable to add - nothing else.

In my aliases file, all I really have in there is the main system email
address and all my majordomo stuff.  Everything else is handled in
virtusertable   We have a custom adduser script that adds their alias to
the virtusertable, with this domain being at the very end and it just keeps
adding the new users alias just before the catch all alias for the domain
which is the very last line.

Well, it should be doable with Sean Straw's idea:

PSE-L(_at_)mail(_dot_)professional(_dot_)org (Professional Software 
Engineering) wrote:
With some creative (read: kludge) filter writing, you could possibly set up
ONE account, and plus it (that is, use the account with plussing as the
destination in the virtusertable file: generic+joebob(_at_)localhost), then in
the filter, handle the individual plussed extensions to determine who
you're forwarding it to - but this would limit otherwise valid use of
plussed addresses, as well as run into all the same problems people have
with filtering messages with multiple local recipients through one account...

Before I tackle the two problems he mentioned, let's look at how this
would be set up.  First off, you would create an account through which
all these addresses would be filtered.  We'll call it 'generic' below,
but you could name it after the domain, or whatever you want.  The
virtuser table then changes from:

        bob(_at_)domain bob7456(_at_)aol(_dot_)com
        sally(_at_)domain       sdoe(_at_)else(_dot_)where
        @domain         unknown-address-handler-address
to:
        bob(_at_)domain generic+"bob7456(_at_)aol(_dot_)com"
        sally(_at_)domain       generic+"sdoe(_at_)else(_dot_)where"
        @domain         unknown-address-handler-address


The 'generic' account then has a .procmailrc that runs something like:

        ARG = $1
        :0
        ! $ARG


Okay, now for the problems.  First off, the second problems doesn't
exist.  If your sendmail is new enough to handle plus-addressing and
the virtuser table then it's also new enough to know that the addresses
generic+foo(_at_)here and generic+bar(_at_)here are different and require two
separate procmail invocations.  Indeed, plus-addressing is one of the
solutions to the "all messages through one accounts doesn't work"
problem -- the data after the plus is the (eventual) envelope
recipient.

As for the first problem, I believe that with a one line change to the
/etc/sendmail.cf (actually, to cf/m4/proto.m4 in the sendmail source
tree) the ability to use plus-addressing with these accounts could be
restored (I've mailed a patch to sendmail-bugs(_at_)sendmail(_dot_)org).  
However,
I don't think AOL supports plus addresses, so there might not be any
demand from your users for them.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>