Retrieving Mail Form Mutliple Mailboxes

Moderator: crythias

Locked
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

I have a rather silly question, that I have been trouble shoting the last few days.

How do I know which cronjob is retrieving my mails from the various inboxes? I currently have 5 different inboxes on OTRS and since Monday my fetchmail has not been retrieving e-mails from any of the boxes. However when I llok at the log file it tells me there are no e-mails in the box, and only shows the one account. However when I log into the e-mail account the mailbox is full of e-mails.


Thanks
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

First, I would recommend as much as possible to alias your email addresses to a single mailbox. Dispatching will still work.
Second, it would be helpful to know if you're running Windows or Linux. My *guess* is that the CronW service has stopped.
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
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

Sorry, forgot to mention this is on a Unix machine.

I think I might have a conflicting fetchmail service running, and I'm not sure where to find this one or how to stop it.
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

what do the logs say?
did you look at your crontab?
crontab -l -u otrs
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
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

Here is my crontab file.

Code: Select all

# --
# cron/aaa_base - base crontab package
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: aaa_base.dist,v 1.7 2009/02/16 20:35:25 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# Who gets the cron emails?
MAILTO="otrs@localhost"
# --
# cron/aaa_base - base crontab package
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: aaa_base.dist,v 1.7 2009/02/16 20:35:25 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# Who gets the cron emails?
MAILTO="otrs@mydomain.com"
# --
# cron/cache - delete expired cache
# Copyright (C) 2001-2010 xxx, http://otrs.org/
# --
# $Id: cache.dist,v 1.2 2010/11/22 12:15:35 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# 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
# --
# cron/fetchmail - fetchmail cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: fetchmail.dist,v 1.10 2009/02/16 20:53:10 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch every 1 minutes emails via fetchmail
#1 * * * * [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /dev/null
1 * * * *    /usr/bin/fetchmail -a --ssl >> /dev/null
# --
# cron/fetchmail - fetchmail cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: fetchmail.dist,v 1.10 2009/02/16 20:53:10 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch every 1 minutes emails via fetchmail
#*/1 * * * * [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /dev/null
#*/1 * * * *    /usr/bin/fetchmail -a --ssl >> /dev/null
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2012 xxx, http://otrs.org/
# --
# $Id: generic_agent.dist,v 1.15 2012/02/07 20:11:16 jb Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# start generic agent every 1 minutes
1 * * * *    $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
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2012 xxx, http://otrs.org/
# --
# $Id: generic_agent.dist,v 1.15 2012/02/07 20:11:16 jb Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# start generic agent every 1 minutes
*/1 * * * *    $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
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: generic_agent-database.dist,v 1.9 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# start generic agent every 1 minutes
# */1 * * * *    $HOME/bin/otrs.GenericAgent.pl -c db >> /dev/null
# --
# cron/pending_jobs - pending_jobs cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: pending_jobs.dist,v 1.12 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# check every 120 min the pending jobs
# 45 */2 * * *    $HOME/bin/otrs.PendingJobs.pl >> /dev/null
# --
# cron/postmaster - postmaster cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: postmaster.dist,v 1.9 2009/02/16 20:55:11 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# check daily the spool directory of OTRS
# 1 0 * * * * [ -e /etc/init.d/otrs ] && /etc/init.d/otrs cleanup >> /dev/null; [ -e /etc/rc.d/init.d/otrs ] && /etc/rc.d/init.d/otrs cleanup >> /dev/null
1 0 * * *  $HOME/bin/otrs.cleanup >> /dev/null
# --
# cron/postmaster_mailbox - postmaster_mailbox cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: postmaster_mailbox.dist,v 1.3 2009/11/09 15:24:13 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch emails every 1 minutes
*/1 * * * *    $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
# --
# cron/postmaster_mailbox - postmaster_mailbox cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: postmaster_mailbox.dist,v 1.3 2009/11/09 15:24:13 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch emails every 1 minutes
# */1 * * * *    $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
# --
# cron/rebuild_ticket_index - rebuild ticket index for OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: rebuild_ticket_index.dist,v 1.10 2009/11/09 15:24:13 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# just every day
# 01 01 * * * $HOME/bin/otrs.RebuildTicketIndex.pl >> /dev/null
# --
# cron/session - delete old session ids of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: session.dist,v 1.12 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# delete every 120 minutes old/idle session ids
# 55 */2 * * *    $HOME/bin/otrs.DeleteSessionIDs.pl --expired >> /dev/null
# --
# cron/survey_trigger_send_requests - send delayed survey requests
# Copyright (C) 2001-2011 xxx, http://otrs.org/
# --
# $Id: survey_trigger_send_requests.dist,v 1.2 2011/12/15 16:30:11 jh Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see L<http://www.gnu.org/licenses/agpl.txt>.
# --

