aix系统配置sendmail邮件服务器及常见问题
思韵闪耀
2013-03-19
0

  在系统安装完毕后,通常我们只需按照缺省配置启动sendmail邮件服务就可以用mail,OutLook,Foxmail等常用工具收发邮件了。

  简单操作如下:

  # startsrc -s sendmail -a “-bd -q30m” (启动邮件服务后台进程)

  # vi /etc/inetd.conf, (uncomment the following line)

  pop3 --stream --tcp --nowait --root-- /usr/sbin/pop3d pop3d

  # refresh -s inetd (刷新超级守护进程,允许pop3客户端连接)

  常见问题一、

  当我们需要把AIX服务器的root信箱转发到我们的常用个人信箱以保证及时收到系统发出的重要warning或者报错的话,我们就要配置aliases别名。

  举例如下(红色为我们需要输入的命令,蓝色为我们需要编辑加入的内容)

  # vi /etc/aliases

  # Alias for mailer daemon

  MAILER-DAEMON:root

  # Following alias is required by the new mail protocol, RFC 822

  postmaster:root

  # Aliases to handle mail to msgs and news

  nobody: /dev/null

  # Alias to which SSA related warnings are mailed

  ssa_adm: root

  # Alias for admin issue

  root: root,test@cn.sendmail.com

  要使改动生效,有两种办法

  (1) # sendmail -bi

  (2) # newaliases

  当执行命令遇到如下信息时,我们需要检查目录的许可权限是否设对。

  # newaliases

  WARNING: Group writable Directory /var/spool

  WARNING: Group writable directory /var/spool/mqueue

  /etc/mail/aliases: 5 aliases, longest 17 bytes, 78 bytes total

  # ls -dl /var/spool

  drwxrwxr-x --12 bin --bin -- --512 Dec 19 11:26 /var/spool

  # ls -dl /var/spool/mqueue

  drwxrwxr-x --2 root --system --512 Mar 17 18:08 /var/spool/mqueue

  # chmod 755 /var/spool

  # chmod 755 /var/spool/mqueue

  # newaliases

  /etc/mail/aliases: 5 aliases, longest 17 bytes, 78 bytes total

  另一种警告信息的解决

  # sendmail -bi

  WARNING: World writable directory /etc

  dbm map "Alias0": unsafe map file /etc/aliases

  WARNING: cannot open alias database /etc/aliases

  Cannot create database for alias file /etc/aliases: A system call received a par

  ameter that is not valid.

  # ls -dl /etc

  drwxrwxrwx --30 root --system ----4096 Mar 17 10:35 /etc

  # chmod 755 /etc

  # sendmail -bi

  /etc/aliases: There are 4 aliases. The longest is 9 bytes, with 57 bytes total.

  备注:

  除此aliases全局设置方法外,我们还可以编辑用户自己属主目录下的$HOME/.forward

  add line with the target mail address, for example

  test@cn.sendmail.com

  存盘退出后,凡是发到用户的信都会同时转发到test@cn.sendmail.com

  常见问题二、

  当我们的/etc/sendmail.cf被误删除,或者被损坏,或者被改的面目全非时,如何处理?

  (1) # cp /usr/lpp/bos.net/inst_root/etc/mail/sendmail.cf

  /etc/sendmail.cf

  备注:在/usr/lpp/bos.net/inst_root/etc目录下有很多系统文件的重要拷贝,如

  inetd.conf/rc.tcpip/syslog.conf 等许多许多。

  (2) 重新创建 sendmail.cf(以AIX 4.3.3为例) 步骤如下:

  首先我们要确认系统中存在下列文件集: bos.adt.base &bos.net.tcp.adt

  AIX 将产生定制sendmail配置文件的工具和宏放在/usr/samples/tcpip/sendmail/cf

  具体操作步骤如下:

  #cd /usr/samples/tcpip/sendmail/cf

  这里有我们需要的文件aix433.mc. 它包含我们需要定制的sendmail特性

  #cp aix433.mc mysendmail.mc 创建它的一份拷贝

  #vi mysendmail.mc

  divert(0)dnl

  OSTYPE(aix43)dnl

  FEATURE(genericstable)dnl

  FEATURE(mailertable)dnl

  FEATURE(virtusertable)dnl

  FEATURE(domaintable)dnl

  FEATURE(allmasquerade)dnl

  FEATURE(promiscuous_relay)dnl

  FEATURE(accept_unresolvable_domains)dnl

  FEATURE(accept_unqualifIEd_senders)dnl

  DOMAIN(generic)dnl

  MAILER(local)dnl

  MAILER(smtp)dnl

  MAILER(uucp)

  编辑修改后如下:

  #more mysendmail.mc

  --------------------------------------------

  divert(0)dnl

  OSTYPE(aix433)dnl

  FEATURE(allmasquerade)dnl

  DOMAIN(generic)dnl

  MAILER(local)dnl

  MAILER(smtp)dnl

  MAILER(uucp)

  --------------------------------------------


【版权声明】
本站部分内容来源于互联网,本站不拥有所有权,不承担相关法律责任。如果发现本站有侵权的内容,欢迎发送邮件至masing@13sy.com 举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。

相关内容

将IIS设置克隆到新服务器...
将IIS设置克隆到新服务器的最佳方法是使用IIS配置文件。以下是详...
2025-06-06
网页保护、网页图片保护
1、禁止另存网页,把如下代码加入到网页body/body中 程序代...
2025-05-30
搭建Git服务器及本机克隆...
Git是什么?Git是目前世界上最先进的分布式版本控制系统。SVN...
2025-03-17
ubuntu环境下搭建gi...
操作环境:服务器:Ubuntu 24.04.2 LTS+git 2...
2025-03-17
docker-compos...
1.Compose介绍 DockerCompose是一个用来定义和...
2024-04-26
firewall-cmd ...
firewalld的简要说明:firewalld 、firewal...
2024-03-15

热门资讯

Discus X论坛配置sen... Discuz x2.5 后台邮件设置方法其实和X2/x1.5基本一样,但很多同学都不注意一些细节,比...
redhat Linux系统配... 1 .检查Send Mail 的安装包 [root@sql root]# rpm -qa | gre...
使用Sendmail的反垃圾邮... 在最近几年,无处不在的垃圾邮件已使得所有邮件箱不堪重负,不断地需要工具以抗击这一无穷尽的垃圾邮件流。...