require verify = sender/callout but if $interface_port is 587 require verify = sender

SubZero

Well-Known Member
Apr 21, 2005
100
0
166
Balmumcu, Istanbul, TR
Hi,

I want to set something here. I have this in my current config:

Code:
  require verify          = sender/callout
  accept  domains         = +local_domains
          endpass
          message         = "The recipient cannot be verified.  Please check all recipients of this message to verify they are valid."
          verify          = recipient
I want to add something like this:
if the interface port is 587, don't use the callout function. Please help me to join theese two.

Code:
          condition       = ${if eq{$interface_port}{587}{yes}{no}}
Code:
  require verify          = sender
Awaiting your answers.
 

nisse

Well-Known Member
Nov 11, 2003
87
0
156
Code:
deny
  condition = ${if eq{$interface_port}{587}{no}{yes}}
  !verify   = sender/callout
 

SubZero

Well-Known Member
Apr 21, 2005
100
0
166
Balmumcu, Istanbul, TR
So nisse, all I have to do is this:

Code:
  deny    condition       = ${if eq{$interface_port}{587}{no}{yes}}
          !verify         = sender/callout
  accept  domains         = +local_domains
          endpass
          message         = "The recipient cannot be verified.  Please check all recipients of this message to verify they are valid."
          verify          = recipient
Right?
 

SubZero

Well-Known Member
Apr 21, 2005
100
0
166
Balmumcu, Istanbul, TR
but where is the
Code:
          verify          = sender
part here? :)
 
Last edited:

nisse

Well-Known Member
Nov 11, 2003
87
0
156
It's in the second line.

What it's saying is:

- verify the sender if the port isn't 587, and
- if the sender verification fails, don't accept the message.
 

nisse

Well-Known Member
Nov 11, 2003
87
0
156
Ah, sorry - I see what you're trying to do now. :eek:

This should do it:

Code:
deny
  condition = ${if eq{$interface_port}{587}{no}{yes}}
  !verify   = sender/callout

deny
  condition = ${if eq{$interface_port}{587}{yes}{no}}
  !verify   = sender