email disclaimer

General eFa discussion
Post Reply
thewomble
Posts: 50
Joined: 17 Jan 2017 12:52

email disclaimer

Post by thewomble »

I have my existing mail gateway which I am looking to replace with EFA over the next few months so I am looking to try and get as much as possible the same.

The system adds disclaimers to email (as does EFA) but the disclaimer is dynamic, where the disclaimers uses variables such as date/time the sender and receivers.

An example is below. In red is the variables. Is this possible in EFA or can anybody point to solution/product that work with postfix?

DISCLAIMER: The information contained in this communication/message from %SENDER% sent on %DATE&TIME% is confidential. It is intended solely for the addressee(s) %RCPTS%
olobley
Posts: 8
Joined: 15 Jan 2017 16:02

Re: email disclaimer

Post by olobley »

I'm sure the experts on here can help with the formatting/variables, but I believe the files you want to edit are:

/etc/MailScanner/reports/en/inline.sig.in.html
/etc/MailScanner/reports/en/inline.sig.in.txt

(maybe the out ones too in your case).
I had to modify these two files (for the inbound stuff), to get the spam reporting link over to HTTPS from HTTP.
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: email disclaimer

Post by shawniverson »

thewomble wrote: An example is below. In red is the variables. Is this possible in EFA or can anybody point to solution/product that work with postfix?
It is possible, but not using the existing MailScanner code, as it doesn't pass those variables to the built-in signature function.

Instead, you will need to take a look at /usr/share/MailScanner/perl/custom/CustomAction.pm

I did this very thing when trying to get more information into the signature line.

Starting at line 194,

Code: Select all

  # Setup other variables they can use in the message template
  $id = $message->{id};
  $localpostmaster = MailScanner::Config::Value('localpostmaster', $message);
  $postmastername  = MailScanner::Config::LanguageValue($message, 'mailscanner');
  $hostname = MailScanner::Config::Value('hostname', $message);
  $subject = $message->{subject};
  $date = $message->{datestring}; # scalar localtime;
  $spamreport = $message->{spamreport};
  $token = $message->{token};
And starting at line 482,

Code: Select all

  $attach = substr($typedattach,1);
  $filename = join(', ', keys %infected);
  $id = $message->{id};
  $from = $message->{from};
  $subject = $message->{subject};
  my($token) = $message->{token};
  my($hostname) = MailScanner::Config::Value('hostname', $message);
So, if you can find out if MailScanner has these items stored somewhere in the $message object, you can define them in these code blocks at both locations and then reference them in the signature templates.
thewomble
Posts: 50
Joined: 17 Jan 2017 12:52

Re: email disclaimer

Post by thewomble »

Thanks for the pointer I will give that a go.
Post Reply