Koozali.org: home of the SME Server

Automatic footer - outgoing e-mails

mathubbard

Automatic footer - outgoing e-mails
« on: December 29, 2006, 11:03:14 PM »
Hi,

Apologies if there's an obvious solution for this..... but is there a way to easily add a footer to all e-mails sent by SME7.0?

A lot of companies have 'legal' stuff attached to all e-mails..... and I assume that this can be done by the mail server rather than adding things to signatures in the e-mail clients.

Thanks, Mat.

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
Re: Automatic footer - outgoing e-mails
« Reply #1 on: December 30, 2006, 01:10:01 AM »
Quote from: "mathubbard"

Apologies if there's an obvious solution for this..... but is there a way to easily add a footer to all e-mails sent by SME7.0?


No, there is no support for this. The simplest solution is to use custom signatures in the email clients.

Quote from: "mathubbard"

A lot of companies have 'legal' stuff attached to all e-mails..... and I assume that this can be done by the mail server rather than adding things to signatures in the e-mail clients.


Modifying the body of the mail during transit is a bad thing and leads to disclaimer explosion as mail goes through various mail systems. If anyone is going to add disclaimers, it should be the original injector of the mail.

Before you go down this path, I suggest reading these:

http://goldmark.org/jeff/stupid-disclaimers/
http://goldmark.org/jeff/stupid-disclaimers/apply.html

http://www.emaildisclaimers.com/

(IANAL, but I side with the first opinion)

Someone could write a disclaimer plugin for qpsmtpd fairly easily, but please ensure that it carefully checks for local injection and existing disclaimers (e.g. forwarded internal mail).
............

Offline stefan24

  • *****
  • 483
  • +0/-0
    • www.sme-server.de
Automatic footer - outgoing e-mails
« Reply #2 on: January 30, 2007, 08:38:31 AM »
Regarding necessary disclaimers:

In germany it is required for companies to show certain information in EACH outgoing correspondance (also e-mails) since the beginning of 2007.

http://www.heise.de/newsticker/meldung/84183

IMHO it is not advisable to do this in each and every mail client.
So how can I achive this? The search for "signature" and "disclaimer" in the forum showed me only advices like "Don't do this" and "Why would you want that?".

Offline gordonr

  • *
  • 646
  • +0/-0
    • http://www.smeserver.com.au/
Automatic footer - outgoing e-mails
« Reply #3 on: January 30, 2007, 11:06:06 AM »
Quote from: "stefan24"

So how can I achive this? The search for "signature" and "disclaimer" in the forum showed me only advices like "Don't do this" and "Why would you want that?".

As I mentioned above, someone could write a qpsmtpd plugin to do this, and someone may already have done so. Check the qpsmtpd Wiki. I know that people have done it with qmail-queue filters and even patches to qmail, but I think a qpsmtpd plugin is a better approach.
............

Offline stefan24

  • *****
  • 483
  • +0/-0
    • www.sme-server.de
Automatic footer - outgoing e-mails
« Reply #4 on: January 30, 2007, 01:35:10 PM »
I have already looked into the Wiki (and searched with Google), but there is nothing I (!) could adopt for this purpose.

Offline byte

  • *
  • 2,183
  • +2/-0
Automatic footer - outgoing e-mails
« Reply #5 on: January 30, 2007, 08:12:26 PM »
Quote from: "stefan24"
I have already looked into the Wiki (and searched with Google), but there is nothing I (!) could adopt for this purpose.


How about sponsoring maybe one of the Dev's to do this work?
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline stefan24

  • *****
  • 483
  • +0/-0
    • www.sme-server.de
Automatic footer - outgoing e-mails
« Reply #6 on: January 30, 2007, 10:52:29 PM »
Great!

I'm willing to pay 30 Dollars for this task (via Paypal).

Someone else?

Offline piran

  • *****
  • 502
  • +0/-0
Automatic footer - outgoing e-mails
« Reply #7 on: January 30, 2007, 11:34:06 PM »
Does this one get any where near the target zone for you?
http://www.hjp.at/projekte/qpsmtpd/address_notes/

