Need RT to fetchmail

Hi all,

Finaly got it all setup with the instructions on wiki on a RHEL5
fresh…

I have went through all the manual instructions and everything seems
well.

Now, I need RT to fetch the emails from a POP3 box and bring them into
RT.

How can I achieve this? Is there docs on this setup?

Thansk

Nelson Pereira
Senior Network Administrator

Protus IP Solutions Inc.
npereira@protus.com
phone: 613.733.0000 ext.528
MyFax: 613.822.5083

Refer your friends and colleagues to MyFax!
Click here for more information.
http://www.myfax.com/referral_program.asp

http://www.myfax.com

Nelson,

If you must pull from a POP3 account I would look at
fetchmailhttp://fetchmail.berlios.de/to pull in the mail. OTOH, not
knowing your specific reasons for using
POP3, I would look at ETRN or mail relaying from your host mail system to
use the standard setup with an SMTP mail server on your RT box. However
fetchmail can be configured to pull from POP3 and submit via SMTP so that
may take care of it for you.

James MachadoOn Fri, Apr 4, 2008 at 12:50 PM, Nelson Pereira npereira@protus.com wrote:

Hi all,

Finaly got it all setup with the instructions on wiki on a RHEL5 fresh…

I have went through all the manual instructions and everything seems well.

Now, I need RT to fetch the emails from a POP3 box and bring them into RT.

How can I achieve this? Is there docs on this setup?

Thansk

Nelson Pereira
Senior Network Administrator

Protus IP Solutions Inc.
npereira@protus.com
phone: 613.733.0000 ext.528
MyFax: 613.822.5083
www.myfax.com

Refer your friends and colleagues to MyFax!
Click here for more information.http://www.myfax.com/referral_program.asp

[image: www.MyFax.com] http://www.myfax.com


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Sample config:

/usr/bin/fetchmail -f /opt/rt3/.fetchmailrc -a -m “/opt/rt3/bin/rt-mailgate
–queue General --action correspond --url http://localhost/” >/dev/null

cat /opt/rt3/.fetchmailrc
set logfile=/opt/rt3/fetchmail
poll pop.mail.com proto pop3 user rt3@mail.com with pass “blabla” to rt3
here2008/4/4, Nelson Pereira npereira@protus.com:

Hi all,

Finaly got it all setup with the instructions on wiki on a RHEL5 fresh…

I have went through all the manual instructions and everything seems well.

Now, I need RT to fetch the emails from a POP3 box and bring them into RT.

How can I achieve this? Is there docs on this setup?

Thansk

Nelson Pereira
Senior Network Administrator

Protus IP Solutions Inc.
npereira@protus.com
phone: 613.733.0000 ext.528
MyFax: 613.822.5083
www.myfax.com

Refer your friends and colleagues to MyFax!
Click here for more information.http://www.myfax.com/referral_program.asp

[image: www.MyFax.com] http://www.myfax.com


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Ok, I tried this and im getting this error in the fetchmail log…

fetchmail: 2 messages for otrs at exmail.protus.org (22300 octets).

sh: -c: line 0: syntax error near unexpected token `|’

sh: -c: line 0: `|/etc/smrsh/rt-mailgate --queue general --action
correspond --url http://localhost/rt3

…fetchmail: reading message otrs@exmail.protus.org:1 of 2 (11154
octets) (log message incomplete)fetchmail: error writing message text

fetchmail: MDA error while fetching from otrs@exmail.protus.org

fetchmail: Query status=6 (IOERR)From: Vitaliy Okulov [mailto:vitaliy.okulov@gmail.com]
Sent: Saturday, April 05, 2008 2:21 AM
To: Nelson Pereira
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Sample config:

/usr/bin/fetchmail -f /opt/rt3/.fetchmailrc -a -m
“/opt/rt3/bin/rt-mailgate --queue General --action correspond --url
http://localhost/” >/dev/null

cat /opt/rt3/.fetchmailrc
set logfile=/opt/rt3/fetchmail
poll pop.mail.com proto pop3 user rt3@mail.com with pass “blabla” to rt3
here

You’ve got mismatched quotes. One’s a backtick, the other is a regular
single quote.

I’m not sure which you need, but adjusting one to the other should let
you see soon enough.

Steve Anderson

Systems Administrator

BiP Solutions Ltd.

0141 2702312From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Nelson
Pereira
Sent: 07 April 2008 13:05
To: Vitaliy Okulov
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Ok, I tried this and im getting this error in the fetchmail log…

fetchmail: 2 messages for otrs at exmail.protus.org (22300 octets).

sh: -c: line 0: syntax error near unexpected token `|’

sh: -c: line 0: `|/etc/smrsh/rt-mailgate --queue general --action
correspond --url http://localhost/rt3

…fetchmail: reading message otrs@exmail.protus.org:1 of 2 (11154
octets) (log message incomplete)fetchmail: error writing message text

fetchmail: MDA error while fetching from otrs@exmail.protus.org

fetchmail: Query status=6 (IOERR)

From: Vitaliy Okulov [mailto:vitaliy.okulov@gmail.com]
Sent: Saturday, April 05, 2008 2:21 AM
To: Nelson Pereira
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Sample config:

/usr/bin/fetchmail -f /opt/rt3/.fetchmailrc -a -m
“/opt/rt3/bin/rt-mailgate --queue General --action correspond --url
http://localhost/” >/dev/null

cat /opt/rt3/.fetchmailrc
set logfile=/opt/rt3/fetchmail
poll pop.mail.com proto pop3 user rt3@mail.com with pass “blabla” to rt3
here

Oups… I was piping it… so the command looks like this to retrieve
messages from the pop3 mailbox :

/usr/bin/fetchmail -f /opt/rt3/.fetchmailrc -a -m
“/etc/smrsh/rt-mailgate --queue general --action correspond --url
http://localhost/rt3” > /dev/null

Then in the /opt/rt3/fetchmail log file, I get this error:

404 Not Found

fetchmail: reading message otrs@exmail.protus.org:1 of 2 (11154 octets)
(log message incomplete)fetchmail: MDA returned nonzero status 75

fetchmail: not flushed

…An Error Occurred

404 Not Found

fetchmail: reading message otrs@exmail.protus.org:2 of 2 (11146 octets)
(log message incomplete)fetchmail: MDA returned nonzero status 75

fetchmail: not flushed

I finaly got it working …

The problem was the URL… for some reason, fetchmail does not like to
have http://locahost/rt3, rather, it wants http://192.168.5.5/rt3

So since I use -correspond, I should see an email going back to the
requester right?

But this is not happening…

Nelson Pereira
Senior Network Administrator

Protus IP Solutions Inc.
npereira@protus.com
phone: 613.733.0000 ext.528
MyFax: 613.822.5083

Refer your friends and colleagues to MyFax!
Click here for more information.
http://www.myfax.com/referral_program.asp

http://www.myfax.comFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Nelson
Pereira
Sent: Monday, April 07, 2008 8:05 AM
To: Vitaliy Okulov
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Ok, I tried this and im getting this error in the fetchmail log…

fetchmail: 2 messages for otrs at exmail.protus.org (22300 octets).

sh: -c: line 0: syntax error near unexpected token `|’

sh: -c: line 0: `|/etc/smrsh/rt-mailgate --queue general --action
correspond --url http://localhost/rt3

…fetchmail: reading message otrs@exmail.protus.org:1 of 2 (11154
octets) (log message incomplete)fetchmail: error writing message text

fetchmail: MDA error while fetching from otrs@exmail.protus.org

fetchmail: Query status=6 (IOERR)

From: Vitaliy Okulov [mailto:vitaliy.okulov@gmail.com]
Sent: Saturday, April 05, 2008 2:21 AM
To: Nelson Pereira
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Sample config:

/usr/bin/fetchmail -f /opt/rt3/.fetchmailrc -a -m
“/opt/rt3/bin/rt-mailgate --queue General --action correspond --url
http://localhost/” >/dev/null

cat /opt/rt3/.fetchmailrc
set logfile=/opt/rt3/fetchmail
poll pop.mail.com proto pop3 user rt3@mail.com with pass “blabla” to rt3
here

My .fetchmailrc looks like this and it works fine

username rt_username password rt_password mda “/etc/smrsh/rt-
mailgate --url http://rt.hctc.com --queue ‘Email Support’
–action correspond”

where rt_username and rt_password are whatever you have decided you
will use.

This is on CentOS 5

Regards,

Greg Evans
Hood Canal Communications
(360) 898-2481 ext.212On Apr 7, 2008, at 5:54 AM, Nelson Pereira wrote:

Oups… I was piping it… so the command looks like this to retrieve
messages from the pop3 mailbox :

/usr/bin/fetchmail -f /opt/rt3/.fetchmailrc -a -m "/etc/smrsh/rt-
mailgate --queue general --action correspond --url http://localhost/rt3
" > /dev/null

Then in the /opt/rt3/fetchmail log file, I get this error:

404 Not Found
fetchmail: reading message otrs@exmail.protus.org:1 of 2 (11154
octets) (log message incomplete)fetchmail: MDA returned nonzero
status 75
fetchmail: not flushed
…An Error Occurred

404 Not Found
fetchmail: reading message otrs@exmail.protus.org:2 of 2 (11146
octets) (log message incomplete)fetchmail: MDA returned nonzero
status 75
fetchmail: not flushed

I finaly got it working ……

The problem was the URL… for some reason, fetchmail does not like to
have http://locahost/rt3, rather, it wants http://192.168.5.5/rt3

So since I use –correspond, I should see an email going back to the
requester right?
But this is not happening….

Nelson Pereira
Senior Network Administrator

Protus IP Solutions Inc.
npereira@protus.com
phone: 613.733.0000 ext.528
MyFax: 613.822.5083
www.myfax.com

Refer your friends and colleagues to MyFax!
Click here for more information.
<image001.gif>

From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com
] On Behalf Of Nelson Pereira
Sent: Monday, April 07, 2008 8:05 AM
To: Vitaliy Okulov
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Ok, I tried this and im getting this error in the fetchmail log…

fetchmail: 2 messages for otrs at exmail.protus.org (22300 octets).
sh: -c: line 0: syntax error near unexpected token |' sh: -c: line 0: |/etc/smrsh/rt-mailgate --queue general --action
correspond --url http://localhost/rt3
…fetchmail: reading message otrs@exmail.protus.org:1 of 2 (11154
octets) (log message incomplete)fetchmail: error writing message text
fetchmail: MDA error while fetching from otrs@exmail.protus.org
fetchmail: Query status=6 (IOERR)

From: Vitaliy Okulov [mailto:vitaliy.okulov@gmail.com]
Sent: Saturday, April 05, 2008 2:21 AM
To: Nelson Pereira
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Sample config:

/usr/bin/fetchmail -f /opt/rt3/.fetchmailrc -a -m “/opt/rt3/bin/rt-
mailgate --queue General --action correspond --url http://
localhost/” >/dev/null

cat /opt/rt3/.fetchmailrc
set logfile=/opt/rt3/fetchmail
poll pop.mail.com proto pop3 user rt3@mail.com with pass “blabla” to
rt3 here
2008/4/4, Nelson Pereira npereira@protus.com:
Hi all,

Finaly got it all setup with the instructions on wiki on a RHEL5
fresh…

I have went through all the manual instructions and everything seems
well.

Now, I need RT to fetch the emails from a POP3 box and bring them
into RT.

How can I achieve this? Is there docs on this setup?

Thansk

Nelson Pereira
Senior Network Administrator

Protus IP Solutions Inc.
npereira@protus.com
phone: 613.733.0000 ext.528
MyFax: 613.822.5083
www.myfax.com

Refer your friends and colleagues to MyFax!
Click here for more information.

<image001.gif>


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Please change http://localhost/rt3 according to your hostname.2008/4/7, Nelson Pereira npereira@protus.com:

Oups… I was piping it… so the command looks like this to retrieve
messages from the pop3 mailbox :

/usr/bin/fetchmail -f /opt/rt3/.fetchmailrc -a -m “/etc/smrsh/rt-mailgate
–queue general --action correspond --url http://localhost/rt3” >
/dev/null

Then in the /opt/rt3/fetchmail log file, I get this error:

404 Not Found

fetchmail: reading message otrs@exmail.protus.org:1 of 2 (11154 octets)
(log message incomplete)fetchmail: MDA returned nonzero status 75

fetchmail: not flushed

…An Error Occurred

=================

404 Not Found

fetchmail: reading message otrs@exmail.protus.org:2 of 2 (11146 octets)
(log message incomplete)fetchmail: MDA returned nonzero status 75

fetchmail: not flushed

I finaly got it working ……

The problem was the URL… for some reason, fetchmail does not like to have
http://locahost/rt3, rather, it wants http://192.168.5.5/rt3

So since I use –correspond, I should see an email going back to the
requester right?

But this is not happening….

Nelson Pereira
Senior Network Administrator

Protus IP Solutions Inc.
npereira@protus.com
phone: 613.733.0000 ext.528
MyFax: 613.822.5083
www.myfax.com

Refer your friends and colleagues to MyFax!
Click here for more information.http://www.myfax.com/referral_program.asp

[image: www.MyFax.com] http://www.myfax.com


From: rt-users-bounces@lists.bestpractical.com [mailto:
rt-users-bounces@lists.bestpractical.com] *On Behalf Of *Nelson Pereira
Sent: Monday, April 07, 2008 8:05 AM
To: Vitaliy Okulov
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Ok, I tried this and im getting this error in the fetchmail log…

fetchmail: 2 messages for otrs at exmail.protus.org (22300 octets).

sh: -c: line 0: syntax error near unexpected token `|’

sh: -c: line 0: `|/etc/smrsh/rt-mailgate --queue general --action
correspond --url http://localhost/rt3

…fetchmail: reading message otrs@exmail.protus.org:1 of 2 (11154 octets)
(log message incomplete)fetchmail: error writing message text

fetchmail: MDA error while fetching from otrs@exmail.protus.org

fetchmail: Query status=6 (IOERR)


From: Vitaliy Okulov [mailto:vitaliy.okulov@gmail.com]
Sent: Saturday, April 05, 2008 2:21 AM
To: Nelson Pereira
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Sample config:

/usr/bin/fetchmail -f /opt/rt3/.fetchmailrc -a -m
“/opt/rt3/bin/rt-mailgate --queue General --action correspond --url
http://localhost/” >/dev/null

cat /opt/rt3/.fetchmailrc
set logfile=/opt/rt3/fetchmail
poll pop.mail.com proto pop3 user rt3@mail.com with pass “blabla” to rt3
here

2008/4/4, Nelson Pereira npereira@protus.com:

Hi all,

Finaly got it all setup with the instructions on wiki on a RHEL5 fresh…

I have went through all the manual instructions and everything seems well.

Now, I need RT to fetch the emails from a POP3 box and bring them into RT.

How can I achieve this? Is there docs on this setup?

Thansk

Nelson Pereira
Senior Network Administrator

Protus IP Solutions Inc.
npereira@protus.com
phone: 613.733.0000 ext.528
MyFax: 613.822.5083
www.myfax.com

Refer your friends and colleagues to MyFax!
Click here for more information.http://www.myfax.com/referral_program.asp

[image: www.MyFax.com] http://www.myfax.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

I got sendmail working now…

All is good…

Now I have to work on the templates…

