Rt-mailgate problems

David.Addison@infineon.com wrote:

There appears to be a pipe symbol “|” missing from the start of the
alias definition so sendmail is trying to output the mail to a file
called /opt/rt3/bin/mailgate rather than piping it to the program.

thankz i didn’t see that maybe thats the problem

-----Original Message-----
*From:* rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] *On Behalf Of
*Phillip Leremi
*Sent:* 26 March 2004 09:35
*To:* rt-users@lists.fsck.com
*Cc:* rt-users@lists.bestpractical.com; Ruslan U. Zakirov
*Subject:* [rt-users] Re: rt-mailgate problems



seph wrote:

i can’t create ticket via email, I have done aliases in /etc/aliases
and i did smrch, i have tryed to debug but the log is empty.

At least the first several steps are covered group. Could you include
your MTA logs?

yes here it is:
Mar 25 16:36:31 phillip sendmail[17164]: user 500 attempted to
rebuild the alias map
Mar 25 16:36:36 phillip sendmail[17166]: alias database
/etc/aliases rebuilt by root
Mar 25 16:36:36 phillip sendmail[17166]: /etc/aliases: 67 aliases,
longest 194 bytes, 1412 bytes total
Mar 25 16:36:48 phillip sendmail[17197]: i2PEamcD017197:
from=<darren@ReportStar.net <mailto:darren@ReportStar.net>>,
size=1829, class=0, nrcpts=1,
msgid=<013b01c41278$f4ca9870$1500a8c0@reportstar
<mailto:013b01c41278$f4ca9870$1500a8c0@reportstar>>, proto=ESMTP,
daemon=MTA, relay=phillip [127.0.0.1]
Mar 25 16:36:48 phillip sendmail[17198]: i2PEamcD017197:
to="/opt/rt3/bin/rt-mailgate --queue support --action correspond
--url http://192.168.0.104/" rt-comment :"/opt/rt3/bin/rt-mailgate
--queue support --action comment --url http://192.168.0.104/",
ctladdr=<rt@localhost <mailto:rt@localhost>> (8/0),
delay=00:00:00, xdelay=00:00:00, mailer=*file*, pri=32001,
dsn=5.0.0, stat=Can't create output
Mar 25 16:36:48 phillip sendmail[17198]: i2PEamcD017197:
i2PEamcD017198: DSN: Can't create output
Mar 25 16:36:50 phillip sendmail[17198]: i2PEamcD017198:
to=<darren@ReportStar.net <mailto:darren@ReportStar.net>>,
delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=33025,
relay=fw.reportstar.net. [196.22.194.226], dsn=2.0.0, stat=Sent
(Ok: queued as 54D381251E7)
Mar 26 04:02:04 phillip sendmail[17521]: i2Q224M2017521:
from=root, size=2397, class=0, nrcpts=1,
msgid=<200403260202.i2Q224M2017521@phillip.reportstar.net
<mailto:200403260202.i2Q224M2017521@phillip.reportstar.net>>,
relay=root@localhost <mailto:relay=root@localhost>
Mar 26 04:02:04 phillip sendmail[17524]: i2Q224cD017524:
from=<root@phillip.reportstar.net
<mailto:root@phillip.reportstar.net>>, size=2707, class=0,
nrcpts=1,
msgid=<200403260202.i2Q224M2017521@phillip.reportstar.net
<mailto:200403260202.i2Q224M2017521@phillip.reportstar.net>>,
proto=ESMTP, daemon=MTA, relay=phillip [127.0.0.1]
Mar 26 04:02:04 phillip sendmail[17521]: i2Q224M2017521: to=root,
ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay,
pri=30055, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent
(i2Q224cD017524 Message accepted for delivery)
Mar 26 04:02:04 phillip sendmail[17525]: i2Q224cD017524:
to=<root@phillip.reportstar.net
<mailto:root@phillip.reportstar.net>>,
ctladdr=<root@phillip.reportstar.net
<mailto:root@phillip.reportstar.net>> (0/0), delay=00:00:00,
xdelay=00:00:00, mailer=local, pri=32933, dsn=2.0.0, stat=Sent
Mar 26 11:33:10 phillip sendmail[18522]: alias database
/etc/aliases rebuilt by root
Mar 26 11:33:10 phillip sendmail[18522]: /etc/aliases: 67 aliases,
longest 194 bytes, 1412 bytes total

Have you tried running the mailgate from the command
line?

