RT selectively not sending email

Hello All,

There are some users that RT won’t send email to, upon 'Reply’ing to a
ticket, these users, both as Requestors and as AdminCC’s, are not listed
in the “This message will be sent to” box.

On a clean install (rt3.4.5, perl5.8.8, postgresql7.4, apache1.3,
solaris10) there are four autocreated users. Each user is a global
SuperUser, each user is a watcher in the default General queue. The same
two users are consistently not sent email. The other two users are
always sent email, both as Requestors and as AdminCC’s.

“not sent email” means that they never receive email from RT and are
never listed on the “Update Ticket” page.

rt.log doesn’t contain an error, even at [debug]. The default scrips are
in place. All four users are privileged, Global SuperUsers and AdminCC
Watchers on the queue.

I’m at my wit’s end, any suggestions greatly appreciated.

Thanks,

Isaac Vetter

smime.p7s (2.85 KB)

rt.log doesn’t contain an error, even at [debug]. The default scrips are
in place. All four users are privileged, Global SuperUsers and AdminCC
Watchers on the queue.

I just had this happen to me on Friday, too. No error in any of my logs

  • in fact, my mail server log shows the email being received and
    accepted (for injection by rt-mailgate).

I’m running a slightly different setup with mysql 4.1 and apache 2.0,
though I don’t know if that matters at this point.

Are you using procmail by any chance? I am here, but until now, I’ve
have no problems whatsoever. I’m quite confused.

Regards,

Ranbir

I just had this happen to me on Friday, too. No error in any of my logs

  • in fact, my mail server log shows the email being received and
    accepted (for injection by rt-mailgate).

Are you using procmail by any chance? I am here, but until now, I’ve
have no problems whatsoever. I’m quite confused.

We also use procmail here (to filter spam out of our RT queues). We
recently noticed that the default behaviour of procmail is to fail
silently (ie: return a status of 0) even if the rt-mailgate invocation
fails. This meant that if for some reason our RT server was temporarily
unavailable any incomming email sent to it by rt-mailgate would be
lost (not get created as a ticket and no bounce back to the sender) :frowning:

So we changed our procmail recipes from

:0
|/usr/pkg/bin/rt-mailgate --queue bugs --action correspond --url …

to

:0
EXITCODE=|/usr/pkg/bin/rt-mailgate --queue bugs … ; echo $?

This causes procmail to return rt-mailgate’s return code (ie: EX_TEMPFAIL)
back to sendmail.

We did just encounter one situation where the same ticket got injected
into an RT queue multiple times because it stayed in our sendmail queue
even though RT had successfully created the ticket. We assume there
must be some situation where rt-mailgate can return EX_TEMPFAIL even
though it the ticket has been created. Although this is a little annoying
we figured it wasn’t as bad as losing tickets. If it happens again we
will investigate in more detail.

As to the original posters problem:

There are some users that RT won’t send email to, upon 'Reply’ing to a
ticket, these users, both as Requestors and as AdminCC’s, are not listed
in the “This message will be sent to” box.

On a clean install (rt3.4.5, perl5.8.8, postgresql7.4, apache1.3,
solaris10) there are four autocreated users. Each user is a global
SuperUser, each user is a watcher in the default General queue. The same
two users are consistently not sent email. The other two users are
always sent email, both as Requestors and as AdminCC’s.

One thing that has bitten me in the past – do those users have an email
address recorded for them? At least our version of RT (3.4.5) will not
send an email if there is no email address (I had assumed that it would
just use their username instead, which in our case is always the same,
but apparently not).

Duncan

Duncan McEwan wrote:

As to the original posters problem:

There are some users that RT won’t send email to, upon 'Reply’ing to a
ticket, these users, both as Requestors and as AdminCC’s, are not listed
in the “This message will be sent to” box.

On a clean install (rt3.4.5, perl5.8.8, postgresql7.4, apache1.3,
solaris10) there are four autocreated users. Each user is a global
SuperUser, each user is a watcher in the default General queue. The same
two users are consistently not sent email. The other two users are
always sent email, both as Requestors and as AdminCC’s.

One thing that has bitten me in the past – do those users have an email
address recorded for them? At least our version of RT (3.4.5) will not
send an email if there is no email address (I had assumed that it would
just use their username instead, which in our case is always the same,
but apparently not).

Duncan,

Thanks for your reply. Unfortunately, yes, all the users were
“autocreated upon ticket submission” via email, so they all have email
addresses within their profiles.

