Auto Fetch Mail

Moderator: crythias

brgsstm
OTRS newbie
Posts: 9
Joined: 01 Sep 2011, 17:53
OTRS Version?: 3.0.10
Real Name: Tom Burgess
Company: PMI Health Group

Auto Fetch Mail

Postby brgsstm » 01 Sep 2011, 17:57

Hi,

I have recenty configured OTRS for our small helpdesk. I have to say it's great and has revolutionised our support profile :)

The only issue I have at the moment is that any email sent to our postmaster address is not automatically fetched by OTRS. I have to go to Admin -> Postmaster Mail Accounts -> Fetch mail.

I know this can be setup to automatically to fetch every 5 minutes for example but I am unsure of how to do this with Cron.

If anyone could help I would be greatly appreciative.

Thanks

Tom
OTRS 3.0.10 on Linux with MySQL database connected to an Active Directory for Agents and Customers.

brgsstm
OTRS newbie
Posts: 9
Joined: 01 Sep 2011, 17:53
OTRS Version?: 3.0.10
Real Name: Tom Burgess
Company: PMI Health Group

Re: Auto Fetch Mail

Postby brgsstm » 01 Sep 2011, 18:00

I just realised I should probably post a little info about the system we are using.

It is running on CentOs 5.6 using Apache 2.2.3

Thanks

Tom
OTRS 3.0.10 on Linux with MySQL database connected to an Active Directory for Agents and Customers.

brgsstm
OTRS newbie
Posts: 9
Joined: 01 Sep 2011, 17:53
OTRS Version?: 3.0.10
Real Name: Tom Burgess
Company: PMI Health Group

Re: Auto Fetch Mail

Postby brgsstm » 05 Sep 2011, 11:34

Can no one help me? :(
OTRS 3.0.10 on Linux with MySQL database connected to an Active Directory for Agents and Customers.

User avatar
crythias
Moderator
Posts: 9978
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Auto Fetch Mail

Postby crythias » 05 Sep 2011, 15:45

How did you install? Did you read the README? Are there any error messages in System Log?
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

MichaelR
OTRS superhero
Posts: 250
Joined: 12 Oct 2010, 01:35
OTRS Version?: 3.0.9
Company: LRS Health

Re: Auto Fetch Mail

Postby MichaelR » 06 Sep 2011, 01:45

Do you know what a 'cron' is?
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText

brgsstm
OTRS newbie
Posts: 9
Joined: 01 Sep 2011, 17:53
OTRS Version?: 3.0.10
Real Name: Tom Burgess
Company: PMI Health Group

Re: Auto Fetch Mail

Postby brgsstm » 06 Sep 2011, 11:27

Hi,

Thanks for the response. This is the last thing that I need to get sorted now :)

I installed using yum. I think I know what a "cron" is in that it is like a scheduled job?

I read the readme yes but to be honest it talks about running cron jobs and such and I could do with some guidance on that if possible. I have access to the server via ssh and webmin.

Excuse my ignorance please, I'm quite new to Linux but totally hooked :)

Thanks

Tom
OTRS 3.0.10 on Linux with MySQL database connected to an Active Directory for Agents and Customers.

User avatar
crythias
Moderator
Posts: 9978
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Auto Fetch Mail

Postby crythias » 06 Sep 2011, 14:20

I'm sorry. I meant to say the INSTALL file.

Code: Select all