# This file is distributed with the extenstion '.dist'.
# Please remove the extension and uncomment the last line for production.

# every 20 min
# */20 * * * * $HOME/bin/otrs.SurveyTriggerSendRequests.pl -e >> /dev/null
# --
# cron/unlock - unlock old locked ticket of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: unlock.dist,v 1.11 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# unlock every hour old locked tickets
# 35 * * * *  $HOME/bin/otrs.UnlockTickets.pl --timeout >> /dev/null
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

The log error message is :

Code: Select all

Can't create PID PostMasterMailbox, because it's already running (yourhost.example.com/4488)!
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

no, this doesn't fetch every 1 minute. This fetches at 1 minute past the hour.
1 * * * * /usr/bin/fetchmail -a --ssl >> /dev/null
Effective result:

Code: Select all

MAILTO="otrs@localhost"
MAILTO="otrs@mydomain.com"
20 0 * * 0  $HOME/bin/otrs.DeleteCache.pl --expired >> /dev/null
30 0 * * 0  $HOME/bin/otrs.LoaderCache.pl -o delete >> /dev/null
1 * * * *    /usr/bin/fetchmail -a --ssl >> /dev/null
1 * * * *    $HOME/bin/otrs.GenericAgent.pl >> /dev/null
*/1 * * * *    $HOME/bin/otrs.GenericAgent.pl >> /dev/null
1 0 * * *  $HOME/bin/otrs.cleanup >> /dev/null
*/1 * * * *    $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/nul
Plus every one minute is too fast for pop, especially if you have multiple accounts. Set it to */3 to account for traffic. If you need faster consider procmail.
you're also running fetchmail AND PostMasterMailbox. Why?

Further, search for your error message on the forums. the short answer is you'll need to wait for the pid to clear, or you can clear it yourself with a sql query.
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
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

I'mn still trying to figure out why it was working the one week, for a few months now already, and then suddenly it has just stopped working.

How would I go about implementing procmail?
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

salientanimal wrote:then suddenly it has just stopped working.
Because it couldn't complete the fetch job in time.
salientanimal wrote:How would I go about implementing procmail?
You'll need to be able to send email directly to the OTRS box with it holding its own SMTP server.
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
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

Ok... the procmail I don't think is going to be an option right now.

