Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

Setting Outbound Interfaces

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


gpeel at thenetnow

May 3, 2008, 6:21 AM

Post #1 of 3 (179 views)
Permalink
Setting Outbound Interfaces

Hi all,

First off thanks to everyone on the list who assisted me in getting greg
listing working, and for all the other tidbits getting my ACLs up to snuff.

My next adverture is to get the ip address mappings up to snuff. That is, to
get outgoing mail to be sent through the ip address assigned for whatever
domain.

With the Routers and Transports below, I am seeing a few glitches. The fist
two are the problems with gmail and aol - they are returning multiple ip
addresses. That asside, I dont think I should be seening logs like this at
all.

Question one: Can anyone see whats wronge with my remote_smtp_alias
Transport?

2008-05-03 01:52:52 1JrTgN-0003e3-Qx == gmail_address[at]gmail.com
<alias_on_my_server[at]my_server.com> R=dnslookup_alias T=remote_smtp_alias
defer (-1): "64.233.171.83\n72.14.253.83\n64.233.161.83" is not a valid IP
address for the "interface" option for remote_smtp_alias transport2008-05-03

Some background info:

a list of local domains is in /etc/virtual/domains
Runing FreeBSD 6.2, Exim 4.63, Each domain on the server has its own IP.

Routers:

dnslookup_local:
driver = dnslookup
domains = ! +local_domains
condition = ${lookup {$sender_address_domain} lsearch
{/etc/virtual/domains} {yes}{no}}
transport = remote_smtp_local
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

dnslookup_bounce:
driver = dnslookup
domains = ! +local_domains
condition = ${if eq {$sender_address_local_part}{} {yes}{no}}
transport = remote_smtp_bounce
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

dnslookup_alias:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp_alias
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

Transports:

remote_smtp_local:
driver = smtp
helo_data = ${lookup
dnsdb{defer_never,ptr=$sender_address_domain}{$value} \
{$primary_hostname}}
interface = ${lookup
dnsdb{defer_never,a=$sender_address_domain}{$value}{nnn.nnn.nnn.nnn}}
return_path_add = true
debug_print = "Transport: remote_smtp_local \
Destination: $local_part@$domain \
Sent VIA: ${lookup
dnsdb{ptr=$sender_host_address} \
{$value}{nnn.nnn.nnn.nnn}} \
Domain Info: $domain_data"

remote_smtp_alias:
driver = smtp
helo_data = ${lookup
dnsdb{ptr=$sender_address_domain}{$value}{$primary_hostname}}
interface = ${lookup
dnsdb{a=$original_domain}{$value}{nnn.nnn.nnn.nnn}}
return_path_add = true
debug_print = "Transport: remote_smtp_alias \
Destination: $local_part@$domain \
Sent VIA: ${lookup
dnsdb{ptr=$sender_host_address}{$value} \
{{nnn.nnn.nnn.nnn}} \
Domain Info: $domain_data"

remote_smtp_bounce:
driver = smtp
helo_data = ${lookup
dnsdb{defer_never,ptr=$interface_address}{$value}{$primary_hostname}}
interface = $interface_address
return_path_add = true
debug_print = "Transport: remote_smtp_bounce \
Destination: $local_part@$domain \
Sent VIA: ${lookup
dnsdb{ptr=$sender_host_address}{$value} \
{{nnn.nnn.nnn.nnn}} \
Domain Info: $domain_data"



--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


exim-users-20080324 at djce

May 4, 2008, 3:59 PM

Post #2 of 3 (146 views)
Permalink
Re: Setting Outbound Interfaces [In reply to]

On Sat, May 03, 2008 at 09:21:05AM -0400, Grant Peel wrote:
> With the Routers and Transports below, I am seeing a few glitches. The fist
> two are the problems with gmail and aol - they are returning multiple ip
> addresses. That asside, I dont think I should be seening logs like this at
> all.
>
> Question one: Can anyone see whats wronge with my remote_smtp_alias
> Transport?

After reading your routers/transports, I still don't understand how you think
this is meant to work. i.e. what your intended logic is. And when you say "I
don't think I should be seeing(?) logs like this", I'm not sure what you mean
by that either.

> remote_smtp_alias:
> driver = smtp
> helo_data = ${lookup dnsdb{ptr=$sender_address_domain}{$value}{$primary_hostname}}
> interface = ${lookup dnsdb{a=$original_domain}{$value}{nnn.nnn.nnn.nnn}}
> return_path_add = true

I should imagine that would have problems whenever $original_domain is not
set, or whenever the dnsdb lookup returns > 1 IP address. I'm also guessing
that "nnn.nnn.nnn.nnn" means whichever of your IP addresses you consider to be
your default, but you didn't state that.

So, what exactly are you trying to achieve?

--
Dave Evans
http://djce.org.uk/
http://djce.org.uk/pgpkey
Attachments: signature.asc (0.18 KB)


bje at serendipity

May 5, 2008, 4:46 AM

Post #3 of 3 (143 views)
Permalink
Re: Setting Outbound Interfaces [In reply to]

Hi Grant,

On 3 May 2008, at 14:21, Grant Peel wrote:
> Question one: Can anyone see whats wronge with my remote_smtp_alias
> Transport?
>
> 2008-05-03 01:52:52 1JrTgN-0003e3-Qx == gmail_address[at]gmail.com
> <alias_on_my_server[at]my_server.com> R=dnslookup_alias
> T=remote_smtp_alias
> defer (-1): "64.233.171.83\n72.14.253.83\n64.233.161.83" is not a
> valid IP
> address for the "interface" option for remote_smtp_alias
> transport2008-05-03

You're doing a PTR lookup for $original_domain, which is google.com.

"interface" should be an IP address that's bound locally to your
servers' ethernet or loopback interface.

You should probably use the recipient domain instead (which would be
local, and which you'd be able to associate with an IP address).

> remote_smtp_alias:
> driver = smtp
> helo_data = ${lookup
> dnsdb{ptr=$sender_address_domain}{$value}{$primary_hostname}}
> interface = ${lookup
> dnsdb{a=$original_domain}{$value}{nnn.nnn.nnn.nnn}}
> return_path_add = true
> debug_print = "Transport: remote_smtp_alias \
> Destination: $local_part@$domain \
> Sent VIA: ${lookup
> dnsdb{ptr=$sender_host_address}{$value} \
> {{nnn.nnn.nnn.nnn}} \
> Domain Info: $domain_data"

This is how I do it:

smtp:
driver = smtp
hosts_randomize
interface = ${extract {oif} {PARAM} }
helo_data = ${extract {oif_name} {PARAM} {$value}
{$primary_hostname}}

Jaco

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.