From: gobo72 Date: Thu, 6 Sep 2012 03:35:42 +0000 (+0000) Subject: Ajout msmtp et fichiers de configuration de mutt. X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=0fc5131983e80de7e1e6abf98c8430736f4c9c16;p=hvlinux.git Ajout msmtp et fichiers de configuration de mutt. --- diff --git a/config/dependencies b/config/dependencies index 7ca0968..a3bca56 100644 --- a/config/dependencies +++ b/config/dependencies @@ -118,7 +118,7 @@ ${SENDMAIL}: ${KERBEROS5} # MTA = ${SENDMAIL} or ${SSMTP} ${GNUPG}: ${OPENLDAP} ${LIBUSB_COMPAT} ${MTA} -${MUTT}: ${GNUPG} ${OPENSSL} ${MTA} ${KERBEROS5} ${SASL2} +${MUTT}: ${GNUPG} ${OPENSSL} ${MTA} ${KERBEROS5} ${SASL2} ${MSMTP} ${TRASMISSION}: ${LIBEVENT} diff --git a/config/packages-list b/config/packages-list index 71cf75f..53b7027 100644 --- a/config/packages-list +++ b/config/packages-list @@ -246,6 +246,7 @@ MOC="moc-2.4.4" KMOD="kmod-8" MPC="mpc-0.9" MPFR="mpfr-3.1.0" +MSMTP="msmtp-1.4.29" MUTT="mutt-1.5.21" MYSQL="mysql-5.5.17" @@ -334,7 +335,6 @@ SPLINT="splint-3.1.1" SPLIX="splix-2.0.0" SQLITE="sqlite-autoconf-3071100" SQUIRRELMAIL="squirrelmail-1.5.1" -SSMTP="ssmtp-2.64" STARTUP_NOTIFICATION="startup-notification-0.9" STRACE="strace-4.6" SUBVERSION="subversion-1.7.5" diff --git a/stage3/hv-install-1 b/stage3/hv-install-1 index 416b794..eb8620f 100755 --- a/stage3/hv-install-1 +++ b/stage3/hv-install-1 @@ -145,11 +145,11 @@ ipkg -s "krb5" ${KERBEROS5} if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then ipkg -m noac ${SENDMAIL} else - ipkg -m acnb ${SSMTP} "--enable-ssl" + ipkg ${MSMTP} fi ipkg ${GNUPG} "--libexecdir=/usr/lib" -ipkg ${MUTT} "--enable-imap --with-ssl --with-sasl" +ipkg ${MUTT} "--enable-imap --with-ssl --with-sasl --enable-hcache" # Audio if [ "x${INST_TYPE}" = "xworkstation" -o "x${INST_TYPE}" = "xltsp-server" ]; then diff --git a/stage3/misc/mutt/account1 b/stage3/misc/mutt/account1 new file mode 100644 index 0000000..dae142d --- /dev/null +++ b/stage3/misc/mutt/account1 @@ -0,0 +1,14 @@ +# -*- muttrc -*- rc file for mutt + +# Hawkhost account + +set from="myname@mydonain.com" +set realname='My Name' +set hostname="mydomain.com" + +set folder="imaps://jupiter.arandomserver.com/INBOX" +set imap_user="myusername" +set imap_pass="xxxxxxxx" +set spoolfile="=myname@mydomain_com" +set postponed="=Drafts" +set record ="=Sent" diff --git a/stage3/misc/mutt/account2 b/stage3/misc/mutt/account2 new file mode 100644 index 0000000..f394d9b --- /dev/null +++ b/stage3/misc/mutt/account2 @@ -0,0 +1,14 @@ +# -*- muttrc -*- rc file for mutt + +# Microsoft Online 365 account + +set from="myname@mydonain.com" +set realname='My Name' +set hostname="mydomain.com" + +set folder="imaps://pod51011.outlook.com" +set imap_user="myemailaddress" +set imap_pass="xxxxxxxx" +set spoolfile="=INBOX" +set postponed="=Drafts" +set record="=Sent Items" diff --git a/stage3/misc/mutt/certificates b/stage3/misc/mutt/certificates new file mode 100644 index 0000000..e69de29 diff --git a/stage3/misc/mutt/muttrc b/stage3/misc/mutt/muttrc new file mode 100644 index 0000000..a4ffba5 --- /dev/null +++ b/stage3/misc/mutt/muttrc @@ -0,0 +1,107 @@ +# -*- muttrc -*- Mutt configuration file + +folder-hook 'account1.com' 'source ~/.mutt/account1' +folder-hook 'account2.com' 'source ~/.mutt/account2' +# switch to default account on startup +source ~/.mutt/account1 + +macro index 'source ~/.mutt/account1!' +macro index 'source ~/.mutt/account2!' + +set sendmail="/usr/bin/msmtp --tls-certcheck=off" +set use_envelope_from=yes + +# Don't wait to enter mailbox manually +#unset imap_passive +# Automatically poll subscribed mailboxes for new mail (new in 1.5.11) +set imap_check_subscribed +# Reduce polling frequency to a sane level +set mail_check=60 +# And poll the current mailbox more often (not needed with IDLE in post 1.5.11) +set timeout=10 + +# Cache headers of messages so they need to be downloaded just once. +# This greatly improves speed when opening folders again later. +set header_cache = "~/.mutt/cache" + +# Locally cache messages +set message_cachedir = "~/.mutt/cache" + +set certificate_file="~/.mutt/certificates" + +# Display download progress every 5K +set net_inc=5 + +set beep_new # beep on new messages in the mailboxes + +folder-hook . "push \"l!(~s 'FOLDER INTERNAL DATA')\n*\"" + +set smart_wrap = yes +set sort = 'threads' +set sort_aux = 'last-date-received' + +set pager_index_lines=5 #You might want to increase this +set pager_context=1 +set index_format='%4C %Z %{%b %d} %-15.15F (%4l) %s' + +set include=yes # Quote message, when replying +set delete=yes # Purge deleted messages without asking + +# Ignore most headers. +ignore headers * +unignore headers from: to: subject: date: cc: + +# Now order the visable header lines +unhdr_order * +hdr_order Date: From: To: Reply-To: In-Reply-To: CC: Subject: Organization: + +# Macros for SPAM management +macro index S "s=SPAM" +macro pager S "s=SPAM" +macro index H "s=HAM" +macro pager H "s=HAM" + +# Fetch the spam rating as defined by SpamAssassin for spam messages +spam "X-Spam-Status: Yes, score=([0-9]+.[0-9]*)" "Spam [%1]" + +# The important bit there is %?H?%-11.11H&%D? which displays eleven characters +# of the spam rating if it is found, or failing that the date. The reason we +# display exactly eleven characters of the spam value is so that the columns +# line up correctly regardless of whether we display a date or a spam value. +set index_format="%Z %?H?%-11.11H&%-11.11{%b %d}? %-20.20L %s" + +color hdrdefault red black # Headers +color header brightmagenta black "^date:" +color header brightyellow black "^from:" +color header brightgreen black "^to:" +color header brightgreen black "^cc:" +color header brightcyan black "^subject:" + +color signature brightmagenta black +color attachment brightmagenta black +color error brightwhite red # Errors yell at you in red +color indicator brightyellow blue # Currently selected message +color index brightgreen black ~N # New messages +color normal green black # Plain text + +# Coloring quoted text - coloring the first 7 levels: +color quoted cyan black +color quoted1 yellow black +color quoted2 red black +color quoted3 green black +color quoted4 cyan black +color quoted5 yellow black +color quoted6 red black +color quoted7 green black + +# Highlights inside the body of a message. + +# URLs +color body brightblue black "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +color body brightblue black "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" +mono body bold "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*" +mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+" + +# email addresses +color body brightblue black "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" +mono body bold "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+" diff --git a/stage3/packages-update b/stage3/packages-update index 7687880..9ba68ba 100755 --- a/stage3/packages-update +++ b/stage3/packages-update @@ -134,7 +134,7 @@ if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then fpkg -e "tar.gz" -f "sendmail.$(get_pkg_ver ${SENDMAIL})" ${SENDMAIL} \ "ftp://ftp.sendmail.org/pub/sendmail" else - fpkg -m hv ${SSMTP} + fpkg -m sf -e "tar.bz2" ${MSMTP} fi fpkg -s "gnupg" ${GNUPG} "ftp://ftp.gnupg.org/gcrypt" diff --git a/stage3/pkg/msmtp b/stage3/pkg/msmtp new file mode 100644 index 0000000..55dcd2d --- /dev/null +++ b/stage3/pkg/msmtp @@ -0,0 +1,32 @@ +#!/bin/bash + +hvbuild_post() +{ + cat > /etc/skel/.msmtp << "EOF" +# Global configuration +defaults +tls on +tls_certcheck off + +# Hawk host +account myaccountname1 +from myname@mydomain.com +host myhost.com +tls_starttls off +port 465 +user xxxx +password xxxxxxxx + +# Microsoft Online 365 +account myaccountname2 +from myname@mydomain.com +host pod51011.outlook.com +port 587 +tls_starttls on +auth on +user xxxx +password xxxxxxxx +EOF + + chmod 600 /etc/skel/.msmtp +} diff --git a/stage3/pkg/mutt b/stage3/pkg/mutt new file mode 100644 index 0000000..ad90176 --- /dev/null +++ b/stage3/pkg/mutt @@ -0,0 +1,9 @@ +#!/bin/bash + +hvbuild_post() +{ + install -v -m700 -d /etc/skel/.mutt + install -v -m700 -d /etc/skel/.mutt/cache + install -v -m600 ${SCRDIR}/misc/mutt/{certificates,muttrc,account{1,2}} \ + /etc/skel/.mutt +} diff --git a/stage3/pkg/ssmtp b/stage3/pkg/ssmtp deleted file mode 100644 index d973fa4..0000000 --- a/stage3/pkg/ssmtp +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -hvconfig_pre() -{ - sed -e "s!read\ mailname!mailname=${DOMAIN}!" -i ${LFS_TMP}/${PACKAGE}/generate_config - sed -e "s!read\ smtpport!smtpport=25!" -i ${LFS_TMP}/${PACKAGE}/generate_config -}