[imp] Set a higher maximum size for fetchmail

Michael Kaps info at michis-homepage.net
Fri Jul 11 11:32:16 UTC 2008


Hello,

I want to set a higher maximum size for fetchmail, but only for one user 
on my system.
I use Plesk 8 and Debian 4.0 Sarge.

I tried it like the following shows:

function _checkMessageSize($size, $subject, $from)
    {
   
    //var_dump($current_user, $size);
    //var_dump($this->getParameterList());
    //echo $this->_params['id'];
    //echo "<br>".$this->_params['driver'];
    /*
        $fm_account = new IMP_Fetchmail_Account();
        echo $fm_account->getValue('id')."<br><br>";

        var_dump($fm_account);


        die();
   
    */

    $current_user = $IMP_Fetchmail->_activeparams['id'];
    if($current_user == "user_test1 at michis-homepage.net" AND $size < 
31457280)
        {
        return true;
        }
        else
        {
    if (!empty($GLOBALS['conf']['fetchmail']['size_limit']) &&
            ($size > $GLOBALS['conf']['fetchmail']['size_limit'])) {
            require_once 'Horde/MIME.php';
            $GLOBALS['notification']->push(sprintf(_("The message \"%s\" 
from \"%s\" (%d bytes) exceeds fetch size limit."), 
MIME::Decode($subject), MIME::Decode($from), $size), 'horde.warning');
            return false;
        } else {
            return true;
        }
        }
    }


Unforfunately the object $_activeparams seems to doesn't contain the 
User-ID or the E-Mail-Adress.

But could it be, that the object $fm_account contains the ID for the user?
If yes, how can I test wheater the variable is equal to the given 
Mail-Adress in my script change (see above).

Yours sincerely
Michael




More information about the imp mailing list