    # sending mail, postfix version

    # If amavis replaces the local delivery agent, LDA is procmail
    # On a proxy type setup, LDA is sendmail          
    open(MAIL, "|-") || exec($LDA, @LDAARGS);
    while (<$fh>) {
	next if ($seen_xheader == 0 && m/^$X_HEADER_TAG:/o);
	if ($seen_xheader == 0 && m/\A\r?\n\Z/) {
	    print MAIL "$X_HEADER_TAG: $X_HEADER_LINE\n";
	    $seen_xheader = 1;
	}
	print MAIL $_;
    }
    close(MAIL);

    # Pass up the LDA's error code
    do_exit($? >> 8, __LINE__);

# End postfix                    
