Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to enable mailx welcome when opening a new terminal?

I have El Cap. I googled to no avail, but all I see are sites dedicated TO RID yourself of this welcome message, and I would like to enable it. (as I have been using the terminal more and more for work).


How do? Also, does mailx recognise my default email account? I tried sending an email from it, and it was rejected saying google didn't like me doing this. How can I fix this? Or should I use another provider?


Thanks for any input!

MacBook, iOS 10.1

Posted on Nov 9, 2018 3:01 PM

Reply
Question marked as Best reply

Posted on Nov 9, 2018 5:25 PM

Are you talking about the bash shell variables and shopt options? See "man bash"


bash variables


MAIL

If this parameter is set to a file or directory name and

the MAILPATH variable is not set, bash informs the user of

the arrival of mail in the specified file or Maildir-

format directory.


MAILCHECK

Specifies how often (in seconds) bash checks for mail.

The default is 60 seconds. When it is time to check for

mail, the shell does so before displaying the primary

prompt. If this variable is unset, or set to a value

that is not a number greater than or equal to zero, the

shell disables mail checking.


MAILPATH

A colon-separated list of filenames to be checked for mail.

The message to be printed when mail arrives in a

particular file may be specified by separating the filename

from the message with a `?'. When used in the text of the

message, $_ expands to the name of the current mailfile.

Example: MAILPATH='/var/mail/bfox?"You have

mail":~/shell-mail?"$_ has mail!"' Bash supplies a

default value for this variable, but the location of the

user mail files that it uses is system dependent (e.g.,

/var/mail/$USER).


shopt option


mailwarn

If set, and a file that bash is checking for mail has been

accessed since the last time it was checked, the message

``The mail in mailfile has been read'' is displayed.

3 replies
Question marked as Best reply

Nov 9, 2018 5:25 PM in response to Peugeot208

Are you talking about the bash shell variables and shopt options? See "man bash"


bash variables


MAIL

If this parameter is set to a file or directory name and

the MAILPATH variable is not set, bash informs the user of

the arrival of mail in the specified file or Maildir-

format directory.


MAILCHECK

Specifies how often (in seconds) bash checks for mail.

The default is 60 seconds. When it is time to check for

mail, the shell does so before displaying the primary

prompt. If this variable is unset, or set to a value

that is not a number greater than or equal to zero, the

shell disables mail checking.


MAILPATH

A colon-separated list of filenames to be checked for mail.

The message to be printed when mail arrives in a

particular file may be specified by separating the filename

from the message with a `?'. When used in the text of the

message, $_ expands to the name of the current mailfile.

Example: MAILPATH='/var/mail/bfox?"You have

mail":~/shell-mail?"$_ has mail!"' Bash supplies a

default value for this variable, but the location of the

user mail files that it uses is system dependent (e.g.,

/var/mail/$USER).


shopt option


mailwarn

If set, and a file that bash is checking for mail has been

accessed since the last time it was checked, the message

``The mail in mailfile has been read'' is displayed.

Nov 9, 2018 7:42 PM in response to Peugeot208

You create a .bash_profile in your home folder


Unless you are a .profile kind of guy.


The bash shell startup rules are to look for one of the following files in the following order and use the first one found as the shell initialization file:


.bash_profile

.bash_login

.profile


If non-exist, then nothing is used. When one is found, it is used, and the others (in the order shown) are ignored.


If you start a subshell from the current shell, then bash will run .bashrc, but .bashrc is not run on a new login (aka, when you start a Terminal session).


Many hard core terminal uses, split those shell initialization that persist, such as environment variables, and put them into .bash_profile. Those initializations that need to be done for each shell startup, especially if you create sub-shells, put those into .bashrc. Where those are things like aliases, shell functions, and various shell shopt and set -o options.


If what I just said is confusing, just put everything into a .bash_profile.


You will need to quit your Terminal session and start a new session so that a new bash is started, and the .bash_profile is read.

How to enable mailx welcome when opening a new terminal?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.