Offline Kobus

  • *****
  • 153
  • +0/-0
    • http://www.fullnet.co.uk
Automatic footer - outgoing e-mails
« Reply #8 on: February 06, 2007, 03:55:53 PM »
Hi

In the European Union on January 1 2007 it became law that all company documents must include company details in the document. This includes electronic messaging such as email. You can find the document at http://www.opsi.gov.uk/si/si2006/20063429.htm (UK) and
http://eur-lex.europa.eu/LexUriServ/site/en/oj/2003/l_221/l_22120030904en00130016.pdf /
http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CELEX:31968L0151:EN:HTML for the European Union in general.

So I would also be very interested in a solution to this.

Kobus
Kobus............

Offline Blackbox

  • ***
  • 47
  • +0/-0
Automatic footer - outgoing e-mails
« Reply #9 on: April 11, 2007, 07:47:06 AM »
Hi Everyone,
By any chance, has anyone managed to insert an automatic disclaimer in SME 7?

It looks like our company has been forced by law to do it.

Any help is appreciated.

Thanks
Since I experienced an IRQ conflict, my brain never worked the same!

Offline byte

  • *
  • 2,183
  • +2/-0
Automatic footer - outgoing e-mails
« Reply #10 on: April 11, 2007, 12:28:29 PM »
All,

I raised a NFR over http://bugs.contribs.org/show_bug.cgi?id=2648 - I would love to see this happen but would want to know if anyone would be willing to do this ? I know in past we have talked about a bounty program, so if someone is willing then maybe we could have our first bounty case.

Thanks for listening.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline Blackbox

  • ***
  • 47
  • +0/-0
Re: Automatic footer - outgoing e-mails
« Reply #11 on: August 22, 2007, 08:42:51 AM »
Hi,
I noticed that Bug Report 2648 has been closed that it looks like there is a solution to company (domain) wide email disclaimers.  :-D :-D :-D

I read and re-read all the bug report but, somehow, I am very worried to implement in my production server without having a step by step installation and configuration note. Please excuse my lack of knowledge as I am still a beginner (but I am getting the feel bit by bit  :-))

Can please, someone, post a simple installation and configuration routine? A small point form note would do.

I really need to implement this email footer companywide as it is forced by my directors.

Any help is appreciated.

Thanks in advance
Since I experienced an IRQ conflict, my brain never worked the same!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Automatic footer - outgoing e-mails
« Reply #12 on: August 22, 2007, 12:03:31 PM »
Blackbox

> I read and re-read all the bug report...

It's all in the last couple of posts to that bug report.
It's part of sme7.2 so make sure you have upgraded before trying this.

config setprop smtpd disclaimer enabled
pico /service/qpsmtpd/config/disclaimer
Enter the required disclaimer text (Ctrl o to save)(Ctrl x to exit)
signal-event email-update

Note this creates a general disclaimer for all domains on your sme server

To create domain specific disclaimers, delete the general disclaimer file and create the files
disclaimer_domain1.com.au
disclaimer_domain2.com
disclaimer_domain3.org

edit the files with appropriate text
Remember to do
signal-event email-update
after making any changes

Note also the criteria for when a disclaimer is attached (see http://bugs.contribs.org/show_bug.cgi?id=2648)
eg internal to external messages but not internal to internal.
There are also various switches that can be applied (see http://bugs.contribs.org/show_bug.cgi?id=2648).
...


Offline Blackbox

  • ***
  • 47
  • +0/-0
Re: Automatic footer - outgoing e-mails
« Reply #14 on: August 24, 2007, 11:41:54 AM »
Hi Ray,
Thanks a lot for the info. You saved my life more than once!  8)

I just tried it out.

The disclaimer was attached to the external email. However, the text does not get inserted to the bottom of the mail message. It gets attached as an attachment.

Unfortunately, this is not what my director and lawyer demands. They need to see the disclaimer as part of the messages.

Do you know if this plugin can actually insert the text inside the email itself please?

Any help is appreciated.

Thanks in advance.
Since I experienced an IRQ conflict, my brain never worked the same!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Automatic footer - outgoing e-mails
« Reply #15 on: August 24, 2007, 11:56:23 AM »
Blackbox

> You saved my life more than once! 

Yes I seem to recall that !


> ...the text does not get inserted to the bottom of the mail message. It gets attached as an attachment.
> ...this is not what my director and lawyer demands. They need to see the disclaimer as part of the messages.
> ...Do you know if this plugin can actually insert the text inside the email itself please?

Demand as much as they like, that's the way the feature works.
This "issue" was discussed in the bug report, and as far as I recall it's really an issue of how your email client reads the message. Yes it is technically an attachment, but when you read the message it is displayed as part of the message. It seemed like it could not be implemented any other way for various technical reasons, mainly associated with changing the message and therefore affecting digitally signed messages, which would then appear to be tampered with. Technically it's not possible/desirable to insert anything into the message.
Try it with different email clients.
Read the bug report again for clarification.
...

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Automatic footer - outgoing e-mails
« Reply #16 on: August 24, 2007, 12:18:38 PM »
This "issue" was discussed in the bug report, and as far as I recall it's really an issue of how your email client reads the message.

Ray is correct it does depend on what email client/format they use, in my testing I found some email clients post "inline" AND attach to the email, other email clients just attach to the email as you've found out.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Re: Automatic footer - outgoing e-mails
« Reply #17 on: August 24, 2007, 04:51:17 PM »
One option that may be of interest is to install a server-based commercial anti-virus program. The better ones offer an automatic footer mechanism with the ability to overide the included default footer with a custom one. The default footer is usually similar to: 'This message was scanned for viruses by'. Do some research and pick the antivirus program of your choice. "Inappropriate advertising endorsement, comment(s) removed"

Darrell
"Inappropriate advertising endorsement, comment(s) removed"

« Last Edit: October 20, 2008, 06:47:30 PM by byte »

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Automatic footer - outgoing e-mails
« Reply #18 on: August 24, 2007, 06:38:09 PM »
One option that may be of interest is to install a server-based commercial anti-virus program.

To be honest installing a commercial anti-virus will give you the same result as what is built in to the SME Server already, for example I was running a commercial anti-virus with the footer enabled, and then the developers coded a built in footer and there is no difference between the 2 they both work in the same manner.

dmay's post looks more like a ploy to market his site/product. (That's not intending to start a flame war.)
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Re: Automatic footer - outgoing e-mails
« Reply #19 on: August 24, 2007, 06:57:13 PM »
To be honest installing a commercial anti-virus will give you the same result as what is built in to the SME Server already,
The original poster complained that the SME built in way created a footer attachment. Most of the commercial anti-virus products append the footer at the bottom of the message body. Totally different results.

Darrell

Offline slords

  • *****
  • 235
  • +3/-0
Re: Automatic footer - outgoing e-mails
« Reply #20 on: August 24, 2007, 07:09:50 PM »
One option that may be of interest is to install a server-based commercial anti-virus program. The better ones offer an automatic footer mechanism with the ability to overide the included default footer with a custom one. The default footer is usually similar to: 'This message was scanned for viruses by'.

And unless they are attaching the disclaimer as we are then they invalidate all digital signatures and DKIM/DomainKeys.  Or it is possible they just skip checking/signing digitally signed messages.  If you are working in an industry that relies on digital signatures on messages you will run into tons of problems with any product/program that attempts to modify the message body.

You also run into issues with trying to figure out which part of a multi-part mime message to update.  Many people are sending in HTML/mixed-HTML format these days.  Trying to differentiate between an attached html page or text document becomes a real nightmare (and I've seen many commercial scanners completely botch messages in this format).
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -- Rich Cook

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Automatic footer - outgoing e-mails
« Reply #21 on: August 24, 2007, 07:11:54 PM »
The original poster complained that the SME built in way created a footer attachment.

But its not the SME Server fault, it's actually the email client used i.e outlook/thunderbird.

Quote
Most of the commercial anti-virus products append the footer at the bottom of the message body. Totally different results.

Not true as I've been using a commercial anti-virus for past year and the current commercial anti-virus apply's the footer exactly the same way SME Server's built in footer, I've even spoken to the commercial anti-virus developers and they do not at this time have a way to insert the footer within the actually email message as it will just attach as an attachment.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Re: Automatic footer - outgoing e-mails
« Reply #22 on: August 24, 2007, 07:30:27 PM »
Not true as I've been using a commercial anti-virus
Maybe not true for whatever program you are using. BD works fine.

-----Original Message-----
From: Darrell May [mailto:dmay@]
Sent: Friday, August 24, 2007 12:27 PM
To: May, Darrell
Subject: Footer test

Footer test.

Regards,

Darrell May
Tallgrass Ranch

--
This message was scanned for viruses by BitDefender for Linux Mail Servers.
For more information please visit http://wwww.bitdefender.com/
« Last Edit: August 24, 2007, 11:00:20 PM by dmay »

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Automatic footer - outgoing e-mails
« Reply #23 on: August 24, 2007, 07:44:47 PM »
Maybe not true for whatever program you are using. BD works fine.

It's actually BD which I use too, and as you show it does attach "inline", but it also attaches as an attachment to.

At the end of the day it really does depend on your email client as the built in SME Server code for the footer does also attach "inline" as well as an attachment.

Have you tested the SME Server's email footer option with various email clients ?
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline LucLenaerts

  • 3
  • +0/-0
Re: Automatic footer - outgoing e-mails
« Reply #24 on: October 20, 2008, 12:44:26 PM »
I have tested the disclaimer as documented in the wiki and it seems to work. I have noticed that the text for the disclaimer is included as "text/plain". It is also possible to have an attachment in text/html? There is also a reference about various switches that can be applied, but I can't find them. Has anybody an idea if this is possible?
Thanks.
Luc

Offline Alex Wong

  • *
  • 5
  • +0/-0
Re: Automatic footer - outgoing e-mails
« Reply #25 on: November 26, 2008, 09:20:08 AM »
yes, it seems like just attached the file "disclaimer.txt" in e-mail.

anyone have idea so that the message in "/service/qpsmtpd/config/disclaimer" can be embedded in the mail.

some code showed in "/usr/share/qpsmtpd/plugins/disclaimer":

  my $parser = new MIME::Parser;
  $parser->output_under( $self->spool_dir() );
  $parser->extract_uuencode(1);
  my $ent = $parser->parse_open( $transaction->body_filename() );

  $ent->make_multipart( 'mixed', Force => 1 ) if $ent->mime_type ne 'multipart/mixed';
  $ent->attach( Data => join("\n", @lines),
                Encoding => $self->{_args}->{mime_encoding} || '-SUGGEST',
                Filename => $self->{_args}->{mime_filename} || 'disclaimer.txt',
                Type => $self->{_args}->{mime_type} || 'text/plain');
  if ($ent->parts <= 2) {
    $transaction->header->empty();
    $transaction->header($ent->head());
  }
  $transaction->header->replace( 'X-Qpsmtp-Disclaimer', $fromhost );
  $self->log(LOGNOTICE, "Attached disclaimer for domain: $fromhost");

I am also a guy would like implement this email footer.

thanks.

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: Automatic footer - outgoing e-mails
« Reply #26 on: November 26, 2008, 09:43:21 AM »
See the wiki for instructions -- this thread is a bit out of date I think.

Offline Alex Wong

  • *
  • 5
  • +0/-0
Re: Automatic footer - outgoing e-mails
« Reply #27 on: November 26, 2008, 10:23:02 AM »
hi, thx for your reply...

yes, i know this solution already...

but my question is: it is possible the message can be embedded NOT attached in the mail like LucLenaerts say...

i read bug report & forum about this issue, but cannot find any hit to do that.

anyone can help.

thanks.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Automatic footer - outgoing e-mails
« Reply #28 on: November 26, 2008, 02:02:17 PM »
hi

AFAIR it's not a server issue but a client one..

ciao
Stefano