Fetch IMAP mail interval

Moderator: crythias

Locked
Maayan
Znuny newbie
Posts: 5
Joined: 22 Oct 2015, 17:54
Znuny Version: 5.0.1

Fetch IMAP mail interval

Post by Maayan »

Hi,

Yesterday I installed OTRS 5.0.1 and everything went smoothly and seems to work fine.

I configured OTRS to fetch mail from an IMAP mailbox and iti s working great, the server fetch the mails every 10 min.

I would like to change this interval to 1 min.

What I found online is that i need to change this parameter at OTRS user crontab but the problem that my crontab have only the following in it:
[root@otrs bin]# crontab -u otrs -l
# Who gets the cron emails?
MAILTO="root@localhost"

# check OTRS daemon status
*/5 * * * * $HOME/bin/otrs.Daemon.pl start >> /dev/null


And I found online that i can add a PostMasterMailbox.pl to the crontab but i can't find this file anywhere (tried "find / -name PostMasterMailbox.pl")

So how can I change the fetchmail interval time at OTRS 5.0.1?
root
Administrator
Posts: 4251
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Fetch IMAP mail interval

Post by root »

OTRS 5 banned cron to reinvent the wheel. Check out in the SysConfig Group Daemon, Subgroup Daemon::SchedulerCronTaskManager::Task
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 ?
Maayan
Znuny newbie
Posts: 5
Joined: 22 Oct 2015, 17:54
Znuny Version: 5.0.1

Re: Fetch IMAP mail interval

Post by Maayan »

I changed the following to 1 min interval but still not working:
Daemon::SchedulerCronTaskManager::Task###MailAccountFetch
Daemon::SchedulerCronTaskManager::Task###FetchMail
Daemon::SchedulerCronTaskManager::Task###FetchMailSSL

How can I view the logs related to this issue?
root
Administrator
Posts: 4251
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Fetch IMAP mail interval

Post by root »

This depends on your log settings for OTRS in general and the Daemon specific.
Try a look at $OTRS_HOME/var/log/Daemon.
Don't forget to check your syslog/rsyslog config when you use syslog. On my CentOS 7 test system the facility user was not configured.
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 ?
Maayan
Znuny newbie
Posts: 5
Joined: 22 Oct 2015, 17:54
Znuny Version: 5.0.1

Re: Fetch IMAP mail interval

Post by Maayan »

Looked at the Daemon log and found this error showing every minute (I configured the fetch interval to 1 min on OTRS sysconfig):

Traceback (2130):
Module: Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError Line: 51
Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Cron::Run Line: 206
Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Run Line: 259
Module: (eval) Line: 316
Module: main::Start Line: 316
Module: /opt/otrs//bin/otrs.Daemon.pl Line: 138

ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker-99 Perl: 5.10.1 OS: linux Time: Mon Oct 26 08:28:02 2015

Message: There was an error executing Fetch() in Kernel::System::FetchMail: ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker-99 Perl: 5.10.1 OS: linux Time: Mon Oct 26 08:28:02 2015

Message: FetchMail bin was not found


Now just a reminder although there is an error the OTRS fetch the mails from the mailbox but just not in the interval I want.
root
Administrator
Posts: 4251
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Fetch IMAP mail interval

Post by root »

Maayan wrote: Message: FetchMail bin was not found
Install fetchmail, but I guess you don't have a fetchmail configuration..
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 ?
Maayan
Znuny newbie
Posts: 5
Joined: 22 Oct 2015, 17:54
Znuny Version: 5.0.1

Re: Fetch IMAP mail interval

Post by Maayan »

1. What do you mean Fetchmail configuration? I am not a linux expert can you refer me to a link explaining how to install and configure properly for OTRS?

2. So how the OTRS Fetch mails from the mailbox? as I said it is working just not at the preferred interval.
root
Administrator
Posts: 4251
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Fetch IMAP mail interval

Post by root »

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 ?
Maayan
Znuny newbie
Posts: 5
Joined: 22 Oct 2015, 17:54
Znuny Version: 5.0.1

