[exim] Router for bounce...

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Marco Gaiarin
Dátum:  
Címzett: exim-users
Tárgy: [exim] Router for bounce...

I need to bounce (also in verify, indeed) some user/mailbox; there's a 1:1
relation between mailboxes and users, and simply some 'alias' are queried
via LDAP and 'normalized' to users/logins:

.ifdef LOCAL_USER_LDAP_ALIASES_QUERY
user_ldap_aliases:
debug_print = "R: user_ldap_aliases for $local_part@$domain"
driver = redirect
domains = +local_domains
data = ${lookup ldap {LOCAL_USER_LDAP_ALIASES_QUERY}}
.endif

at the last, i use procmail, i have:

 procmail:
  debug_print = "R: procmail for $local_part@$domain"
  driver = accept
  domains = +local_domains
  check_local_user
  transport = procmail_pipe
  # emulate OR with "if exists"-expansion
  require_files = ${local_part}:${home}:\
                  ${if exists{/etc/procmailrc}\
                    {/etc/procmailrc}{${home}/.procmailrc}}:\
                  +/usr/bin/procmail
  no_verify
  no_expn


for delivery, and for verify:

local_user:
debug_print = "R: local_user for $local_part@$domain"
driver = accept
domains = +local_domains
check_local_user
local_parts = ! root
transport = LOCAL_DELIVERY
require_files = ${local_part}:${home}
cannot_route_message = Unknown user

(that never match in delivery mode).


I can remove all the alias from LDAP, but still the 'base' account email
($local_part@$domain) will match.

Also, i cannot remove homes, they are needed for other things.


What could be the simpliest way to bounce/reject? I'm thinking of:

a) define a 'semaphore file' (/home/<user>/.bounceme); but docs say:
Warning 1: When the router is being run to verify addresses for an incoming SMTP message, Exim is not running as root, but under its own uid. This may affect the result of a require_files check. In particular, stat() may yield the error EACCES (???Permission denied???). This means that the Exim user is not permitted to read one of the directories on the file???s path.

b) make a strictier LDAP query that does not 'normalize' aliases, but match
(with some sort of 'negative match') it?


I'm a bit confused, so i hope i was a bit clear on my question...


Thanks.

-- 
  If SMB was an animal it would go wolf and most people would have shot it
  or put it down humanely.                (Rod Boyce)