Fetch mails immediately after user interaction?

A customer asked me if it is possible to get mails seconds after they have been sent…

What I know is that it needs up to 5 minutes to get a new mail. I use a script to fetch the mails immediately but I dont want to give the user a shell…

Does anyone have an Idea how I could solve this for a client just with user permission?

You can create an account to your user and allow him to execute only that script (with permissions or sudoers file). Or you can prepare a small php portal and send command through exec command or use this library https://github.com/phpseclib/phpseclib. If I don’t make a mistake I used it and it works fine.

Hope this can help :wink:

OK Federico, thank you for your Ideas/Infos… I appreciate that ! - :grinning:

1 Like

If you use imap you have instant sync right? pop3 (connector) has that 5-10-15 minute interval…
At least, this was always my understanding…

Looking at https://www.namecheap.com/support/knowledgebase/article.aspx/9812/2186/how-to-reduce-frequency-of-email-checks-in-different-email-clients#Thunderbird
it seems it is client dependent.

Yes I use the pop3-connector:

As I mentioned before, I am looking for a way for the server to fetch the Mails immediately…

The “check this account every” property probably has a e-smith entry somewhere. There it should be possible to modify it faster (something like every 10 or 15 seconds instead of 5 minutes)
@giacomo can you confirm this (and give a hint what property it is and what command or custom template to use)

1 Like

ISP/Mail server for saving resources and connections could make this impossible.

I shouldn’t :slight_smile:
The getmail process needs much more time than 10-15 seconds for large mailboxes.
An interval of 5 minutes is more than enough, please also consider that mail can be delivered hours or days after been sent.

By the way this is the relevant doc, the parameter is named Time.

Please consider testing the new Mail UI which already contains a button to manually start getmail for specific accounts.