[SOLVED] How to stop mailx from auto-including original message
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to stop mailx from auto-including original message
I am using mailx on several Linux hosts as my mail client. It works as desired on all but one. On this one, when I reply (r) to an email, it automatically includes the original as if I'd done ~m. Furthermore, the included message has "User Name <users@email.com> wrote:" at the top and all message headers are gone.
I can't figure out what's set where to cause this. Normally I do a 'r' command to reply, then a ~m to include the message and I get the message and all headers, no "so-and-so wrote". Or, it I don't want to include the sender's message, I simply dont' do ~m or ~f. In this case, I have no choice. I am using the same .mailrc file as on the other systems and I see no setting causing that behavior.
I don't know mailx enough but maybe a systemwide mailrc is used?
What you can do is this:
strace -eopen -f -o /tmp/strace.log mailx
After some seconds, quit mailx and see what files get opened by mailx. *Maybe* that gives you an idea what config file is messing with you
HTH
Upuetz
Is that machine using a different distro? See /etc/mail.rc or /etc/mailx.rc, depending on distro, for system-wide defaults.
Also, bear in mind that are a few different mailxes: bsd-mailx, heirloom-mailx and s-nail come to mind. They have different parameters and capabilities. You could check which one your machine is using; maybe ~r isn't doing what you think.
Yes! that was it. Mailx uses /etc/nail.rc. Upuetz, that strace is fantastic. I've never used that before. That will come in handy for lots of stuff.
When I copied the nail.rc from a system that worked the way I wanted it to it worked properly. Unfortunately, In comparing the old and new .rc files, I believe this setting in the old nail.rc was the culprit:
# Automatically quote the text of the message that is responded to.
set quote
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.