ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


sendmail configuration


  • 2006-02-17 07:06:12

    sendmail configuration

    I realise this is not related to Atutor, but we need some help finding out how to best configure sendmail, and then need some information on how Atutor uses it.

    as far as I've seen the sender adress is different if:

    * using course e-mail function: the sender is the one who generated the message
    * creating accounts: the sender adress is system account, and
    * subscribing to forums: also system account
    * password-reminder: also system account?

    we have ongoing problems with mail not going througt as they are rejected by spamfilters. we get the following error:

    Sender address rejected: Domain not found

    (we might have fixed this now)

    but, when *some* generate a message from the course email we get this:

    Feb 16 22:13:14 hk2 sendmail[6764]: k1GLDEgf006764: headers too large (32768 max) from local during message collect

    all help appreciatet, also any tips on mailservers to use rather than sendmail (the server is a red hat, apache2)

  • 2006-02-17 09:03:59

    Re: sendmail configuration

    more info:

    we've narrowed this down a bit more: the message goes through fine if you only send it to "enrolled". if you send it to both "enrolled" and "assistants" you get the error message headers too large..

    anyone experienced the same? is this a bug?

  • 2006-02-17 13:21:34

    Re: sendmail configuration

    The headers too large problem seems to be a bug in tools/course_email.php.

    The PHP code tries to construct an SQL query to extract the relevant recipients for the message based on the state of the Assistant, Enrolled, etc. checkboxes. This code works fine when only a single checkbox is selected, and generates SQL as follows:

    * Assistants
    - SELECT email FROM course_enrollment C, members M WHERE C.course_id=7 AND C.member_id=M.member_id AND C.privileges<>0;

    * Enrolled
    - SELECT email FROM course_enrollment C, members M WHERE C.course_id=7 AND C.member_id=M.member_id AND (C.approved='y' AND C.role<>'Instructor');

    But when both Assistants and Enrolled are selected, the PHP code blindly tries to combine these two into one SQL statement using an OR operator, and ends up with:

    SELECT email FROM course_enrollment C, members M WHERE C.course_id=7 AND C.member_id=M.member_id AND (C.approved='y' AND C.role<>'Instructor') OR C.privileges<>0;

    Which fails due to an operator precendence problem.


    For this to work the statement must be something like:

    SELECT email FROM course_enrollment C, members M WHERE C.course_id=7 AND C.member_id=M.member_id AND ((C.approved='y' AND C.role<>'Instructor') OR C.privileges<>0);

    (note added parens around the two sides of the OR)

    Alternately, the recipients from the two classes (Assistants and Enrolled; probably the same situation with the other groups) must be extracted in separate queries.

  • 2006-02-17 13:34:31

    Re: sendmail configuration

    Attached is a simple patch that might be sufficient to fix this.

  • 2006-02-20 14:59:31

    Re: sendmail configuration

    as far as we've seen the patch from link here has eliminated this bug, and our mail now works fine.

    what happens is that when "assistant" and "enrolled" (and probably the two other options as well) are both checked the system tries to send ~64 emails to ALL registred users (on the system, not just the course) - luckily causing sendmail to not send it as the header fields becomes too large..

    ..if you have checked the patch you should probably make it available to all users!


    best,
    vjo

  • 2006-03-22 07:53:59

    Re: sendmail configuration

    Patch attached here