Problem with Postmaster fetching email automatically

Moderator: crythias

Locked
Wallas77
Znuny newbie
Posts: 11
Joined: 16 Oct 2015, 19:56
Znuny Version: 4.0.13
Real Name: Waldir Valle
Company: Mentor Mexico

Problem with Postmaster fetching email automatically

Post by Wallas77 »

Hi,

I just installed OTRS 4.0.13 version in Ubuntu Server 14.04, but I receive the following error message in the cronjob postmaster_mailbox

otrs@otrs:/opt/otrs/var/cron$ perl postmaster_mailbox
Number found where operator expected at postmaster_mailbox line 3, near "*/10"
(Missing operator before 10?)
syntax error at postmaster_mailbox line 3, near "*/10"
Unknown regexp modifier "/n" at postmaster_mailbox line 3, at end of line
Regexp modifiers "/u" and "/l" are mutually exclusive at postmaster_mailbox line 3, at end of line
Regexp modifiers "/u" and "/l" are mutually exclusive at postmaster_mailbox line 3, at end of line
Execution of postmaster_mailbox aborted due to compilation errors.

the postmaster_mailbox contains:

# fetch emails every 10 minutes
*/10 * * * * $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null

Could you please help me to know the problem?

Thanks in advance
Kindest Regards
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Problem with Postmaster fetching email automatically

Post by crythias »

cron is not perl.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
Wallas77
Znuny newbie
Posts: 11
Joined: 16 Oct 2015, 19:56
Znuny Version: 4.0.13
Real Name: Waldir Valle
Company: Mentor Mexico

Re: Problem with Postmaster fetching email automatically

Post by Wallas77 »

Crythias thanks for your reply, but could you please be more specific in how can I solve this problem?

Thanks in advance
Regards
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Problem with Postmaster fetching email automatically

Post by crythias »

It depends what your problem is. If your problem is that email is not fetched automatically, check
crontab -u otrs -l

If the problem is that you're trying to process a crontab with perl, don't do that. It won't work.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
Wallas77
Znuny newbie
Posts: 11
Joined: 16 Oct 2015, 19:56
Znuny Version: 4.0.13
Real Name: Waldir Valle
Company: Mentor Mexico

Re: Problem with Postmaster fetching email automatically

Post by Wallas77 »

The problem is the automatically fetching is not working, if I manually retrieve the emails otrs create the tickets correctly but automatically doesn't work.

I changed the time instead of 10 minutes now is set 2 minutes, but doesn't work correctly.

Any idea why is not working?

Thanks

otrs@otrs:/opt/otrs/bin$ crontab -u otrs -l
# Who gets the cron emails?
MAILTO="waldir@mntr.mx"

# delete expired cache weekly (Sunday mornings)
20 0 * * 0 $HOME/bin/otrs.DeleteCache.pl --expired >> /dev/null
30 0 * * 0 $HOME/bin/otrs.LoaderCache.pl -o delete >> /dev/null

# fetch every 5 minutes emails via fetchmail
#*/5 * * * * [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /dev/null
#*/5 * * * * /usr/bin/fetchmail -a --ssl >> /dev/null

# generate dashboard stats every hour
5 * * * * $HOME/bin/otrs.GenerateDashboardStats.pl >> /dev/null

# start generic agent every 20 minutes
*/20 * * * * $HOME/bin/otrs.GenericAgent.pl >> /dev/null

# example to execute otrs.GenericAgent.pl on 23:00 with
# Kernel::Config::GenericAgentMove job file
#0 23 * * * $HOME/bin/otrs.GenericAgent.pl -c "Kernel::Config::GenericAgentMove" >> /dev/null

# start generic agent every 10 minutes
*/10 * * * * $HOME/bin/otrs.GenericAgent.pl -c db >> /dev/null

# check every 120 min the pending jobs
45 */2 * * * $HOME/bin/otrs.PendingJobs.pl >> /dev/null

# check daily the spool directory of OTRS
10 0 * * * $HOME/bin/otrs.ReprocessMails.pl >> /dev/null

# fetch emails every 2 minutes
*/2 * * * * $HOME/bin/otrs.PostMasterMailbox.pl

# just every day
01 01 * * * $HOME/bin/otrs.RebuildTicketIndex.pl >> /dev/null

# check scheduler status
*/5 * * * * $HOME/bin/otrs.Scheduler.pl -w 1 >> /dev/null

# delete every 120 minutes old/idle session ids
55 */2 * * * $HOME/bin/otrs.DeleteSessionIDs.pl --expired >> /dev/null

# unlock every hour old locked tickets
35 * * * * $HOME/bin/otrs.UnlockTickets.pl --timeout >> /dev/null
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Problem with Postmaster fetching email automatically

Post by crythias »

There's lots of potential reasons, but let's start with ...

Code: Select all

su - otrs

Code: Select all

echo $HOME
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
Wallas77
Znuny newbie
Posts: 11
Joined: 16 Oct 2015, 19:56
Znuny Version: 4.0.13
Real Name: Waldir Valle
Company: Mentor Mexico

Re: Problem with Postmaster fetching email automatically

Post by Wallas77 »

This is the result:

otrs@otrs:~$ su - otrs
Password:
otrs@otrs:~$ echo $HOME
/home/otrs
otrs@otrs:~$

Thanks in advance
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Problem with Postmaster fetching email automatically

Post by crythias »

otrs's $HOME needs to be /opt/otrs or wherever otrs is installed.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
Wallas77
Znuny newbie
Posts: 11
Joined: 16 Oct 2015, 19:56
Znuny Version: 4.0.13
Real Name: Waldir Valle
Company: Mentor Mexico

Re: Problem with Postmaster fetching email automatically

Post by Wallas77 »

Crythias,

I changed the $HOME as you told me and the fetching works fine.

Thanks a lot for your help

Reagrds
Locked