On Sun, Nov 12, 2006 at 11:57:16PM +0000, Peter Bowyer wrote:
>
> local_user:
> driver = accept
> local_parts = lsearch;/etc/local_users
> verify_only
Ok, tried to do something a little more complex and got stuck.
It's getting too late to think about this, I suspect.
Again, all local mail is delivered via procmail. I want to prevent
mail being delivered to "users" just because they are in /etc/passwd
or in /etc/aliases.
So, for all mail that is not generated locally, I will use a lookup
to see if they are a local user.
If the file doesn't exist I want to fall back to using
"check_local_user".
# If LOCAL_USERS exists check that the local_part is in that file
local_user_listed:
debug_print = "R: local_user for $local_part@$domain"
driver = accept
verify_only
check_local_user
require_files = LOCAL_USERS
local_parts = ${if exists{LOCAL_USERS}{LOCAL_USERS}{*}}
# Otherwise, fallback to just check_local_user
local_user:
debug_print = "R: local_user for $local_part@$domain"
driver = accept
verify_only
require_files = ! LOCAL_USERS
check_local_user
My guess is there's a better way to do that.
And, how do I check if the connection if from the localhost or via
-bs? If it's locally generated mail then I don't want to limit to
what's in LOCAL_USERS. "hosts = ! @ : 127.0.0.1" doesn't work in a
Router, right?
BTW -- for -bs in an ACL you can check
hosts = :
can that be negated?
hosts = ! :
> should do it - 'check_local_user' is presumably a superset of the
> users in your local_users file, so is redundant
I left "check_local_user" on there because I did want to make sure
there is a real user to deliver to, not just that it's in LOCAL_USERS.
--
Bill Moseley
moseley@???