Configure gmail

Moderator: crythias

Locked
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Configure gmail

Post by Electromancer »

Hi,
I got OTRS installed, and where do I go to configure gmail's nmap and smtp settings?

I want to be able to send tickets from my personal email.

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

Re: Configure gmail

Post by crythias »

Warning otrs will delete all your mail.
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
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

Thanks for replying!

I'm going to use a separate email just for OTRS.

I now have Gmail's POP3S and SMTPS settings in and working fine.

Question: How do I configure so that when a user submits me an email to my gmail account, that it gets forwarded to OTRS ticket list? I think I spelled that right..
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Configure gmail

Post by crythias »

It's not a forward. it's a fetch.
Electromancer wrote: How do I configure so that when a user submits me an email to my gmail account, that it gets forwarded to OTRS ticket list? I think I spelled that right..
Tell the user to send it to the other account or copy/paste in the interface.
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
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

Okay, how do I configure OTRS to fetch from my gmail account every few seconds?

Thanks!
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Configure gmail

Post by jojo »

http://doc.otrs.org/3.1/en/html/adminar ... count.html


Don't use it with your personal account, it will fetch all mails!
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

Okay and what steps should I take?
One way is to use a local MTA and the otrs.PostMaster.pl script that pipes the mails directly into the system. Another possibility is the use of mail accounts which can be administrated through the web interface.
--How do I do this?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Configure gmail

Post by jojo »

you can not do this with gmail (without deeper knowledge on operating an email server), you need to use POP3/S or IMAP/S
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

I have Gmail's SMTPS and POP3S settings configured, I can fetch my emails from my personal gmail account into the ticket list.

But how do I make OTRS fetch my emails for me automatically every few seconds?

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

Re: Configure gmail

Post by crythias »

Read the install instructions about cron.
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
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

So I'm at the part
Script 3.16. Files needed to create the cron jobs
at here http://doc.otrs.org/3.0/en/html/x545.ht ... figuration

I see
linux:/opt/otrs/var/cron# for foo in *.dist; do cp $foo
`basename $foo .dist`; done
Do I substitute any word in that syntax, because every time I execute that syntax I get the following..

OUTPUT: cp: target `unlock' is not a directory

What am I doing wrong? :(
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Configure gmail

Post by crythias »

Just remove .dist from all the files manually and restart cron per instructions
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
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

What is the easiest way to do that?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Configure gmail

Post by jojo »

read INSTALL file
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

Okay I will do that, thanks for pointing me their!

Thank you jojo!
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

Okay, I read the entire INSTALL file in /opt/otrs

I am stuck at 11) Cronjobs for the OTRS user:
Here.. shell> for foo in *.dist; do cp $foo `basename $foo .dist`; done
OUTPUT: >
All I see is '>' and nothing happens when I type, so I press [Ctrl]+[C](BREAK) to get out to my normal prompt which is --> [root@host cron]#

So now I decide to follow the wiki page just in case I missed something..etc.
I am at script 3.16 on this page --> http://doc.otrs.org/3.0/en/html/x545.ht ... figuration

And I enter this at the terminal..
linux:/opt/otrs/var/cron# for foo in *.dist; do cp $foo
`basename $foo .dist`; done
OUTPUT: cp: target `unlock` is not a directory

Why is that whole command returning this error? Now what should I try or check?

I am still trying to configure OTRS to fetch emails automatically. I wan't to receive emails in the ticket list that are submitted to my email address.

Thanks in advance.
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

Okay, I did not resolve the issue above with the command syntax output, however I now am receiving fetched ticket emails automatically and each ticket/email takes awhile to show up in OTRS.

Why does it take almost 8 minutes to fetch each new email automatically? I'm just curious.

To your knowledge, can I adjust this behavior so that I can receive email/tickets every minute, or maybe even a few seconds you think?
Last edited by Electromancer on 30 Jan 2013, 10:45, edited 1 time in total.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Configure gmail

Post by jojo »

man cron
man 5 crontab
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

hmmm I will definitely look into that, thanks jojo!
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

Okay, so after doing some reading, I edited this file..
/opt/otrs/var/cron/postmaster_mailbox

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

( I wan't to have emails fetched every minute..)

After saving and rebooting the server, I log back in to OTRS and still takes longer then 1 minute to receive new email tickets.

Am I doing something wrong?

Could I use procmail instead of postmaster_mailbox.pl ? If so, then what exact steps do I need to take?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Configure gmail

Post by jojo »

- check if your change is reflected in the users crontab (if you don't know how to do, ask your linux admin)
- if the change is not reflected, please run "bin/Cron.sh restart otrs" as root
- procmail can not be used with your gmail setup
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

I will do exactly that! Thank's jojo for everything! Really! You pointed me in the right direction always. Kudos for you jojo!

One more thing..

What ports should I open with iptables in CentOS? I turned off the firewall completely in order to view the web console on remote workstations.
Port 80 did not do it..
Electromancer
Znuny newbie
Posts: 29
Joined: 16 Jan 2013, 05:56
Znuny Version: 3.1.12
Real Name: Josh

Re: Configure gmail

Post by Electromancer »

Okay I found the solution after reading the man pages.

# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
# service iptables save

Last time my syntax was off..
Locked