Mutt ist dafür bekannt, ein schneller und hochgradig konfigurierbarer E-Mail-Client zu sein, und da er textbasiert ist, ist er ideal, um E-Mails schnell über SSH zu überprüfen.
Mutt installieren
mutt kann wie folgt mit dem Dienstprogramm yum installiert werden.
# yum install mutt .... Dependencies Resolved ======================================================================================================================================================================================================== Package Arch Version Repository Size ======================================================================================================================================================================================================== Installing: mutt x86_64 5:1.5.21-27.el7 base 1.4 M Installing for dependencies: mailcap noarch 2.1.41-2.el7 base 31 k tokyocabinet x86_64 1.4.48-3.el7 base 459 k urlview x86_64 0.9-15.20121210git6cfcad.el7 base 27 k Transaction Summary ======================================================================================================================================================================================================== Install 1 Package (+3 Dependent packages) Total download size: 1.9 M Installed size: 7.3 M Is this ok [y/d/N]: y
Mutt konfigurieren
1. Die Konfigurationsdatei für Mutt befindet sich im Home-Verzeichnis jedes Benutzers als ~/.muttrc . Nachfolgend finden Sie eine Beispielkonfiguration für die .muttrc-Datei. Das ist alles, was Sie brauchen, um Mutt zum Laufen zu bringen.
# vi ~/.muttrc # About Me set from = "[email protected]" set realname = "Firstname Lastname" # My credentials set smtp_url = "smtp://[email protected]@smtp.domain.com:587/" set smtp_pass = "password" set imap_user = "[email protected]" set imap_pass = "password" # My mailboxes set folder = "imaps://imap.domain.com:993" set spoolfile = "+INBOX" # Where to put the stuff set header_cache = "~/.mutt/cache/headers" set message_cachedir = "~/.mutt/cache/bodies" set certificate_file = "~/.mutt/certificates" # Etc set mail_check = 30 set move = no set imap_keepalive = 900 set sort = threads set editor = "vim" # GnuPG bootstrap # source ~/.mutt/gpg.rc
2. Erstellen Sie nach Abschluss der Konfiguration das Cache-Verzeichnis.
# mkdir -p ~/.mutt/cache
Bestätigen
Um zu überprüfen, ob alles richtig eingerichtet ist, senden Sie eine Test-E-Mail vom Server.
# echo "" | mutt -s "subject" -i body.txt -a attachment.txt [email protected]
-s used to specify subject of mail. -i used to specify file containing message body. -a used to specify attachment file.
Einige andere häufig verwendete Optionen mit Mutt sind:
-b used to add Bcc address. -c used to add Cc address. -e if you want to specify sender's address (something other than default).Linux / UNIX :E-Mails mit Anhängen mit mutt senden
Linux / UNIX :E-Mails mit Anhängen mit dem Befehl mailx senden
E-Mails mit Anhängen mit dem Solaris-Befehl mailx senden