[Mimedefang] how to disable notify=success

Aleksandar Milivojevic alex at milivojevic.org
Thu Nov 17 11:08:29 EST 2005

Quoting Marco Berizzi <pupilla at hotmail.com>:

> Hello.
> I'm using a sendmail/MIMEDefang box as a gateway for my M$ Exchange 
> 5.5 internal mail server.
> One of our bigger customers are rejecting all messages from <>, so 
> MDN and return receipt from my M$ exchange relayed through the 
> sendmail/MD box are rejected.
> I would like to know if there is a way to disable NOTIFY=SUCCESS with MD.

Return receipts can be reqested on two levels.  On SMTP level and in 
headers. In former case they are handled by MTA, and in later by MUA.

To block any disposition notification, also known as return receipts 
(these are
not bounces):

sub filter_end ($) {
  my ($entity) = @_;

  if ($entity->head->get("Content-Type") =~
      m+multipart/report.*disposition-notification+igs) {
    return action_bounce("Disposition notifications prohibited");

You can also prevent requests for them to hit your users.  IMO, this is good
things, since return receipts are very handy way for spammers to verify 
that an
email address exists.

To disable them on SMTP level, simply tell sendmail you want to disable the
feature.  Add noreceipts to confPRIVACY_FLAGS in sendmail.mc and reubuild
sendmail.cf from it.  For example:

define(`confPRIVACY_FLAGS', `goaway,restrictqrun,noreceipts,noetrn')

To disable them in the headers, you can siply remove offending headers 
from the
message (you'd do this in filter_end function).  The headers you want to
ruthlessly remove are:


For example, add this to the above filter_end function:

  my @hremove = ("Disposition-Notification-To",
  foreach my $h (@hremove) {
    if ($entity->head->get($h)) {

This message was sent using IMP, the Internet Messaging Program.

More information about the MIMEDefang mailing list