I’m going to fight my fear and confusion and delve into the RT code
sometime this week, hopefully I can figure out what’s going on.

Isaac

smime.p7s (2.85 KB)

Kanwar Ranbir Sandhu wrote:> On Thu, 2006-09-14 at 16:59 -0400, Isaac Vetter wrote:

rt.log doesn’t contain an error, even at [debug]. The default scrips are
in place. All four users are privileged, Global SuperUsers and AdminCC
Watchers on the queue.

I just had this happen to me on Friday, too. No error in any of my logs

  • in fact, my mail server log shows the email being received and
    accepted (for injection by rt-mailgate).

Are you using procmail by any chance? I am here, but until now, I’ve
have no problems whatsoever. I’m quite confused.

Hello Ranbir,

In my case, the “Update Ticket” page in the web interface does not list
the appropriate email addresses under the “This message will be sent to
…” text. Both AdminCCs and Requestors are incorrectly left out.

Are you experiencing this problem as well? I do not believe that the
problem is mail-server or mail-client related because the RT web
interface excludes email addresses from the “Update Ticket” page. I
believe that RT is not trying to send email.

Are multiple users experiencing the problem on your end? If everything
is normal except that the RT email doesn’t appear in the user’s Inbox,
procmail could definitely be a culprit.

Isaac

smime.p7s (2.85 KB)

We have seen this also, and seems an RT’s “arbitrary decision”.

Same with attachments. *Some* users get the email, but no attachment on

it.

All users been autocreated on ticket submission, so all them have an

email address in place.

Regards

Pablo Povarchik - FuturaHost.Com
CEO

Managed hosting services, the core of our work

±-------- Web Hosting - Dedicated Servers - Colocation (AS39317) ----------+
| info@futurahost.com - http://www.futurahost.com/ - (+39) 0461 592710
| Special! Get a Full Cabinet + 10Mbps full burst for only EUR 1,099 per month
| in our London (UK) facilities. Availability also in Fremont CA, USA.

All,

Sorry for answering my own post. My problem was with the
$RTAddressRegexp value in RT_SiteConfig.pm.

As I understand it, this variable is used to avoid creating email loops
by not sending email to any addresses that match the regex stored in
this variable.

This was my regex:
[1].*@domain.edu$’

It was meant to catch systems@domain.edu, helpdesk@domain.edu,
helpdesk-comment@domain.edu, helpdesk-web@domain.edu,
helpdesk-web-comment@domain.edu, helpdesk-project@domain.edu,
webmaster@domain.edu, etc …

Perl regex character classes are character based, not string based
(duh). So if the characters in the email address were also in
[systemshelpdeskwebmaster], the user would not get email. What I meant,
and what is currently working, is this:

‘^systems|helpdesk|webmaster.*@domain.edu$’

Thanks to everyone that responded.

Isaac Vetter

Isaac Vetter wrote:

smime.p7s (2.85 KB)


  1. systems|helpdesk|webmaster ↩︎

All,

Sorry for answering my own post. My problem was with the
$RTAddressRegexp value in RT_SiteConfig.pm.

As I understand it, this variable is used to avoid creating email loops
by not sending email to any addresses that match the regex stored in
this variable.

This was my regex:
[1].*@domain.edu$’

It was meant to catch systems@domain.edu, helpdesk@domain.edu,
helpdesk-comment@domain.edu, helpdesk-web@domain.edu,
helpdesk-web-comment@domain.edu, helpdesk-project@domain.edu,
webmaster@domain.edu, etc …

Perl regex character classes are character based, not string based
(duh). So if the characters in the email address were also in
[systemshelpdeskwebmaster], the user would not get email. What I meant,
and what is currently working, is this:

‘^systems|helpdesk|webmaster.@domain.edu$’
This is also incorrect :slight_smile: you need
'^(systems|helpdesk|webmaster).
@domain.edu$’

See also Request Tracker Wiki

Thanks to everyone that responded.

Isaac Vetter

Isaac Vetter wrote:

Hello All,

There are some users that RT won’t send email to, upon 'Reply’ing to a
ticket, these users, both as Requestors and as AdminCC’s, are not
listed in the “This message will be sent to” box.

On a clean install (rt3.4.5, perl5.8.8, postgresql7.4, apache1.3,
solaris10) there are four autocreated users. Each user is a global
SuperUser, each user is a watcher in the default General queue. The
same two users are consistently not sent email. The other two users
are always sent email, both as Requestors and as AdminCC’s.

“not sent email” means that they never receive email from RT and are
never listed on the “Update Ticket” page.