Re: Fetch IMAP mail interval

Post by Maayan »

WORKING!

Thanks.
flaviof
Znuny newbie
Posts: 9
Joined: 27 Oct 2015, 19:35
Znuny Version: 5.0.1-03
Real Name: Flavio

Re: Fetch IMAP mail interval

Post by flaviof »

Explain to us what you did to solved :)
gecelann
Znuny expert
Posts: 164
Joined: 12 Feb 2016, 08:05
Znuny Version: 5.0.0
Real Name: ann
Company: rghdinc

Re: Fetch IMAP mail interval

Post by gecelann »

Hi to all!

Good day!
I am having this error when I change my fetchmail interval into 1 minute I already changed the following subgroup of Daemon::SchedulerCronTaskManager::Task into 1 min and I already have email settings. Please see the image below. What else did I missed? Please help me to fix the issue. I Already install fetchmail using yum install fetchmail but I keep on getting the error. :( :(

Please help me :(((((

Selection_022.png
Selection_023.png
You do not have the required permissions to view the files attached to this post.
gecelann
Znuny expert
Posts: 164
Joined: 12 Feb 2016, 08:05
Znuny Version: 5.0.0
Real Name: ann
Company: rghdinc

Re: Fetch IMAP mail interval

Post by gecelann »

This is the error that I get in my email.
Please help me :(((

ERROR: OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker-01 Perl: 5.10.1 OS: linux Time: Tue Sep 27 10:42:17 2016

Message: There was an error executing /usr/bin/fetchmail -a: Unknown

Traceback (15690):


Module: Kernel::System::FetchMail::Fetch Line: 344
Module: (eval) Line: 147
Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Cron::Run Line: 131
Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Run Line: 259
Module: (eval) Line: 316
Module: main::Start Line: 316
Module: /opt/otrs//bin/otrs.Daemon.pl Line: 138

Selection_024.png
You do not have the required permissions to view the files attached to this post.
root
Administrator
Posts: 4251
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Fetch IMAP mail interval

Post by root »

Think about changing from pulling (fetch) e-mails to push (SMTP), fetching in 1 minute interval couldn't be the right approach.
Then you should try reading the manual and find out what the difference is between Daemon::SchedulerCronTaskManager::Task###FetchMail and Daemon::SchedulerCronTaskManager::Task###MailAccountFetch. Maybe the SysConfig explanation will be enough.
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 ?
gecelann
Znuny expert
Posts: 164
Joined: 12 Feb 2016, 08:05
Znuny Version: 5.0.0
Real Name: ann
Company: rghdinc

Re: Fetch IMAP mail interval

Post by gecelann »

root wrote:Think about changing from pulling (fetch) e-mails to push (SMTP), fetching in 1 minute interval couldn't be the right approach.
Then you should try reading the manual and find out what the difference is between Daemon::SchedulerCronTaskManager::Task###FetchMail and Daemon::SchedulerCronTaskManager::Task###MailAccountFetch. Maybe the SysConfig explanation will be enough.
It is okay now!
Thank you! :)
rdxmb
Znuny newbie
Posts: 1
Joined: 17 Mar 2020, 17:34
Znuny Version: 6.26
Real Name: Marc

Re: Fetch IMAP mail interval

Post by rdxmb »

Hello,

I have otrs 6.0.28 in docker.

I'd like to change the mail fetch interval. Where can this be done? I've found nothing in the docs but that the default interval is 10min: https://doc.otrs.com/doc/manual/admin/6 ... tings.html

Who can help? Thanks!
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Fetch IMAP mail interval

Post by zzz »

rdxmb wrote: 19 May 2020, 16:04 Hello,

I have otrs 6.0.28 in docker.

I'd like to change the mail fetch interval. Where can this be done? I've found nothing in the docs but that the default interval is 10min: https://doc.otrs.com/doc/manual/admin/6 ... tings.html

Who can help? Thanks!
Hey,

Check the 'Daemon::SchedulerCronTaskManager::Task###MailAccountFetch' setting.

— Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
Locked