×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

You still need to find the log file before you can solve the problem ...

本文发表在 rolia.net 枫下论坛Qmail has 2 ways to log information:

1. use splogger that comes with qmail. It reads messages from stdin and feed them to syslog. You should be able to find out whether splogger is in use by running 'ps ax | grep splogger'. If it is in use, then the log for mail should be in /var/log, in the name of maillog, mail.log, mail.info, mail.err, etc.

2. use mutilog which is part of daemontools (a seperate software package also written by djb). If that's the case, qmail must be running under supervise (part of daemontools), so is multilog. You should be able to find out whether those programs are in use by running 'ps ax | grep supervise' and 'ps ax | grep multilog'.

If daemontools are in use, there must be a service directory, most likely in /service, /var/service, etc. Under that, there must be smtpd, smtpd/log, qmail, qmail/log, pop3d, pop3d/log. In each of those directories, there must be a script called run which contains commands to run those services. The run script under log directory must contain the command multilog, and the last parameter of multilog is the directory it logs information to, which is a directory called main under log directory by default. You should be able to find log files in those directories. One more thing is that the timestamp of entries in those log files are in tai64 format, you will need to run 'tai64nlocal < <logfile>' to get the human readable timestamp.

Once you can find the log file, you shoud be able to know the problem of your mail server.

Here are some pointers you might want to look into:

- Life with Qmail (http://www.lifewithqmail.org) -- highly recommended
- Qmail site (http://www.qmail.org/top.html)
- DJB's site:
-- for qmail (http://cr.yp.to/qmail.html)
-- for daemontools (http://cr.yp.to/daemontools.html)
-- for ucspi-tcp (http://cr.yp.to/ucspi-tcp.html)

Good luck!更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 枫下家园 / 电脑用户 / 紧急呼叫:温柔杀手--退隐江湖,阿土,我们公司的mail server(linux)不可以pop收信和发信了,但是web收发都正常,到底是怎么回事,还是firewall的问题吗?
    这些天搞的要疯掉了,估计老板没多久就要炒了我了,wu.....从昨天开始是不可以发信,今天就收都收不到了。我查了一下,mail server 上的log文件都没有了,一个faillog, lastlog都是乱码,老板还不让我改密码,怎么办?
    • 你用什么 mail server?
      • linux 2.2.13
      • up
      • up
    • 信息比较少,难以定位。sendmail一般来说很稳定,但看样子是sendmail和pop3停掉了,最简单的办法是reboot。另外查一下是否open relay,被当作垃圾邮件转发站也能累死server的。anything else?
      • web收发就不用sendmail了吗?
        • ???没注意,俺以为说阿帕奇没问题呢。那俺怀疑原文表述有误,可能仅仅是pop3停掉了。
          • 需要更详细的relay信息,最好xiaodongxi把发件失败的提示信息和邮件头放上来看看
        • web mail可以不用pop取邮件的,直接读文件就可以了。 有可能是popd死了或者验证有问题。
    • faillog and lastlog are binary files, you'll need to use lastlog(8) and faillog(8) to examine the content. Let me ask you some questions first:
      1. which linux distribution are you using? I'd assume Redhat?

      2. what's the output of 'ps ax | grep sendmail'?

      3. what's the output of 'ps ax | grep pop'?

      4. what's the output of 'lsof -i -n' (assuming you have lsof installed)?

      5. when you say "mail server 上的log文件都没有了", what does that mean? Are you missing all the log files or only the maillog?

      BTW, I hate sendmail and stay away from it as much as possible :-)
    • 70% because pop3d is dead try "kill -1 1" to restart pop3d in inetd.conf file if it is not commented
      • 关于我们公司服务器的问题我以前请教过各位专家,但是由于小女子对LINUX 实在是一窍不通,要处理也无从下手。公司里有四个服务器,其中
        本文发表在 rolia.net 枫下论坛mail server , firewall是linux, 另两个是NT,估计是在1999年由一个东欧人架构起来的,他2000年初就走了,一直没人管理。 在去年11月我刚到公司的时候web server (NT, IIS4)被黑过,症状是index页面被换了,我打了一系列的补丁后问题就好了,但是最近从1月份开始不停的有其他公司的Webmaster 向我们抱怨说他们的服务器遭到来自我们mail server or firewall 的ports scan或攻击,我才开始学习linux, 对服务器的管理也就是经常查查log 文件,在firewall 上我可以查到iplog, syslog, lastlog, 但是这些在mail server 上一个也查不到。比较头疼。

        mail server上有apach, qmail, 不清楚sendmail, 版本是2.2.13。 上个星期四的时候我们同事发现从outlook 上无法发信,可以收信,错误信息是:
        Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Account: 'x.x.x.x', Server: 'x.x.x.x', Protocol: SMTP, Port: 25, Secure(SSL): No, Error Number: 0x800CCC0F , 星期五开始,从其他信箱(yahoo,hotmail)向mail server上发信根本就收不到。但是outlook上连接正常,没有错误信息。

        我试着用mail server上网页(web)发信,收发一切正常。查过一些文章,以为是code red引起的问题,但是用一些软件查了好象没有code red.

        请各位专家给我会症会症,再不解决,礼拜一我就不用去了。老板也就给我一个labour工的钱,但是我又做web developer, 又做network administrator, 而且孤军做战,真是累呀。 :(.....

        还好,有rolia上的各位专家,我还有一线希望。。。这里先谢过大家了。更多精彩文章及讨论,请光临枫下论坛 rolia.net
        • qmail 是和 sendmail 类似的 mail server, 有时候因为大量 email 的涌入,qmail-pop3d 会死掉,首先杀掉 qmail-pop3d 再运行试试。
        • You still need to find the log file before you can solve the problem ...
          本文发表在 rolia.net 枫下论坛Qmail has 2 ways to log information:

          1. use splogger that comes with qmail. It reads messages from stdin and feed them to syslog. You should be able to find out whether splogger is in use by running 'ps ax | grep splogger'. If it is in use, then the log for mail should be in /var/log, in the name of maillog, mail.log, mail.info, mail.err, etc.

          2. use mutilog which is part of daemontools (a seperate software package also written by djb). If that's the case, qmail must be running under supervise (part of daemontools), so is multilog. You should be able to find out whether those programs are in use by running 'ps ax | grep supervise' and 'ps ax | grep multilog'.

          If daemontools are in use, there must be a service directory, most likely in /service, /var/service, etc. Under that, there must be smtpd, smtpd/log, qmail, qmail/log, pop3d, pop3d/log. In each of those directories, there must be a script called run which contains commands to run those services. The run script under log directory must contain the command multilog, and the last parameter of multilog is the directory it logs information to, which is a directory called main under log directory by default. You should be able to find log files in those directories. One more thing is that the timestamp of entries in those log files are in tai64 format, you will need to run 'tai64nlocal < <logfile>' to get the human readable timestamp.

          Once you can find the log file, you shoud be able to know the problem of your mail server.

          Here are some pointers you might want to look into:

          - Life with Qmail (http://www.lifewithqmail.org) -- highly recommended
          - Qmail site (http://www.qmail.org/top.html)
          - DJB's site:
          -- for qmail (http://cr.yp.to/qmail.html)
          -- for daemontools (http://cr.yp.to/daemontools.html)
          -- for ucspi-tcp (http://cr.yp.to/ucspi-tcp.html)

          Good luck!更多精彩文章及讨论,请光临枫下论坛 rolia.net
      • thanks everyone's help! I'll have a try.