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.
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)
I shouldn’t
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.