Re: [exim] Advanced Exim Configuration with the smart_route …

Pàgina inicial
Delete this message
Reply to this message
Autor: Danielle M.
Data:  
A: exim-users
Assumpte: Re: [exim] Advanced Exim Configuration with the smart_route directive
On 6/12/2015 10:33 AM, Danielle M. wrote:
> On 6/12/2015 5:04 AM, Jon Gerdes wrote:
>> On Thu, 2015-06-11 at 12:48 -0500, Danielle M. wrote:
>>> On 6/11/2015 10:34 AM, Jon Gerdes wrote:
>>>> On Thu, 2015-06-11 at 10:05 -0500, Danielle M. wrote:
>>>>> Hey Jon,
>>>>>
>>>>> Thank you so much for the help. I'm relatively new to advanced Exim
>>>>> configuration and am running into an error or two with your
>>>>> suggestion. Exim is returning the below error when trying to set your
>>>>> ACL variable in the connect area:
>>>>>
>>>>> main option "set" unknown
>>>>>
>>>>> As for the router condition, would it look something like this?
>>>>>
>>>>> condition = ${if acl_c_mail_submission_port{1}}
>>>>>      smart_route:
>>>>>      driver = manualroute
>>>>>      domains = !+local_domains
>>>>>      transport = remote_smtp
>>>>>      route_list = * ip_address

>>>>>
>>>>> Thank you!
>>>>> Dani McLeod
>>>>> On 6/11/2015 3:38 AM, Jon Gerdes wrote:
>>>>>
>>>>>> On Wed, 2015-06-10 at 17:03 -0500, Danielle M. wrote:
>>>>>>> Trying this one more time as I do not think my first send
>>>>>>> registered.
>> -- snip --
>>
>>> 2015-06-11 12:37:41 1Z36Q9-0000fy-E3 failed to expand condition "${if
>>> and{{bool_lax{NULL}}{bool_lax{{if
>>> eq{$acl_c_mail_submission_port}{1}}}}}}" for smart_route router:
>>> missing
>>> } at end of condition inside "and" group
>>>
>>> I've tried all of the common sense fixes I could think of (ensuring all
>>> braces have a matching opposite brace, etc.) to no avail. To sum up
>>> what
>>> I've added:
>>>
>>> ---Under acl_check_connect---
>>>
>>> warn  condition = ${if ={587}{$interface_port}}
>>>         set acl_c_mail_submission_port = 1
>>>         domains = !+local_domains
>>> accept domains = !+local_domains

>>>
>>> ---Under routers---
>>>
>>> smart_route:
>>>       driver = manualroute
>>>       domains = !+local_domains
>>>       transport = remote_smtp
>>>       route_list = * ip_address_for_smart_host
>>>       condition = {if acl_c_mail_submission_port{1}}
>>>       no_more

>>>
>>> Any ideas?
>>>
>>> Thank you,
>>> Danielle M.
>>>
>>>
>> Danielle
>>
>> I've just tested this:
>>
>>   warn condition = ${if eq{$interface_port}{587}}
>>         set acl_c_mail_submission_port = 1
>>         domains = !+local_domains

>>
>> With this:
>>
>> #exim -bhc 192.168.100.11 -oMi 10.77.10.11.587
>>
>> ... and that works for definite!
>>
>> ----------- 8< ----------------
>>>>> processing "warn"
>>>>> check condition = ${if eq{$interface_port}{587}}
>>>>>                  = true
>>>>> check set acl_c_mail_submission_port = 1
>>>>> check domains = !+internal_domains
>> ----------- 8< ----------------

>>
>> In the above exim command, 192.168.100.11 is a pretend client address,
>> 10.77.10.11 is and exim daemon address and the .587 means to pretend
>> that the connection is arriving on port 587 and not 25. Note it is a .
>> (dot) and not a : as you would normally expect ...
>>
>> Finally, the extra c (-bhc) is probably not needed in your case but I
>> use callout checks here and so I always put it in.
>>
>> For the if syntax see:
>> http://www.exim.org/exim-html-current/doc/html/spec_html/ch-string_expansions.html
>> In this case I am using the third example:
>>
>> condition = ${if >{$acl_m4}{3}}
>>
>> Cheers
>> Jon
>>
>>
>>
>> Blueloop Ltd
>>
>> Jon Gerdes | Senior Consultant
>>
>> Blueloop House
>> Ilchester Road
>> Yeovil
>> Somerset BA21 3AA
>>
>> Tel: 2100
>> Web: www.blueloop.net
>>
>>
>>
>> Registered Address : Blueloop House, Ilchester Road, YEOVIL, BA21 3AA
>> Registered England & Wales - 3981322
>>
>> CONFIDENTIAL INFORMATION
>> This e-mail and any files attached with it are confidential and for
>> the sole use of the intended recipient(s). If you are not the
>> intended recipient(s) you are prohibited from using, copying or
>> distributing this or any information contained in it and should
>> immediately notify the sender and delete the message from your system.
>>
>> Internet communications are not secure and Blueloop Limited is not
>> responsible for unauthorised use by third parties nor for alteration
>> or corruption in transmission. Furthermore, while Blueloop Limited
>> have taken reasonable precautions to minimise the risk of software
>> viruses, it cannot accept liability for any damage which you may
>> suffer as a result of such viruses, and we therefore recommend you
>> carry out your own virus checks on receipt of any e-mail.
> Jon,
>
> I don't know what changed, but now it works! One final thing is
> hanging up when I try to send via SMTP:
>
> 2015-06-12 10:28:01 SMTP connection from [::1]:36914 (TCP/IP
> connection count = 1)
> 2015-06-12 10:28:01 H=[::1]:36914 rejected connection in "connect" ACL
>
> I have this in my connect ACL:
>
> warn condition = ${if eq{$interface_port}{587}}
>        set acl_c_mail_submission_port = 1
>        domains = !+local_domains
> accept domains = !+local_domains

>
> Thank you,
> Dani
>
>

Anyone on this?