When the requester receives the response back on a -action correspond,
with a subject line of [example.com #2] AutoReply: testing111 and they
get this message:

What stipulates the formatting of the subject line? I would like it to
be a ticket number not example.com #2

Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding:

  "testing111",

a summary of which appears below.

There is no need to reply to this message right now. Your ticket has
been assigned an ID of [example.com #2].

Please include the string:

     [example.com #2]

in the subject line of all future correspondence about this issue. To do
so, you may reply to this message.

                    Thank you,

                    otrs@protus.orgFrom: Vitaliy Okulov [mailto:vitaliy.okulov@gmail.com] 

Sent: Monday, April 07, 2008 12:59 PM
To: Nelson Pereira
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Please change http://localhost/rt3 according to your hostname.

Hi Nelson,

example.com #2” is the ticket number. Your RT installation is named
example.com’ and the ticket number is ‘2’. This number in the subject
line of any replies to RT will associate the message with ticket #2 instead
of creating a new ticket.

Regards,
Gene

At 10:24 AM 4/7/2008, Nelson Pereira wrote:

When the requester receives the response back on a –action correspond,
with a subject line of [example.com #2] AutoReply: testing111 and they get
this message:
What stipulates the formatting of the subject line? I would like it to be
a ticket number not example.com #2….

Greetings,

This message has been automatically generated in response to the creation
of a trouble ticket regarding:
“testing111”,
a summary of which appears below.

There is no need to reply to this message right now. Your ticket has been
assigned an ID of [example.com #2].

Please include the string:

     [example.com #2]

in the subject line of all future correspondence about this issue. To do
so, you may reply to this message.

                    Thank you,
                    otrs@protus.org

Gene LeDuc, GSEC
Security Analyst
San Diego State University

Thanks !

Went in and changed this…

Is there a specific config that when an agent adds a reply or comment
and selects to send it to the requestor?

It’s not sending the comments or repluies…

Nelson Pereira
Senior Network Administrator

Protus IP Solutions Inc.
npereira@protus.com
phone: 613.733.0000 ext.528
MyFax: 613.822.5083

Refer your friends and colleagues to MyFax!
Click here for more information.
http://www.myfax.com/referral_program.asp

http://www.myfax.comFrom: Gene LeDuc [mailto:gleduc@mail.sdsu.edu]
Sent: Monday, April 07, 2008 1:38 PM
To: Nelson Pereira
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Need RT to fetchmail…

Hi Nelson,

example.com #2” is the ticket number. Your RT installation is named
example.com’ and the ticket number is ‘2’. This number in the subject
line of any replies to RT will associate the message with ticket #2
instead of creating a new ticket.

Regards,
Gene

At 10:24 AM 4/7/2008, Nelson Pereira wrote:

When the requester receives the response back on a -action correspond,
with a subject line of [example.com #2] AutoReply: testing111 and they
get this message:
What stipulates the formatting of the subject line? I would like it to
be a ticket number not example.com #2

Greetings,

This message has been automatically generated in response to the
creation of a trouble ticket regarding:
“testing111”,
a summary of which appears below.

There is no need to reply to this message right now. Your ticket has
been assigned an ID of [example.com #2].

Please include the string:

     [example.com #2]

in the subject line of all future correspondence about this issue. To do
so, you may reply to this message.

                    Thank you,
                    otrs@protus.org

Gene LeDuc, GSEC
Security Analyst
San Diego State University

By default RT won’t send an e-mail notification to the person who made the
changes, it assumes that the person already knows about the changes. So if
you are both the requestor and the person updating the ticket, don’t expect
to get any notifications (it’s more realistic to use 2 different accounts
for testing, anyway). You can change this behavior by use of the
NotifyActor setting in the config file. Another thing that is going save
you hours of scratching your head is to set RT’s logging level to Debug and
then make liberal use of statements like
$Rt::Logger->debug(“Notify script now entering Code Prep stage”);

And then monitor the rt.log file.

At 10:56 AM 4/7/2008, Nelson Pereira wrote:

Went in and changed this
.

Is there a specific config that when an agent adds a reply or comment and
selects to send it to the requestor?
It’s not sending the comments or repluies

Gene LeDuc, GSEC
Security Analyst
San Diego State University