Signature only in HAM

Questions and answers about how to do stuff
Post Reply
nicola.piazzi
Posts: 389
Joined: 23 Apr 2015 09:45

Signature only in HAM

Post by nicola.piazzi »

In my configuration these 2 files :
/etc/MailScanner/reports/en/inline.sig.in.txt
/etc/MailScanner/reports/en/inline.sig.in.html

contains some link to add in whitelist the sender and the host of the sender
but content of these 2 files is appended to ham only

how can I append also to spam messages ?
nicola.piazzi
Posts: 389
Joined: 23 Apr 2015 09:45

Re: Signature only in HAM

Post by nicola.piazzi »

no one can help me :-(
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Signature only in HAM

Post by shawniverson »

You can append to spam too. Check out inline sigs options for spam in EFA-Configure.
nicola.piazzi
Posts: 389
Joined: 23 Apr 2015 09:45

Re: Signature only in HAM

Post by nicola.piazzi »

Sorry but I am unable to find where to act in EFA-Configure menu
nicola.piazzi
Posts: 389
Joined: 23 Apr 2015 09:45

Post by nicola.piazzi »

-deleted-
Last edited by nicola.piazzi on 18 Jan 2016 09:36, edited 2 times in total.
nicola.piazzi
Posts: 389
Joined: 23 Apr 2015 09:45

Re: Signature only in HAM

Post by nicola.piazzi »

EFA-Configure option 9 + 3 invoke /var/EFA/lib/EFA-Configure/func_asksigrules
func_asksigrules write domains that we want to add signatures in sig.html.rules and sig.text.rules

But this is intended only for ham messages
If you watch /etc/MailScanner/MailScanner.conf you see
Spam Actions = deliver header "X-Spam-Status:Yes"
High Scoring Spam Actions = store deliver header "X-Spam-Status:Yes"
Non Spam Actions = store deliver header "X-Spam-Status:No" custom(nonspam)

Only Non Spam Actions has custom(nonspam) as an action
and it invoke script : /usr/lib/MailScanner/MailScanner/CustomFunctions/CustomAction.pm
In the script there is token creation and signature addition only in nonspam subroutine

I think that it can't be a good thing to add custom(nonspam) as an action of Spam Actions and High Scoring Spam Actions
nicola.piazzi
Posts: 389
Joined: 23 Apr 2015 09:45

Re: Signature only in HAM

Post by nicola.piazzi »

Only way that works is to add custom(nonspam) action also in Spam Actions like here, so it works , I have a look of the code and I cant find problem doing this, do you think that can be problems ?


Spam Actions = deliver header "X-Spam-Status:Yes"
High Scoring Spam Actions = store deliver header "X-Spam-Status:Yes"
Non Spam Actions = store deliver header "X-Spam-Status:No" custom(nonspam)
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Signature only in HAM

Post by shawniverson »

Add custom(spam) or use EFA-Configure here:

9) Spam Settings --> 1) Non Spam Settings
nicola.piazzi
Posts: 389
Joined: 23 Apr 2015 09:45

Re: Signature only in HAM

Post by nicola.piazzi »

Sorry shawni but EFA-Configure can be used only 4 Non Spam settings
I already have signature in incoming non spam, in need also in incoming spam

Adding custom(spam) doesnt solve

signatures are added only adding custom(nonspam) also to spam messages
the program CustomAction.pm add signatures only when called with nonspam option
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Signature only in HAM

Post by shawniverson »

I am looking at the code right now...

Code: Select all

if ($param =~ /^spam$/ ) {
   return EFASpamNotify($message);
 }

sub EFASpamNotify {
  my($message) = @_;
  my($token);

  $token = EFACreateToken();
  #if (!$token) { return; }

  $message->{token} = $token;

  # Notify user
  HandleSpamNotify($message);

  return 0;
}
Yes it is there. Told you the wrong menu option 9) Spam Settings --> 2) Spam Settings
[EFA] Spam Notification Settings:

[EFA] By default, EFA notifies users of lower scoring
[EFA] spam when spam is stored in quarantine. Users
[EFA] can release the message by clicking the link
[EFA] link in the {Spam Not Delivered} notification.
[EFA] You can optionally choose to disable
[EFA] this feature, especially if your users are
[EFA] abusing this feature and causing Spamassassin
[EFA] to autolearn and poison the Bayesian filter.

[EFA] Do you want to DISABLE spam notification? [y/N]:
nicola.piazzi
Posts: 389
Joined: 23 Apr 2015 09:45

Re: Signature only in HAM

Post by nicola.piazzi »

yes, and you see that only with nonspam parameter it ll attach the signature
i dont think that is a problem to use custom(nonspam ) also in spam messages
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Signature only in HAM

Post by shawniverson »

I see what you are saying. You want the actual message signed, not a notification about a spam message.
User avatar
shawniverson
Posts: 3783
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Signature only in HAM

Post by shawniverson »

This should be doable. You need a slightly modified routine so that instead of submitting non-spam as spam, you submit spam as non-spam.

Is that correct?
nicola.piazzi
Posts: 389
Joined: 23 Apr 2015 09:45

Re: Signature only in HAM

Post by nicola.piazzi »

Actually both spam & nonspam are passed to Exchange
difference is spam-statys Yes or No
but to have inline.signature i mist add custom(nonspam) action
Post Reply