[Mimedefang] Boilerplate Vanished

Barry Byrne barry.byrne at wbtsystems.com
Thu Oct 3 10:23:00 EDT 2002


Ric:

How about something like this. Drop the SendmailMacro bit if not applicable.

 - Barry

# This function returns true if mail relayed from localhost (127.0.0.1)
# or if relay is 192.168.0.101 (substitute IP of your Exchange server)
# or if user has been authenticated by sendmail (SMTP_AUTH) - delete if not
needed

sub is_local_sender {
	if ($RelayAddr =~ /127\.0\.0\.1/
		|| $RelayAddr =~ /192\.168\.0\.101/
		|| exists($SendmailMacros{'auth_authen'})) {
		return 1;
	} else {
		return 0;
	}
}

# Only append_boilerplate if local relay.

if (is_local_sender()) {
	append_boilerplate($entity, "blah blah...");
}

--
Barry Byrne, IT Manager,
WBT Systems, Block 2, Harcourt Centre
Harcourt Street, Dublin 2, Ireland


> -----Original Message-----
> From: mimedefang-admin at lists.roaringpenguin.com
> [mailto:mimedefang-admin at lists.roaringpenguin.com]On Behalf Of Richard
> Cooper
> Sent: 03 October 2002 14:32
> To: mimedefang at lists.roaringpenguin.com
> Subject: RE: [Mimedefang] Boilerplate Vanished
>
>
> [*embarrassed cough*]
>
> OK, so I went back to this, cd'd to /etc/mail and behold, there
> was a new copy of mimedefang-filter obviously installed there
> (instead of /usr/local/etc/mimedefang) when I rebuilt.
>
> I'm not really sure why the second mimedefang-filter didn't show
> up during my 'find' but there you go.
>
> Sorry to anyone who wasted time reading my previous mail.
>
> Whilst I'm here though...I'm not really a Perl person but I would
> like the boilerplate text added only to outgoing mail - as I see
> it at the moment, since this is a mail relay it will add the
> footer to all emails, incoming and outgoing. The machine
> mimedefang runs on is a simple mail relay (it relays to and from
> an Exchange Server sitting the other side of a Firewall). It
> seems the best way to check for mail going out from our domain
> would be to check the envelope 'from' header but maybe I'm
> reinventing the wheel (with out any wheel design skills). Does
> anyone have an example script for this, or something similar.
> Since I am new to Mimedefang and not very experienced with Perl,
> even suggestions or advice on this would be most appreciated.
>
> Cheers
> Ric
>
> > -----Original Message-----
> > From: mimedefang-admin at lists.roaringpenguin.com
> > [mailto:mimedefang-admin at lists.roaringpenguin.com]On Behalf Of Richard
> > Cooper
> > Sent: 03 October 2002 12:29
> > To: mimedefang at lists.roaringpenguin.com
> > Subject: [Mimedefang] Boilerplate Vanished
> >
> >
> > Hi everybody :)
> >
> > I'm new to Mimedefang but I have it all working pretty well
> > on a test machine. My problem is that I recompiled to get
> > Sophos support in and my boilerplate text has vanished. The
> > call appears fine in mimedefang-filter and it worked fine
> > before, but now after recompiling everything else works but
> > my footer doesn't appear anymore.
> >
> > I'm sorry if this is a stupid question, but I have no idea
> > why this should happen. I've searched for a second
> > mimedefang-filter in case my reinstall changed the default
> > path, but I can't find anything. In case its useful, this is
> > what I have in mimedefang-filter (which worked before, so I
> > can't see it being a problem).
> >
> > #Append Boilerplate
> >     append_boilerplate($entity, "-- \n".
> >     "This email and any files transmitted with it are
> > confidential and\n".
> >     "intended solely for the use of the individual or entity
> > to whom\n".
> >     "they are addressed.\n".
> >     "\n".
> >     "If you have received this email in error please notify the\n".
> >     "originator of the message. This footer also confirms
> > that this\n".
> >     "email message has been scanned for the presence of
> > computer viruses.\n".
> >     "\n".
> >     "Any views expressed in this message are those of the
> > individual\n".
> >     "sender, except where the sender specifies and with authority,\n".
> >     "states them to be the views of Digital Animations Group.\n");
> >
> > Thanks for any help.
> > Ric
> >
> >
> > _______________________________________________
> > MIMEDefang mailing list
> > MIMEDefang at lists.roaringpenguin.com
> > http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
> >
> >
>
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>




More information about the MIMEDefang mailing list