No outgoing mail

Hi all,

I’ve just upgraded from 2.0.11 to 2.0.12 and though it was about time I
looked at getting the email side working.

I’ve got a bog standard RH7.2 system (with updates) running apache/RT2. I’ve
got the exim RPM’s installed which creates the symlink /usr/sbin/sendmail so
that it can emulate sendmail.

It’s correctly configured and I can send emails from the machine from a ssh
session using the normal mail command.

I’ve updated the /opt/rt2/etc/config.pm as shown below for the email stuff,
but when I try to ‘reply’ to a ticket nothing happens. I am right in
thinking ‘comment’ only records it inside RT but reply sends an email?

There is absolutely nothing in the exim log which seams to think that it’s
not even being called.

BEGIN

{{{ Outgoing mail configuration

RT is designed such that any mail which already has a ticket-id associated

with it will get to the right place automatically.

$CorrespondAddress and $CommentAddress are the default addresses

that will be listed in From: and Reply-To: headers of correspondence

and comment mail tracked by RT, unless overridden by a queue-specific

address.

$CorrespondAddress=‘rt@ringways.co.uk’;

$CommentAddress=‘rt@ringways.co.uk’;

#Sendmail Configuration

$MailCommand defines which method RT will use to try to send mail

We know that ‘sendmail’ works fairly well.

If ‘sendmail’ doesn’t work well for you, try ‘sendmailpipe’

But note that you have to configure $SendmailPath and add a -t

to $SendmailArguments

$MailCommand = ‘sendmailpipe’;

$SendmailArguments defines what flags to pass to $Sendmail

assuming you picked ‘sendmail’ or ‘sendmailpipe’ as the $MailCommand above.

If you picked ‘sendmailpipe’, you MUST add a -t flag to $SendmailArguments

These options are good for most sendmail wrappers and workalikes

$SendmailArguments="-oi";

These arguments are good for sendmail brand sendmail 8 and newer

#$SendmailArguments="-oi -ODeliveryMode=b -OErrorMode=m";

If you selected ‘sendmailpipe’ above, you MUST specify the path

to your sendmail binary in $SendmailPath.

!! If you did not # select ‘sendmailpipe’ above, this has no effect!!

$SendmailPath = “/usr/sbin/sendmail”;

RT can optionally set a “Friendly” ‘To:’ header when sending messages to

Ccs or AdminCcs (rather than having a blank ‘To:’ header.

This feature DOES NOT WORK WITH SENDMAIL[tm] BRAND SENDMAIL

If you are using sendmail, rather than postfix, qmail, exim or some other

MTA,

you must disable this option.

$UseFriendlyToLine = 0;

have tried the above as 1 and 0

}}}

END

Gary Stainburn

This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000

Gary Stainburn wrote:

I am right in thinking ‘comment’ only records it inside RT but reply
sends an email?

Not really. The idea is that reply is for mailing responses to the
Requestor (and CCing your staff as well), and that comment just mails
your staff for discussing stuff internally that you don’t want the
Requestor to know about.

Whether it actually works like that depends on how you’ve set your
scrips up, but in general both should send mail. (You could set up your
scrips so that comment never mails, if that’s what you want.)

Note that if you add a comment or reply on the website, you won’t mail
yourself. Therefore if you are the only watcher on a ticket, ‘Exim’
won’t be called. (I’ve found a webmail account to be handy for testing
this kind of stuff out, so you can mail yourself without ‘RT’ spotting
it!)

Smylers
GBdirect

|+ $MailCommand = ‘sendmailpipe’;
|+
|+ # $SendmailArguments defines what flags to pass to $Sendmail
|+ # assuming you picked ‘sendmail’ or ‘sendmailpipe’ as the $MailCommand above.
|+ # If you picked ‘sendmailpipe’, you MUST add a -t flag to $SendmailArguments
|+
|+ # These options are good for most sendmail wrappers and workalikes
|+ $SendmailArguments=“-oi”;
|+
|+ # These arguments are good for sendmail brand sendmail 8 and newer
|+ #$SendmailArguments=“-oi -ODeliveryMode=b -OErrorMode=m”;

I don’t know if you read the entire config file. Above, it says:

" If you picked ‘sendmailpipe’, you MUST add a -t flag to
$SendmailArguments". Your $SendmailArguments does not contain this.

Also. If you’re running sendmail 8 and newer, you have to use the second
SendmailArguements included.

You should read over the entire config.pm.

-darrin

|+ $MailCommand = ‘sendmailpipe’;
|+
|+ # $SendmailArguments defines what flags to pass to $Sendmail
|+ # assuming you picked ‘sendmail’ or ‘sendmailpipe’ as the $MailCommand
| above. + # If you picked ‘sendmailpipe’, you MUST add a -t flag to
| $SendmailArguments +
|+ # These options are good for most sendmail wrappers and workalikes
|+ $SendmailArguments=“-oi”;
|+
|+ # These arguments are good for sendmail brand sendmail 8 and newer
|+ #$SendmailArguments=“-oi -ODeliveryMode=b -OErrorMode=m”;

I don’t know if you read the entire config file. Above, it says:

" If you picked ‘sendmailpipe’, you MUST add a -t flag to
$SendmailArguments". Your $SendmailArguments does not contain this.

Sorry, the sendmail pipe was an error. I tried this to see if it made any
difference - it didn’t, even after adding the -t

Also. If you’re running sendmail 8 and newer, you have to use the second
SendmailArguements included.

I don’t know which version of sendmail emulates, but I tried both of the
example values for Sendmail Arguments and neither worked (with and without
the -t)

You should read over the entire config.pm.

I have read the entire config.pm, and apart from the bits regarding checking
incoming emails (which I’m none too clear about) I can’t see anything I’ve
missed

There is absolutely nothing in the exim logs to say that it’s even trying to
send an email.

As a test, I su’d to apache which is the user that runs the web server and
called exim as I thought RT would and everything worked fine, with the exim
log showing the transaction. The mail actually failed once it got to our mail
server as the sender - apache@ringways.co.uk - doesn’t exist)

