特殊:Badtitle/NS100:Mutt:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/mutt}} {{Languages|UbuntuHelp:mutt}} == Introduction == '''Mutt''' is a small but very powerful text-based mail client for Unix operating syst... |
小无编辑摘要 |
||
(未显示同一用户的6个中间版本) | |||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/mutt}} | {{From|https://help.ubuntu.com/community/mutt}} | ||
{{Languages|UbuntuHelp:mutt}} | {{Languages|UbuntuHelp:mutt}} | ||
== Introduction == | == Introduction == | ||
'''Mutt''' is a small but very powerful text-based mail client for Unix operating systems. It is great for testing mail server setups and sending email messages via the command line. | '''Mutt''' is a small but very powerful text-based mail client for Unix operating systems. It is great for testing mail server setups and sending email messages via the command line. | ||
== Installation == | == Installation == | ||
Mutt has '''mail-transport-agent''' as a dependency which means if you don't have a Mail Transport Agent installed on your system and you install Mutt an MTA will also be installed, [[UbuntuHelp:Postfix|Postfix]] being the default. If you want to install a different MTA than Postfix, [[UbuntuHelp:Exim4|Exim4]] for example, you will need to install the package before installing Mutt. | |||
Mutt has '''mail-transport-agent''' as a dependency which means if you don't have a Mail Transport Agent installed on your system and you install Mutt an MTA will also be installed, [[UbuntuHelp:Postfix]] being the default. If you want to install a different MTA than Postfix, [[UbuntuHelp:Exim4]] for example, you will need to install the package before installing Mutt. | |||
If you don't need a full fledged and feature full MTA, but want to send messages using Mutt a good substitute is the '''ssmtp''' package in the Universe repository. | If you don't need a full fledged and feature full MTA, but want to send messages using Mutt a good substitute is the '''ssmtp''' package in the Universe repository. | ||
'''SSMTP''' can be configured to send mail to a proper MTA or mail hub. | '''SSMTP''' can be configured to send mail to a proper MTA or mail hub. | ||
'''Mutt''' can be installed from the Main repository see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]] for details. | |||
'''Mutt''' can be installed from the Main repository see InstallingSoftware for details. | |||
== Sending Messages Via CLI == | == Sending Messages Via CLI == | ||
Once you have Mutt and a MTA installed sending messages via command line or bash script is simple. | Once you have Mutt and a MTA installed sending messages via command line or bash script is simple. | ||
For example: | For example: | ||
<pre><nowiki> | <pre><nowiki> | ||
echo "Test" | mutt -s Hello [email protected] | echo "Test" | mutt -s Hello [email protected] | ||
</nowiki></pre> | </nowiki></pre> | ||
The above command will send a message to ''[email protected]'' with the subject of "Hello" '''(the -s)''' and the word "Test" in the message body. | The above command will send a message to ''[email protected]'' with the subject of "Hello" '''(the -s)''' and the word "Test" in the message body. | ||
== SSMTP configuration == | == SSMTP configuration == | ||
This section will provide instructions on using the '''ssmtp''' package to deliver mail to another MTA. | This section will provide instructions on using the '''ssmtp''' package to deliver mail to another MTA. | ||
The SSMTP configuration file is <code><nowiki>/etc/ssmtp/ssmtp.conf</nowiki></code> edit the following options: | The SSMTP configuration file is <code><nowiki>/etc/ssmtp/ssmtp.conf</nowiki></code> edit the following options: | ||
<pre><nowiki> | <pre><nowiki> | ||
mailhub=mta.example.com | mailhub=mta.example.com | ||
hostname=your_local_machine | hostname=your_local_machine | ||
</nowiki></pre> | </nowiki></pre> | ||
That should do it, just make sure that you are allowed to relay messages through the host configured in the '''mailhub''' option. | That should do it, just make sure that you are allowed to relay messages through the host configured in the '''mailhub''' option. | ||
=== SSMTP with SMTP AUTH === | === SSMTP with SMTP AUTH === | ||
Here are some options you can configure if the '''mailhub''' you are using requires authentication in order to relay messages: | Here are some options you can configure if the '''mailhub''' you are using requires authentication in order to relay messages: | ||
<pre><nowiki> | <pre><nowiki> | ||
AuthUser=username | AuthUser=username | ||
第52行: | 第31行: | ||
UseSTARTTLS=YES | UseSTARTTLS=YES | ||
</nowiki></pre> | </nowiki></pre> | ||
You may not need the ''UseTLS'' and ''UseSTARTTLS'' options. Use these options to configure TLS encryption with the MTA (usually a good idea). | You may not need the ''UseTLS'' and ''UseSTARTTLS'' options. Use these options to configure TLS encryption with the MTA (usually a good idea). | ||
'''Note:''' this guide has been tested on Ubuntu 6.06 (Dapper), Ubuntu 7.06 (Feisty), and Ubuntu 7.10 (Gutsy). | '''Note:''' this guide has been tested on Ubuntu 6.06 (Dapper), Ubuntu 7.06 (Feisty), and Ubuntu 7.10 (Gutsy). | ||
---- | ---- | ||
[[category: | [[category:CategoryEmail]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2008年10月19日 (日) 23:54的最新版本
![]() |
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/mutt }} |
![]() |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/af | • {{#if: UbuntuHelp:mutt|Afrikaans| [[::Mutt/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/ar | • {{#if: UbuntuHelp:mutt|العربية| [[::Mutt/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/az | • {{#if: UbuntuHelp:mutt|azərbaycanca| [[::Mutt/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/bcc | • {{#if: UbuntuHelp:mutt|جهلسری بلوچی| [[::Mutt/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/bg | • {{#if: UbuntuHelp:mutt|български| [[::Mutt/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/br | • {{#if: UbuntuHelp:mutt|brezhoneg| [[::Mutt/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/ca | • {{#if: UbuntuHelp:mutt|català| [[::Mutt/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/cs | • {{#if: UbuntuHelp:mutt|čeština| [[::Mutt/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/de | • {{#if: UbuntuHelp:mutt|Deutsch| [[::Mutt/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/el | • {{#if: UbuntuHelp:mutt|Ελληνικά| [[::Mutt/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/es | • {{#if: UbuntuHelp:mutt|español| [[::Mutt/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/fa | • {{#if: UbuntuHelp:mutt|فارسی| [[::Mutt/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/fi | • {{#if: UbuntuHelp:mutt|suomi| [[::Mutt/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/fr | • {{#if: UbuntuHelp:mutt|français| [[::Mutt/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/gu | • {{#if: UbuntuHelp:mutt|ગુજરાતી| [[::Mutt/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/he | • {{#if: UbuntuHelp:mutt|עברית| [[::Mutt/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/hu | • {{#if: UbuntuHelp:mutt|magyar| [[::Mutt/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/id | • {{#if: UbuntuHelp:mutt|Bahasa Indonesia| [[::Mutt/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/it | • {{#if: UbuntuHelp:mutt|italiano| [[::Mutt/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/ja | • {{#if: UbuntuHelp:mutt|日本語| [[::Mutt/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/ko | • {{#if: UbuntuHelp:mutt|한국어| [[::Mutt/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/ksh | • {{#if: UbuntuHelp:mutt|Ripoarisch| [[::Mutt/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/mr | • {{#if: UbuntuHelp:mutt|मराठी| [[::Mutt/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/ms | • {{#if: UbuntuHelp:mutt|Bahasa Melayu| [[::Mutt/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/nl | • {{#if: UbuntuHelp:mutt|Nederlands| [[::Mutt/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/no | • {{#if: UbuntuHelp:mutt|norsk| [[::Mutt/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/oc | • {{#if: UbuntuHelp:mutt|occitan| [[::Mutt/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/pl | • {{#if: UbuntuHelp:mutt|polski| [[::Mutt/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/pt | • {{#if: UbuntuHelp:mutt|português| [[::Mutt/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/ro | • {{#if: UbuntuHelp:mutt|română| [[::Mutt/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/ru | • {{#if: UbuntuHelp:mutt|русский| [[::Mutt/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/si | • {{#if: UbuntuHelp:mutt|සිංහල| [[::Mutt/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/sq | • {{#if: UbuntuHelp:mutt|shqip| [[::Mutt/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/sr | • {{#if: UbuntuHelp:mutt|српски / srpski| [[::Mutt/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/sv | • {{#if: UbuntuHelp:mutt|svenska| [[::Mutt/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/th | • {{#if: UbuntuHelp:mutt|ไทย| [[::Mutt/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/tr | • {{#if: UbuntuHelp:mutt|Türkçe| [[::Mutt/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/vi | • {{#if: UbuntuHelp:mutt|Tiếng Việt| [[::Mutt/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/yue | • {{#if: UbuntuHelp:mutt|粵語| [[::Mutt/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/zh | • {{#if: UbuntuHelp:mutt|中文| [[::Mutt/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/zh-hans | • {{#if: UbuntuHelp:mutt|中文(简体)| [[::Mutt/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:mutt | UbuntuHelp:mutt | {{#if: | :}}Mutt}}/zh-hant | • {{#if: UbuntuHelp:mutt|中文(繁體)| [[::Mutt/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:mutt|:Mutt|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Mutt/zh | | {{#ifexist: Mutt/zh | | {{#ifeq: {{#titleparts:Mutt|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Mutt|1|-1|}} | zh | | }}
Introduction
Mutt is a small but very powerful text-based mail client for Unix operating systems. It is great for testing mail server setups and sending email messages via the command line.
Installation
Mutt has mail-transport-agent as a dependency which means if you don't have a Mail Transport Agent installed on your system and you install Mutt an MTA will also be installed, Postfix being the default. If you want to install a different MTA than Postfix, Exim4 for example, you will need to install the package before installing Mutt. If you don't need a full fledged and feature full MTA, but want to send messages using Mutt a good substitute is the ssmtp package in the Universe repository. SSMTP can be configured to send mail to a proper MTA or mail hub. Mutt can be installed from the Main repository see InstallingSoftware for details.
Sending Messages Via CLI
Once you have Mutt and a MTA installed sending messages via command line or bash script is simple. For example:
echo "Test" | mutt -s Hello [email protected]
The above command will send a message to [email protected] with the subject of "Hello" (the -s) and the word "Test" in the message body.
SSMTP configuration
This section will provide instructions on using the ssmtp package to deliver mail to another MTA.
The SSMTP configuration file is /etc/ssmtp/ssmtp.conf
edit the following options:
mailhub=mta.example.com hostname=your_local_machine
That should do it, just make sure that you are allowed to relay messages through the host configured in the mailhub option.
SSMTP with SMTP AUTH
Here are some options you can configure if the mailhub you are using requires authentication in order to relay messages:
AuthUser=username AuthPass=password UseTLS=YES UseSTARTTLS=YES
You may not need the UseTLS and UseSTARTTLS options. Use these options to configure TLS encryption with the MTA (usually a good idea). Note: this guide has been tested on Ubuntu 6.06 (Dapper), Ubuntu 7.06 (Feisty), and Ubuntu 7.10 (Gutsy).