今天早上在邮件服务器上添加新用户时显示配额已满添加用户失败等信息;赶快登陆服务器进行排查啊,首先简单介绍一下我们的环境Centos 6.4+Apache+postfix+mysql(其实我也不太清楚,因为不是我来搭建的。嘿嘿)以下为一个菜鸟排查错误思路过程:
突破口1、使用df -h 查看磁盘空间是否正常
[root@mail ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 30G 6.4G 22G 23% / tmpfs 947M 0 947M 0% /dev/shm /dev/sda1 194M 20M 165M 11% /boot
通过查看结果显示磁盘空间还有很多。
突破口2、然后查看服务器日志:
[root@mail ~]#tail /var/log/messages Mar 7 09:25:58 localhost postfix/smtpd[11886]: auxpropfunc error no mechanism available Mar 7 09:27:46 localhost postfix/smtpd[13245]: auxpropfunc error invalid parameter supplied Mar 7 09:27:46 localhost postfix/smtpd[13245]: sql_select option missing Mar 7 09:27:46 localhost postfix/smtpd[13245]: auxpropfunc error no mechanism available Mar 7 09:31:40 localhost postfix/smtpd[16724]: auxpropfunc error invalid parameter supplied Mar 7 09:31:40 localhost postfix/smtpd[16724]: sql_select option missing Mar 7 09:31:40 localhost postfix/smtpd[16724]: auxpropfunc error no mechanism available Mar 7 09:35:03 localhost postfix/smtpd[19464]: auxpropfunc error invalid parameter supplied Mar 7 09:35:03 localhost postfix/smtpd[19464]: sql_select option missing Mar 7 09:35:03 localhost postfix/smtpd[19464]: auxpropfunc error no mechanism available
通过日志查看显示:没有关于配额已满的错误。
突破口3、查看并编辑更改配置文件
[root@mail ~]# vim /etc/postfix/main.cf mime_header_checks= regexp:/etc/postfix/mime_header_checks mailbox_size_limit = 512000000 #邮件大小权限 message_size_limit = 20480000 #信息大小权限 ###笔者假想可能是这里的配额有点小,就将这里的默认大小更改成了### [root@mail ~]# vim /etc/pos##tfix/main.cf mime_header_checks= regexp:/etc/postfix/mime_header_checks mailbox_size_limit = 1024000000 message_size_limit = 40960000
         重启服务
[root@mail small.com]# /etc/init.d/courier-authlib restart #认证模块的加载 Stopping Courier authentication services: authdaemond Starting Courier authentication services: authdaemond [root@mail small.com]# /etc/init.d/courier-imap restart pop3、imap #服务模块的重启 Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl Starting Courier-IMAP server: imap imap-ssl pop3 pop3-ssl [root@mail small.com]# /etc/init.d/saslauthd restart #saslauthd认证模块的重新加载 Stopping saslauthd: [ OK ] Starting saslauthd: [ OK ] [root@mail small.com]# /etc/init.d/httpd restart #apache服务器重启,页面的重新加载 Stopping httpd: [ OK ] Starting httpd: [ OK ] [root@mail small.com]# /etc/init.d/postfix restart 邮件服务器的重启 Shutting down postfix: [ OK ] Starting postfix: [ OK ] [root@mail small.com]# vim /etc/postfix/main.cf [root@mail small.com]# /etc/init.d/postfix restart Shutting down postfix: [ OK ] Starting postfix: [ OK ]
重启登陆页面添加用户发现还是无法添加,还是同样的错误,从而说明不是此权限限制的问题。仔细想了一下可能是数据库的问题
突破口4、进入数据库查看数据库的参数设定
[root@mail small.com]# mysql -p123456
mysql> show databases;     #查看所有表
+--------------------+
| Database           |
+--------------------+
| information_schema |
| extmail            |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.13 sec)
mysql> use extmail      #指定邮件数据表
Database changed
mysql> show tables;     #查看所有表
+-------------------+
| Tables_in_extmail |
+-------------------+
| alias             |
| domain            |
| domain_manager    |
| mailbox           |
| manager           |
+-------------------+
5 rows in set (0.01 sec)
mysql> desc domain;   
+----------------------+--------------+------+-----+---------------------+-------+
| Field                | Type         | Null | Key | Default             | Extra |
+----------------------+--------------+------+-----+---------------------+-------+
| domain               | varchar(255) | NO   | PRI |                     |       |
| description          | varchar(255) | NO   |     |                     |       |
| hashdirpath          | varchar(255) | NO   |     |                     |       |
| maxalias             | int(10)      | NO   |     | 0                   |       |
| maxusers             | int(10)      | NO   |     | 0                   |       |
| maxquota             | varchar(16)  | NO   |     | 0                   |       |
| maxnetdiskquota      | varchar(16)  | NO   |     | 0                   |       |
| transport            | varchar(255) | YES  |     | NULL                |       |
| can_signup           | tinyint(1)   | NO   |     | 0                   |       |
| default_quota        | varchar(255) | YES  |     | NULL                |       |
| default_netdiskquota | varchar(255) | YES  |     | NULL                |       |
| default_expire       | varchar(12)  | YES  |     | NULL                |       |
| disablesmtpd         | smallint(1)  | YES  |     | NULL                |       |
| disablesmtp          | smallint(1)  | YES  |     | NULL                |       |
| disablewebmail       | smallint(1)  | YES  |     | NULL                |       |
| disablenetdisk       | smallint(1)  | YES  |     | NULL                |       |
| disableimap          | smallint(1)  | YES  |     | NULL                |       |
| disablepop3          | smallint(1)  | YES  |     | NULL                |       |
| createdate           | datetime     | NO   |     | 0000-00-00 00:00:00 |       |
| expiredate           | date         | NO   |     | 0000-00-00          |       |
| active               | tinyint(1)   | NO   |     | 1                   |       |
+----------------------+--------------+------+-----+---------------------+-------+
21 rows in set (0.01 sec)
mysql> select * from domain\G;
*************************** 1. row ***************************
              domain: email.org
         description: virtualDomain for extmail.org
         hashdirpath: A0/B0
            maxalias: 50
            maxusers: 50
            maxquota: 1073741824
     maxnetdiskquota: 1073741824
           transport: NULL
          can_signup: 1
       default_quota: 5242880