rt.log doesn’t contain an error, even at [debug]. The default scrips
are in place. All four users are privileged, Global SuperUsers and
AdminCC Watchers on the queue.

I’m at my wit’s end, any suggestions greatly appreciated.

Thanks,

Isaac Vetter


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


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

Best regards, Ruslan.


  1. systems|helpdesk|webmaster ↩︎

Ruslan Zakirov wrote:

‘^systems|helpdesk|webmaster.@domain.edu$’
This is also incorrect :slight_smile: you need
'^(systems|helpdesk|webmaster).
@domain.edu$’

No, actually parentheses are not necessary due, I think, to order of
precedence.

But thanks for chiming in, Ruslan.

smime.p7s (2.85 KB)

Ruslan Zakirov wrote:

‘^systems|helpdesk|webmaster.@domain.edu$’
This is also incorrect :slight_smile: you need
'^(systems|helpdesk|webmaster).
@domain.edu$’

No, actually parentheses are not necessary due, I think, to order of
precedence.
regexp ‘^systems|helpdesk|webmaster.*@domain.edu$’ matches:

  1. any email address that starts with “systems”, for example “systems@mail.ru
  2. any email address that has substring “helpdesk”, for example
    helpdesk@google.com” or “Cool.User@helpdesk.domain.com
  3. and any email that contains “webmaster” in name part and domain is
    “domain.edu”, for example “qwewebmasterewq@domain.edu”

But thanks for chiming in, Ruslan.

See also Request Tracker Wiki


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

Best regards, Ruslan.

The issue of multiple copies which Duncan mentions below can lead to
problems when rt-mailgate fails if preventative measures are not
taken.

When procmail is configured to set EXITCODE to the rt-mailgate
return code as specified below and rt-mailgate fails, procmail decides
that recipe has failed and continues to try subsequent recipes in the
file. If none succeeds, it will default to the DEFAULT action which,
unless explicitly configured otherwise, is to put the message in the
user’s spool file. After delivering the message to the spool file,
procmail exits and returns the value of EXITCODE to sendmail, causing
sendmail to requeue the message.

If RT is down for some time, a copy of the message is deposited in
the spool file on each retry. If there are many messages, it can
add up to a lot of disk space.

One solution to this problem is to set DEFAULT to /dev/null, i.e.,

DEFAULT=/dev/null

prior to the execution of the rt-mailgate recipes.

GaryDuncan McEwan duncan@mcs.vuw.ac.nz wrote:

We also use procmail here (to filter spam out of our RT queues). We
recently noticed that the default behaviour of procmail is to fail
silently (ie: return a status of 0) even if the rt-mailgate invocation
fails. This meant that if for some reason our RT server was temporarily
unavailable any incomming email sent to it by rt-mailgate would be
lost (not get created as a ticket and no bounce back to the sender) :frowning:

So we changed our procmail recipes from

:0
|/usr/pkg/bin/rt-mailgate --queue bugs --action correspond --url …

to

:0
EXITCODE=|/usr/pkg/bin/rt-mailgate --queue bugs … ; echo $?

This causes procmail to return rt-mailgate’s return code (ie: EX_TEMPFAIL)
back to sendmail.

We did just encounter one situation where the same ticket got injected
into an RT queue multiple times because it stayed in our sendmail queue
even though RT had successfully created the ticket. We assume there
must be some situation where rt-mailgate can return EX_TEMPFAIL even
though it the ticket has been created. Although this is a little annoying
we figured it wasn’t as bad as losing tickets. If it happens again we
will investigate in more detail.

Gary Hall hall@fas.sfu.ca | Voice (604) 291-5925
Faculty of Applied Sciences | Fax (604) 291-5404
Simon Fraser University |
Burnaby, B.C. V5A 1S6 |

Mike,

You’re right that using the EXITCODE hack causes RT to fail to realize
that there has been a successful delivery and continue to search for
a place to deliver the message. This is the behavior I referred to
in my posting.

I think your problem may be with the implementation of my proposed
solution. When I said:
"One solution to this problem is to set DEFAULT to /dev/null, i.e.,

DEFAULT=/dev/null

prior to the execution of the rt-mailgate recipes.",

I meant to do it prior to the entire (set of) recipe(s).

E.g.,

DEFAULT=/dev/null

:0

  • ^TO rt@my.domain
    | $RT_MAILGATE --queue $QUEUE --action $ACTION --url $RT_URL

It appears that you may have put DEFAULT assignment inside the RT
recipe itself.

Gary

Mike Friedman wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The issue of multiple copies which Duncan mentions below can lead to
problems when rt-mailgate fails if preventative measures are not taken.

When procmail is configured to set EXITCODE to the rt-mailgate return
code as specified below and rt-mailgate fails, procmail decides that
recipe has failed and continues to try subsequent recipes in the file.
If none succeeds, it will default to the DEFAULT action which, unless
explicitly configured otherwise, is to put the message in the user’s
spool file. After delivering the message to the spool file, procmail
exits and returns the value of EXITCODE to sendmail, causing sendmail
to requeue the message.

If RT is down for some time, a copy of the message is deposited in the
spool file on each retry. If there are many messages, it can add up to
a lot of disk space.

One solution to this problem is to set DEFAULT to /dev/null, i.e.,

DEFAULT=/dev/null

prior to the execution of the rt-mailgate recipes.

Gary,

I’m having a similar problem, but the symptoms are somewhat different
and your suggestion isn’t working (in fact it makes things worse).

First, I followed Duncan’s suggestion and replaced this:

| $RT_MAILGATE --queue $QUEUE --action $ACTION --url $RT_URL

with this:

EXITCODE=| $RT_MAILGATE --queue $QUEUE --action $ACTION --url $RT_URL
; echo $?

What happened then is that all mail successfully delivered to RT
queues also ended up in the default inbox of the user running procmail.

So, I just tried your suggestion. Immediately proceeding the execution
of rt-mailgate, I inserted this line:

DEFAULT=/dev/null

But then a test mail I sent still ended up in the default inbox, but it
didn’t get delivered to RT!

The .forward file for the user running procmail looks like this:

“|IFS=’ ’ && p=/usr/local/bin/procmail && test -f $p && exec $p -Yf-
|| exit 75”

This was recommended in some documentation I saw, though I’m not sure I
understand why I can’t just use this:

“|exec /usr/local/bin/procmail || exit 75”

(although my symptoms are the same with the above as well).

Do you have any ideas about this?

Thanks.

Mike


Mike Friedman IST/System and Network Security
mikef@ack.Berkeley.EDU 2484 Shattuck Avenue
1-510-642-1410 University of California at Berkeley
Socrates and Berkeley Scholars Web Hosting Services Have Been Retired | Web Platform Services http://security.berkeley.edu


-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBRRrVqq0bf1iNr4mCEQKJMQCg+1SPsbxLZeUxbFwx/IiiV9DN6I8AoISn
V0yhaZKaKC1MBLjUimgwkHMb
=vUIK
-----END PGP SIGNATURE-----

Gary Hall hall@fas.sfu.ca | Voice (604) 291-5925
Faculty of Applied Sciences | Fax (604) 291-5404
Simon Fraser University |
Burnaby, B.C. V5A 1S6 |

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1On Wed, 27 Sep 2006 at 13:40 (-0700), Gary Hall wrote:

You’re right that using the EXITCODE hack causes RT to fail to realize
that there has been a successful delivery and continue to search for a
place to deliver the message. This is the behavior I referred to in my
posting.

I think your problem may be with the implementation of my proposed
solution. When I said: "One solution to this problem is to set DEFAULT
to /dev/null, i.e.,

DEFAULT=/dev/null

prior to the execution of the rt-mailgate recipes.",

I meant to do it prior to the entire (set of) recipe(s).

Gary,

I was a bit confused earlier, because I though you had indicated that RT
would behave this way only if rt-mailgate had failed to deliver
something, which was not my symptom.

But your correction above does seem to do the trick. I had originally
been wary of resetting DEFAULT globally in my .procmailrc, in case that
might mess up other recipe processing that occurs earlier in the file. But
I suppose my concern was misplaced. With ‘DEFAULT=/dev/null’ now at the
beginning of the file, things seem to work fine now; I can get the
benefits of setting EXITCODE, mail gets delivered to RT queues and I don’t
get extra copies of each mail parcel in the default inbox.

Thanks.

Mike

Mike Friedman IST/System and Network Security
mikef@ack.berkeley.edu 2484 Shattuck Avenue
1-510-642-1410 University of California at Berkeley
Socrates and Berkeley Scholars Web Hosting Services Have Been Retired | Web Platform Services http://security.berkeley.edu

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBRR1XL60bf1iNr4mCEQJNCACdH7f5Js3qmMZlYOAB050hXMBoLNgAn35b
+LIT45PvvIIy2nOGPdhuEeEJ
=nz8v
-----END PGP SIGNATURE-----