[prev in list] [next in list] [prev in thread] [next in thread] 

List:       exim-users
Subject:    Re: [EXIM] Rejecting local addresses from remote hosts
From:       Philip Hazel <ph10 () cus ! cam ! ac ! uk>
Date:       1998-03-30 13:37:27
[Download RAW message or body]

On Mon, 30 Mar 1998, Craig Foster wrote:

> Forgive me if I've missed something obvious in the docs, but here's
> my query.  I'd like to be able to reject messages with an envelope
> sender of user@my.domain which come from hosts that are not in 
> my.domain.  I see that sender_verify works if "user" is not a 
> genuine local user, but I don't know how to deal with, say, "mail from:
> postmaster@my.domain" that's from outside my network.  This is for
> a campus mail hub that does controlled relaying.

I would not advise you to do this. What if user@my.domain sends mail out
to other.user@other.domain, but other.user@other.domain is away
visiting, and has set up a .forward file, and it just so happens that he
is visiting your part of the world, so the message gets forwarded back
to your host from outside... 

This can be quite common in academic institutions.

Another case is a mailing list that doesn't rewrite the envelope sender 
(a bad idea, but some do exist). Yet another case is the possibility of 
a remote recipient "forwarding" the message to someone else on your host 
in such a way as to preserve the original sender ("bounce" in Pine). 
This also happens.

If you really want to do it, the only way is via a system filter with a 
construction such as

if $sender_host_address does not begin 123.123 and
   $sender_address ends @my.domain
then
   ...
   
(note that "begin" and "end" are new features in 1.90, released today).     

> Very impressed with Exim and the docs, esp. compared with PP manual...

Thanks.

-- 
Philip Hazel                   University Computing Service,
ph10@cus.cam.ac.uk             New Museums Site, Cambridge CB2 3QG,
P.Hazel@ucs.cam.ac.uk          England.  Phone: +44 1223 334714


-- 
***  Exim information can be found at http://www.exim.org/  ***

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic