<p class="MsoNormal"> </p>
<p class="MsoNormal">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? </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">This is how my .procmailrc looks like</p>
<p class="MsoNormal">===========================</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">#Preliminaries<br>
SHELL=/bin/sh #Use the
Bourne shell (check your path!)<br>
MAILDIR=${HOME} #First check what
your mail directory is! <br>
LOGFILE=${MAILDIR}/procmail.log<br>
LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "<br>
VERBOSE=yes<br>
MAILDOMAIN=<a href="http://rt.domain.com/" target="_blank">rt.domain.com</a><br>
<span class="q">RT_MAILGATE="/usr/bin/rt-mailgate"</span><br>
<span class="q">RT_URL="<a href="http://rt.domain.com/" target="_blank">http://rt.domain.com/</a>"</span><br>
<br>
LOGABSTRACT=all<br>
<br>
#:0<br>
#{<br>
<br>
<br>
# the following line extracts the recipient from Received-headers.<br>
# Simply using the To: does not work, as tickets are often created <br>
# by sending a CC/BCC to RT<br>
<br>
TO=`formail -c -xReceived: |grep $MAILDOMAIN |sed -e 's/.*for *<*\(.*\)>*
*;.*$/\1/'`<br>
QUEUE=`echo $TO| $HOME/get_queue.pl`<br>
ACTION=`echo $TO| $HOME/get_action.pl` <br>
<br>
# if you use mailman before the mail reaches RT uncomment the folowing<br>
# line so 'Precedence:' header will be stripped and auto-reply will<br>
# function correctly<br>
#REMOVE_HEADER="-I Precedence:" <br>
<br>
#:0 h b w<br>
#| formail $REMOVE_HEADER | /usr/bin/perl $RT_MAILGATE --queue $QUEUE --action
$ACTION --url $RT_URL<br>
#}<br>
<br>
:0<br>
* ^<a href="mailto:TO.*user@rt.domain.com" target="_blank">TO.*user@rt.domain.com</a><br>
| /usr/bin/rt-mailgate --queue "Full Name" --action correspond --url <a href="http://rt.domain.com/" target="_blank">http://rt.domain.com/</a><br>
<br>
<br>
I dont remember making any changes to this .procmailrc since the last time it
worked.<br>
<br>
<br>
When I looked at the maillog the sendmail is not even invoking the rt-mailgate <br>
<br>
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 <a href="mailto:user@rt.domain.com" target="_blank">user@rt.domain.com</a>
the RT senmail gets the message, looks at the aliases on /etc/aliases. On their
I have an alias name user: rt <br>
<br>
So it points to the rt name which then uses the .procmailrc to triggered the
/usr/bin/rt-mailgate<br>
<br>
Any inputs?<br>
<br>
Here I'm pasting the information I'm getting from the different logs when
opening a ticket on RT by sending an email to <a href="mailto:user@rt.domain.com" target="_blank">user@rt.domain.com</a><br>
<br>
Procmail.log Information <br>
=================<br>
<br>
--- Logging /var/rt/home/procmail.log for rt, procmail: [13052] Thu Jun 7
11:40:13 2007<br>
procmail: Assigning "MAILDOMAIN=<a href="http://rt.domain.com/" target="_blank">rt.domain.com</a>"<br>
procmail: Assigning "RT_MAILGATE=/usr/bin/rt-mailgate" <br>
procmail: Assigning "RT_URL=<a href="http://rt.domain.com/" target="_blank">http://rt.domain.com/</a>"<br>
procmail: Assigning "LOGABSTRACT=all"<br>
procmail: Match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?).*
<a href="mailto:user@rt.domain.com" target="_blank">user@rt.domain.com</a>"<br>
procmail: Executing "/usr/bin/rt-mailgate,--queue,My
Name,--action,correspond,--url,<a href="http://rt.domain.com/" target="_blank">http://rt.domain.com/</a>"<br>
procmail: Assigning "LASTFOLDER=/usr/bin/rt-mailgate --queue My Name
--action correspond --url <a href="http://rt.domain.com/" target="_blank">http://rt.domain.com/</a>"<br>
procmail: Notified comsat: "rt@:/usr/bin/rt-mailgate --queue My Name
--action correspond --url <a href="http://rt.domain.com/" target="_blank"><span style="color: windowtext; text-decoration: none;"></span>http://rt.domain.com/</a>"<br>
>From <a href="mailto:anotheruser@domainB.com" target="_blank">anotheruser@domainB.com</a>
Thu Jun 7 11:40:13 2007<br>
Subject: test 1<br>
Folder: /usr/bin/rt-mailgate --queue My Name --action
correspo 1783 <br>
An Error Occurred<br>
<br>
302 Found<br>
<br>
<br>
<br>
Maillog Information:<br>
=============<br>
Jun 7 11:40:13 rt sendmail[13050]: l57FeDS1013050: from=<<a href="mailto:anotheruser@domainB.com" target="_blank">anotheruser@domainB.com</a>
>, size=1503, class=0, nrcpts=1,
msgid=<002f01c7a91a$23182fe0$7100000a@computer>, proto=ESMTP, daemon=MTA,
relay=<a href="http://mail1.domain.com/" target="_blank">mail1.domain.com</a> [<a href="http://128.121.34.15/" target="_blank">128.121.34.15 </a>]<br>
Jun 7 11:40:13 rt sendmail[13051]: l57FeDS1013050: to=<<a href="mailto:user@rt.domain.com" target="_blank">user@rt.domain.com</a>>,
delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31694, dsn=2.0.0, stat=Sent<br>
<br>
<br>
Apache Access Log:<br>
==============<br>
<br>
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"</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<div style="border-style: none none double; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 2.25pt; padding: 0in 0in 1pt;">
<p class="MsoNormal" style="border: medium none ; padding: 0in;">This is how the mail log looked
like the email was working and getting sent to the proper Queue:</p>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">May 23 11:52:50 rt sendmail[22635]: l4NFqo34022635:
to=<a href="mailto:user@domain.com">user@domain.com</a>, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00,
mailer=relay,</p>
<p class="MsoNormal">pri=139404, relay=[<a href="http://127.0.0.1">127.0.0.1</a>] [<a href="http://127.0.0.1">127.0.0.1</a>], dsn=2.0.0,
stat=Sent (l4NFqolM022636 Message accepted for delivery)</p>
<p class="MsoNormal">May 23 11:52:50 rt sendmail[22638]: l4NFqolM022636:
to=<<a href="mailto:user@domain.com">user@domain.com</a>>, ctladdr=<<a href="mailto:apache@rt.domain.com">apache@rt.domain.com</a>> (87/87),
delay=00:00:00, xdelay=00:00:</p>
<p class="MsoNormal">00, mailer=esmtp, pri=229569, relay=<a href="http://mail1.domain.com">mail1.domain.com</a>.
[<a href="http://128.121.34.15">128.121.34.15</a>], dsn=2.0.0, stat=Sent (Ok: queued as 63E7812C059D)</p>
<p class="MsoNormal">May 23 11:52:50 rt sendmail[22624]: l4NFqncX022621:
to="|/usr/bin/rt-mailgate --queue General<span style="">
</span>--action correspond --url <a href="http://rt.domain.com">http://rt.domain.com</a>", c</p>
<p class="MsoNormal">tladdr=<<a href="mailto:user@rt.domain.com">user@rt.domain.com</a>> (8/0), delay=00:00:01,
xdelay=00:00:01, mailer=prog, pri=33089, dsn=2.0.0, stat=Sent</p>
<p class="MsoNormal"> </p>