LINUX学习笔记本

如何查看文件属性的年份:
#stat -c '%x %y %z %n' *
#ls -al --full-time

*在ls -l命令中如果你没有看见有年份显示的文件,表明此文件修改日期是今年的.

#######################################################################

如何判断某个服务是否已经运行呢?
例如,我可以使用
#service smb status
来知道smb是否已经运行了

我现在想做一个script来判断smb是否已经运行了,如果没有运行就启动

这个脚本怎么写呢?


A: ps -e|grep -q servicename||service servicename start

pgrep smb || service smb start

########################################################################

重新编译qmail
按照qmailrocks.org的安装方法来安装qmail,是已经打了TLS的patch,但是在给一些邮箱发邮件的时候出现了错误:

@4000000041b6e20323efce64 delivery 898: deferral: TLS_found_no_client_cert_in_control/clientcert.pem/
@4000000041b3c5ac266e18bc delivery 5: deferral: TLS_not_available:_connect_failed:_error:14077410:SSL_routines:SSL23_GET_SERVER_HELLO:sslv3_alert_handshake_failure/
[root@mail qmail-send]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 gino-group.com ESMTP
ehlo
250-gino-group.com
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-STARTTLS
250-PIPELINING
250 8BITMIME

已经开放了TLS的功能.
google了很久,依然找不到解决问题的方法
现在只能重新编译qmail,去掉TLS的patch来解决问题了,之前安装的是qmail-1.03,现在干脆下载一个netqmail-1.05来安装
注意在重新编译qmail时,一定要停止qmail的进程,否则会出现错误
保证qmail队列中没有邮件的情况下,使用qmailctl stop来完全停止qmail的进程
[root@mail qmail-send]# qmailctl stat
/service/qmail-send: up (pid 17713) 803 seconds
/service/qmail-send/log: up (pid 17717) 803 seconds
/service/qmail-smtpd: up (pid 17718) 803 seconds
/service/qmail-smtpd/log: up (pid 17720) 803 seconds
/service/qmail-pop3d: up (pid 17721) 803 seconds
/service/qmail-pop3d/log: up (pid 17722) 803 seconds
messages in queue: 4
messages in queue but not yet preprocessed: 0
[root@mail qmail-send]#

安装netqmail-1.05
[root@mail qmail-send]# cd /usr/src/qmail/
[root@mail qmail]# tar zxvf netqmail-1.05.tar.gz
[root@mail qmail]# cd netqmail-1.05
[root@mail netqmail-1.05]# ./collate.sh
[root@mail netqmail-1.05]# cd ../
[root@mail qmail]# tar zxvf qmail-smtpd-auth-0.31.tar.gz
[root@mail qmail]# cp qmail-smtpd-auth-0.31/base64.* netqmail-1.05/netqmail-1.05
[root@mail qmail]# patch -d netqmail-1.05/netqmail-1.05 < qmail-smtpd-auth-0.31/auth.patch
[root@mail qmail]# cd netqmail-1.05/netqmail-1.05
[root@mail qmail]# make setup check
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值