Pages

Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Tuesday, October 12, 2010

mutt smtp server support (no local mta)

Suppose you want to use a text-based mail client without having to install and setup a full-fledged mail-transfer agent (mta). Mutt from version 1.5 on, has support for your smtp
server (internet mta) on the internet.

All you need to do is recompile with the extra option --enable-smtp in ./configure.

See the last line of the following command:

# ...
./configure \
  --prefix=/usr \
  --mandir=/usr/man \
  --sysconfdir=/etc/mutt \
  --with-mailpath=/var/spool/mail \
  --enable-pop \
  --enable-imap \
  --with-ssl \
  --enable-locales-fix \
  --without-wc-funcs \
  --build=$ARCH-slackware-linux \
  --enable-smtp # <-- add this extra argument!
# ...
To configure the server you need to create a file called .muttrc in your $HOME and enter the following settings:
#openssl aes-256-cbc -in test.txt -out test.txt.enc # encrypt
#openssl enc -d -aes-256-cbc -in test.txt.enc       # decrypt
#echo "body" | mutt -s "subject" -F muttrc addressee@somewhere.com -a attachment
set smtp_url="smtp://smtp.server.tld"
set realname="Mutt Forevah"
set from="Who-ay-Em Ayemhoo"

Adapt to your smtp server settings accordingly.