- You have new mail
- Re: You have new mail
- Re: You have new mail
- Re: You have new mail
- Re: You have new mail
- Re: You have new mail
- Re: You have new mail
- Re: You have new mail
- Re: You have new mail
- Re: You have new mail
- Re: You have new mail
- Re: You have new mail
- Что такое сообщение «У вас есть новая почта» в Linux / UNIX?
- Где эта почта?
- Что это содержит, и кто / что послал это?
- Насколько это важно?
- Это даже фактическая «почта» в том же смысле, что и электронная почта? Или это просто моя система говорит мне что-то?
- “You have mail” – How to Read Mail in Linux Command Line
- View Spool File
- Delete Spool File
- Using the mail Program
- Delete All Messages using mail
- What is the «You have new mail» message in Linux/UNIX?
- 7 Answers 7
- Where is this mail?
- What does it contain, and who/what sent it?
- How important is it?
- Is this even actual «mail» in the same sense as email? Or is it just my system telling me something?
- How to read email received on a Debian server
- 5 Answers 5
You have new mail
Звиняйте за тупость. Сегодня логинюсь — выходит такое сообщение. Где его посмотреть? Кажется, всё уже облазил, не нашёл. И «кто» его пишет?
Re: You have new mail
Смотреть в локальной папке /var/spool/mail/user. Проверка почты идет скорее всего через biff и прописана в /etc/profile.
Re: You have new mail
mail в консоли набери, удивишься 🙂
а сообщения тебе пишет сама система
Re: You have new mail
неа, нифига 🙂 подефолту локальная почта юзеров хранится в mbox, а не в maildir
хотя наверное в разных дистрах поразному 😉
Re: You have new mail
Re: You have new mail
Re: You have new mail
Что /etc/login.defs ?
Или ты JB ответил о mbox/maildir ?
Или мне о MAIL_CHECK_ENAB ?
—————————————
Я писал о том кто сообщает о почте — это login
Re: You have new mail
По-порядку:
1. ls -A /var/spool/mail/
.keep
Т.е. пусто.
2. $ mail
bash: mail: command not found
3. mutt-а тоже нет. Видимо, надо поставить.
4. Ни в /etc/profile, ни в /etc/login.defs никакого упоминания не увидел.
Не хочется быть «чайником», но вот.
Re: You have new mail
> bash: mail: command not found
mailx установлен? и вообще какой дистрибутив?
Re: You have new mail
Похоже что джента, т.к. есть .keep в папках.
Re: You have new mail
У меня на слаке уже давно отключена проверка почты в локальном ящике, ибо неоткуда ей там взяться. Прописывается это в /etc/login.defs.
Re: You have new mail
Надо же, угадал. Действительно Gentoo. Но я так и не понял, уведомления о почте идут, а посмотреть никак.
Источник
Что такое сообщение «У вас есть новая почта» в Linux / UNIX?
Иногда, когда я захожу в окно и получаю root с правами su, я получаю симпатичное маленькое сообщение о том, что у меня есть почта (слава Богу, это не AOL).
- Где эта почта?
- Что это содержит?
- Кто / Что послал это?
- Насколько это важно?
Это даже фактическая «почта» в том же смысле, что и электронная почта? Или это просто моя система говорит мне что-то?
EDIT: В связи с этим вопросом, я мог бы послать себе почту , используя Sendmail программы следующим образом: email@localhost ?
Где эта почта?
Скорее всего, это будет в спул-файле: /var/mail/$USER или /var/spool/mail/$USER это наиболее распространенные места в Linux и BSD.
(Возможны другие местоположения — проверьте, если $MAIL установлено — но по умолчанию система информирует вас только о /var(/spool)/mail .)
Обычно файл спула находится в очень простом формате mbox , поэтому вы можете открыть его в текстовом редакторе или на пейджере.
Для немного более удобного способа большинство дистрибутивов поставляются с программой под названием mail (или Mail , mailx ). Вы можете попробовать mutt или alpine ; Вы даже можете настроить его для отправки на внешний почтовый ящик. (См. «Это реальная почта?» Ниже.)
Что это содержит, и кто / что послал это?
Чаще всего сообщения содержат выходные данные заданий cron, или отчет о безопасности системы по logwatch , или подобный мусор. Прочитайте это и узнайте.
Насколько это важно?
Зависит от содержания каждого сообщения.
Вы должны по крайней мере просмотреть заголовки темы — часто люди игнорируют почту в течение нескольких месяцев, даже не осознавая, что их ежедневные задания не выполняются.
Это даже фактическая «почта» в том же смысле, что и электронная почта? Или это просто моя система говорит мне что-то?
Да, обоим — это генерируется вашей системой, которая говорит вам что-то, но это также реальная электронная почта и может обрабатываться как таковая.
Вы можете (и должны) настроить почтовое программное обеспечение — «MTA», иначе /usr/sbin/sendmail — пересылать сообщения на ваш личный почтовый адрес. Точные инструкции различаются в зависимости от того, какой MTA (если есть) вы установили, будь то персональный компьютер или сервер, есть ли у вас собственный домен или вы используете @ gmail.com и т. Д.
Обратите внимание, что в /usr/sbin/sendmail настоящее время это общий API и не обязательно означает оригинальный MTA Sendmail. На самом деле, вы не должны использовать Sendmail, но что-то более современное, такое как OpenSMTPD, Postfix или Exim4. Все они предоставляют один и тот же /usr/sbin/sendmail инструмент, но их проще настраивать, они более безопасны и столь же эффективны.
Самым простым способом для меня было запустить следующее в терминале:
Для тех, кто интересуется, как читать эти сообщения одно за другим, вы можете просто использовать «почта»
Затем введите номер сообщения из списка, который вы хотите прочитать.
Чтобы перейти к следующему сообщению, вы можете напечатать «next», другая полезная команда — «delete».
Чтобы узнать больше о том, как mail работает программа, смотрите вывод man mail .
Просто, чтобы дать некоторые пояснения, в течение долгого времени в UNIX-системах традиционно запускался «локально настроенный» почтовый демон, который не маршрутизирует сообщения через Интернет, а только копирует сообщения в каталоги спулинга других пользователей (как @John T упоминается). Это настоящая SMTP-совместимая электронная почта, она просто не маршрутизируется через Интернет, потому что это не обязательно.
Таким образом, если вы запустите почтовый клиент (например, alpine или mutt ), вы можете отправлять почту другим пользователям в системе, обращаясь к user@hostname , или во многих случаях, просто указывая пользователя. У вас также, вероятно, есть утилита командной строки, mailx которую можно использовать для отправки быстрой электронной почты с помощью вашей оболочки.
Теперь, если вы хотите отправлять сообщения пользователям в системах, отличных от той, в которую вы вошли, то здесь начинается настоящее веселье. Вам необходимо настроить демон почтовой программы для распознавания и передачи внешней электронной почты агенту переноса, настройки агента переноса и выполнения всего, что я сам пока не понимаю.
Где эта почта?
Скорее всего, хранится на вашем компьютере, в папке почтового ящика для вашего пользователя root (где это зависит от того, какой тип почтового сервера вы установили). Вы можете получить к нему доступ довольно быстро через Alpine .
Что это содержит?
Вероятно, просто некоторые вещи типа системного отчета. «То и дело пытались войти в систему 10 раз с неверным паролем» .. «Хотелось бы, чтобы кто-нибудь запускал обновления для меня», «Драйвер такой-то постоянно терпит неудачу», «Бот NSA повысил производительность на 1%» .. и т.д..
Кто / Что послал это?
Сервисы на вашем сервере, скорее всего.
Насколько это важно?
Зависит от того, насколько важен ваш сервер.
Источник
“You have mail” – How to Read Mail in Linux Command Line
This message indicates that there is a message in your spool file. Usually the spool file is in a very simple mbox format, so you can open it in a text viewer like less or with the mail program. In most cases, this is not a message from a long lost lover, but instead a system message generated by your Linux mail service. (sad)
View Spool File
Use the following command to read the mail for the currently logged in user. The $(whoami) variable returns the currently logged in user.
You can use the ↑ and ↓ arrows on your keyboard to scroll through the spool file.
Press uppercase G to scroll to the bottom of the file and lowercase q to quit.
If you wish to read another user’s mail, just enter their user name.
Delete Spool File
You can simply delete the /var/mail/username file to delete all emails for a specific user. The $(whoami) variable returns the currently logged in user.
Using the mail Program
You can also use the mail program to easily list and view messages in your spool file. If mail is not installed, you can install it with sudo apt install mailutils .
Messages will be listed with a corresponding number:
After the ? prompt, enter the number of the mail you want to read and press ENTER .
Press ENTER to scroll through the message line by line and press q and ENTER to return to the message list.
To exit mail , type q at the ? prompt and then press ENTER .
Delete All Messages using mail
To delete all messages using mail, after the ? prompt, type d * and press ENTER .
Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.
Источник
What is the «You have new mail» message in Linux/UNIX?
Sometimes, when I log into a box and ‘su’ to root, I get a cute little message saying I have mail (thank GOD it’s not AOL).
- Where is this mail?
- What does it contain?
- Who/What sent it?
- How important is it?
Is this even actual «mail» in the same sense as email? Or is it just my system telling me something?
EDIT: In relation to this question, would I be able to send myself mail using the sendmail program like so: email@localhost ?
7 Answers 7
Where is this mail?
It’s likely to be in the spool file: /var/mail/$USER or /var/spool/mail/$USER are the most common locations on Linux and BSD.
(Other locations are possible – check if $MAIL is set – but by default, the system only informs you about /var(/spool)/mail .)
Usually the spool file is in a very simple mbox format, so you can open it in a text editor or pager.
For a slightly more convenient way, most distributions come with a program called mail (or Mail , mailx ). You can try mutt or alpine ; you can even configure it to be sent to an outside mailbox. (See «is this real mail?» below.)
What does it contain, and who/what sent it?
Most often the messages contain output of cron jobs, or a system security report by logwatch, or similar junk. Read it and find out.
How important is it?
Depends greatly on the contents of each message.
You should at least scan the subject headers – often people ignore the mail for months never realizing that their daily cron jobs fail.
Is this even actual «mail» in the same sense as email? Or is it just my system telling me something?
Yes to both – it’s generated by your system telling you something, but it’s also actual email and can be handled as such.
You can (and should) configure your mail software – the «MTA» aka /usr/sbin/sendmail – to forward the messages to your personal mail address. The exact instructions vary depending on which MTA (if any) you have installed, whether this is a personal computer or a server, whether you have your own domain or use a @gmail.com, and so on.
Note that /usr/sbin/sendmail nowadays is a shared API and doesn’t necessarily mean the original Sendmail MTA. In fact, you shouldn’t use Sendmail, but something more modern like OpenSMTPD, Postfix, or Exim4. All of them provide the same /usr/sbin/sendmail tool, but they’re easier to configure, more secure, and just as powerful.
The easiest way for me was to run the following in a terminal:
For anyone wondering how to read these messages one by one, you can just use ‘mail’
Then type a message number from the list which you want to read.
To goto the next message you can type ‘next’, another useful command is ‘delete’..
To see more about how the mail program works, see the output of man mail .
Just to offer some clarification, it’s been the tradition for a long time for UNIX boxes to run a «locally configured» mailer daemon that doesn’t route messages through the Internet, but only copies messages to other users spool directories (as @John T mentioned). It is real SMTP-compliant email, it’s just not routed over the Internet because it doesn’t need to be.
So, if you fire up an email client (like alpine or mutt ) you can send mail to other users on the system by addressing to user@hostname , or in many cases, just specifying the user. You also likely have a command line utility called mailx that can be used to send a quick email using your shell.
Now, if you want to send messages to users on systems other than the one you are logged in to, that’s where the real fun begins. You’ll need to configure your mailer daemon to recognize and hand off external email to a transfer agent, configure the transfer agent, and do a whole bunch of stuff I don’t yet understand myself.
Источник
How to read email received on a Debian server
I have a VPS (virtual private server) running Debian Linux. When I login using PuTTY the console shows — «You have mail»
I have no idea on how to retrieve this email. Which software do I need to install? Which steps to follow?
5 Answers 5
Just type mail , it is the most basic way to read the mail. It should be installed by default on a Debian system, it comes from the mailutils package. Read the man page or type ? to figure out commands to use.
But there are better ways to read the mail. As noted earlier, mailx is an improved version. Even more user-friendly are mutt, cone and (al)pine. All of these are packaged by Debian and can be installed by apt-get
I find the mail program difficult to use. The mail is stored in a flat file, so I use vi /var/spool/mail/user and manage it there.
or
mailx is present by default on most systems. Type mailx to invoke it. Read the manpages to understand how to navigate the mailx interface.
You need some sort of mail client to be configured. I use alpine as it has basic text-GUI and I used it somewhere previously and I am customed to it. Very easy to use, configurable, etc. btw. One way to manage is fetchmail:ing to some other location, if system has mail server installed. Plain .forward file with your mail address in it /home/dir is an option too! Don’t create a loop, though!
Источник