I have an EC2 instance using Ubuntu 14.04 which is where I want to send email from.
I tested it by sending an email:echo "This is the body of the email" | mail -s "This is the subject line " myemailid@gmail.com
But it gave me an error:
Segmentation fault (core dumped)
I checked
/var/log/syslog
and found this:Sep 25 09:26:47 my-server-hostname kernel: [321695.640722] mail[7863]: segfault at c0 ip 00007f58c4d5318e sp 00007ffdfc146f90 error 4 in libmailutils.so.4.0.0[7f58c4ccf000+a9000]
What should i do to fix this?
I don’t know if this is relevant to this question, but I used a dynamic DNS address from duckdns and during the postfix setup,
I entered
"mydomainname.duckdns.org"
in the'System mail name'
field.
Answer
First of all, your error messages show the segmentation fault is not happening in Postfix, but in the mail
command, more precisely in the shared library libmailutils.so
which it uses.
Normally a segmentation fault indicates a software bug and the next step would be either to report the problem to the program author or to run the program in a debugger to find out exactly where the fault is happening. But the mail
program is so widely used that such a bug seems improbable, and I’d rather suspect a damaged binary file.
Consequently, as a first step I’d recommend to reinstall both the mail
command and the libmailutils.so
shared library to see if the error goes away. Also check if the system is current on updates.
Attribution
Source : Link , Question Author : Guest1997 , Answer Author : Tilman Schmidt