As we know $MAILPATH environment variable in bash can be used to intimate
the user on new mail arrival and it is useful when the mails are received
in the same machine.
Here we have seperate mailserver for our incoming mails. But users
normally work in mainserver. Both are linux servers.
My doubt is, Is it possible to set the $MAILPATH variable in mainserver to
intimate whenever a new mail is arrived in mailserver? Or is there any
Normally we have an entry something like or similar to
export MAILPATH=/var/spool/mail/$USER?hi $USER, you have new mail.
Should we able to change this entry to
export MAILPATH=mailserver:/var/spool/mail/$USER?hi $USER, you have
Valuable suggestions are very welcome.