[SOLVED] Automatic fetchmail not working

Moderator: crythias

Post Reply
bleitner
Znuny newbie
Posts: 17
Joined: 29 Apr 2012, 18:09
Znuny Version: 3.1.4
Real Name: bob
Company: temboo

[SOLVED] Automatic fetchmail not working

Post by bleitner »

I've configured through the web interface a mailbox to grab emails from to auto-generate tickets. From the web interface, clicking on "Fetch now" works fine and will generate tickets. However, I've enable fetchmail and PostMasterMailbox.pl in the crontab and it doesn't seem to be working? I'm not seeing anything in the logs and verified that the crontab is running.

Code: Select all

Jul 30 19:07:01 OTRS003101-Peak CRON[7255]: (otrs) CMD ([ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /dev/null)
Jul 30 19:07:01 OTRS003101-Peak CRON[7256]: (otrs) CMD (/usr/bin/fetchmail -a --ssl >> /dev/null)
Jul 30 19:07:01 OTRS003101-Peak CRON[7257]: (otrs) CMD ($HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null)
Last edited by bleitner on 31 Jul 2012, 18:48, edited 1 time in total.
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: Automatic fetchmail not working

Post by Wolfgangf »

sounds like you are checking two different mailboxes
- where ist the mailbox you configured through the web interface? on the OTRS box or somewhere else
- which mailbox are you fetching with fetchmail and where do you delivert the mails to?

To my mind, you should have configured a local account through web interface (for example "otrs") and fetchmail should fetch mails from an external account and deliver to local user otrs

BR
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
bleitner
Znuny newbie
Posts: 17
Joined: 29 Apr 2012, 18:09
Znuny Version: 3.1.4
Real Name: bob
Company: temboo

Re: Automatic fetchmail not working

Post by bleitner »

There's only one account under PostMaster Mail Accounts, helpdesk@ourdomain.com, which is an external mailbox that I can manually fetch mail from. I also enabled the fetchmail cron task which I didn't need, I only needed PostMasterMailbox.pl to run so I fixed that.

I did however figure out the problem for why it wasn't running. The crontab was looking for PostMasterMailbox.pl at $HOME/bin/PostMasterMailbox.pl, and $HOME was resolving to /home/otrs, not opt/otrs which is where the script was. Once I fixed that all started working.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: [SOLVED] Automatic fetchmail not working

Post by crythias »

yes, because you created a user with home there. :) edit passwd file and it should work normally.
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
donmiyagi
Znuny newbie
Posts: 10
Joined: 11 Sep 2012, 21:48
Znuny Version: 3.1.10
Real Name: Don Miyagi
Company: Sushi House

Re: [SOLVED] Automatic fetchmail not working

Post by donmiyagi »

I am having this same exact problem. Where and how did you edit the directory location?
donmiyagi
Znuny newbie
Posts: 10
Joined: 11 Sep 2012, 21:48
Znuny Version: 3.1.10
Real Name: Don Miyagi
Company: Sushi House

Re: [SOLVED] Automatic fetchmail not working

Post by donmiyagi »

Nevermind. If you go to /opt/otrs/var and edit the cron files individually to the right path it will work.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: [SOLVED] Automatic fetchmail not working

Post by crythias »

donmiyagi wrote:Nevermind. If you go to /opt/otrs/var and edit the cron files individually to the right path it will work.
Yes, it will, but you might want to check your otrs user's home directory in /etc/passwd (and the shadow, likely)
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
Post Reply