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
* [EMAIL PROTECTED]
| /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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED]

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])?).*
[EMAIL PROTECTED]"
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 [EMAIL PROTECTED]  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=<
[EMAIL PROTECTED] >, size=1503, class=0, nrcpts=1, msgid=<
[EMAIL PROTECTED]>, proto=ESMTP, daemon=MTA, relay=
mail1.domain.com [128.121.34.15 ]
Jun  7 11:40:13 rt sendmail[13051]: l57FeDS1013050: to=<[EMAIL PROTECTED]>,
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: [EMAIL PROTECTED],
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=<[EMAIL PROTECTED]>,
ctladdr=<[EMAIL PROTECTED]> (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=<[EMAIL PROTECTED]> (8/0), delay=00:00:01, xdelay=00:00:01,
mailer=prog, pri=33089, dsn=2.0.0, stat=Sent
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Reply via email to