Directadmin限制Exim发邮件数量

  1. [root@localhost ~]# cat /etc/virtual/limit #全局设置,所有虚拟主机用户,每天最大发送邮件数量
  2. 100
  3. # /etc/virtual/limit 的值不为0的情况下,等于0或者负数,主机用户可发送邮件量均为“无限制”(不推荐) 根据笔者的经验,100-200的数量已经可以满足普通用户的需求。
  4.  
  5. [root@localhost ~]# cat /etc/virtual/limit_userabc #单独设置,用户"userabc"每天最大发送邮件数量
  6. 200
  7.  
  8. [root@localhost ~]# cat /etc/virtual/limit_baiqiuyi #单独设置,用户"baiqiuyi"每天可发送的邮件数量为“无限制”
  9. 0
  10. #前提为/etc/exim.pl 里有这行 if (open (LIMIT, "/etc/virtual/limit_$name"))
  11.  
  12. [root@localhost ~]# ls -lh /etc/virtual/usage
  13. total 24K
  14. -rw-rw---- 1 root mail    5 Apr 28 21:47 baiqiuyi
  15. -rw-rw---- 1 root mail 1.4K Apr 28 21:47 baiqiuyi.bytes #此文件记录了该用户当天发送邮件的详细信息,如果该文件过大,就有发送垃圾邮件的嫌疑。

Linux命令行获取本机IP

  1. # perl
  2. [root@Nagios ~]# ifconfig|perl -nle'/dr:([^ ]+)/&&print$1'
  3. 192.168.0.200
  4. 127.0.0.1
  5.  
  6. # perl,够帅
  7. [root@Nagios ~]# ip addr|perl -pe '$_=/t (.*)\//?$1.$/:""'
  8. 127.0.0.1
  9. 192.168.0.200
  10.  
  11. # awk
  12. [root@Nagios ~]# ifconfig|awk -F':| *' '/inet /{print $4}'
  13. 192.168.0.200
  14. 127.0.0.1
  15.  
  16. # sed
  17. [root@Nagios ~]# ifconfig|sed -rn 's/.*r:([^ ]+) .*/\1/p'
  18. 192.168.0.200
  19. 127.0.0.1
  20.  
  21. # shell
  22. [root@Nagios ~]# ifconfig|grep 'inet addr:'|while read X Y Z; do echo $Y;done|(IFS=':';while read X Y;do echo $Y ;done)
  23. 192.168.0.200
  24. 127.0.0.1

from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs

pptpd vpn错误619的解决办法

  1. #/var/log/messages错误日志为:
  2. Apr  5 19:45:25 localhost pptpd[2000]: GRE: read(fd=6,buffer=8059680,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
  3. Apr  5 19:45:25 localhost pptpd[2000]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
  4.  
  5. # 打开options.pptpd
  6. # vi /etc/ppp/options.pptpd
  7. # 找到debug,在下面添加一行 debug dump 打开连接调试
  8. #错误日志提示为:Cannot determine ethernet address for proxy ARP
  9.  
  10. Apr  5 19:49:25 localhost pppd[2026]: nobsdcomp         # (from /etc/ppp/options.pptpd)
  11. Apr  5 19:49:25 localhost pppd[2026]: require-mppe-128          # (from /etc/ppp/options.pptpd)
  12. Apr  5 19:49:25 localhost pppd[2026]: pppd 2.4.4 started by root, uid 0
  13. Apr  5 19:49:25 localhost pppd[2026]: Using interface ppp0
  14. Apr  5 19:49:25 localhost pppd[2026]: Connect: ppp0 <--> /dev/pts/1
  15. Apr  5 19:49:25 localhost pppd[2026]: MPPE 128-bit stateless compression enabled
  16. Apr  5 19:49:25 localhost pptpd[2025]: CTRL: Ignored a SET LINK INFO packet with real ACCMs!
  17. Apr  5 19:49:27 localhost pppd[2026]: Cannot determine ethernet address for proxy ARP
  18. Apr  5 19:49:27 localhost pppd[2026]: local  IP address 10.0.0.1
  19. Apr  5 19:49:27 localhost pppd[2026]: remote IP address 10.0.0.2
  20.  
  21. # 重启pptpd服务
  22. service pptpd restart
  1. windows上 开始运行cmd
  2. apr -d *
  3. 再拨VPNOK

upstream timed out (110: Connection timed out) while reading response header from upstream

Nginx错误日志为:upstream timed out (110: Connection timed out) while reading response header from upstream
解决办法为在server字段里修改proxy_read_timeout的值,具体参考

  1. proxy_connect_timeout 300;
  2. proxy_read_timeout 300;
  3. proxy_send_timeout 300;
1 1