11) Cronjobs for the OTRS user:
    ---------------------------
   There are several OTRS default cronjobs in $OTRS_HOME/var/cron/*.dist.
   They can be activated by copying them without the ".dist" filename extension.

   shell> cd var/cron
   shell> for foo in *.dist; do cp $foo `basename $foo .dist`; done

   To schedule these cronjobs on your system, you can use the script Cron.sh.
   Make sure to execute it as the OTRS system user!

      Scheduling the cronjobs for the first time:

      shell> /opt/otrs/bin/Cron.sh start

      Updating the cronjob schedules if you made changes changes:

      shell> /opt/otrs/bin/Cron.sh restart

      Stopping the cronjobs (useful for maintenance):

      shell> /opt/otrs/bin/Cron.sh stop
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

brgsstm
OTRS newbie
Posts: 9
Joined: 01 Sep 2011, 17:53
OTRS Version?: 3.0.10
Real Name: Tom Burgess
Company: PMI Health Group

Re: Auto Fetch Mail

Postby brgsstm » 07 Sep 2011, 12:40

Hi, thanks for that.

I did read that, my problem is that I can't seem to find this location $OTRS_HOME/var/cron/. I know it is saying the home directory of the user used to install but I just can't see it. I installed using putty as a user with sudo rights so therefore basically as root.

I am also getting this error in the disgnostics of OTRS:

"Check log for error log entries.

You have more error log entries: No UserID found for 'root@localhost'!, Need User!, Need User!, Need User!, Need User!, Need User!, Need User!"

Maybe this could be the issue?

Thanks again for your help.
OTRS 3.0.10 on Linux with MySQL database connected to an Active Directory for Agents and Customers.

ferrosti
OTRS ninja
Posts: 723
Joined: 10 Oct 2007, 14:30
OTRS Version?: 3.0
Location: Hamburg, Germany

Re: Auto Fetch Mail

Postby ferrosti » 07 Sep 2011, 13:27

On linux systems I won´t stick to package based installation. IMHO it is far more comfortable to just take the .tar.gz and install from this one. Well, apache configuration might be a little tricky for the first time and Linux beginners.

Your OTRS home usually is /opt/otrs, not /home/otrs, since this is about the installation home, not the users home.
/opt/otrs/var/cron should contain the files mentioned above and you need to copy at least the file PostMasterMailbox.dist to PostMasterMailbox and adjust it to your needs.

No UserID for 'root@localhost' is a very uncommon error, since this is the standard user used by otrs and this one is added to 'otrs.users' table during installation. So check this table, whether this user exists or not. In case ther is no user you might have forgotten some steps during installation.
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems

brgsstm
OTRS newbie
Posts: 9
Joined: 01 Sep 2011, 17:53
OTRS Version?: 3.0.10
Real Name: Tom Burgess
Company: PMI Health Group

Re: Auto Fetch Mail

Postby brgsstm » 07 Sep 2011, 15:50

Thanks,

My /opt/otrs/var/cron only contains the files without the .dist ?

If I am to run Cron.sh as the otrs user, does that mean I need to log into my server using SSH logged in as user otrs? I don't recall setting a password for that :(

Where is otrs.users table? I have checked phpmyadmin and cannot see it?

Thanks

Tom
OTRS 3.0.10 on Linux with MySQL database connected to an Active Directory for Agents and Customers.

User avatar
crythias
Moderator
Posts: 9978
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Auto Fetch Mail

Postby crythias » 07 Sep 2011, 16:35

brgsstm wrote:otrs.users table
Is otrsdatabasename (by default, otrs) and .users means the table named users.
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

brgsstm
OTRS newbie
Posts: 9
Joined: 01 Sep 2011, 17:53
OTRS Version?: 3.0.10
Real Name: Tom Burgess
Company: PMI Health Group

Re: Auto Fetch Mail

Postby brgsstm » 07 Sep 2011, 17:08

Thanks,

There is no user in there called root@localhost

Can I just create one?

Thanks

Tom
OTRS 3.0.10 on Linux with MySQL database connected to an Active Directory for Agents and Customers.

ferrosti
OTRS ninja
Posts: 723
Joined: 10 Oct 2007, 14:30
OTRS Version?: 3.0
Location: Hamburg, Germany

Re: Auto Fetch Mail

Postby ferrosti » 07 Sep 2011, 17:33

I´d wipe this installation and reinstall from scratch. In case this user is missing, which is usually created automatically during installation you might have screwed up something.

It seems you have only very little knowledge about Linux, which is OK, but I´d rather recommend a system that can be configured by yourself.

There is no need to know the otrs user PWD, since one would login as root, type 'su -u otrs' and your root login will become otrs user. I usually start cron by 'Cron.sh start otrs'.
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems

brgsstm
OTRS newbie
Posts: 9
Joined: 01 Sep 2011, 17:53
OTRS Version?: 3.0.10
Real Name: Tom Burgess
Company: PMI Health Group

Re: Auto Fetch Mail

Postby brgsstm » 07 Sep 2011, 17:43

Ok, damn, we have been using it for nearly a week and have some 400 tickets in the system now :(

Would I be able to install a fresh instance of OTRS? I'm guessing not as there would already be an otrs user on this system?

Your right, I have little experience of Linux but I am really enjoying learning it :)
OTRS 3.0.10 on Linux with MySQL database connected to an Active Directory for Agents and Customers.

meoukg
OTRS newbie
Posts: 12
Joined: 15 Nov 2013, 04:50
OTRS Version?: 3.3.9
Real Name: Haley Le

Re: Auto Fetch Mail

Postby meoukg » 10 Dec 2013, 14:36

Hi all,

please show how to do it on Windows OS.
Running the OTRS Server on Windows Server 2012 R2 Standard & Microsoft SQL Server 2012 Standard

Naseh
OTRS newbie
Posts: 2
Joined: 03 Jan 2018, 11:32
OTRS Version?: 5-0-15
Real Name: Naseh Raoon
Company: Ebone network

how to enable automatic fetching?

Postby Naseh » 04 Jan 2018, 08:45

How to enable automatic fetching in otrs evrsion 5-0-15. Because it only fetches when we go into postmaster mailbox account. Need solution so it does automatically fetching. As i m a newbie in linux so explain me in steps.

reneeb
OTRS guru
Posts: 4483
Joined: 13 Mar 2011, 09:54
OTRS Version?: 3.3.x
Company: Perl-Services.de
Contact:

Re: Auto Fetch Mail

Postby reneeb » 04 Jan 2018, 09:18

Perl / OTRS development: http://perl-services.de
Free OTRS add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de

Naseh
OTRS newbie
Posts: 2
Joined: 03 Jan 2018, 11:32
OTRS Version?: 5-0-15
Real Name: Naseh Raoon
Company: Ebone network

Re: Auto Fetch Mail

Postby Naseh » 11 Jan 2018, 10:27

I have already done these steps and the error got solved but the new error has been occurred in the otrs system log
error:OTRS-otrs.Daemon.pl - Daemon Kernel::System::Daemon::DaemonModules::SchedulerCronTaskManager-20 Could not create new Schedule::Cron::Events object!

Because of this error couldn't able to fetch emails automatically!

Code: Select all

/opt/otrs/Kernel/System/CronEvent.pm

reneeb
OTRS guru
Posts: 4483
Joined: 13 Mar 2011, 09:54
OTRS Version?: 3.3.x
Company: Perl-Services.de
Contact:

Re: Auto Fetch Mail

Postby reneeb » 14 Jan 2018, 14:38

Did you check the "Schedule" settings in the Daemon tasks (SysConfig -> Daemon ...). It should look something like

Code: Select all

20 0 * * 0
Perl / OTRS development: http://perl-services.de
Free OTRS add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de


Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests