OpenWrt Forum Archive

Topic: mutt is not working with msmtp/ssmtp

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

i am currently using Buffalo WZR-HP-AG300H with OpenWrt Firmware Attitude Adjustment (r27797)

i try to use mutt with msmtp/ssmtp ,and have proper install of mutt
       


root@OpenWrt:~# opkg install mutt
Installing mutt (1.5.21-1) to root...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing libncurses (5.7-5) to root...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Installing terminfo (5.7-5) to root...
Downloading http://downloads.openwrt.org/snapshots/ … ar71xx.ipk.
Configuring terminfo.
Configuring libncurses.
Configuring mutt.
------------

when i try to mail a test email like some this
"mutt -s "ppp0_log" {email acc.}@yahoo.com.hk < /tmp/ppp0.log"

it return a mesage like this whether i am using msmtp or ssmtp(i have already config msmtp and ssmtp with reference in google):

mutt: can't load library 'libncursesw.so.5"

i'm newbies in openwrt/linux, what should i in oder to let my mutt work properly?

thanks.

(Last edited by luckluck on 30 Jul 2011, 13:46)

i install the      libncursesw, then the error message disappear, i originally think that  libncurses is the same as libncursesw

another error occur, i'm using mutt with msmtp setting provided by https://forum.openwrt.org/viewtopic.php?id=18669

account default

host smtp.gmail.com
port 587
auth on
user account@gmail.com
password password

auto_from off
from account@gmail.com

tls on
tls_starttls on
tls_certcheck off

logfile
syslog LOG_MAIL

my muttrc setting as fallow

set sendmail="/usr/bin/msmtp"
set from="hkdfshop@gmail.com"

set use_from=yes 


set rfc2047_parameters=yes

i try to test  mutt by this code

echo "test" | mutt -s "my_first_test" holuck@gmail.com

but error return

Error sending message, child exited 127 (Exec error.).
Could not send the message.

i google the error message but seen i can not find solution in mynewbies level

so frustrated

when i try to execute msmtp to send an email in ssh , it return an error , this may be the reason that give"Error sending message" in mutt

root@OpenWrt:/etc# msmtp holuck@gmail.com
Segmentation fault

i just want to send mails out by openwrt, why it is so difficult to do this? help!!

(Last edited by luckluck on 30 Jul 2011, 18:49)

finally i need to use ssmtp with mutt to do my job , linux enviroment is quit hard for newbies!

Try to narrow your problem down. Can you send an email with just ssmtp?
Don't forget that ssmtp needs a properly configured revaliases file.
That file is located at

/etc/ssmtp/revaliases

heres my file

# sSMTP aliases
#
# Format:    local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:myemailaddress@gmail.com:smtp.gmail.com:587
localusername:myemailaddress@gmail.com:smtp.gmail.com:587
#
#

You'll also need a properly configured ssmtp.conf file located at

/etc/ssmtp/ssmtp.conf

heres my file

#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#
root=myemailaddress@gmail.com
mailhub=smtp.gmail.com:587
hostname=myemailaddress@gmail.com
FromLineOverride=YES
UseSTARTTLS=YES
AuthUser=myemailaddress
AuthPass=myemailpassword
#
#


So, start with making those changes and see if you have ssmtp working, then move on to configuring mutt. But if all you need is the ability to send mail, then ssmtp is all you really need.


To test ssmtp by itself create a file to test with, heres a sample file, lets name it dump


From:myemailaddress@gmail.com
Subject:My subject line

My email body


Note: make sure that there is a blank line between the Subject line and the main body or message.

Then to test do as follows

ssmtp myemailaddress@gmail.com < dump

thank you for your reply , i am using ssmtp with mutt just fine now with your setting advised

i wonder why msmtp gives "Segmentation fault" errror

The discussion might have continued from here.