WHMCS email pop3 import script errors

8 posts / 0 new
Last post
#1 Wed, 01/11/2012 - 13:43
khinton

WHMCS email pop3 import script errors

Hello all. I have asked the WHMCS devs already for hlp, and they don't believe they can. They think I'm having server authentication issues, etc. First: The main owner of my domain-specifics is a user caleld khinton. Under that, I have mailboxes in /homes of the /home/khinton directory like billing, sales, support, etc for he different ticket departments. I figured I'd try using the pop3 importer script. I'm running CentOS6(32) bit here. Trouble is I maintaine the server, so I'm not sure how to resolve this particular error. I'm still learning the ins and outs of virtualMin's control panel, so maybe i did something wrong? First: I thought that mailboxes under the main all have to look like (for pop3 login user ids): sales.khinton, where .khinton is the main mailbox. Billing.khinton, and so on. Wouldn't that go in the pop3 configuration? I'm not sure what to do. In my server log I get stuff like: spamd: connection from localhost [127.0.0.1] at port 56041 Jan 11 14:30:03 serverbox spamd[14649]: spamd: setuid to khinton succeeded Jan 11 14:30:03 serverbox spamd[14649]: spamd: processing message 20120111193003.0AD93340EED@serverbox.keithnet.us for khinton:500 Jan 11 14:30:03 serverbox spamd[14649]: spamd: clean message (1.2/5.0) for khinton:500 in 0.4 seconds, 1279 bytes. Jan 11 14:30:03 serverbox spamd[14649]: spamd: result: . 1 - DKIM_ADSP_NXDOMAIN,NO_DNS_FOR_FROM,NO_RELAYS scantime=0.4,size=1279,user=khinton,uid=500,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=56041,mid=20120111193003.0AD93340EED@serverbox.keithnet.us,autolearn=no Jan 11 14:30:03 serverbox postfix/local[29461]: 0AD93340EED: to=khinton@serverbox.keithnet.us, orig_to=, relay=local, delay=1.5, delays=0.78/0.01/0/0.75, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME) Jan 11 14:30:03 serverbox postfix/qmgr[1534]: 0AD93340EED: removed Jan 11 14:30:03 serverbox spamd[14628]: prefork: child states: II Jan 11 14:35:02 serverbox postfix/sendmail[29628]: warning: the Postfix sendmail command has set-uid root file permissions Jan 11 14:35:02 serverbox postfix/sendmail[29628]: warning: or the command is run from a set-uid root process Jan 11 14:35:02 serverbox postfix/sendmail[29628]: warning: the Postfix sendmail command must be installed without set-uid root file permissions Jan 11 14:35:02 serverbox dovecot: pop3-login: Login: user=<sales.khinton>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=29631, secured Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Error: opendir(/home/khinton/homes/sales/Maildir/tmp) failed: Permission denied Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Error: open(/home/khinton/homes/sales/Maildir/dovecot.index.log) failed: Permission denied (euid=506(sales.khinton) egid=500(khinton) missing +r perm: /home/khinton/homes/sales/Maildir/dovecot.index.log, euid is not dir owner) Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Error: file_dotlock_create(/home/khinton/homes/sales/Maildir/dovecot-uidlist) failed: Permission denied (euid=506(sales.khinton) egid=500(khinton) missing +w perm: /home/khinton/homes/sales/Maildir, euid is not dir owner) Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Error: open(/home/khinton/homes/sales/Maildir/dovecot-uidlist) failed: Permission denied Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Error: Couldn't init INBOX: Internal error occurred. Refer to server log for more information. [2012-01-11 14:35:02] Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Mailbox init failed top=0/0, retr=0/0, del=0/0, size=0 Jan 11 14:35:02 serverbox dovecot: pop3-login: Login: user=<sales.khinton>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=29635, TLS Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Error: opendir(/home/khinton/homes/sales/Maildir/tmp) failed: Permission denied Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Error: open(/home/khinton/homes/sales/Maildir/dovecot.index.log) failed: Permission denied (euid=506(sales.khinton) egid=500(khinton) missing +r perm: /home/khinton/homes/sales/Maildir/dovecot.index.log, euid is not dir owner) Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Error: file_dotlock_create(/home/khinton/homes/sales/Maildir/dovecot-uidlist) failed: Permission denied (euid=506(sales.khinton) egid=500(khinton) missing +w perm: /home/khinton/homes/sales/Maildir, euid is not dir owner) Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Error: open(/home/khinton/homes/sales/Maildir/dovecot-uidlist) failed: Permission denied Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Error: Couldn't init INBOX: Internal error occurred. Refer to server log for more information. [2012-01-11 14:35:02] Jan 11 14:35:02 serverbox dovecot: pop3(sales.khinton): Mailbox init failed top=0/0, retr=0/0, del=0/0, size=0 Jan 11 14:35:02 serverbox dovecot: pop3-login: Login: user=<support.khinton>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=29638, secured Jan 11 14:35:02 serverbox dovecot: pop3(support.khinton): Error: opendir(/home/khinton/homes/support/Maildir/tmp) failed: Permission denied Jan 11 14:35:02 serverbox dovecot: pop3(support.khinton): Error: open(/home/khinton/homes/support/Maildir/dovecot.index.log) failed: Permission denied (euid=505(support.khinton) egid=500(khinton) missing +r perm: /home/khinton/homes/support/Maildir/dovecot.index.log, euid is not dir owner) Jan 11 14:35:02 serverbox dovecot: pop3(support.khinton): Error: file_dotlock_create(/home/khinton/homes/support/Maildir/dovecot-uidlist) failed: Permission denied (euid=505(support.khinton) egid=500(khinton) missing +w perm: /home/khinton/homes/support/Maildir, euid is not dir owner) Jan 11 14:35:02 serverbox dovecot: pop3(support.khinton): Error: open(/home/khinton/homes/support/Maildir/dovecot-uidlist) failed: Permission denied Jan 11 14:35:02 serverbox dovecot: pop3(support.khinton): Error: Couldn't init INBOX: Internal error occurred. Refer to server log for more information. [2012-01-11 14:35:02] Jan 11 14:35:02 serverbox dovecot: pop3(support.khinton): Mailbox init failed top=0/0, retr=0/0, del=0/0, size=0 Jan.. Then I still get errors about the postfix sendmial command, etc. Can any experienced people who have set up support departments in WHMCS get backt o me? What about any experienced mail admins who know what a Gid is vs whatever this other id issue stuff is? And what about erasing the warnings about the sendmail command? I want to try to get this resovled. Right now, I am getting orverran with cron messages flooding the admin inbox with one failing after the other. Every five minutes (as per WHMCS.com's documentation instructions) is what I set the cron job to. I'm in a real bind here, and can't fix the problem. Until I can, I'm stuck. ANy help is appreciated. Running Virtualmin pro here. But because this isn't a virtualmin issue itslef necessarily, I saw no point in bothering Jamie yet again. This might even be beyond Jamies department of experience;I'm hoping someone can get back tom e ASAP ont his. Please provide me optionally with email addresses if any of you have them. I do not always look at the forums. If things get too bad, i may need to trust someone with remote login access to work ont he server directly. Not with direct root access, more as in su - etc. If anyone wishes to contact me, my email is here for contact purposes: keithint1234@gmail.com Any help is appreciated.

Wed, 01/11/2012 - 14:06
andreychek

Howdy,

Well, it looks like you may be seeing a permissions problem... what output do you see when running this command:

ls -la home/khinton/homes/sales/Maildir

Wed, 01/11/2012 - 23:23
khinton

Output of ls -la Eric, hear is what you asked me for. ls -la /home/khinton/homes/sales/Maildir wich also probably goes for the support, and billing mailboxes. total 40 drwx--x--x 7 khinton khinton 4096 Jan 10 21:00 . drwxr-xr-x 5 khinton khinton 4096 Jan 10 20:41 .. drwx--x--x 2 khinton khinton 4096 Jan 10 20:55 cur -rwx--x--x 1 khinton khinton 468 Jan 10 21:00 dovecot.index.log -rwx--x--x 1 khinton khinton 51 Jan 10 21:00 dovecot-uidlist -rwx--x--x 1 khinton khinton 8 Jan 10 20:55 dovecot-uidvalidity -r-xr-xr-x 1 khinton khinton 0 Jan 10 20:55 dovecot-uidvalidity.4f0cebf6 drwx--x--x 2 khinton khinton 4096 Jan 10 20:55 new drwx--x--x 5 khinton khinton 4096 Jan 10 20:02 .spam drwx--x--x 2 khinton khinton 4096 Jan 10 20:41 tmp drwx--x--x 5 khinton khinton 4096 Jan 10 20:02 .trash If we do ls -la /home/khinton/homes/billing/Maildir I get: total 76 drwx--x--x 10 khinton khinton 4096 Jan 10 17:14 . drwxr-xr-x 5 khinton khinton 4096 Jan 9 21:21 .. drwx--x--x 2 khinton khinton 4096 Jan 10 17:14 cur -rwx--x--x 1 khinton khinton 16384 Jan 10 17:14 dovecot.index.cache -rwx--x--x 1 khinton khinton 1096 Jan 10 17:14 dovecot.index.log -rwx--x--x 1 khinton khinton 72 Jan 9 21:30 dovecot.mailbox.log -rwx--x--x 1 khinton khinton 51 Jan 10 17:14 dovecot-uidlist -rwx--x--x 1 khinton khinton 8 Jan 9 21:30 dovecot-uidvalidity -r-xr-xr-x 1 khinton khinton 0 Jan 9 21:30 dovecot-uidvalidity.4f0ba2bd drwx--x--x 5 khinton khinton 4096 Jan 9 21:30 .Drafts drwx--x--x 2 khinton khinton 4096 Jan 9 21:30 new drwx--x--x 5 khinton khinton 4096 Jan 9 21:30 .Sent drwx--x--x 5 khinton khinton 4096 Jan 9 03:02 .spam -rwx--x--x 1 khinton khinton 18 Jan 9 21:30 subscriptions drwx--x--x 2 khinton khinton 4096 Jan 10 17:14 tmp drwx--x--x 5 khinton khinton 4096 Jan 9 03:02 .trash drwx--x--x 5 khinton khinton 4096 Jan 10 17:15 .Trash Finally for the support mailbox: ls -la /home/khinton/homes/support/Maildir I get: total 40 drwx--x--x 7 khinton khinton 4096 Jan 10 21:00 . drwxr-xr-x 5 khinton khinton 4096 Jan 10 20:20 .. drwx--x--x 2 khinton khinton 4096 Jan 10 20:55 cur -rwx--x--x 1 khinton khinton 468 Jan 10 21:00 dovecot.index.log -rwx--x--x 1 khinton khinton 51 Jan 10 21:00 dovecot-uidlist -rwx--x--x 1 khinton khinton 8 Jan 10 20:55 dovecot-uidvalidity -r-xr-xr-x 1 khinton khinton 0 Jan 10 20:55 dovecot-uidvalidity.4f0cebf8 drwx--x--x 2 khinton khinton 4096 Jan 10 20:55 new drwx--x--x 5 khinton khinton 4096 Jan 10 20:01 .spam drwx--x--x 2 khinton khinton 4096 Jan 10 20:20 tmp drwx--x--x 5 khinton khinton 4096 Jan 10 20:01 .trash I'm also just curious about the parent mailbox the khinton box to make sure no problems exist: ls -la /home/kihnton/Maildir: total 160 drwxr-xr-x 8 khinton khinton 4096 Jan 11 14:44 . drwxr-xr-x 14 khinton khinton 4096 Jan 11 14:45 .. drwxr-xr-x 2 khinton khinton 20480 Jan 11 14:44 cur -rwxr-xr-x 1 khinton khinton 856 Jan 11 00:20 dovecot.index -rwxr-xr-x 1 khinton khinton 57344 Jan 11 14:44 dovecot.index.cache -rwxr-xr-x 1 khinton khinton 14360 Jan 11 14:44 dovecot.index.log -rwxr-xr-x 1 khinton khinton 72 Jan 9 21:31 dovecot.mailbox.log -rwxr-xr-x 1 khinton khinton 10255 Jan 11 14:44 dovecot-uidlist -rwxr-xr-x 1 khinton khinton 8 Jan 9 21:31 dovecot-uidvalidity -r-xr-xr-x 1 khinton khinton 0 Jan 9 21:31 dovecot-uidvalidity.4f0ba2ec drwxr-xr-x 5 khinton khinton 4096 Jan 9 21:31 .Drafts drwxr-xr-x 2 khinton khinton 12288 Jan 12 00:20 new drwxr-xr-x 5 khinton khinton 4096 Jan 9 21:31 .Sent -rwxr-xr-x 1 khinton khinton 18 Jan 9 21:31 subscriptions drwxr-xr-x 2 khinton khinton 4096 Jan 12 00:20 tmp drwxr-xr-x 5 khinton khinton 4096 Jan 10 20:21 .Trash

Well, Eric, there you go. Hope this helps! Please get back to me when you can.

Thu, 01/12/2012 - 10:04
andreychek

Hmm, is it possible that someone had run a "chown -R khinton:khinton" on /home/khinton?

The permissions of your various home directories in there don't appear to be correct -- they're owned by the Virtual Server owner, rather than the owner of the email account. And that would indeed keep things from working (and possibly cause mail to bounce).

In the case of "home/khinton/homes/sales", that should be owned by the user "sales.khinton". That can be fixed with this command:

chown -R sales.khinton home/khinton/homes/sales

For the billing user, you can do this:

chown -R billing.khinton /home/khinton/homes/billing

Thu, 01/12/2012 - 12:13
khinton

Hi Eric. Yeah-I accidentally did do: chown -R khinton:khinton /home/khinton/ I have just done for allt hree mailboxes: chown -R /billing.khinton /home/khinton/homes/billing chown -R sales.khinton /home/khinton/homes/sales Finally: chown -R support.khinton /home/khinton/homes/support Now: Assuming that works, what about the permissions problem? What do you suggest I do about that. Maybe chmod 755 or 777? Just a thought around. Thanks! BC some of those errors in the server mail log said that specific permissions wern't

Thu, 01/12/2012 - 13:49
andreychek

Howdy,

Well, the permissions problems you were seeing were due to the directories being owned by the wrong users. In theory, setting the ownership as you did should also correct the permissions problems that were occurring.

-Eric

Thu, 01/12/2012 - 18:10
khinton

Solved the issue. Eric-you were correct: making sure the owners of the email accounts owned the email boxes helped. I was sure that I had not entered wrong email info, and that php-imap support was working just fine. Curious though: How can incorrect mailbox owners make emails perhaps "bounce"?

Thu, 01/12/2012 - 22:13
andreychek

Curious though: How can incorrect mailbox owners make emails perhaps "bounce"?

Well, the issue you would run into is that procmail wouldn't have been able to write to the email folder, since it was owned by the wrong user.

That would at the very least prevent email delivery, but I think it would actually generate a bounce message.

-Eric

Topic locked