有用的资料在 Linux mail 命令

http://www.cnblogs.com/JemBai/archive/2012/01/24/2329136.html

还有这里 Linux系统下mail命令使用

http://www.php100.com/html/webkaifa/Linux/2009/0315/6309.html  (介绍的挺详细的)

可是上面的链接都没有说是怎么打开邮件代发服务的。所以在很大程度上,不是一个傻瓜教程。

针对我的系统 linuxmint 13 , ubuntu 12.04 的衍生版,我准备采用这种方法

一般准备开始使用的时候会遇到下面这样的问题

发现不在/usr/lib/sendmail 下面,那么用命令

find / -name sendmail -print

搜索了下,原来在 /usr/sbin/sendmail 中 (linuxmint 13)

于是直接调用

结果还出现请安装MTA

于是在软件源里面又搜索了下MTA

搜索了一下,大致了解了一下MTA的意思, mail transport agent

然后又google一下,觉得大家会有多种MTA解决方案。比较常见的有postfix

然后看了下postfix的具体内容

alex@universe / $ apt-cache show postfix
Package: postfix
Priority: optional
Section: mail
Installed-Size:
Maintainer: LaMont Jones <lamont@debian.org>
Architecture: amd64
Version: 2.9.-~12.04.
Replaces: mail-transport-agent
Provides: default-mta, mail-transport-agent
Depends: libc6 (>= 2.14), libdb5., libsasl2- (>= 2.1.), libsqlite3- (>= 3.5.), libssl1.0.0 (>= 1.0.), debconf (>= 0.5) | debconf-2.0, netbase, adduser (>= 3.48), dpkg (>= 1.8.), lsb-base (>= 3.0-), ssl-cert, cpio
Recommends: python
Suggests: procmail, postfix-mysql, postfix-pgsql, postfix-ldap, postfix-pcre, sasl2-bin, libsasl2-modules, dovecot-common, resolvconf, postfix-cdb, mail-reader, ufw, postfix-doc
Conflicts: libnss-db (<< 2.2-), mail-transport-agent, smail
Filename: pool/main/p/postfix/postfix_2.9.6-~12.04.1_amd64.deb
Size:
MD5sum: b0f7d4d22db0931a3004aaaff0ba6804
SHA1: 9f5e22ece0f39eae298b535ff0a7d390a75401c1
SHA256: 0bbbe26a6298e282d948d61b71661014e9915cba3ccf3717e0a41e97f7441436
Description-en: High-performance mail transport agent
Postfix is Wietse Venema's mail transport agent that started life as an
alternative to the widely-used Sendmail program. Postfix attempts to
be fast, easy to administer, and secure, while at the same time being
sendmail compatible enough to not upset existing users. Thus, the outside
has a sendmail-ish flavor, but the inside is completely different.
Homepage: http://www.postfix.org
Description-md5: 98656fbf1bb45b53edd367037a2e5a90
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: mail-server Package: postfix
Priority: optional
Section: mail
Installed-Size:
Maintainer: LaMont Jones <lamont@debian.org>
Architecture: amd64
Version: 2.9.-
Replaces: mail-transport-agent
Provides: default-mta, mail-transport-agent
Depends: libc6 (>= 2.14), libdb5., libsasl2-, libsqlite3- (>= 3.5.), libssl1.0.0 (>= 1.0.), debconf (>= 0.5) | debconf-2.0, netbase, adduser (>= 3.48), dpkg (>= 1.8.), lsb-base (>= 3.0-), ssl-cert, cpio
Recommends: python
Suggests: procmail, postfix-mysql, postfix-pgsql, postfix-ldap, postfix-pcre, sasl2-bin, libsasl2-modules, dovecot-common, resolvconf, postfix-cdb, mail-reader, ufw
Conflicts: libnss-db (<< 2.2-), mail-transport-agent, smail
Filename: pool/main/p/postfix/postfix_2.9.1-4_amd64.deb
Size:
MD5sum: e86312470d009f8001983a62c718c81d
SHA1: af26fc8133a5f1fdb357a1b923c5bee7c5f0a3cc
SHA256: 5bd0b17affa241e5c620f95629136d3dfd319553f4c3cb74fa83e598c9e87e43
Description-en: High-performance mail transport agent
Postfix is Wietse Venema's mail transport agent that started life as an
alternative to the widely-used Sendmail program. Postfix attempts to
be fast, easy to administer, and secure, while at the same time being
sendmail compatible enough to not upset existing users. Thus, the outside
has a sendmail-ish flavor, but the inside is completely different.
Homepage: http://www.postfix.org
Description-md5: 98656fbf1bb45b53edd367037a2e5a90
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y

然后,准备安装postfix

sudo apt-get install postfix

会遇见下面的一个configuration of postfix

我们一般选择Internet site 就好了。

然后再选择

然后系统就开始自动安装了。

最后在系统安装信息的末尾,你能看到这个:

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
 * Stopping Postfix Mail Transport Agent postfix                         [ OK ]
 * Starting Postfix Mail Transport Agent postfix                         [ OK ]
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

上面说明MTA postfix服务已经在运行了

然后简单的,给本地用户发送一条mail,测试一下效果,采用方法如下:

看到

这时候再看看邮件内容是啥:

很好一目了然。是这样的邮件。

分析: 如果在发送邮件的时候,我们多加一些邮件选项,比如说Cc Bcc Forward Reply 等等,或者直接发送HTML代码格式的邮件,这样将更有说服力。

好了,上面的邮件发送只是本地邮件发送,我们现在需要来真格的,要看看在线发送到Internet的邮件服务!

