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.

view relayers - cpanel user and smtp

Discussion in 'E-mail Discussions' started by sorcier, Oct 12, 2005.

  1. sorcier

    sorcier Member

    Joined:
    Apr 16, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    WHM has the option: view relayers

    Previously all sending through smtp appeared with the real user (user1, user2... ). Now all the sending through smtp (tcp 25) appear with the user "cpanel". This is correct? It affects to the bandwidth measurements of each user?

    Code:
    Top Email Relayers
    
    Below are list of users who have relayed mail. They are listed in the order by
    number of messages sent. You can click on the user/domain to view who 
    they sent the messages to. 
    
    User 	    	Domain 			Messages Sent 	Total Bytes Sent
    cpanel 						84 		96448516
    conxxx	        conxxxx.com 			7		11157
    freshxxx	freshxxxx.com 	   		7		16954
    elaxxx 		ela.xxx 			5	 	3773
    root 						5 		50689
    fiduxxxxc 	fiduxxxx.com 			3		8063
    .
    .
    .
    .
    These 84 (more less) emails are greater to megabayte and are of a single user "elaxxx" but they are seen like sended by cpanel and not like sended by "elaxxx".

    The other 5 messages of "elaxxx" are through webmail (phpsuexec).

    This is correct? It affects to the bandwidth measurements of each user?
     
  2. Ali

    Ali Well-Known Member

    Joined:
    Jul 12, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    We are facing the same issue for over a month now. Anyone with a solution fix ?
     
  3. swampy

    swampy Well-Known Member

    Joined:
    Jan 30, 2004
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    0
    I am also experiencing this also on one server where the domain name should be it is displaying the customers username not the domain name so when I click it I get Invalid user [user domain.com]

    user+domain.com instead of domain.com
     
  4. heinst

    heinst Registered

    Joined:
    Oct 28, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Fix for Top Email Relayers BUG

    Today I found a solution for the problem

    Change the group from mailnull user to the mail group

    My passwd entry was:

    mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin

    Now it's:

    mailnull:x:47:12::/var/spool/mqueue:/sbin/nologin

    where 12 is the gid from group mail

    It happens that eximstats cannot read /etc/userdomains as this fille is owned by root.mail, and smtp records in /var/log/exim_mainlog dont contains the system user so a lookup must be used.
     
  5. ThunderHostingDotCom

    ThunderHostingDotCom Well-Known Member

    Joined:
    Nov 18, 2002
    Messages:
    450
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    All over!
    Did anyone else try this fix & get it to work without ANY problems?
     
  6. zella

    zella Member

    Joined:
    Aug 5, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I tried this fix and seems working without any problems.

    Marc
     
  7. bking

    bking Well-Known Member

    Joined:
    Mar 1, 2004
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney
    I logged a bug for this over a month ago.

    http://bugzilla.cpanel.net/show_bug.cgi?id=3314

    They confirmed it, but nothing has come of it yet...
     
  8. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    My problem with viewing relayers is that it always shows up as blank and no relayers are being displayed at all. All i see is;

    User Domain Messages Sent Total Bytes Sent

    and thats it.

    I thought it was a bug in Release but after i upgraded all my other boxes to R i can view relayers, just not on this server. Its been like this for over 3 weeks. Whats the fix? It could be related but who knows.
     
  9. swampy

    swampy Well-Known Member

    Joined:
    Jan 30, 2004
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    0
    Hi can somone explain a little more for the above fix

    Thanks
    Swampy
     
  10. dev_cw

    dev_cw Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    59
    Likes Received:
    1
    Trophy Points:
    8
    I am trying the fix but I have noticed that my passwd is a bit different:

    the entry for mailnull is:
    mailnull:x:47:47::/var/spool/mqueue:/dev/null

    Rather than the described:
    mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin

    I am wondering if my setting is OK or should it end in "/sbin/nologin" like the example above.

    Also does exim or eximstats need to be restarted for this fix to work?
     
  11. dev_cw

    dev_cw Well-Known Member

    Joined:
    Jun 30, 2004
    Messages:
    59
    Likes Received:
    1
    Trophy Points:
    8
    Ok did the fix and all seems to be working.

    Thanks for the help.
     
  12. Trigger

    Trigger Well-Known Member

    Joined:
    May 17, 2003
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brisbane
    This fix did the trick for me, all email being sent through the server was being listed as cpanel rather than under the users account.

    Big thanks to heinst for finding it out :)

    How to implement the fix
    Edit the passwd file
    Code:
    pico /etc/passwd
    find the line for mailnull
    Code:
    mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
    and edit it as below
    Code:
    mailnull:x:47:12::/var/spool/mqueue:/sbin/nologin
    Save the changes
    ctrl + x

    Answer 'Y' to save changes

    Hit 'Enter' to save as the original file name

    Then you will need to restart eximstats for the changes to take effect
    Code:
    /scripts/restartsrv_eximstats
     
  13. ThunderHostingDotCom

    ThunderHostingDotCom Well-Known Member

    Joined:
    Nov 18, 2002
    Messages:
    450
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    All over!
    I changed the 2nd 47 to 12 & all seems fine but our /etc/passwd looks like this...
    mailnull:x:47:47::/var/spool/mqueue:/dev/null

    What is the difference between /sbin/nologin & /dev/null at the end? Should I change this to what was posted? How long will it take for this fix to work? Ours still shows the below...

    User Domain Messages Sent Total Bytes Sent
    cpanel 26 185831
    nobody 20 21227
    cxxx cxxx.com 1 720
     
  14. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    Well now, my 'Top Email Relayers' on a box was showing empty, so I found this thread. Went to change my passwd file to 47:12 -- low and behold it was already set to 12. No one relayed mail from the box the last couple days? Methinks not!

    :: edit ::

    whoops, quick check of mysql database finds that eximstats was not writing to the db and overhead was out of control. optimize of db and restart of eximstats looks to have worked. Helps to seach a BIT more I suppose... :)
     
    #14 mctDarren, Mar 27, 2006
    Last edited: Mar 27, 2006
  15. heinst

    heinst Registered

    Joined:
    Oct 28, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Top Email Relayers: Same BUG, new reason!!! Fix at the end!

    A few days ago, my server started having the same behavior as before:

    almost all mails assigned to cpanel user!

    After inquiring the /usr/local/cpanel/bin/eximstats i've noticed that the problem was on the function Cpanel::cPanelFunctions::userdomains() called in the subroutine checkuserdomains()

    the reason is the following:

    eximstatus uses a perl hash to map the domain to the system user in the format:

    Code:
    $userdomain{domain} = user
    
    BUT!!!

    Someone at Cpanel changed the Cpanel::cPanelFunctions::userdomains() to return a hash in the format:

    Code:
    $userdomain{user} = domain
    

    I've made a small port from the Cpanel::cPanelFunctions::userdomains() to the sub checkuserdomains in eximstats.

    Now my sub checkuserdomains() looks like:

    Code:
    
    sub checkuserdomains {
       my $mtime = (stat('/etc/userdomains'))[9];
       if ($mtime != $userdomains_mtime) {
          $userdomains_mtime = $mtime;
    
          if (-e '/etc/userdomains') {
              if (my $lockfile = SafeFile::safeopen(\*TUD, '<', '/etc/userdomains')) {
                  while (my $line = readline(TUD)) {
                      chomp $line;
                      my ($domain,$account) = split(/\s*[:]\s*/,$line,2);
                      next if (! $account);
                      next if ($account eq 'nobody');
                      $userdomains{$domain} = $account;
                  }
                  SafeFile::safeclose(\*TUD,$lockfile);
              }
          }
       }
    }
    
    

    Now everything is working fine in Top Email Relayers.
     
  16. sorcier

    sorcier Member

    Joined:
    Apr 16, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1

    Mentioning what originally I mentioned:

    I see in the tables of EximStats that the problem is mainly with fixed_login. Some times it assigns the correct user to them and the other times it assigns them to user CPANEL.

    The question:

    Why the messages with fixed_login are property of Cpanel in many occasions and rare time they are property of its real users?
     
  17. fcitrolo

    fcitrolo Active Member

    Joined:
    Dec 31, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1

    I am having this exact problem, I tried searching but didn't come up with anything. Is there any solution to this?
     
  18. dinfiesta

    dinfiesta Well-Known Member

    Joined:
    May 2, 2005
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Thanks!
    It worked!
     
  19. honghong

    honghong Member

    Joined:
    Sep 6, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    is work for me
     
  20. ispro

    ispro Well-Known Member

    Joined:
    Apr 8, 2004
    Messages:
    628
    Likes Received:
    1
    Trophy Points:
    18
    All our servers have 47.47 so I wonder what are security risks associated with setting it to 47.12 (e.g. group mail)?
     
Loading...

Share This Page