default_netdiskquota: 5242880
      default_expire: 1y
        disablesmtpd: 0
         disablesmtp: 0
      disablewebmail: 0
      disablenetdisk: 0
         disableimap: 1
         disablepop3: 0
          createdate: 2007-02-14 15:10:04
          expiredate: 2010-11-08
              active: 0
*************************** 2. row ***************************
              domain: luck.com
         description: luck.com
         hashdirpath:
            maxalias: 100
            maxusers: 200
            maxquota: 15728640000S
     maxnetdiskquota: 524288000S
           transport:
          can_signup: 0
       default_quota: 5242880S
default_netdiskquota: 5242880S
      default_expire: 1y
        disablesmtpd: 0
         disablesmtp: 0
      disablewebmail: 0
      disablenetdisk: 0
         disableimap: 1
         disablepop3: 0
          createdate: 2013-08-22 21:14:17
          expiredate: 0000-00-00
              active: 0
*************************** 3. row ***************************
              domain: small.com
         description: small.com
         hashdirpath:
            maxalias: 100
            maxusers: 200
            maxquota: 15728640000S    #最大配额
     maxnetdiskquota: 5242880000S
           transport:
          can_signup: 0
       default_quota: 104857600S
default_netdiskquota: 5242880S
      default_expire: 10y
        disablesmtpd: 0
         disablesmtp: 0
      disablewebmail: 0
      disablenetdisk: 0
         disableimap: 0
         disablepop3: 0
          createdate: 2013-08-23 00:59:55
          expiredate: 0000-00-00
              active: 1
3 rows in set (0.00 sec)
[root@mail small.com]# mysqldump -xR -p123456. extmail > /tmp/extmail_20140328.sql  #备份数据库
[root@mail small.com]# ls /tmp/extmail_20140328.sql      #查看备份状态
/tmp/extmail_20140328.sql
[root@mail small.com]# mysql -p123456     #登陆mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 823051
Server version: 5.1.69-log Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql> use extmail
Database changed
mysql> update domain set maxquota=‘31457280000S‘;     #更改参数使其配额更大
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3  Changed: 3  Warnings: 0
mysql> quit        #退出服务器登陆页面添加用户,添加成功,邮件服务器添加用户的错误修复完成。
本文出自 “起点梦想” 博客,请务必保留此出处http://pangge.blog.51cto.com/6013757/1386098
公司邮件服务器错误修复排查过程,布布扣,bubuko.com
原文:http://pangge.blog.51cto.com/6013757/1386098