这个先留下一会儿,我先去睡个觉。。

——————————————————分割线 07:03 A.M. 1st Augest————————————————————————

linux 原生系统发送电子邮件 (在本地与因特网)的更多相关文章

  1. linux通过使用mail发送电子邮件

    通过外部方法发送的电子邮件 bin/mail默认为本地sendmail发送电子邮件,求本地的机器必须安装和启动Sendmail服务.配置很麻烦,并且会带来不必要的 资源占用.而通过改动配置文件能够使用 ...

  2. 孤荷凌寒自学python第六十一天在Fedora28版的linux系统上找搭建本地Mongodb数据服务

    孤荷凌寒自学python第六十一天在Fedora28版的linux系统上找搭建本地Mongodb数据服务 (完整学习过程屏幕记录视频地址在文末) 今天是学习mongoDB数据库的第七天.成功在本地搭建 ...

  3. 使用php发送电子邮件(phpmailer)

    在项目开发过程中,经常会用到通过程序发送电子邮件,例如:注册用户通过邮件激活,通过邮件找回密码,发送报表等.这里介绍几种通过PHP发送电子邮件的 方式(1)通过mail()函数发送邮件(2)使用fso ...

  4. Linux常用系统函数

    Linux常用系统函数 一.进程控制 fork 创建一个新进程clone 按指定条件创建子进程execve 运行可执行文件exit 中止进程_exit 立即中止当前进程getdtablesize 进程 ...

  5. Servlet 发送电子邮件

    使用 Servlet 发送一封电子邮件是很简单的,但首先您必须在您的计算机上安装 JavaMail API 和 Java Activation Framework)JAF). 您可以从 Java 网站 ...

  6. 《Linux/UNIX系统编程手册》第56章 SOCKET:介绍

    关键词: 1. socket基础 一个典型的客户端/服务器场景中,应用程序使用socket进行通信的方式如下: 各个应用程序创建一个socket.socket是一个允许通信的设备,两个应用程序都需要用 ...

  7. 【转帖】Linux 内核系统架构

    Linux 内核系统架构   描述Linux内核的文章已经有上亿字了 但是对于初学者,还是应该多学习多看,毕竟上亿字不能一下子就明白的. 即使看了所有的Linux 内核文章,估计也还不是很明白,这时候 ...

  8. linux下系统对于sigsegv错误时的处理

    一般来讲,对非法地址的访问会导致应用程序收到由系统发送的sigsegv信号,默认情况下,函数对于这个信号的处理是退出. 但是为了方便调试,我们可以自己设置处理函数,使用signal函数. 这里比较重要 ...

  9. Windows与Linux/Mac系统时间不一致的解决方法

    Windows与Linux/Mac系统时间不一致的解决方法 分类: linux2012-02-12 14:25 1691人阅读 评论(1) 收藏 举报 windowsubuntusystemlinux ...

随机推荐

  1. The Swift Programming Language-官方教程精译Swift(7)函数 -- Functions

    函数 函数是执行特定任务的代码自包含块.通过给定一个函数名称标识它是什么,并在需要的时候使用该名称来调用函数以执行任务. Swift的统一的功能语法足够灵活的,可表达任何东西,无论是不带参数名称的简单 ...

  2. 复习一下SpringMVC的工作原理

    上面的是springMVC的工作原理图: 1.客户端发出一个http请求给web服务器,web服务器对http请求进行解析,如果匹配DispatcherServlet的请求映射路径(在web.xml中 ...

  3. sqlserver大容量日志文件处理

    原文:sqlserver大容量日志文件处理 针对SqlServer2000 .SqlServer2005.SqlServer2008.SqlServer2012.SqlServer2014库日志文件优 ...

  4. 在OpenWrt上编写自己的硬件操作程序

    上一篇文章中有写到如何使用OPENWRT的SDK,这里继续,写怎么在上面开发自己的应用程序. 我欲在OpenWrt上编写一个软件,它能够去读取某个AD芯片的多通道采样值. 在看这篇文章之前请看这官方的 ...

  5. Ruby on Rails (ROR)类书籍

    Ruby on Rails (ROR)类书籍下载地址及其他(整理) Ruby on Rails 如此之热,忍不住也去看了看热闹,现在把一些相关的电子图书下载地址整理下,方便有兴趣的朋友. 2006-0 ...

  6. SQL Server 数据库定时自动备份

    原文:SQL Server 数据库定时自动备份 SQL Server 数据库定时自动备份——每天定时备份,保留前8天的备份 利用SQL Server代理新建作业来定期备份 1)在数据库库的[SQL S ...

  7. leetcode[87] Partition List

    题目:给定一个链表和一个数x,将链表中比x小的放在前面,其他的放在后头.例如: Given 1->4->3->2->5->2 and x = 3,return 1-> ...

  8. 通过改变viewport 实现网站自适应

    var phoneWidth = parseInt(window.screen.width); var phoneScale = phoneWidth/640; var userAgent = nav ...

  9. Windows注册表的基本知识及应用

    转帖:Windows注册表的基本知识及应用 2009-12-23 11:30:56 分类: Windows注册表的基本知识及应用  一.注册表的重要性 在DOS年代,对计算机的内存管理及系统配置主要通 ...

  10. DHTML【3】--HTML

    从这一节开始我们就开始介绍HTML的标签了,首先我们来介绍Form标签. Form标签也称Form表单,From是与服务器交互最重要的标签,此标签必须做到随手就写,写完就正常运行的地步. 那么什么是F ...