首页 > 其他分享 >debain配置qmail

debain配置qmail

时间:2023-05-06 14:07:07浏览次数:46  
标签:control qmail 00 配置 debain qidizi var root


在配置中都依照

http://www.lifewithqmail.org/lwq.html

debain配置qmail_bash

中的说明一步一步的来的.

竟然直接就成功了.

虽然提供了deb包,但是我没使用.因为想在自己机上测试一下安装过程是怎么样的.好在服务器上安装.

在安装过程中,因为我机子没装gcc,所以cc命令用不了,在deb管理器上安装了个gcc就可以了.

接make又不行,又直接在新产得包管理器上安装个make就可以了.

然后就一路下去就完全无事直到可以使用telnet登录发送 是产

 

以下是部分测试代码

 

root@qidizi:/package/admin/daemontools-0.76# cd /var/qmail
root@qidizi:/var/qmail# ls
alias  bin  boot  control  doc    man  queue  users
root@qidizi:/var/qmail# vi rc
root@qidizi:/var/qmail# vi rc
root@qidizi:/var/qmail# chmod 755 /var/qmail/rc
root@qidizi:/var/qmail# mkdir /var/log/qmail
root@qidizi:/var/qmail# echo ./Mailbox >/var/qmail/control/defaultdelivery
root@qidizi:/var/qmail# vi /var/qmail/bin/qmailctl
root@qidizi:/var/qmail# vi /var/qmail/bin/qmailctl
root@qidizi:/var/qmail# chmod 755 /var/qmail/bin/qmailctl
root@qidizi:/var/qmail# ln -s /var/qmail/bin/qmailctl /usr/bin
root@qidizi:/var/qmail# mkdir -p /var/qmail/supervise/qmail-send/log
root@qidizi:/var/qmail# ls
alias  bin  boot  control  doc    man  queue  rc    supervise  users
root@qidizi:/var/qmail# cd supervise
root@qidizi:/var/qmail/supervise# ls
qmail-send
root@qidizi:/var/qmail/supervise# mkdir -p /var/qmail/supervise/qmail-smtpd/log
root@qidizi:/var/qmail/supervise# ls
qmail-send  qmail-smtpd
root@qidizi:/var/qmail/supervise# vi /var/qmail/supervise/qmail-send/run
root@qidizi:/var/qmail/supervise# vi /var/qmail/supervise/qmail-send/log/run
root@qidizi:/var/qmail/supervise# vi /var/qmail/supervise/qmail-smtpd/run
root@qidizi:/var/qmail/supervise# cd .
root@qidizi:/var/qmail/supervise# cd ..
root@qidizi:/var/qmail# cd control
root@qidizi:/var/qmail/control# ls
defaultdelivery  defaultdomain    locals    me  plusdomain    rcpthosts
root@qidizi:/var/qmail/control# echo 20 > /var/qmail/control/concurrencyincoming
root@qidizi:/var/qmail/control# ls
concurrencyincoming  defaultdelivery  defaultdomain  locals  me  plusdomain  rcpthosts
root@qidizi:/var/qmail/control# vi concurrencyincoming
root@qidizi:/var/qmail/control# chmod 644 /var/qmail/control/concurrencyincoming
root@qidizi:/var/qmail/control# vi /var/qmail/supervise/qmail-smtpd/log/run
root@qidizi:/var/qmail/control# chmod 755 /var/qmail/supervise/qmail-send/run
root@qidizi:/var/qmail/control# chmod 755 /var/qmail/supervise/qmail-send/log/run
root@qidizi:/var/qmail/control# chmod 755 /var/qmail/supervise/qmail-smtpd/run
root@qidizi:/var/qmail/control#     chmod 755 /var/qmail/supervise/qmail-smtpd/log/run
root@qidizi:/var/qmail/control# mkdir  /var/log/qmail/smtpd
root@qidizi:/var/qmail/control# chown qmaill /var/log/qmail /var/log/qmail/smtpd
root@qidizi:/var/qmail/control# ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
root@qidizi:/var/qmail/control# top


top - 20:43:14 up  1:09,  2 users,  load average: 0.00, 0.00, 0.00
Tasks: 188 total,   1 running, 187 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.6%us,  0.2%sy,  0.0%ni, 98.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3481752k total,  2355616k used,  1126136k free,   760728k buffers
Swap:  6321144k total,        0k used,  6321144k free,  1083768k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                       
 2095 qidizi    20   0  341m  79m  30m S    5  2.3   5:01.78 rhythmbox                                                     
 2239 qidizi    20   0  370m  55m  26m S    2  1.6   1:52.80 plugin-containe                                               
 1490 root      20   0  178m  40m  10m S    1  1.2   1:56.38 Xorg                                                          
 2185 qidizi    20   0  640m 234m  40m S    1  6.9   2:47.79 firefox                                                       
11899 root      20   0  2464 1216  896 R    1  0.0   0:00.06 top                                                           
   16 root      20   0     0    0    0 S    0  0.0   0:00.89 events/1                                                      
 2110 qidizi    20   0 27704 4184 3484 S    0  0.1   0:02.12 gvfsd-http                                                    
 2510 root      20   0  101m  14m  10m S    0  0.4   0:09.42 gnome-terminal                                                
    1 root      20   0  2032  744  652 S    0  0.0   0:01.18 init                                                          
    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd                                                      
root@qidizi:/var/qmail/control# ps -A | grep qmail
11890 ?        00:00:00 qmail-send
11895 ?        00:00:00 qmail-lspawn
11896 ?        00:00:00 qmail-rspawn
11897 ?        00:00:00 qmail-clean
root@qidizi:/var/qmail/control# qmailctl stat
/service/qmail-send: up (pid 11890) 50 seconds
/service/qmail-send/log: up (pid 11889) 50 seconds
/service/qmail-smtpd: up (pid 11887) 50 seconds
/service/qmail-smtpd/log: up (pid 11888) 50 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0
root@qidizi:/var/qmail/control# qmailctl stop
Stopping qmail...
  qmail-smtpd
  qmail-send
root@qidizi:/var/qmail/control# ps -A | grep qmail
root@qidizi:/var/qmail/control# echo '127.:allow,RELAYCLIENT=""' >>/etc/tcp.smtp
root@qidizi:/var/qmail/control# qmailctl cdb
Reloaded /etc/tcp.smtp.
root@qidizi:/var/qmail/control# /etc/init.d/sendmail stop
bash: /etc/init.d/sendmail: 没有那个文件或目录
root@qidizi:/var/qmail/control#     /sbin/init.d/sendmail stop
bash: /sbin/init.d/sendmail: 没有那个文件或目录
root@qidizi:/var/qmail/control#     /etc/rc.d/init.d/sendmail stop
bash: /etc/rc.d/init.d/sendmail: 没有那个文件或目录
root@qidizi:/var/qmail/control# ps -A | grep send
root@qidizi:/var/qmail/control# netstat -a | grep smtp
root@qidizi:/var/qmail/control# mv /usr/lib/sendmail /usr/lib/sendmail.old
root@qidizi:/var/qmail/control# mv /usr/sbin/sendmail /usr/sbin/sendmail.old 
root@qidizi:/var/qmail/control# chmod 0 /usr/lib/sendmail.old /usr/sbin/sendmail.old 
root@qidizi:/var/qmail/control# ln -s /var/qmail/bin/sendmail /usr/lib
root@qidizi:/var/qmail/control# ln -s /var/qmail/bin/sendmail /usr/sbin
root@qidizi:/var/qmail/control#  echo dave > /var/qmail/alias/.qmail-root
root@qidizi:/var/qmail/control# echo dave > /var/qmail/alias/.qmail-postmaster
root@qidizi:/var/qmail/control# ln -s .qmail-postmaster /var/qmail/alias/.qmail-mailer-daemon
root@qidizi:/var/qmail/control#  ln -s .qmail-postmaster /var/qmail/alias/.qmail-abuse
root@qidizi:/var/qmail/control#  chmod 644 /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-postmaster
root@qidizi:/var/qmail/control# qmailctl start
Starting qmail
root@qidizi:/var/qmail/control# qmailctl stat
/service/qmail-send: up (pid 12073) 8 seconds
/service/qmail-send/log: up (pid 12072) 8 seconds
/service/qmail-smtpd: up (pid 12076) 8 seconds
/service/qmail-smtpd/log: up (pid 12077) 8 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0
root@qidizi:/var/qmail/control# cd ..
root@qidizi:/var/qmail# ls
alias  bin  boot  control  doc    man  queue  rc    supervise  users
root@qidizi:/var/qmail# mkdir test
root@qidizi:/var/qmail# ls
alias  bin  boot  control  doc    man  queue  rc    supervise  test  users
root@qidizi:/var/qmail# cd test
root@qidizi:/var/qmail/test# vi instTest.sh
root@qidizi:/var/qmail/test# chmod 755 instTest.sh
root@qidizi:/var/qmail/test# ./instTest.sh
Congratulations, your LWQ installation looks good!
root@qidizi:/var/qmail/test# ps
  PID TTY          TIME CMD
 2519 pts/1    00:00:00 bash
 7251 pts/1    00:00:00 su
 7259 pts/1    00:00:00 bash
12247 pts/1    00:00:00 ps
root@qidizi:/var/qmail/test# ps -efl | grep ser
5 S root        37     2  0  80   0 -     0 -      19:34 ?        00:00:00 [kseriod]
1 S root      1599     2  0  80   0 -     0 -      19:34 ?        00:00:00 [kconservative/0]
1 S root      1600     2  0  80   0 -     0 -      19:34 ?        00:00:00 [kconservative/1]
1 S root      1601     2  0  80   0 -     0 -      19:34 ?        00:00:00 [kconservative/2]
1 S root      1602     2  0  80   0 -     0 -      19:34 ?        00:00:00 [kconservative/3]
0 S qidizi    1914     1  0  80   0 - 10551 -      19:34 ?        00:00:00 /usr/lib/bonobo-activation/bonobo-activation-server --ac-activate --ior-output-fd=18
0 S root     11239 11237  0  80   0 -   426 -      20:22 ?        00:00:00 svscan /service
0 S root     11240 11237  0  80   0 -   383 -      20:22 ?        00:00:00 readproctitle service errors: ................................................................................................................................................................................................................................................................................................................................................................................................................
4 S qmaild   12076 11885  0  80   0 -   437 -      20:47 ?        00:00:00 /usr/local/bin/tcpserver -v -R -l qidizi.local -x /etc/tcp.smtp.cdb -c 20 -u 71 -g 71 0 smtp /var/qmail/bin/qmail-smtpd
0 S root     12249  7259  0  80   0 -   880 -      20:50 pts/1    00:00:00 grep ser
root@qidizi:/var/qmail/test# telnet
telnet> open locolhost 25
telnet: could not resolve locolhost/25: Name or service not known
telnet> open qidizi 25
Trying 127.0.1.1...
Connected to qidizi.qidizi.com.
Escape character is '^]'.
220 qidizi.local ESMTP
helo qidizi.com
250 qidizi.local
auth login
502 unimplemented (#5.5.1)
mail from:[email protected]
250 ok
rcpt to:[email protected]
250 ok
data
354 go ahead
subject:=?UTF-8?B?t6LLzbi9vP6junJlYWx3b3JkLmh0bQ==?=

.
250 ok 1319547394 qp 12399
quit
221 qidizi.local
Connection closed by foreign host.
root@qidizi:/var/qmail/test#

标签:control,qmail,00,配置,debain,qidizi,var,root
From: https://blog.51cto.com/u_252283/6249583

相关文章

  • log4j2常见配置
    log4j2常见配置转载自:https://www.cnblogs.com/gavinYang/p/8168928.html依赖jar:<dependency><groupId>org.apache.logging.log4j</groupId><artifactId>log4j-core</artifactId><version>2.9.1</version></depen......
  • logback常见配置
    logback常见配置依赖jar包<!--https://mvnrepository.com/artifact/ch.qos.logback/logback-core--><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-core</artifactId><version>......
  • Ubuntu 安装 Docker Engine 并配置用户权限
    1.删除旧版本Docker,没有可以跳过sudoapt-getremovedockerdocker-enginedocker.iocontainerdrunc2.更新apt包索引并安装包,以允许apt通过HTTPS使用存储库sudoapt-getupdatesudoapt-getinstallca-certificatescurlgnupg3.使用以下命令设置存储库echo\"d......
  • log4j常见配置
    log4j常见配置转载自:https://www.cnblogs.com/gavinYang/p/8168901.html依赖jar<dependency><groupId>log4j</groupId><artifactId>log4j</artifactId><version>1.2.17</version></dependency>Level:日志输出的几种级别F......
  • idea配置
    一、ideaIDEA全称IntelliJIDEA,是用于java语言开发的集成环境IDE(IntegratedDevelopmentEnvironment),也可用于其他语言的开发。IntelliJ在业界被公认为最好的java开发工具之一,尤其在智能代码助手、代码自动提示、重构、J2EE支持、Ant、JUnit、CVS整合、代码审查、创新的GUI设计......
  • 使用nacos配置,启动服务时一直报 Error starting ApplicationContext. To display the
    报错日志如下:ErrorstartingApplicationContext.Todisplaytheconditionsreportre-runyourapplicationwith'debug'enabled.-2023-05-0509:46:02.328[TID:N/A]ERROR8236---[main]o.s.b.d.LoggingFailureAnalysisReporter:***********......
  • 配置wordpress:更换网站ico图标(wordpress 6.2)
    一,更换ico1,代码:<linkrel="shortcuticon"href="http://wp.liuhongdi.com/favicon.ico?v=35"type="image/x-icon"/>2,添加代码:3,上传文件到wordpress根目录,如图:二,测试效果:说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest......
  • 使用properties配置jdbc信息报错问题
    今天使用properties文件来配置mysql驱动,url,user,password,然后配置到spring-dao.xml(spring和mybatis整合文件)中运行后报错java.sql.SQLException:Accessdeniedforuser'ASUS'@'localhost'(usingpassword:YES)用户ASUS访问被拒绝,在properties中user配置的是root。解决方法:......
  • 解决IDEA中每次都要重复配置Maven问题
    IDEA中每次都要重复配置Maven问题......
  • JDK----下载、作用、安装、配置
      官网JDK下载地址http://www.oracle.com/technetwork/java/javase/downloads/index.html   JDK介绍:java开发、调试需要安装JDK(包括javac编译、JRE等)只运行java程序只需安装JRE(包括javaAPI类库和JVM虚拟机)JRE  JDK环境变量配置及作用:安装完JDK后在cmd中输入java报错“不是内......