Problem with postwwwact not sending the email! Please help!

nettpakke

Member
Apr 29, 2011
13
0
51
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
 

Attachments

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
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
 

nettpakke

Member
Apr 29, 2011
13
0
51
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
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
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?
 

nettpakke

Member
Apr 29, 2011
13
0
51
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.
 

nettpakke

Member
Apr 29, 2011
13
0
51
This is what I get when I create a new account:

System has 0 free ips.

Running post creation scripts (/scripts/legacypostwwwacct, /scripts/postwwwacct, /scripts/postwwwacctuser)...
Sending email to client...

sending mail...

Email has been sent to client at [email protected] which was provided in WHM.
A copy was also sent to Nettpakke <[email protected]>.

Sending variables to postwwwacct2.
...Done
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
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.
 

nettpakke

Member
Apr 29, 2011
13
0
51
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?
 

nettpakke

Member
Apr 29, 2011
13
0
51
I have now logged into root via terminal, and ran the postwwwacct script, and I got this:

Code:
[email protected] [~]# /scripts/postwwwacct

Sending email to client...

sending mail...

Email has been sent to client at @ which is [email protected] because no email was provided in WHM.
A copy was also sent to Nettpakke &lt;[email protected]&gt;.

Sending variables to postwwwacct2.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
You could check the permissions on both scripts:

Code:
ls -lah /scripts/postwwwacct*
 

nettpakke

Member
Apr 29, 2011
13
0
51
I got this:

Code:
[email protected] [~]# 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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
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.
 

nettpakke

Member
Apr 29, 2011
13
0
51
Progress :D Now I got this:

Code:
[email protected] [~]# /scripts/postwwwacct

Sending email to client...

sending mail...

Email has been sent to client at @ which is [email][email protected][/email] because no email was provided in WHM.
A copy was also sent to [email][email protected][/email].

Sending variables to postwwwacct2.
# Scripts hook to create database and db virtuser; pair the two
Auto-generated database '_sql' for database user '_usr'.
 

nettpakke

Member
Apr 29, 2011
13
0
51
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...
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
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.
 

nettpakke

Member
Apr 29, 2011
13
0
51
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?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
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.