免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2829 | 回复: 2
打印 上一主题 下一主题

[安装配置] aix unix 6.1 上配置sendmail 邮件服务器问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-03-06 14:15 |只看该作者 |倒序浏览
各位大神,本人对sendmail的配置不是很清楚,也查询了一些相关资料,还是没弄明白sendmail的配置工作,
现在我需要实现程序调用sendmail 向外发送邮件,不需要接收。但是我直接用命令模式向外部邮箱发送邮件都失败了,其中的配置不是很清楚,望指点一下。
如:#mail -s "test" aaa@sys.com

像sendmail.cf这类的配置文件,以及DNS服务器的配置工作,这些能跟我详细解答一下吗?向外部邮箱发邮件,应该要配置外部邮件服务器的地址吧?这些配置流程能告诉下我吗?
谢谢。。。

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-10-08 06:20:00
2 [报告]
发表于 2012-03-06 15:01 |只看该作者
Reference http://www.deer-run.com/~hal/sysadmin/sendmail.html

Local Sendmail Configuration

We still need to make sure that each system has an appropriate Sendmail configuration file, however, so that users and processes on the machine can send out email from the host. Generally our email "client" type machines will want to simply relay all outgoing email to some local mail server for processing and routing. This is exactly what the standard "nullclient" configuration is designed to do:
        include(`cf/m4/cf.m4')
        define(`__OSTYPE__',`')
        FEATURE(`nullclient', `mailhost')
The second argument to FEATURE(`nullclient') is the name (or IP address) of the mail server outgoing email should be relayed to. Obviously, you will need to change this hostname to something appropriate for your site.

The other two lines in this configuration also deserve a little explanation. The cf.m4 file contains all of the macro definitions which expand items like FEATURE(`nullclient') into the actual Sendmail configuration language that is used in the sendmail.cf file. The cf.m4 file is found in the Sendmail source distribution under the cf/m4 subdirectory-- be sure to replace the pathname in the first line above with the correct pathname to the cf.m4 file on your system.

The second line defines the OSTYPE macro to be the empty string. Normally, OSTYPE would be set to a string that indicates what OS platform the config file would be used on, and controls various OS-specific parameters (file locations, command line arguments, et al). However, for a simple nullclient configuration, none of that OS-specific information is important so we can just generate a completely generic configuration file that will work on any OS platform simply by setting OSTYPE to null.

In order to generate a Sendmail configuration file for your system from the above macros, simply type the above three lines into a text file taking care to preserve the balanced left and right quotes and making the appropriate changes on the first and third lines for your local environment. Assuming the new file name is nullclient.mc, you can generate a sendmail.cf file with the following command:

        m4 nullclient.mc > sendmail.cf
Install the resulting sendmail.cf file in the appropriate location on your system (usually /etc/mail/sendmail.cf, but sometimes just /etc/sendmail.cf).

论坛徽章:
0
3 [报告]
发表于 2012-03-06 23:44 |只看该作者
楼上的方法,我查资料也查到过,但是不知道配置的基本步骤,过程,只需要配置邮件服务器DNS,能向外发送邮件即可。请高手指点啊。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP