Community Discussions and Support
How to check SMTP AUTH in policy task ?

I am using policy tasks to analyse incoming email through a perlscript (I have written an own spam filtering mechanism which connects to an own database on a different machine)

I want to react on the email different it it is received with SMTP AUTH. How can I check this, because there is no corresponding line in the Email-Header ?

As I can see from the logfile, spamhalter realises incoming emails being SMTP authenticated, so there must be some way to get this information ?

Best regards

 Heiko

<P>I am using policy tasks to analyse incoming email through a perlscript (I have written an own spam filtering mechanism which connects to an own database on a different machine)</P> <P>I want to react on the email different it it is received with SMTP AUTH. How can I check this, because there is no corresponding line in the Email-Header ?</P> <P>As I can see from the logfile, spamhalter realises incoming emails being SMTP authenticated, so there must be some way to get this information ?</P> <P>Best regards</P> <P> Heiko</P>

[quote user="Marschall"]

I am using policy tasks to analyse incoming email through a perlscript (I have written an own spam filtering mechanism which connects to an own database on a different machine)

I want to react on the email different it it is received with SMTP AUTH. How can I check this, because there is no corresponding line in the Email-Header ?

As I can see from the logfile, spamhalter realises incoming emails being SMTP authenticated, so there must be some way to get this information ?

Best regards

 Heiko

[/quote]

 

If Spamhalter can do this, and I'm not sure that it does,  then it's being done via the  daemon interface.  Spamhalter gets all the mail files, both the QCF and QDF, after it's been received via MercuryS and/or MercuryD so I'm not all that sure how it knows that the message has gone through the MercuryS ESMTP authentication process.

 

[quote user="Marschall"]<p>I am using policy tasks to analyse incoming email through a perlscript (I have written an own spam filtering mechanism which connects to an own database on a different machine)</p> <p>I want to react on the email different it it is received with SMTP AUTH. How can I check this, because there is no corresponding line in the Email-Header ?</p> <p>As I can see from the logfile, spamhalter realises incoming emails being SMTP authenticated, so there must be some way to get this information ?</p> <p>Best regards</p> <p> Heiko</p><p>[/quote]</p><p> </p><p>If Spamhalter can do this, and I'm not sure that it does,  then it's being done via the  daemon interface.  Spamhalter gets all the mail files, both the QCF and QDF, after it's been received via MercuryS and/or MercuryD so I'm not all that sure how it knows that the message has gone through the MercuryS ESMTP authentication process. </p><p> </p>

[quote user="Thomas R. Stephenson"]

If Spamhalter can do this, and I'm not sure that it does,  then it's being done via the  daemon interface.  Spamhalter gets all the mail files, both the QCF and QDF, after it's been received via MercuryS and/or MercuryD so I'm not all that sure how it knows that the message has gone through the MercuryS ESMTP authentication process.

[/quote]

It is one of my tricks. [:D] Deamon interface not provide this kind of information, but I can made deduction by other informations instead:

  • message not goes by mercuryD
  • Server is not configured as openrelay
  • message going from known local address
  • message is for non-local user

At this case, message is very probably autorized by SMTP AUTH. Yes, hole os here, when message is for local user. But Spamhalter need this test for detect inbound/outgoing message, and for this purpose is this test enough.

By new API (SMTP server hooks) is possible to know if message is authorized, just here is problem how to get this information to queue procesing daemon. Maybe will be easy to write small daemon what can add some header with information about authorization. When i got a small free time, then I see what I can do with this. [;)]

[quote user="Thomas R. Stephenson"]<p>If Spamhalter can do this, and I'm not sure that it does,  then it's being done via the  daemon interface.  Spamhalter gets all the mail files, both the QCF and QDF, after it's been received via MercuryS and/or MercuryD so I'm not all that sure how it knows that the message has gone through the MercuryS ESMTP authentication process. </p><p>[/quote]</p><p>It is one of my tricks. [:D] Deamon interface not provide this kind of information, but I can made deduction by other informations instead:</p><ul><li>message not goes by mercuryD</li><li>Server is not configured as openrelay </li><li>message going from known local address</li><li>message is for non-local user</li></ul><p>At this case, message is very probably autorized by SMTP AUTH. Yes, hole os here, when message is for local user. But Spamhalter need this test for detect inbound/outgoing message, and for this purpose is this test enough.</p><p>By new API (SMTP server hooks) is possible to know if message is authorized, just here is problem how to get this information to queue procesing daemon. Maybe will be easy to write small daemon what can add some header with information about authorization. When i got a small free time, then I see what I can do with this. [;)] </p>

Don't worry Lukas - it's pretty trivial to add this in MercuryS itself; I'll do it for v4.53.

Cheers!

-- David --

Don't worry Lukas - it's pretty trivial to add this in MercuryS itself; I'll do it for v4.53. Cheers! -- David --
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft