On our Exim 4.62 server we're experiencing a problem with relaying mail 
to another mailserver. This problem occurs ONLY when the following 
conditions are met:

- The mail that is sent has more recipients on the same domain (So, more 
than one To, or a CC on the same domain)
- The mail has no recipients with local mailboxes

It seems that the repeated MySQL lookup for the port fails (The 
hostname/IP and port for the receiving mailserver needs to be found in a 
MySQL database). A message with a single recipient or when a copy of the 
message needs to be delivered to a local mailbox, instead of being 
relayed, the problem doesn't occur.

The following error message indicates that Exim can't query the port 
where needs to be relayed to.

/var/log/exim/exim_main.log:
== [EMAIL PROTECTED] <[EMAIL PROTECTED]> R=mailrelaysql T=pipe_remote 
defer (-1): TCP port "" is not defined for pipe_remote transport
== [EMAIL PROTECTED] <[EMAIL PROTECTED]> R=mailrelaysql T=pipe_remote 
defer (-1): TCP port "" is not defined for pipe_remote transport


The following router is used in exim.conf:

mailrelaysql:
  driver = accept
  transport = pipe_remote
  condition = ${if eq{$domain}{${lookup mysql {SELECT domein FROM 
domains WHERE domain='$domain' AND relay_on='1' LIMIT 0,1}}}{yes}{no}}
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8

The following transport is used in exim.conf:

pipe_remote:
  driver = smtp
  hosts = ${lookup mysql{SELECT relay_ip FROM domains WHERE 
domain='$domain'}}
  port = ${lookup mysql{SELECT relay_port FROM domains WHERE 
domain='$domain'}}
  allow_localhost
  hosts_override

Any tips how we can solve this problem?



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

Reply via email to