no i haven't ?

seph


Kind Regards,
Phillip
Phillip Leremi
Tel: 011 884 7633
Fax: 011 883 5805
phillip@reportstar.net
www.reportstar.net



rt-users mailing list
rt-users@lists.bestpractical.com
The rt-users Archives

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Kind Regards,
Phillip
Phillip Leremi
Tel: 011 884 7633
Fax: 011 883 5805
phillip@reportstar.net

I am running RT3 and cannot get an inbound email to open a ticket.

I have added /etc/aliases:

rt mail forwarding

rt: "|/opt/rt3/bin/rt-mailgate --queue general --action
correspond --url http://rt.nubrid

ges.com/"

rt-comment: "|/opt/rt3/bin/rt-mailgate --queue general --action
comment --url http://rt.nubridges

.com/"

I have added a soft link in smrch

When I send an email to rt@rt.nubridges.com

Here is the sendmail logfiles:

Apr 1 20:22:38 rt sendmail[9000]: i321Mcv8009000:
from=PKnowles@nubridges.com, size=1764, class=0, nrcpts=1,
msgid=3430B9A60E93564FAB3B5861335CBDCF01470676@germanium.numethods.com
, proto=ESMTP, daemon=MTA, relay=germanium.numethods.com [10.0.26.97]

Apr 1 20:22:39 rt sendmail[9001]: i321Mcv8009000:
to=“|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url
http://rt.nubridges.com/”, ctladdr=rt@rt.nubridges.com (8/0),
delay=00:00:01, xdelay=00:00:01, mailer=prog, pri=31970, dsn=5.3.0,
stat=unknown mailer error 255

Apr 1 20:22:39 rt sendmail[9001]: i321Mcv8009000: i321Mdv8009001: DSN:
unknown mailer error 255

Outbound email is working fine.

Any guidance would be appreciated,

Phillip Knowles-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Phillip
Leremi
Sent: Friday, March 26, 2004 4:35 AM
To: rt-users@lists.fsck.com
Cc: rt-users@lists.bestpractical.com; Ruslan U. Zakirov
Subject: [rt-users] Re: rt-mailgate problems

seph wrote:

i can't create ticket via email, I have done aliases in

/etc/aliases
and i did smrch, i have tryed to debug but the log is empty.

At least the first several steps are covered group. Could you include
your MTA logs?

