Re: [Exim] How can I know a mail is incoming relay or outgoi…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Sam Ng
CC: exim-users
Sujet: Re: [Exim] How can I know a mail is incoming relay or outgoing relay?
On Thu, 22 Jun 2000, Sam Ng wrote:

> How can I know a mail is incoming relay or outgoing relay?


You can't, because it is an individual recipient address that determines
this, and a message may contain more than one such address.

"relay" = from some other machine & address not in local domain

"incoming relay" = "relay" & address in relay_domains

"outgoing relay" = "relay" & not "incoming relay"

> Because I want to do something like
>
> do "perl program 1" for outgoing relay mail
> do "perl program 2" for incoming relay mail


"not in local domain" => address will be processed by routers.

Therefore, you should be able to put some kind of complicated condition
on a router which does what you want.

${if eq {$sender_host_address}{}    tests for message from the local host


If your relay domains are in a file, you can test $domain for being in
that list to check for incoming vs outgoing.


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.