Robby Van Mieghem:
> Can there be more lines after the if .. endif

Yes. Please RTFM: http://www.postfix.org/header_checks.5.html

    Wietse

> meaning I have 3 other checks to do ( not conditional ) , just a check if a
> field contains spec word 1, word2 or 3, depending on that FILTER smtp :
> 
> so
> 
> if /^X-MS-Exchange-CrossTenant-id:/
> !/^X-MS-Exchange-CrossTenant-id: 8888/ REJECT TenantID-InCorrect
> /X-MS-Exchange-CrossTenant-id: 8888/ WARN Allowing mail  Tenant-ID
> endif
> ^route_gw:/ tst1/ FILTER smtpxxxxx
> ^route_gw:/ tst2/ FiLTER smtpxxxxx
> ^route_gw:/ tst3/ FILTER smtpxxxxxx
> 
> 2017-09-14 19:41 GMT+02:00 Noel Jones <njo...@megan.vbhcs.org>:
> 
> > On 9/14/2017 7:18 AM, Robby Van Mieghem wrote:
> > > OK tx
> > >
> > > Small other questions. Seems not to works also : assuming tenantid =
> > > 8888
> > >
> > > I have one line in header checks
> > >
> > > !/^X-MS-Exchange-CrossTenant-id: 8888/ REJECT Tenant-ID In-Correct
> > >
> > > So I want a reject whenever the X-********-CrossTenantID is not 8888
> > > ... He seems to ignire th '!'
> >
> > The above will apply to all headers.  So eg. "Received: ..." doesn't
> > match and will cause the message to be rejected.
> >
> > >
> > > How can I say conditionally if it does not match do that ... Or can
> > > I use only :
> > >
> > >
> > > if /^X-MS-Exchange-CrossTenant-id:/
> > > !/^X-MS-Exchange-CrossTenant-id: 8888/ REJECT TenantID-InCorrect
> > > /X-MS-Exchange-CrossTenant-id: 8888/ WARN Allowing mail  Tenant-ID
> > > Correct
> > > endif
> >
> >
> > Yes, to test a specific header content, it needs to be in a IF/ENDIF
> > statement.
> >
> >
> >
> >
> >   -- Noel Jones
> >

Reply via email to