yes here it is:
Mar 25 16:36:31 phillip sendmail[17164]: user 500 attempted to rebuild
the alias map
Mar 25 16:36:36 phillip sendmail[17166]: alias database /etc/aliases
rebuilt by root
Mar 25 16:36:36 phillip sendmail[17166]: /etc/aliases: 67 aliases,
longest 194 bytes, 1412 bytes total
Mar 25 16:36:48 phillip sendmail[17197]: i2PEamcD017197:
from=darren@ReportStar.net, size=1829, class=0, nrcpts=1,
msgid=013b01c41278$f4ca9870$1500a8c0@reportstar, proto=ESMTP,
daemon=MTA, relay=phillip [127.0.0.1]
Mar 25 16:36:48 phillip sendmail[17198]: i2PEamcD017197:
to=“/opt/rt3/bin/rt-mailgate --queue support --action correspond --url
http://192.168.0.104/” rt-comment :“/opt/rt3/bin/rt-mailgate --queue
support --action comment --url http://192.168.0.104/”,
ctladdr=rt@localhost (8/0), delay=00:00:00, xdelay=00:00:00,
mailer=file, pri=32001, dsn=5.0.0, stat=Can’t create output
Mar 25 16:36:48 phillip sendmail[17198]: i2PEamcD017197: i2PEamcD017198:
DSN: Can’t create output
Mar 25 16:36:50 phillip sendmail[17198]: i2PEamcD017198:
to=darren@ReportStar.net, delay=00:00:02, xdelay=00:00:02,
mailer=esmtp, pri=33025, relay=fw.reportstar.net. [196.22.194.226],
dsn=2.0.0, stat=Sent (Ok: queued as 54D381251E7)
Mar 26 04:02:04 phillip sendmail[17521]: i2Q224M2017521: from=root,
size=2397, class=0, nrcpts=1,
msgid=200403260202.i2Q224M2017521@phillip.reportstar.net,
relay=root@localhost
Mar 26 04:02:04 phillip sendmail[17524]: i2Q224cD017524:
from=root@phillip.reportstar.net, size=2707, class=0, nrcpts=1,
msgid=200403260202.i2Q224M2017521@phillip.reportstar.net, proto=ESMTP,
daemon=MTA, relay=phillip [127.0.0.1]
Mar 26 04:02:04 phillip sendmail[17521]: i2Q224M2017521: to=root,
ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay,
pri=30055, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent
(i2Q224cD017524 Message accepted for delivery)
Mar 26 04:02:04 phillip sendmail[17525]: i2Q224cD017524:
to=root@phillip.reportstar.net, ctladdr=root@phillip.reportstar.net
(0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32933,
dsn=2.0.0, stat=Sent
Mar 26 11:33:10 phillip sendmail[18522]: alias database /etc/aliases
rebuilt by root
Mar 26 11:33:10 phillip sendmail[18522]: /etc/aliases: 67 aliases,
longest 194 bytes, 1412 bytes total

Have you tried running the mailgate from the command
line?

no i haven’t ?

seph

Kind Regards,
Phillip
Phillip Leremi
Tel: 011 884 7633
Fax: 011 883 5805
phillip@reportstar.net

Phillip Knowles wrote:

Apr 1 20:22:39 rt sendmail[9001]: i321Mcv8009000:
to=“|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url
http://rt.nubridges.com/”, ctladdr=rt@rt.nubridges.com (8/0),
delay=00:00:01, xdelay=00:00:01, mailer=prog, pri=31970, dsn=5.3.0,
stat=unknown mailer error 255

What happens when you try running the mailgate from the
command line?

Here is the error when run from the command line:

[root@rt bin]# perl /opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://rt.nubridges.com --debug < /etc/aliases

Connecting to http://rt.nubridges.com/REST/1.0/NoAuth/mail-gateway at /opt/rt3/bin/rt-mailgate line 403, <> chunk 1.

%# BEGIN LICENSE BLOCK

%#

%#

%# (Except where explictly superceded by other copyright notices)

%#

%# This work is made available to you under the terms of Version 2 of

%# the GNU General Public License. A copy of that license should have

%# been provided with this software, but in any event can be snarfed

%# from www.gnu.org.

%#

%# This work is distributed in the hope that it will be useful, but

%# WITHOUT ANY WARRANTY; without even the implied warranty of

%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

%# General Public License for more details.

%#

%# Unless otherwise specified, all modifications, corrections or

%# extensions to this work which alter its source code become the

%# property of Best Practical Solutions, LLC when submitted for

%# inclusion in the work.

%#

%#

%# END LICENSE BLOCK

<%ARGS>

$message

$queue => 1

$action => “correspond”

$ticket => undef

</%ARGS>

<%init>

use RT::Interface::Email;

my ( $status, $error, $Ticket ) = RT::Interface::email::Gateway( %ARGS);

</%init>

<%flags>

inherit => undef # inhibit UTF8 conversion done in /autohandler

</%flags>

% if ($status) {

ok

% if ( $Ticket->Id ) {

Ticket: <% $Ticket->Id %>

Queue: <% $Ticket->QueueObj->Name %>

Owner: <% $Ticket->OwnerObj->Name %>

Status: <% $Ticket->Status %>Subject: <% $Ticket->Subject %>

Requestor: <% $Ticket->Requestors->MemberEmailAddressesAsString %>

% }

% } else {

not ok - <%$error%>

% }

RT server error.

The RT server which handled your email did not behave as expected. It

said:

%# BEGIN LICENSE BLOCK

%#

%#

%# (Except where explictly superceded by other copyright notices)

%#

%# This work is made available to you under the terms of Version 2 of

%# the GNU General Public License. A copy of that license should have

%# been provided with this software, but in any event can be snarfed

%# from www.gnu.org.

%#

%# This work is distributed in the hope that it will be useful, but

%# WITHOUT ANY WARRANTY; without even the implied warranty of

%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

%# General Public License for more details.

%#

%# Unless otherwise specified, all modifications, corrections or

%# extensions to this work which alter its source code become the

%# property of Best Practical Solutions, LLC when submitted for

%# inclusion in the work.

%#

%#

%# END LICENSE BLOCK

<%ARGS>

$message

$queue => 1

$action => “correspond”

$ticket => undef

</%ARGS>

<%init>

use RT::Interface::Email;

my ( $status, $error, $Ticket ) = RT::Interface::email::Gateway( %ARGS);

</%init>

<%flags>

inherit => undef # inhibit UTF8 conversion done in /autohandler

</%flags>

% if ($status) {

ok

% if ( $Ticket->Id ) {

Ticket: <% $Ticket->Id %>

Queue: <% $Ticket->QueueObj->Name %>

Owner: <% $Ticket->OwnerObj->Name %>

Status: <% $Ticket->Status %>

Subject: <% $Ticket->Subject %>

Requestor: <% $Ticket->Requestors->MemberEmailAddressesAsString %>

% }

% } else {

not ok - <%$error%>

% }

Thanks

Phillip

From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Phil
Homewood
Sent: Thursday, April 01, 2004 6:00 PM
To: rt-users@lists.fsck.com
Subject: Re: [rt-users] Re: rt-mailgate problems

Phillip Knowles wrote:

Apr 1 20:22:39 rt sendmail[9001]: i321Mcv8009000:
to=“|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url
http://rt.nubridges.com/”, ctladdr=rt@rt.nubridges.com (8/0),
delay=00:00:01, xdelay=00:00:01, mailer=prog, pri=31970, dsn=5.3.0,
stat=unknown mailer error 255

What happens when you try running the mailgate from the
command line?
rt-users mailing list
rt-users@lists.bestpractical.com
http://lists.bestpractical.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Please don’t copy followups to me. I read the list.

Phillip Knowles wrote:

Here is the error when run from the command line:

The RT server which handled your email did not behave as expected. It
said:

%# BEGIN LICENSE BLOCK
%#

So, you have an Apache misconfiguration - it’s not passing
the mailgate to Mason for parsing.

The mailing list archives are full of discussion of this,
including heaps of clues on how to fix it.
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - A CyberGuard Company

Hi RT users,

recently (by luck) rt was working fine and
the auto generated mails were being delivered with no problems
the host machine that holds the rt installation stalled
and was forced into reboot and since then mails are not
being delivered.

below is what i added to the /etc/aliases file, a queue i have created is called IMAC
does it look correct are there any methods as to find out where this process is failing

IMAC: “/etc/smrsh/rt-mailgate --queue IMAC --action correspond --url http://xxxx.xxx.xxx.ericsson.se/rt/
IMAC-comment: “/etc/smrsh/rt-mailgate --queue IMAC --action comment --url http://xxxx.xxx.xxx.ericsson.se/rt/

Thanks for any help

did you run newaliases after you’ve added alises?
look into /var/log/mail or /var/log/messages.
also look into RT log file/On 8/29/05, Tomas Doyle XA (DL/LMI) tomas.xa.doyle@ericsson.com wrote:

Hi RT users,

recently (by luck) rt was working fine and
the auto generated mails were being delivered with no problems
the host machine that holds the rt installation stalled
and was forced into reboot and since then mails are not
being delivered.

below is what i added to the /etc/aliases file, a queue i have created is called IMAC
does it look correct are there any methods as to find out where this process is failing

IMAC: “/etc/smrsh/rt-mailgate --queue IMAC --action correspond --url http://xxxx.xxx.xxx.ericsson.se/rt/
IMAC-comment: “/etc/smrsh/rt-mailgate --queue IMAC --action comment --url http://xxxx.xxx.xxx.ericsson.se/rt/

Thanks for any help


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Buy your copy of our new book, RT Essentials, today!

Download a free sample chapter from http://rtbook.bestpractical.com

Best regards, Ruslan.

I’m in the process of moving our group from RT 1.07 to 3.4.4 on a system
running Solaris 10 x86. Everything has been working well, except that I
can’t get ticket creation by email to work. Syslog is recording:

Oct 27 15:08:12 plumbing sendmail[14289]: [ID 801593 mail.info]
j9OJk3x2002042: to=“|/var/adm/sm.bin/rt-mailgate --queue general
–action correspond --url http://myhost.mydomain/rt/”,
ctladdr=rt@myhost.mydomain (1/0), delay=3+00:22:09, xdelay=00:00:00,
mailer=prog, pri=26761053, dsn=4.0.0, stat=Deferred: prog mailer
(/bin/sh) exited with EX_TEMPFAIL

I have the following in my /etc/mail/aliases:

rt: “|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url
http://myhost.mydomain/rt/
rt-comment: “|/opt/rt3/bin/rt-mailgate --queue general --action comment
–url http://myhost.mydomain/rt/

After googling and reading the fine manual, I’ve symlinked
/opt/rt3/bin/rt-mailgate to /var/adm/sm.bin/rt-mailgate, but to no
effect. I’ve also replaced the Sun sendmail with a compile of
sendmail.org’s 8.13.5.

Any ideas?

Thanks,

Tom

Thomas A. Kyle
Network Analyst
Washington University
Department of Psychiatry
tkyle@matlock.wustl.edu
P: (314) 286-1779

As is standard practice, I puzzled it out within five minutes of posting.

Piping a mail message directly through the rt-mailgate script showed
that it couldn’t create a ticket in the “general” queue. In my infinite
wisdom, I’d renamed the queue " General" so that it always appeared
first in drop-downs and then promptly forgotten.

I’d tried piping a message through (echo
“hello”|/opt/rt3/bin/rt-mailgate --etc etc) earlier while
troubleshooting, but it had just gone off into never-never land.
Must’ve fixed something without realizing it.

Tom Kyle wrote:

I’m in the process of moving our group from RT 1.07 to 3.4.4 on a system
running Solaris 10 x86. Everything has been working well, except that I
can’t get ticket creation by email to work. Syslog is recording:

Oct 27 15:08:12 plumbing sendmail[14289]: [ID 801593 mail.info]
j9OJk3x2002042: to=“|/var/adm/sm.bin/rt-mailgate --queue general
–action correspond --url http://myhost.mydomain/rt/”,
ctladdr=rt@myhost.mydomain (1/0), delay=3+00:22:09, xdelay=00:00:00,
mailer=prog, pri=26761053, dsn=4.0.0, stat=Deferred: prog mailer
(/bin/sh) exited with EX_TEMPFAIL

I have the following in my /etc/mail/aliases:

rt: “|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url
http://myhost.mydomain/rt/
rt-comment: “|/opt/rt3/bin/rt-mailgate --queue general --action comment
–url http://myhost.mydomain/rt/

After googling and reading the fine manual, I’ve symlinked
/opt/rt3/bin/rt-mailgate to /var/adm/sm.bin/rt-mailgate, but to no
effect. I’ve also replaced the Sun sendmail with a compile of
sendmail.org’s 8.13.5.

Any ideas?

Thanks,

Tom

Thomas A. Kyle
Network Analyst
Washington University
Department of Psychiatry
tkyle@matlock.wustl.edu
P: (314) 286-1779

As is standard practice, I puzzled it out within five minutes of posting.

Piping a mail message directly through the rt-mailgate script showed
that it couldn’t create a ticket in the “general” queue. In my infinite
wisdom, I’d renamed the queue " General" so that it always appeared
first in drop-downs and then promptly forgotten.

I’d tried piping a message through (echo
“hello”|/opt/rt3/bin/rt-mailgate --etc etc) earlier while
troubleshooting, but it had just gone off into never-never land.
Must’ve fixed something without realizing it.
Glad to hear that you’ve fixed problem, but want to add two comments:

  1. mailgate script has --debug option
  2. IMHO RT/mailgate understand --queue <queue_id> format too. So your
    aliases wouldn’t be broken if you rename queue again.

Tom Kyle wrote:

I’m in the process of moving our group from RT 1.07 to 3.4.4 on a system
running Solaris 10 x86. Everything has been working well, except that I
can’t get ticket creation by email to work. Syslog is recording:

Oct 27 15:08:12 plumbing sendmail[14289]: [ID 801593 mail.info]
j9OJk3x2002042: to=“|/var/adm/sm.bin/rt-mailgate --queue general
–action correspond --url http://myhost.mydomain/rt/”,
ctladdr=rt@myhost.mydomain (1/0), delay=3+00:22:09, xdelay=00:00:00,
mailer=prog, pri=26761053, dsn=4.0.0, stat=Deferred: prog mailer
(/bin/sh) exited with EX_TEMPFAIL

I have the following in my /etc/mail/aliases:

rt: “|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url
http://myhost.mydomain/rt/
rt-comment: “|/opt/rt3/bin/rt-mailgate --queue general --action comment
–url http://myhost.mydomain/rt/

After googling and reading the fine manual, I’ve symlinked
/opt/rt3/bin/rt-mailgate to /var/adm/sm.bin/rt-mailgate, but to no
effect. I’ve also replaced the Sun sendmail with a compile of
sendmail.org’s 8.13.5.

Any ideas?

Thanks,

Tom

Best regards, Ruslan.