Re: [Exim] \dev\null

Top Page
Delete this message
Reply to this message
Author: Nigel Metheringham
Date:  
To: Simon Alman
CC: Thomas Kinghorn, Exim-Users (E-mail)
Subject: Re: [Exim] \dev\null
Thomas Kinghorn wrote:
> >Is there a way to \dev\null users who are no longer with our company?
> >All the mail is relayed to our exchange server which tosses the mail if
> >the user does not exist.
> >
> >I was wondering if exim could do it before it got to the exchange server?



On Mon, 2003-06-02 at 10:23, Simon Alman wrote:
> I'd just use a system filter to drop any addresses I don't want
> delivered i.e create a system filter file with the following:


In general if you are doing routing in a system filter you are doing
something wrong (same as for doing routing in the rewrite rules).

The best way of doing this depends on how you have the the list of those
that have left - ie is it something like an LDAP directory attribute, or
a list of leavers, or a manual list.

If you have a manual list then you could use a normal alias file
configuration and make the aliases look something like this:-

    jbloggs:    :fail: J Bloggs no longer works here.\
            His business functions are now handled by fred@domain


Or you could have a router which takes a file with a list of leavers:-

  leavers:
    driver = redirect
    domains = +local_domains
    condition = ${lookup{$local_part}lsearch{/etc/aliases}}
    data = :fail: $local_part no longer works here


Use :blackhole: in place of :fail: if you really want to silently
discard mail - however this is pretty silly in normal circumstances.

    Nigel.
--
[ Nigel Metheringham           Nigel.Metheringham@??? ]
[ - Comments in this message are my own and not ITO opinion/policy - ]