venerdì, maggio 10, 2013

Configurare MUTT su linux (debian/ubuntu based)

Necessario: MUTT e SSMTP

# apt-get install mutt ssmtp

Configurazione per GMAIL:

Editare il file "ssmtp.conf" in /etc/ssmtp/ssmtp.conf in questo modo:

Per GMAIL
root=miamail@gmail.com
mailhub=smtp.gmail.com:465
UseTLS=YES
hostname=nomeserver
FromLineOverride=YES

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

Per altro gestore, ad es ARUBA
#root=
mailhub=smtp.aruba.it:25
#rewriteDomain=
#hostname=
UseSTARTTLS=NO
AuthUser=utente
AuthPass=password
FromLineOverride=YES

Creare nella directory utente (in questo caso root /root) il file ".muttrc" ed inserire:

Per GMAIL con IMAP
set imap_user = "vostra_email@gmail.com"
set imap_pass = "vostra_password"
set from = "vostra_email@gmail.com"
set realname = "vostro_nome"
set sendmail = "/usr/sbin/ssmtp -fvostro_nome -au vostra_email@gmail.com -ap vostra_password"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed="+[Gmail]/Drafts"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set sort = 'threads'
set sort_aux = 'last-date-received'
set imap_check_subscribed
set move = no

ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc

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

Per altro gestore, ad es ARUBA
# Purge deleted message without confirm.
set delete=yes

# Don't move read message to mbox and don't ask for it!
set move=no

# Set a customized "From: " header.
my_hdr From: Pippo<info@pippo.it>

# Mailbox format should be autodetected.
#set mbox_type=Maildir

# Specifies the default location of local mailboxes.
# Default is "~/Mail".
set folder=~/Maildir

# Append sent messages to "Sent", mbox or Maildir format will
# be autodetected. The "+" sign means relative to the $folder
# directory.
set record=+Sent

# Where to store postponed messages (instead of ~/postpone).
set postponed=+Postponed

# Choose which header to hide/show, and their order.
ignore *
unignore  from: date: subject: to: cc:
hdr_order from: date: subject: to: cc:

# Select the text editor.
set editor="/usr/bin/nano -r 65"

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

Per inviare mail da terminale:
# echo "prova invio mail" | mutt -s "soggetto messaggio" destinatario@mail.com

Server DNS: come crearlo nella propria LAN locale

Ho dovuto realizzare un server DNS locale per risolvere tutti quei domini interni alla mia rete LAN perché mi sono rotto le palle che su un ...