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.

Problem with postwwwact not sending the email! Please help!

Discussion in 'E-mail Discussions' started by nettpakke, Apr 29, 2011.

  1. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I have a new linux-server with a new installation of WHM/cPanel. Installation was done by cPanel-crew. After this I created a reseller, and put some files in the sceleton (cpanel3-skel), and all is working fine for manually creating new accounts for my webcustomers (customers dont order themself). Much of the settings (packages etc) I have "copied" from another server. And on the "old" server I also have two postwwwacct-scripts (postwwwacct + postwwwacct2). First script is for creating information-email going out to customer and admin-email, while the second script is for creating MySQL-databases. These scripts work perfect on the old server, and I wanted to use the same scripts on my new server. I downloaded them for the old server, changed a little bit of the content to match the customer-info on the new server, and uploaded it to the scripts-folder.

    But my frustrating problem is this: When I create a new account, there is NO emails going out and NO databases are being set up!! After account creation it says it used the script, but nothing happens!

    Can someone please help me?? I am sure this is just one stupid setting somewhere I have done differently from the old server, but I have NO IDEA where or what is causing it to act different.

    Best regards
    Johan
     

    Attached Files:

  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Does anything generate in /usr/local/cpanel/logs/error_log when creating a new account indicating any error? You can tail the log during new account creation to see if anything does occur there:

    Code:
    tail -fn0 /usr/local/cpanel/logs/error_log
    You could also try manually creating the account via command line to see if you receive any error(s):

    Code:
    /scripts/createacct domain.com username password
    Replace domain.com with a testing domain name, username with a testing username, and password with a testing password.

    Finally, you can also try to execute the scripts in root SSH to see if they fail there with any error message(s):

    Code:
    /scripts/postwwwacct
    /scripts/postwwwacct2
     
  3. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Yes, I have been looking a little on the error-log, but I am not an experienced user. So its dificult for me to see.

    This is what I see in the error-log:

    Code:
    [2011-04-30 00:40:09 +0200] warn [quotacheck] User file '/var/cpanel/users/root' is empty or non-existent. at /usr/local/cpanel/Cpanel/Config/LoadCpUserFile.pm line 106
    	Cpanel::Config::LoadCpUserFile::_load('root', undef, 0) called at /usr/local/cpanel/Cpanel/Config/LoadCpUserFile.pm line 25
    	Cpanel::Config::LoadCpUserFile::load('root') called at /usr/local/cpanel/Cpanel/Config/LoadCpUserFile.pm line 252
    	Cpanel::Config::LoadCpUserFile::loadcpuserfile('root') called at /scripts/quotacheck line 84
    [2011-04-30 00:40:09 +0200] warn [quotacheck] Failed to load cPanel user file for root at /usr/local/cpanel/Cpanel/Config/LoadCpUserFile.pm line 28
    	Cpanel::Config::LoadCpUserFile::load('root') called at /usr/local/cpanel/Cpanel/Config/LoadCpUserFile.pm line 252
    	Cpanel::Config::LoadCpUserFile::loadcpuserfile('root') called at /scripts/quotacheck line 84
    Creating mailbox file: File exists
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    That error isn't likely causing the issue for emails to send. Did you try executing the script at the command prompt?
     
  5. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    No. I am on a MAC and I dont have a SSH-program. I only use SFTP and WHM.

    Its the only errors I am getting in the error-log, so I dont know where to look.
     
  6. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    This is what I get when I create a new account:

     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I'm on a Mac and SSH is tied into terminal. You don't need a separate SSH program when running on a Mac. In Finder, type terminal and it will pull up terminal. You need to run these commands in root SSH to troubleshoot it.
     
  8. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    stupid question: how do I log into root via the terminal window? :p
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    It was just brought to my attention that you appear to have a ticket already opened about this issue (1431182). If that is the case, can you please always mention this on the forum. When a ticket is also being worked, it can be redundant to troubleshoot the same issues via the forum, especially when we do not have direct access to the machine in any way unlike via the ticketing system.
     
  10. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I am sorry, as I said I am very new to this.

    As I understand cPanel Support only helps with the system and not 3rd party scripts. Was hoping someone in the forum could help with the problem. Any suggestion to where I can get/hire help for this problem?
     
  11. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I have now logged into root via terminal, and ran the postwwwacct script, and I got this:

    Code:
    root@server [~]# /scripts/postwwwacct
    
    Sending email to client...
    
    sending mail...
    
    Email has been sent to client at @ which is username@domain.com because no email was provided in WHM.
    A copy was also sent to Nettpakke <hosting@nettpakke.no>.
    
    Sending variables to postwwwacct2.
     
  12. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    and when I tried postwwwacct2-script, I got this:

    Code:
    root@server [~]# /scripts/postwwwacct2
    -bash: /scripts/postwwwacct2: Permission denied
    
     
  13. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You could check the permissions on both scripts:

    Code:
    ls -lah /scripts/postwwwacct*
     
  14. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I got this:

    Code:
    root@server [~]# ls -lah /scripts/postwwwacct*
    -rwxr-xr-x 1 root root  12K Apr 30 01:05 /scripts/postwwwacct*
    -rw-r--r-- 1 root root 8.5K Apr 30 00:33 /scripts/postwwwacct2
    
    with the postwwwacct in green, but postwwwacct2 in black.
     
  15. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Then do:

    Code:
    chmod 755 /scripts/postwwwacct2
    At that point, try to re-run the script again.
     
  16. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Progress :D Now I got this:

    Code:
    root@server [~]# /scripts/postwwwacct
    
    Sending email to client...
    
    sending mail...
    
    Email has been sent to client at @ which is [email]username@domain.com[/email] because no email was provided in WHM.
    A copy was also sent to [email]hosting@nettpakke.no[/email].
    
    Sending variables to postwwwacct2.
    # Scripts hook to create database and db virtuser; pair the two
    Auto-generated database '_sql' for database user '_usr'.
    
     
  17. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I tried to make a new account, but although I got message about sending email and creating databases, nothing happened.

    CHANGE: Now the database was made!! So postwwwacct2 is working perfect :D

    But still no emails...
     
  18. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Is the email it is trying to send to (b/c an email isn't set as it indicates when run via command line) a working email account? Try to send an email to the email account it is using from another email account on the server to see what happens.
     
  19. nettpakke

    nettpakke Member

    Joined:
    Apr 29, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    The receiving email accounts are working fine if I send from another account (not from account made by this server). I havent configured any other emails on the server yet.

    Maybe there is a problem in the email-setup for the server?
     
  20. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Try a different email account to send to for the script. You can set your email accounts in WHM > Basic cPanel & WHM Setup area as well as WHM > Change System Mail Preferences area.
     
Loading...

Share This Page