How can I go about fixing my mess? The mail system is not working at all now :( and I'm left manually fetching e-mails every now and again.

Oh and which one would you recommend I use considering I have multiple mailboxes and not just the one?
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

Try searching

which .. fetchmail or postmastermailbox? I don't have a preference. Just know that you're possibly going to have collisions with postmaster mailbox trying to get from both boxes. If you can alias them to one, you may achieve better results.
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
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

Yip I'm going to try and do that.

So yesterday I changed the Cron jobs a bit and adjusted it to 3 minutes as you suggested. I'm doing more tets today, because it looks like something is picking up the e-mails from the mailbox, but I dont know what nor where they are being sent as they not being pulling into OTRS.
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

salientanimal wrote:because it looks like something is picking up the e-mails from the mailbox, but I dont know what nor where they are being sent as they not being pulling into OTRS.
Your OTRS logs will be helpful in troubleshooting this. If you've changed default text of Priority normal, for instance, it needs to be adjusted in SysConfig. If OTRS has retrieved a message but not applied it to a ticket, the email isn't gone. It's waiting for the processing to be successful and then the tickets will go to the proper location. Again, look at your System Log in the Admin section of OTRS.

You should also verify that you don't have competing OTRS installs or email clients attempting to download email from the OTRS boxes. Only one non-human should be grabbing from that account.
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
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

I stoped the crons and have now restarted them. If there are no logs in my OTRS log when the mails get fetched, what does this mean?
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

Admin/Syslog should show you when and what happens to the tickets when fetched. If it's completely blank, you have a log configuration problem.
salientanimal wrote: However when I log into the e-mail account the mailbox is full of e-mails.
If this is still true, the account isn't pulling emails, and the otrs log should tell you why.

If Manual Fetch works, then it's a cron problem.
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
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

I have now made quite a few adjustments to my otrs cron jobs and this is currently what is running now that I ahve activated it again this morning using ./Cron.sh start.

Code: Select all

# --
# cron/aaa_base - base crontab package
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: aaa_base.dist,v 1.7 2009/02/16 20:35:25 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# Who gets the cron emails?
MAILTO="otrs@localhost"
# --
# cron/aaa_base - base crontab package
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: aaa_base.dist,v 1.7 2009/02/16 20:35:25 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# Who gets the cron emails?
MAILTO="otrs@virginmobile.co.za"
# --
# cron/cache - delete expired cache
# Copyright (C) 2001-2010 xxx, http://otrs.org/
# --
# $Id: cache.dist,v 1.2 2010/11/22 12:15:35 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# 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
# --
# cron/fetchmail - fetchmail cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: fetchmail.dist,v 1.10 2009/02/16 20:53:10 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch every 1 minutes emails via fetchmail
*/3 * * * * [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /dev/null
#*/3 * * * *    /usr/bin/fetchmail -a --ssl >> /dev/null
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2012 xxx, http://otrs.org/
# --
# $Id: generic_agent.dist,v 1.15 2012/02/07 20:11:16 jb Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# start generic agent every 1 minutes
1 * * * *    $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
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2012 xxx, http://otrs.org/
# --
# $Id: generic_agent.dist,v 1.15 2012/02/07 20:11:16 jb Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# start generic agent every 1 minutes
*/1 * * * *    $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
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: generic_agent-database.dist,v 1.9 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# start generic agent every 1 minutes
# */1 * * * *    $HOME/bin/otrs.GenericAgent.pl -c db >> /dev/null
# --
# cron/pending_jobs - pending_jobs cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: pending_jobs.dist,v 1.12 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# check every 120 min the pending jobs
# 45 */2 * * *    $HOME/bin/otrs.PendingJobs.pl >> /dev/null
# --
# cron/postmaster - postmaster cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: postmaster.dist,v 1.9 2009/02/16 20:55:11 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# check daily the spool directory of OTRS
# 1 0 * * * * [ -e /etc/init.d/otrs ] && /etc/init.d/otrs cleanup >> /dev/null; [ -e /etc/rc.d/init.d/otrs ] && /etc/rc.d/init.d/otrs cleanup >> /dev/null
*/3 0 * * *  $HOME/bin/otrs.cleanup >> /dev/null
# --
# cron/postmaster_mailbox - postmaster_mailbox cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: postmaster_mailbox.dist,v 1.3 2009/11/09 15:24:13 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch emails every 1 minutes
#*/3 * * * *    $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
# --
# cron/postmaster_mailbox - postmaster_mailbox cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: postmaster_mailbox.dist,v 1.3 2009/11/09 15:24:13 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch emails every 1 minutes
# */1 * * * *    $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
# --
# cron/rebuild_ticket_index - rebuild ticket index for OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: rebuild_ticket_index.dist,v 1.10 2009/11/09 15:24:13 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# just every day
# 01 01 * * * $HOME/bin/otrs.RebuildTicketIndex.pl >> /dev/null
# --
# cron/session - delete old session ids of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: session.dist,v 1.12 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# delete every 120 minutes old/idle session ids
# 55 */2 * * *    $HOME/bin/otrs.DeleteSessionIDs.pl --expired >> /dev/null
# --
# cron/survey_trigger_send_requests - send delayed survey requests
# Copyright (C) 2001-2011 xxx, http://otrs.org/
# --
# $Id: survey_trigger_send_requests.dist,v 1.2 2011/12/15 16:30:11 jh Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see L<http://www.gnu.org/licenses/agpl.txt>.
# --

# This file is distributed with the extenstion '.dist'.
# Please remove the extension and uncomment the last line for production.

# every 20 min
# */20 * * * * $HOME/bin/otrs.SurveyTriggerSendRequests.pl -e >> /dev/null
# --
# cron/unlock - unlock old locked ticket of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: unlock.dist,v 1.11 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# unlock every hour old locked tickets
*/35 * * * *  $HOME/bin/otrs.UnlockTickets.pl --timeout >> /dev/null
As you can imagine this issue is becoming a pain of a pain, and I don't know if I'm any clsoer to finding a solution. I have looked at my log and also confirmed that Core::Log is set to SysLog. What is really baffeling me is if I turn off the crons (./Cron.sh stop) the e-mails stay in the otrs@mydomain.com mailbox, as they should because the cron is not running. However when I turn the cron back on (./Cron.sh start) it fetches the mails but not details in the System Log of OTRS that the mails haev either been fetched or fail. My ./Cron.sh is located in the following directory /opt/otrs/bin. What should my next step to trouble shooting be?

The cron seems to be fetching the mails and storing them to /var/mail/otrs.
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

If Sys log says nothing, you may have other issues, because I'm sure you've changed the labeling for the default priority or another attribute. There must be errors showing in the system log. But you aren't showing them, and we're just going to go round and round on this. check also /var/log/syslog and or /var/log messages.

The mails are getting fetched and aren't being treated because the defaults for their disposition are changed/don't exist/are invalid.

This is highly likely to be a custom configuration issue, but until you determine *what* is changed in the PostMaster default Priority or other attribute (state?), the tickets are going to sit until this is resolved.

Check SysConfig Ticket/Core::PostMaster and verify they match valid values.
PostmasterDefaultQueue
Default value: Raw
Defines the postmaster default queue.

PostmasterDefaultPriority
Default value: 3 normal
Defines the default priority of new tickets.

PostmasterDefaultState
Default value: new
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
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

Ok I'm going to go through all the seetings again... but I know I didn't make any changes in the system itself.

Everything was working perfectly for more than 3 months, and then just stopped.

What I can confirm thus far is that these are all the same as you mentioned:
Check SysConfig Ticket/Core::PostMaster and verify they match valid values.
PostmasterDefaultQueue
Default value: Raw
Defines the postmaster default queue.

PostmasterDefaultPriority
Default value: 3 normal
Defines the default priority of new tickets.

PostmasterDefaultState
Default value: new
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

What happens with a manual fetch?

You must find a log file that is indicating that it's doing well something. There's not a lot of troubleshooting that can be done effectively without a log.
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
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

Also verify that the default settings that match are actual valid settings in their respective locations elsewhere in the admin settings.
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
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

If I do a manual fetch it correctly fetches the mails and puts them into the queues
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

Also is I do a manual fetch it is recorded in the SysLog of OTRS
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

salientanimal wrote:If I do a manual fetch it correctly fetches the mails and puts them into the queues
salientanimal wrote: If there are no logs in my OTRS log when the mails get fetched, what does this mean?
salientanimal wrote:when I llok at the log file it tells me there are no e-mails in the box, and only shows the one account.
salientanimal wrote:when I log into the e-mail account the mailbox is full of e-mails.
Effective result of your last cron post:

Code: Select all

20 0 * * 0  $HOME/bin/otrs.DeleteCache.pl --expired >> /dev/null
30 0 * * 0  $HOME/bin/otrs.LoaderCache.pl -o delete >> /dev/null
*/3 * * * * [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /dev/null
1 * * * *    $HOME/bin/otrs.GenericAgent.pl >> /dev/null
*/1 * * * *    $HOME/bin/otrs.GenericAgent.pl >> /dev/null
*/3 0 * * *  $HOME/bin/otrs.cleanup >> /dev/null
*/35 * * * *  $HOME/bin/otrs.UnlockTickets.pl --timeout >> /dev/nul
My suggestion: get rid of the fetchmail line and put back the postmastermailbox line:

Code: Select all

*/3 * * * *    $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
Chances are, your system doesn't have the fetchmail binary and is therefore not running.
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
salientanimal
Znuny newbie
Posts: 58
Joined: 03 Oct 2012, 14:13
Znuny Version: 3.1.10
Real Name: Leon Claassen
Company: Virgin

Re: Retrieving Mail Form Mutliple Mailboxes

Post by salientanimal »

So eventually I figured out what the problem was. It appears that somehow I had 2 instances of OTRS running. At one stage I did do a reinstall, but why didn't the new install replace the old files?

Also, how do I find out exactly which "copy" of OTRS is the "active" one so that I can remove / suspend the second copy?

Thanks again though for all your help with trouble shooting this one. Took a while to resolve, but at least now its working.
OTRS 3.1.10 (NEWBIE) - UNIX (NEWBIE) - MySQL (INTERMEDIATE)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Retrieving Mail Form Mutliple Mailboxes

Post by crythias »

well, the easiest thing to do is to rename config.pm and see if it breaks the live install.
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
Locked