Footer - Discalimer
Footer - Discalimer
Make it possible to set a disclaimer which will automaticly be added to each message passing hmailserver. I think making it on domain level is an good idea.
http://www.hmailserver.com/tracker/?do=details&id=265
http://www.hmailserver.com/tracker/?do=details&id=265
- TheAngryPenguin
- Senior user
- Posts: 341
- Joined: 2004-10-11 20:51
Even though they are stoopid, the people who pay we admins just seem to want this. I'd never recommend the use of this, but it may make or break the final decision of someone considering hMS as their mail server of choice. Hell, I can even enable something like this with Postini -- why not be able to do it here, at the source?
In hMailServer 4.0, it's extremly easy to do this using scripting. All you need to do is to put the following lines in the EventHandlers.vbs-file.
Perhaps this is enough?
Code: Select all
Sub OnDeliverMessage(oMessage)
' Add a footer to all messages.
oMessage.Body = oMessage.Body & vbNewLine & vbNewLine & "Please note that this email contains no useful information whatsoever."
oMessage.Save
End Sub
i agree w/ you martin. this much easier than re-writting the hmail. how ever this one only works in text mail format not in html format.
see :
http://www.hmailserver.com/forum/viewtopic.php?p=10655

see :
http://www.hmailserver.com/forum/viewtopic.php?p=10655
martin wrote:In hMailServer 4.0, it's extremly easy to do this using scripting. All you need to do is to put the following lines in the EventHandlers.vbs-file.
Perhaps this is enough?Code: Select all
Sub OnDeliverMessage(oMessage) ' Add a footer to all messages. oMessage.Body = oMessage.Body & vbNewLine & vbNewLine & "Please note that this email contains no useful information whatsoever." oMessage.Save End Sub
Maybe you could add some templates and a wizard to help modifying those to achieve the most common tasks through scripts (I know there is a section in this forum but many hMailServer users do not know anything about programming).
Last edited by plive on 2005-08-25 23:33, edited 1 time in total.
I've already wrote this in my script. Our company wants it and uses the feature, but only for emails going outside of the local domains. So Any internal comms doesn't get a disclaimer.
If it were to become an option, I would require an additional optional to not do it for local mail / local domains.
If it were to become an option, I would require an additional optional to not do it for local mail / local domains.
Code: Select all
call disclaimer(oMessage) ' in onAcceptMessage
sub disclaimer(oMessage)
dim disclaim
disclaim=false
Dim oRecipients
Set oRecipients = oMessage.Recipients
For i = 0 To oRecipients.Count - 1
if oRecipients(i).IsLocalUser = false Then disclaim = true
next
if disclaim=true then
oMessage.Body=oMessage.Body & vbcrlf & vbcrlf & "----------------" & vbcrlf & "Disclaimer goes here-PLAIN"
if oMessage.HTMLBody <> "" then
oMessage.HTMLBody = oMessage.HTMLBody & "<br><br>----------------<br><h3>Disclaimer goes here-HTML</h3>"
end if
oMessage.Save
end if
end sub
This script works very as soon as U understand that ' is for comment in vbs and that you must uncomment
Sub OnClientConnect(oClient)
End Sub
Sub OnAcceptMessage(oClient, oMessage)
call disclaimer(oMessage)
End Sub
Sub OnDeliverMessage(oMessage)
End Sub
And place call disclaimer(oMessage) between
Sub OnAcceptMessage(oClient, oMessage)
and
End Sub
In EventHandlers.vbs
But I have a question how to insert " in vbs (for example <a href="http://www...)
Thank you
Sub OnClientConnect(oClient)
End Sub
Sub OnAcceptMessage(oClient, oMessage)
call disclaimer(oMessage)
End Sub
Sub OnDeliverMessage(oMessage)
End Sub
And place call disclaimer(oMessage) between
Sub OnAcceptMessage(oClient, oMessage)
and
End Sub
In EventHandlers.vbs
But I have a question how to insert " in vbs (for example <a href="http://www...)
Thank you
Sure, here the code :
Maybe it is the vbcrlf that doesn't work
Code: Select all
Sub OnClientConnect(oClient)
End Sub
Sub OnAcceptMessage(oClient, oMessage)
call disclaimer(oMessage)
End Sub
Sub OnDeliverMessage(oMessage)
End Sub
'in onAcceptMessage
sub disclaimer(oMessage)
dim disclaim
disclaim=false
Dim oRecipients
Set oRecipients = oMessage.Recipients
For i = 0 To oRecipients.Count - 1
if oRecipients(i).IsLocalUser = false Then disclaim = true
next
if disclaim=true then
oMessage.Body=oMessage.Body & vbcrlf & vbcrlf & "----------------" & vbcrlf & "first line" & vbcrlf & vbcrlf & "second line"
if oMessage.HTMLBody <> "" then
oMessage.HTMLBody = oMessage.HTMLBody & "<br><br>----------------<br><h4>First line.<br><br>second line.</h4>"
end if
oMessage.Save
end if
end sub
Apache 1.3.33 PHP Version 4.4 hMailServer 4.1-B136 OS : Win XP SP2 AV : ClamAV 0.86.1
- Blue Ninja
- Normal user
- Posts: 238
- Joined: 2005-12-31 00:22
- Contact:
- Blue Ninja
- Normal user
- Posts: 238
- Joined: 2005-12-31 00:22
- Contact:
Martin,martin wrote:Me neither. I hate those 14-line disclaimers that aren't enforceable in any way.
Just force the disclaimers to be somehow delimited with a MIME boundary or something, so that you can add another feature to hMailServer to automatically strip this disclaimer from all incoming messages

Before we run away with the idea that these appendages are unenforceable, I beg to differ. Not because they are necessarily enforceable in law, but because if a half-decent lawyer was on the job it would certainly be used as ammunition to prop up a case.
"M'lud, the plaintiff says he received no notification that the information supplied in the email could lead to his hard drive being trashed, however the defendants mail server through which this email passed has been independently verified to automatically add such notification to all emails, including this one".
Juries typically convict on the probability factor offered by the evidence, and not least the ability of the prosecution/defence lawyers - not on the fact that some law or other has been broken.
We've got enough stupid laws as it is, and the last thing we need is our parliament spending huge dollars enshrining email footers in law.
Me, I just ignore them like every other sane person does.
Andrew
"M'lud, the plaintiff says he received no notification that the information supplied in the email could lead to his hard drive being trashed, however the defendants mail server through which this email passed has been independently verified to automatically add such notification to all emails, including this one".
Juries typically convict on the probability factor offered by the evidence, and not least the ability of the prosecution/defence lawyers - not on the fact that some law or other has been broken.
We've got enough stupid laws as it is, and the last thing we need is our parliament spending huge dollars enshrining email footers in law.
Me, I just ignore them like every other sane person does.
Andrew
Andrew McKay
I do believe that you woefully neglected to appropriately punctuate the above quoted plea before the magistrate....DONS POWERED WIG...kazmax wrote: "M'lud, the plaintiff says he received no notification that the information supplied in the email could lead to his hard drive being trashed, however the defendants mail server through which this email passed has been independently verified to automatically add such notification to all emails, including this one".
"M'lud, the plaintiff says he received no notification that the information supplied in the email could lead to his hard drive being trashed, however comma the defendants mail server through which this email passed has been independently verified to automatically add such notification to all emails, including the one which led to the unfortunate circumstance in question".
I feel like i've done my bit to improve the plight of the human condition...*ducking and running*