Has anyone got any other ideas of what I can try?

-darrin


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Gary Stainburn

This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000

Gary Stainburn wrote:

I am right in thinking ‘comment’ only records it inside RT but reply
sends an email?

Not really. The idea is that reply is for mailing responses to the
Requestor (and CCing your staff as well), and that comment just mails
your staff for discussing stuff internally that you don’t want the
Requestor to know about.

Whether it actually works like that depends on how you’ve set your
scrips up, but in general both should send mail. (You could set up your
scrips so that comment never mails, if that’s what you want.)

Note that if you add a comment or reply on the website, you won’t mail
yourself. Therefore if you are the only watcher on a ticket, ‘Exim’
won’t be called. (I’ve found a webmail account to be handy for testing
this kind of stuff out, so you can mail yourself without ‘RT’ spotting
it!)

Smylers

This is really getting weard now.

Based on your description above, if I create a ticket as ‘tanveer’, and reply
as ‘gary’, it should generate an email - it did’t. Nor did it generate an
error message anywhere to show that it tried and failed.

The global scrips I’ve got are (presumably defaulted):
OnComment NotifyOtherRecipientsAsComment with template Correspondence
OnCorrespond NotifyOtherRecipients with template Correspondence

which looks like how you described the actions above Smylers.

To me, this suggests that somewhere there is a problem telling RT to not
carry out the above actions, or that in carrying them out, something fails
quite early on - i.e. before getting to the sendmail stage.

However, when I added the following scrip to one of my queues, it
successfully managed to send emails to all watchers when I resolved a test
ticket.

OnResolve NotifyAllWatchers with template Resolved

This therefore means that the mechanics of sending the emails works, and
therefore the problem is with the trigger mechanism.

The ticket I’m working on has tanveer as requestor, gary as owner, and the
queue has tanveer, gary, and peter as watchers.

who should get a response if ‘root’ comments, reply’s or resolves to this
ticket?

(Sorry for waffling)
Gary Stainburn

This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000

Gary Stainburn wrote:

Gary Stainburn wrote:

I am right in thinking ‘comment’ only records it inside RT but reply
sends an email?

Not really. The idea is that reply is for mailing responses to the
Requestor (and CCing your staff as well), and that comment just mails
your staff for discussing stuff internally that you don’t want the
Requestor to know about.

This is really getting weard now.

Based on your description above, if I create a ticket as ‘tanveer’, and reply
as ‘gary’, it should generate an email - it did’t. Nor did it generate an
error message anywhere to show that it tried and failed.

The global scrips I’ve got are (presumably defaulted):
OnComment NotifyOtherRecipientsAsComment with template Correspondence
OnCorrespond NotifyOtherRecipients with template Correspondence

If you look up those ScripActions in the database, you’ll see that they
involve NotifyAsComment and Notify (respectively) with an argument of
“OtherRecipients”. I think OtherRecipients are new in version 2.0.12.
They are other non-‘RT’ recipients of the original message (so if the
Requestor mailed your ‘RT’ system and CCed the message to a third party,
that third party would be the OtherRecipients).

which looks like how you described the actions above Smylers.

What you need is something that notifies Requestors.

To me, this suggests that somewhere there is a problem telling RT to not
carry out the above actions, or that in carrying them out, something fails
quite early on - i.e. before getting to the sendmail stage.

Yes-ish.

However, when I added the following scrip to one of my queues, it
successfully managed to send emails to all watchers when I resolved a test
ticket.

OnResolve NotifyAllWatchers with template Resolved

Cos that one is mailing all Watchers.

You probably want something like

OnCorrespond NotifyAllWatchers with template Correspondence

That’ll let everybody know when something happens. For OnComment you
probably don’t want Requestors to be informed (that would defeat the
purpose of the OnCorrespond/OnComment distinction), so you’d use
something like:

OnComment NotifyOwner with template AdminComment
OnComment NotifyAdminCcsAsComment with template AdminComment

Smylers
GBdirect