Re: [exim] Checking home existance in a smart way...

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Chris Siebenmann
Date:  
À: Marco Gaiarin
CC: exim-users, cks
Sujet: Re: [exim] Checking home existance in a smart way...
| But i've also thinked about this: if for some reason /home get not mounted?
| All email will start bounce, instead of get in queue for later delivery.
|
| There's a ''smart'' way to do this check? Thanks.


What we do in a similar circumstance (for /var/mail) is to have a magic
dotfile in the root of the filesystem and then have a condition check
that forces a deferal if the dotfile is not present. There are two ways
of doing this deferal; you can do it in an explicit router or you can
force a deferal-creating failure.

 A deferal router would look something like:
    defer_varmail:
        debug_print = "R: defer_varmail for $local_part@$domain"
        driver = redirect
        domains = +local_domains
        condition = ${if exists{/var/mail/.MOUNTED} {no} {yes}
        allow_defer
        data = :defer:/var/mail not mounted?!
        no_verify
        no_expn


Using an explicit router is by far the best way to handle this but it
isn't always possible. A full discussion of integrating conditional
deferal into an existing router is beyond the scope of this email; rather
than give a partial one I'll refer interested people to here:

    http://utcc.utoronto.ca/~cks/space/blog/sysadmin/EximDeferRouters


It would be nice if Exim had an explicit way of forcing routers to
defer, not just to accept or pass on addresses. What I'm doing in
that entry (and in our Exim configuration) is kind of a sleazy hack.

    - cks