Re: [exim] Routing: Accept mail from certain hosts

Top Page
Delete this message
Reply to this message
Author: Tony Finch
Date:  
To: Peter Thomassen
CC: exim-users
Subject: Re: [exim] Routing: Accept mail from certain hosts
On Fri, 8 Aug 2008, Peter Thomassen wrote:

> Therefore, I want my "archive router" (that routes to a given Maildir)
> to accept only mail from this special host. How can I do that?


archive:
driver = accept
condition = ${if match_ip{$sender_host_address}{1.2.3.4:5.6.7.8} }
...

> (If someone is further interested: The archive server shall not let any
> mail in except that from that mail server, but it should of course be
> able to forward local mail to me. Are there better ideas for realizing
> this configuration?)


I think your idea is fine, though I would be inclined to reverse it,
i.e. so all email from outside is archived and local email is not.

archive:
driver = accept
condition = ${if !match_ip{$sender_host_address}{:@[]} }
...

The :@[] rune is a host list containing an empty item (for non-SMTP
messages) and all local interface addresses.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}