Shorter intervall for download emails from connector

I was told that it seems it takes too long, until we see new emails. The reason is, that we have configured a imap connector, where the shortest intervall seems to be 5 min. Is it somehow possible to shorten this period, maybe in a conf. file as it is not (yet?) possible in gui? When a customer sends a mail it can take up to 5 min till we see them in our mailboxes, which seems like a very long period depending on the usecase.

Thats why I’d like to ask if it is possible to add shorter periods like one or two minutes in the future, or I’d like to configure that by editing a config file if possible.

1 Like

Tried that (db getmail setprop myusername@externaldomain.tld Time 1) but in /etc/crond.d/getmail I still see */5 * * * * before my mailconnector line, and it still takes 5 min till next download.

It works if I set */1 * * * * ? But how would I be able to make it persist future updates? Changing the getmail cron file is probably not the recommended way? Maybe I should also ask the provider, if they have no problem with this intervall as for about 10 users, each trying to update every minute, We cant afford that they might not like this and ban us, atm I only test this with one (my) account :slight_smile:

Yes, please ask as some providers really don’t like it.

Sorry, I forgot you need to apply the config with

signal-event nethserver-getmail-update

or in this case just expand the template with

expand-template /etc/cron.d/getmail

2 Likes

I only can issue signal-event nethserver-getmail-save. Else I get message: Can’t open directory /etc/e-smith/nethserver-getmail-update. And if I set manually */1 * * * * in /etc/crond.d/getmail and issue `expand-template /etc/cron.d/getmail it changes everything back to */5 * * * *. Sorry if I am bit slow in understanding :slight_smile:

Please do a

db getmail show

so I can see your config.

I tested it yesterday and it worked but I think if you edit it in GUI it goes back to 5…

I then get the following entries for the different mailaccounts:

db getmail show
username@externaldomain.com@imap.externaldomain.com=getmail
Account=username@internaldomain.com
Delete=30
FilterCheck=enabled
Password=password
Retriever=SimpleIMAPRetriever
Server=imap.externaldomain.com
Time=5
Username=username@externaldomain.com
status=enabled

I did not change anything in the ui.

You don’t need to change a file.

This sets time to 1:

db getmail setprop username@externaldomain.com@imap.externaldomain.com Time 1

Then expand the template with

expand-template /etc/cron.d/getmail

Now you should see the right value in /etc/cron.d/getmail

EDIT:

If it worked, db show getmail should show a Time of 1.

Just ping me if it still doesn’t work…

1 Like

That way it works, thank you very much :ok_hand:. Is this update proof, or will this occasionally get overwritten?

You’re welcome and yes, it should be update proof.

1 Like

@Elleni

Hi

I’m using the same config for one client, I can confirm this even made the big update 7.7 - 7.8…

Thx @mrmarkuz for the tip beginning of this year!

My 2 cents
Andy

2 Likes