0

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.

  • Can you check permissions for /tmp directory. is it publicly writable? – mayur lagad Aug 29 '18 at 22:16
0

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.

| improve this answer | |
  • Reinstalled, still getting the same error – Guest1997 Sep 25 '16 at 11:32
  • Did you reboot the server? Sometimes stale copies of shared libraries remain in memory after an update. – Tilman Schmidt Sep 25 '16 at 11:44
  • Restarted and tried again, still getting a segfault.. – Guest1997 Sep 25 '16 at 11:59
  • Strange. If you have some idea of programming you might try getting a backtrace from the core dump with gdb and/or to run the mail command under strace to get an idea where and why it is dying. Otherwise I fear your only option is to report a bug to Ubuntu. – Tilman Schmidt Sep 25 '16 at 12:14
  • Hmm... i have programming experience,but not with C/C++ and linux....i think i'll just report the bug... – Guest1997 Sep 25 '16 at 12:15
-1

I was facing the same error while switching to root user & this link helped me to address the issue.

Actually there were some changes made to root’s bash profile “/root/.bashrc” and i reverted the changes as mentioned in above link.

| improve this answer | |
  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Gerald Schneider May 12 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.