Mail: new accounts having authentication problems

Discussion in 'Installation/Configuration' started by mike_p, Dec 16, 2011.

  1. mike_p

    mike_p Member

    I've not tweaked my ISPConfg setup for a while because everything has been working beautifully. :)

    Until today :(

    I've set up a new domain and added the mail domain and added two mailboxes.

    The web domain works fine (theerfore DNS is good)
    But the email boxes cannot be reached - they fail authorization.

    All other domains/mailboxes are working correctly.

    I've upgraded my ISPConfig to 3.0.4.1. Hasn't helped.
    Dovecot version is 1.2.17
    Centos version 5.7(final)

    Permissions in /var/vmail/ all look correct.

    Where do I go from here?
     
    Last edited: Dec 16, 2011
  2. mike_p

    mike_p Member

    additional info: mail log reports
    permission denied + the vmail users dir
    and
    missing +x perm
    but the permissions ARE correct.
    sieve: failed to stat user's sieve script:
     
  3. falko

    falko Super Moderator Howtoforge Staff

    What's the output of ls -la /var/mail/? Is SELinux disabled?

    Can you post the exact error messages from your mail log?
     
  4. mike_p

    mike_p Member

    Ok seems to be solved.

    After the mail authentication problems, i found DNS on my various websites started to fail. To test the sites I set up dns in my local hosts file and found the sites were okay. Then I noticed some odd things gong on with MySQL. Further testing found "describe <tables>" command came back with a SQL error saying unable to write to /tmp/#sql...

    So I checked permissions on /tmp = 755
    Changed permissions on /tmp to 777 and all problems solved.

    Is 777 correct for tmp folder?
    If so what changed it?
    If not, what else could have changed to require this?
     
    Last edited: Dec 19, 2011
  5. falko

    falko Super Moderator Howtoforge Staff

    Yes, that's how it should be.
     
  6. mike_p

    mike_p Member

    Thanks for the confirmation Falko.

    Last night, it was reset again to 700!

    This has a variety of effects on services. Quite apart from the services that use the tmp directory directly, MySQL uses it for some operations, so any service that uses MySQL can show odd behaviour.

    On monday some DNS requests were going astray.

    This morning I found mail was stacking up in the mailqueue.
    After reseting the tmp folder to 777, I then flushed the mailqueue and everything is back to normal.

    Any ideas how or why the /tmp folder permissions are getting reset?
     
  7. mike_p

    mike_p Member

    Last night the permissions for /tmp got reset again this time to 750?

    What is going on?
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Did you check your cron jobs? Also check /etc/cron.daily/.
     
  9. mike_p

    mike_p Member

    I've checked all cron jobs. Can't find anything that would do this.

    ...and it is still happening. (I've now created a cronjob to reset it to 777)

    Apart from the ISPConfig cron jobs, I have a yum update running every night.
    I also have another server pulling a backup off the server using RSYNC, but thats been running for many months without a problem.
     
    Last edited: Dec 23, 2011
  10. rolix

    rolix New Member

    i have same problem when creating new mailbox
    /tmp has 777

    when i execute
    chmod -R +x /var/vmail
    i can login in the mailbox

    here is my logfile:
    Jan 13 08:48:50 ISPMAIL1 dovecot: deliver([email protected]): chdir(/var/vmail/rr.at/rr) failed: Permission denied
    Jan 13 08:48:50 ISPMAIL1 dovecot: deliver([email protected]): sieve: stat(/var/vmail/rr.at/rr/.sieve) failed: Permission denied (using global script path in stead)
    Jan 13 08:48:50 ISPMAIL1 dovecot: deliver([email protected]): stat(/var/vmail/rr.at/rr/Maildir) failed: Permission denied
    Jan 13 08:48:50 ISPMAIL1 dovecot: deliver([email protected]): stat(/var/vmail/rr.at/rr/Maildir/tmp) failed: Permission denied (euid=5000(vmail) egid=5000(vmail) missing +x perm: /var/vmail/rr.at)
    Jan 13 08:48:50 ISPMAIL1 dovecot: deliver([email protected]): msgid=<20120112172902.50D33A1EAC@ISPMAIL1>: save failed to INBOX: Internal error occurred. Refer to server log for more information. [2012-01-13 08:48:50]
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Which ISPConfig version do you use?
     
  12. rolix

    rolix New Member

    latest ISPConfig Version: 3.0.4.2
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, there are no known problems in that releasereagrding email. Please check under System > Server config > mail that the email user and group is set to vmail.
     
  14. rolix

    rolix New Member

    yes it is.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you use courier or dovecot as Imap / pop3 server and is the correct imap/pop3 server that is installed on your server selected under system > server config?
     
  16. rolix

    rolix New Member

    dovecot

    dovecot is also selected in the gui
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

  18. rolix

    rolix New Member

    there are no pending jobs

    13.01.2012-08:58 - DEBUG - Calling function 'update' from plugin 'network_settings_plugin' raised by event 'server_update'.
    13.01.2012-08:58 - DEBUG - Network configuration disabled in server settings.
    13.01.2012-08:58 - DEBUG - Calling function 'update' from plugin 'postfix_server_plugin' raised by event 'server_update'.
    13.01.2012-08:58 - DEBUG - Processed datalog_id 156
    13.01.2012-08:58 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    13.01.2012-08:59 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    13.01.2012-08:59 - DEBUG - Found 1 changes, starting update process.
    13.01.2012-08:59 - DEBUG - Replicated from master: REPLACE INTO mail_user (`mailuser_id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`email`,`password`,`name`,`uid`,`gid`,`maildir`,`quota`,`cc`,`homedir`,`autoresponder`,`autoresponder_start_date`,`autoresponder_end_date`,`autoresponder_text`,`move_junk`,`custom_mailfilter`,`postfix`,`access`,`disableimap`,`disablepop3`,`disabledeliver`,`disablesmtp`,`login`,`disablesieve`,`disablelda`) VALUES ('6','1','2','riud','riud','','4','[email protected]','$1$Wukvjl3r$oKbe2sNV3JTQMCz8jJhas0','','5000','5000','/var/vmail/dom.at/dom2','0','','/var/vmail','n','0000-00-00 00:00:00','0000-00-00 00:00:00','','n','','y','n','n','n','n','n','[email protected]','n','n')
    13.01.2012-08:59 - DEBUG - Calling function 'user_insert' from plugin 'mail_plugin' raised by event 'mail_user_insert'.
    13.01.2012-08:59 - DEBUG - Created Directory: /var/vmail/dom.at/dom2
    13.01.2012-08:59 - DEBUG - Created Maildir /var/vmail/dom.at/dom2/Maildir with subfolder:
    13.01.2012-08:59 - DEBUG - Set ownership on /var/vmail/dom.at/dom2
    13.01.2012-08:59 - DEBUG - Created Maildir /var/vmail/dom.at/dom2/Maildir with subfolder: Sent
    13.01.2012-08:59 - DEBUG - Created Maildir /var/vmail/dom.at/dom2/Maildir with subfolder: Drafts
    13.01.2012-08:59 - DEBUG - Created Maildir /var/vmail/dom.at/dom2/Maildir with subfolder: Trash
    13.01.2012-08:59 - DEBUG - Created Maildir /var/vmail/dom.at/dom2/Maildir with subfolder: Junk
    13.01.2012-08:59 - DEBUG - Calling function 'update' from plugin 'maildeliver_plugin' raised by event 'mail_user_insert'.
    13.01.2012-08:59 - DEBUG - Mailfilter config has been changed
    13.01.2012-08:59 - DEBUG - Processed datalog_id 157
    13.01.2012-08:59 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats all ok. Please post the output of:

    ls -la /var/vmail/dom.at/dom2

    and

    grep vmail /etc/group

    and

    grep vmail /etc/passwd
     
  20. rolix

    rolix New Member

    ls -la /var/vmail/dom.at/dom2
    total 0
    drwx------ 3 vmail vmail 3896 2012-01-13 09:59 .
    drwx--x--x 4 root root 3896 2012-01-13 09:59 ..
    drwx------ 9 vmail vmail 3896 2012-01-13 09:59 Maildir
    -rw------- 1 vmail vmail 46 2012-01-13 09:59 .quotausage
    -rw-r--r-- 1 root root 70 2012-01-13 09:59 .sieve
    -rw-r--r-- 1 vmail vmail 118 2012-01-13 09:59 .sieve.svbin

    grep vmail /etc/group
    vmail:x:5000:

    grep vmail /etc/passwd
    vmail:x:5000:5000::/var/vmail:/bin/sh
     

Share This Page