[Mimedefang] Duplication of Disclaimer!!

Barry Byrne barry.byrne at wbtsystems.com
Wed Dec 11 08:37:01 EST 2002


> -----Original Message-----
> From: mimedefang-admin at lists.roaringpenguin.com
> [mailto:mimedefang-admin at lists.roaringpenguin.com]On Behalf Of Mahesh P

> I have couple of doubts with mimedefang. I have installed MimeDefang
> 2.15 in Solaris 5.8 with Sendmail 8.12.x. I have configured Disclaimer
> and Filtering Attachment on Incoming Mails.
>
> Now, I am facing a problem like while i am forwarding mail within our
> local user that disclaimer is getting duplicated.  How to avoid that
> duplication? I should be having only one copy of disclaimer when i am
> using for local user.

Need a bit more information about how you are determining what is an
incoming mail.
Something like this should work (substitute your appropriate IP details):

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

if ( !is_local_sender ) {
	# Do stuff for inbound mails
} else {
	# Do stuff for outbound/local mails
}



> And, How to avoid the mails which comes from Unauthorized domain &

Add something like these lines to your .mc file and rebuild .cf file
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')
FEATURE(blacklist_recipients)

Add relevant entries to /etc/mail/access and rebuild access database.

> Specific porn mails by reading the content of mail.

See www.spamassassin.org

 - Barry




More information about the MIMEDefang mailing list