Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

[MailScanner] Removing the ALT attribute for Web Bug images

Discussion in 'cPanel Developers' started by spiff06, Aug 30, 2006.

  1. spiff06

    spiff06 Well-Known Member

    Jan 17, 2004
    Likes Received:
    Trophy Points:
    With MailScanner, "Web bug from" warnings appear when a Web bug, i.e. a tiny 1x1 image is inserted in an HTML message, by which the sender attempts to know whether the recipient has read the email.

    Now, having a string of characters replace a 1x1 picture in a mail client which does not load the pictures (for example, Thunderbird), means the page formatting is broken. On the eBay message I just received, the Web bug warnings make the page unreadable. I could show the images (it's only a button click away...), but I thought it would make more sense to remove the ALT attribute from the IMG tag entirely.

    I've commented out a line in /usr/mailscanner/lib/MailScanner/

            # It's not in the whitelist, so zap it with insecticide!
            $output .= '<img src="' . $WebBugReplacement . '" width="' .
                       $attr->{'width'} .  '" height="' . $attr->{'height'} .
                       '" alt="';
    [COLOR="Red"]#        $output .= 'Web Bug from ' . $attr->{'src'} if $attr->{'src'};[/COLOR]
            $output .= '" />';
            $DisarmWebBugFound = 1;
            $DisarmDoneSomething{'web bug'} = 1;
    Is there anything wrong in doing this? Specifically, would a remote server deem an incoming message from my server more likely flaggable as spam if the ALT attributes are set to the empty string?


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice