Kernel/System/MailAccount/IMAP.pm => how to set $Param{Timeout}

Moderator: crythias

Post Reply
mohnewald
Znuny newbie
Posts: 10
Joined: 31 Jan 2023, 09:23
Znuny Version: 6.2.8
Real Name: Michael Liebherr

Kernel/System/MailAccount/IMAP.pm => how to set $Param{Timeout}

Post by mohnewald »

Hello,

we fetch our mails with imap and sometimes get a 600s timeout because the Mailserver is shitty...

how can i set the $Param{Timeout} ?

i found: Kernel/System/MailAccount/IMAP.pm

my $Type = 'IMAP';

# connect to host
my $IMAPObject = Net::IMAP::Simple->new(
$Param{Host},
timeout => $Param{Timeout} ,
debug => $Param{Debug} || undef,
);


Cheers,
Michael
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Kernel/System/MailAccount/IMAP.pm => how to set $Param{Timeout}

Post by root »

Hi,

There's no code change required. You can adjust the system configuration Daemon::SchedulerCronTaskManager::Task###MailAccountFetch by adding the parameter --timeout xxx.
Add two items to the params array. One is --timeout, and the other one your timeout in seconds. Don't put them into one item!

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
mohnewald
Znuny newbie
Posts: 10
Joined: 31 Jan 2023, 09:23
Znuny Version: 6.2.8
Real Name: Michael Liebherr

Re: Kernel/System/MailAccount/IMAP.pm => how to set $Param{Timeout}

Post by mohnewald »

Danke Roy! 8)
Post Reply