[rt-users] Please Help! An Error Occurred 302 Found

Richard Solid richardsolid at gmail.com
Fri Jun 8 10:11:50 EDT 2007


 Hello,

I had RT working fine a week ago. All of the sudden procmail is not
redirecting emails to the proper queues. This was working before and not
now. Something must have changed but I'm not sure what. Can anyone help?

This is how my .procmailrc looks like
===========================

 #Preliminaries
SHELL=/bin/sh          #Use the Bourne shell (check your path!)
MAILDIR=${HOME}        #First check what your mail directory is!
LOGFILE=${MAILDIR}/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "
VERBOSE=yes
MAILDOMAIN=rt.domain.com
RT_MAILGATE="/usr/bin/rt-mailgate"
RT_URL="http://rt.domain.com/"

LOGABSTRACT=all

#:0
#{


# the following line extracts the recipient from Received-headers.
# Simply using the To: does not work, as tickets are often created
# by sending a CC/BCC to RT

TO=`formail -c -xReceived: |grep $MAILDOMAIN |sed -e 's/.*for *<*\(.*\)>*
*;.*$/\1/'`
QUEUE=`echo $TO| $HOME/get_queue.pl`
ACTION=`echo $TO| $HOME/get_action.pl`

# if you use mailman before the mail reaches RT uncomment the folowing
# line so 'Precedence:' header will be stripped and auto-reply will
# function correctly
#REMOVE_HEADER="-I Precedence:"

#:0 h b w
#| formail $REMOVE_HEADER | /usr/bin/perl $RT_MAILGATE --queue $QUEUE
--action $ACTION --url $RT_URL
#}

:0
* ^TO.*user at rt.domain.com
| /usr/bin/rt-mailgate --queue "Full Name" --action correspond --url
http://rt.domain.com/


I dont remember making any changes to this .procmailrc since the last time
it worked.


When I looked at the maillog the sendmail is not even invoking the
rt-mailgate

I'm using sendmail, as far as I know the way this work is like this. If I
send an email to my email address user at rt.domain.com the RT senmail gets the
message, looks at the aliases on /etc/aliases. On their I have an alias name
user:  rt

So it points to the rt name which then uses the .procmailrc to triggered the
/usr/bin/rt-mailgate

Any inputs?

Here I'm pasting the information I'm getting from the different logs when
opening a ticket on RT by sending an email to user at rt.domain.com

Procmail.log Information
=================

--- Logging /var/rt/home/procmail.log for rt, procmail: [13052] Thu Jun  7
11:40:13 2007
procmail: Assigning "MAILDOMAIN=rt.domain.com"
procmail: Assigning "RT_MAILGATE=/usr/bin/rt-mailgate"
procmail: Assigning "RT_URL=http://rt.domain.com/"
procmail: Assigning "LOGABSTRACT=all"
procmail: Match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?).*
user at rt.domain.com"
procmail: Executing "/usr/bin/rt-mailgate,--queue,My
Name,--action,correspond,--url,http://rt.domain.com/"
procmail: Assigning "LASTFOLDER=/usr/bin/rt-mailgate --queue My Name
--action correspond --url http://rt.domain.com/"
procmail: Notified comsat: "rt@:/usr/bin/rt-mailgate --queue My Name
--action correspond --url http://rt.domain.com/"
>From anotheruser at domainB.com  Thu Jun  7 11:40:13 2007
 Subject: test 1
  Folder: /usr/bin/rt-mailgate --queue My Name --action correspo     1783
An Error Occurred

302 Found



Maillog Information:
=============
Jun  7 11:40:13 rt sendmail[13050]: l57FeDS1013050: from=<
anotheruser at domainB.com >, size=1503, class=0, nrcpts=1, msgid=<
002f01c7a91a$23182fe0$7100000a at computer>, proto=ESMTP, daemon=MTA, relay=
mail1.domain.com [128.121.34.15 ]
Jun  7 11:40:13 rt sendmail[13051]: l57FeDS1013050: to=<user at rt.domain.com>,
delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31694, dsn=2.0.0,
stat=Sent


Apache Access Log:
==============

x.x.x.x - - [07/Jun/2007:11:49:35 -0400] "POST
//REST/1.0/NoAuth/mail-gateway HTTP/1.1" 302 314 "-" "libwww-perl/5.79"





This is how the mail log looked like the email was working and getting sent
to the proper Queue:





May 23 11:52:50 rt sendmail[22635]: l4NFqo34022635: to=user at domain.com,
ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay,

pri=139404, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent
(l4NFqolM022636 Message accepted for delivery)

May 23 11:52:50 rt sendmail[22638]: l4NFqolM022636: to=<user at domain.com>,
ctladdr=<apache at rt.domain.com> (87/87), delay=00:00:00, xdelay=00:00:

00, mailer=esmtp, pri=229569, relay=mail1.domain.com. [128.121.34.15], dsn=
2.0.0, stat=Sent (Ok: queued as 63E7812C059D)

May 23 11:52:50 rt sendmail[22624]: l4NFqncX022621:
to="|/usr/bin/rt-mailgate --queue General  --action correspond --url
http://rt.domain.com", c

tladdr=<user at rt.domain.com> (8/0), delay=00:00:01, xdelay=00:00:01,
mailer=prog, pri=33089, dsn=2.0.0, stat=Sent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20070608/9a276717/attachment.htm>


More information about the rt-users mailing list