The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mail delivery problem

Discussion in 'E-mail Discussions' started by nisse, Aug 12, 2005.

  1. nisse

    nisse Well-Known Member

    Joined:
    Nov 11, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    After moving to 10.2.0-R82, I'm getting the following error whenever a bulletin board tries to send out an email:

    failed to expand condition "${perl{checkspam}}" for lookuphost router: Gid 99 is not permitted to relay mail at /etc/exim.pl line 365.

    The relevant section in exim.pl is:

    #MAILTRAP
    my $safegid = (getgrnam("mailtrap"))[2];
    if ($uid >= 99 && $gid >= 99 && $safegid ne $gid && -e "/etc/eximmailtrap") {
    die "Gid $gid is not permitted to relay mail";
    }
    #MAILTRAP

    Anyone know how to fix this?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Make sure that you don't have the following set: WHM > Tweak Settings > Prevent the user 'nobody' from sending out mail to remote addresses
     
  3. nat

    nat Well-Known Member

    Joined:
    Jan 16, 2003
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    When sending using a php script and even squirrelmail included with cpanel....

    2005-11-21 21:04:36 1EeOSS-0003DD-JG failed to expand condition "${perl{checkspam}}" for literal router: Gid 531 is not permitted to relay mail at /etc/exim.pl line 365.

    "WHM > Tweak Settings > Prevent the user 'nobody' from sending out mail to remote addresses" is DISABLED.

    I have enabled it, restarted exim, then disabled it, then restarted exim, but that had no effect.

    I have ran...

    /scripts/mailperm
    /scripts/updateuserdomains
    /sbin/service exim restart

    For anyone else that has this problem and everything above does not work, remove the empty file at /etc/eximmailtrap

    rm /etc/eximmailtrap
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If that file keeps reappearing, edit /var/cpanel/cpanel.config and set:

    eximmailtrap=0
     
  5. bi098_s

    bi098_s Registered

    Joined:
    Oct 2, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    That is strange answer from you...

    My problem:

    I am zydusnet (uid=32315 gid=32316)
    mailtrap (gid=32003)
    nobody (gid=uid=99)
    /etc/eximmailtrap exists

    My test:

    bash-2.05b$ exim -bt zydusnet@test.com
    LOG: MAIN PANIC
    failed to expand condition "${perl{checkspam}}" for lookuphost router: Gid 32316 is not permitted to relay mail at /etc/exim.pl line 365.

    LOG: MAIN PANIC
    failed to expand condition "${perl{checkspam}}" for literal router: Gid 32316 is not permitted to relay mail at /etc/exim.pl line 365.

    Your code:

    #MAILTRAP
    my $safegid = (getgrnam("mailtrap"))[2];
    if ($uid >= 99 && $gid >= 99 && $safegid ne $gid && -e "/etc/eximmailtrap") {
    die "Gid $gid is not permitted to relay mail";
    }
    #MAILTRAP

    Your condition works like

    if ( 32315 >= 99 && 32316 >= 99 && 32003 ne 32316 && -e "/etc/eximmailtrap") {
    die "Gid $gid is not permitted to relay mail";
    }

    1 & 1 & 1 & 1 = 1 !!!!

    As a result I am not able to send under real user environment and the originator of this post have told you the same. He cannot send from Cpane's webmail even...

    What is the solution? I am not a NOBODY user....
     
  6. chican0

    chican0 Well-Known Member

    Joined:
    Mar 26, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Los Angeles
    I am having this same issue. Any more responses to this issue?

    Update: Nevermind... a /scripts/eximup --force fixed the problem for me as it was suggested in several other threads.
     
    #6 chican0, Jan 25, 2006
    Last edited: Jan 25, 2006
Loading...

Share This Page