You are not logged in.

#1 2019-09-11 13:22:33

Laërte
Member
Registered: 2015-08-26
Posts: 9

[RESOLVED] How does zsh check for new mail ?

What I already know:
— If MAIL is set and MAILPATH is unset, zsh will check for new mail in MAIL.
— I can choose the message displayed by setting MAILPATH accordingly.
— MAILCHECK determines the number of time between each check.
— There is a checkmailpath() function written in C in the source code of zsh that triggers the verification for new mails.

What I want to know:
— How can I call checkmailpath() from zsh ? I’ve set MAILPATH to my tastes, but I would like new mails to be checked at precise moments (after the execution of getmail). If there is a command that calls checkmailpath() I can create an alias `alias getmail="getmail&&checkmailpath"` to do what I want. However, I’ve been looking on the internet without finding anything related to my needs.

Last edited by Laërte (2019-09-11 17:13:03)

Offline

#2 2019-09-11 16:52:47

Swiggles
Member
Registered: 2014-08-02
Posts: 130

Re: [RESOLVED] How does zsh check for new mail ?

Add this to your .zshrc:

autoload checkmail

You can use the checkmail command after.

Edit: For reference

Last edited by Swiggles (2019-09-11 16:55:03)

Offline

#3 2019-09-11 17:12:48

Laërte
Member
Registered: 2015-08-26
Posts: 9

Re: [RESOLVED] How does zsh check for new mail ?

Thanks, that’s perfect.
I’ll change the title so that people can see it’s resolved.

Offline

Board footer

Powered by FluxBB