Score:0

Simple Mailx configuration

cn flag

I find a lot of Unix mail programs' documentations unwieldy because they provide a lot of advanced commands but it is difficult to find basic set-up information.

I would like to check and send email from the command line and am reading about how to set up mailx.

The documentation says:

IMAP or POP3 client setup

As you probably want messages to be deleted from this account after saving them, prefix it with '%:'. The shortcut command can be used to avoid typing that many characters every time you want to connect:

shortcut myisp %:imaps://[email protected]

You might want to put this string into a startup file. As the shortcut command is specific to this implementation of mailx and will confuse other implementations, it should not be used in ~/.mailrc, instead, put set NAIL_EXTRA_RC=~/.nailrc in ~/.mailrc and create a file ~/.nailrc containing the shortcut command above. You can then access your remote mailbox by invoking 'mailx -f myisp' on the command line, or by executing 'fi myisp' within mailx.

I followed these instructions. I notice that so far the configuration file does not contain a password or any other information.

I have mailx installed. I tried to invoke the mailx -f myisp command, which returned No such file or directory.

Why does this not work?

How do I configure mailx to send and read email from Gmail?

I have looked through the documentation and I do not see any configuration instructions apart from "Mailx reads mail from the post office", without explanation of how to create that post office. I have definitely found useful third-party guides which explain to write configuration information in a .mailrc file, but I'm at least curious why this information is not in the mailx man pages and if there are some other man pages I should be reading as preparation for using mailx.

zwets avatar
us flag
Have you already run `mailx` with option `--config-verbose` to verify that it actually picks up the `shortcut` setting? From its output "no such file or directory" it looks like it doesn't. Its man page also mentions a `--debug-level` option that may be useful to diagnose your issue.
John Smith avatar
cn flag
After reading around, I'm probably going to pursue using GNU mailutils and/or s-nail. I looked at these tools' documentation and it seems robust. People are calling mailx "heirloom" software. My best guess is that its documentation isn't up to speed with the modern software environment so it doesn't explain everything a modern user would need to know.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.