How does RT mail?

Hello all,

We are having a problem whereby messages sent by RT to addresses

outside our domain are failing, whereas messages sent via sendmail at
the command line are succeeding.

How can I see the command that RT is constructing and executing to

send mail, so that I can attempt to reproduce and diagnose this problem/

Thanks,

Eric J. Roode
Senior Enterprise Developer
Barrack, Rodos & Bacine
(215) 963-0600

I believe RT executes the send mail command…

Do like you would for any program…

replace sendmail with a wrapper sendmail that calls sendmail :stuck_out_tongue: but
before it calls it, it logs how it calls it to a log file :smiley:

Mike Johnson
Datatel Programmer/Analyst
Northern Ontario School of Medicine
955 Oliver Road
Thunder Bay, ON P7B 5E1
Phone: 807.766.7331
Email: mike.johnson@normed.ca
Technology assistance: email nosmhelpdesk@normed.ca
Technology Emergency Contact (TEC) Mon-Fri, 8am to 5pm excluding stat
holidays:
Off campus toll free 1-800-461-8777, option 8, or locally either
(705)-662-7120 or (807)-766-7500

“Roode, Eric” eroode@barrack.com 30/09/2009 3:49 pm >>>
Hello all,

We are having a problem whereby messages sent by RT to addresses

outside our domain are failing, whereas messages sent via sendmail at
the command line are succeeding.

How can I see the command that RT is constructing and executing to

send mail, so that I can attempt to reproduce and diagnose this
problem/

Thanks,

Eric J. Roode
Senior Enterprise Developer
Barrack, Rodos & Bacine
(215) 963–0600

I believe RT executes the send mail command…

Do like you would for any program…

replace sendmail with a wrapper sendmail that calls sendmail :stuck_out_tongue: but
before it calls it, it logs how it calls it to a log file :smiley:

I turned logging on, and cranked the log level up to ‘debug’.
I see the headers of the e-mail message that RT::Action::SendEmail
creates,
but I do not see the send mail wrapper like you say.

I want to know which program (I assumed sendmail, but who knows)
RT calls, and what command-line options it uses.

Any helpful information would be appreciated.

– Eric Roode

said:

I want to know which program (I assumed sendmail, but who knows)
RT calls, and what command-line options it uses.

Any helpful information would be appreciated.

The defaults are in etc/RT_Config.pm
Set($SendmailArguments , “-oi -t”);
Set($SendmailPath , “/usr/sbin/sendmail”);

I want to know which program (I assumed sendmail, but who knows)
RT calls, and what command-line options it uses.

RT can also be configured to send directly to a non-local SMTP
service, but that is not the default. If you have inherited the RT
instance, you’ll want to look at the RT_SiteConfig.pm carefully, and
don’t edit RT_Config.pm. RT_Config.pm gets replaced in an upgrade;
RT_SiteConfig.pm does not.

Tom Lahti
BIT LLC
(425)251-0833 x 117
http://www.bitstatement.net/

You didn’t understand what I was saying.

In your RT installation there is a line in the config file that tells you what RT is using to send the mail. This is exploration you need to do.

Once you know how RT sends mail(by default it uses the sendmail command)… you know how to intercept it.

An example,

If it uses /usr/bin/sendmail

What you do…

Create a script in /usr/local/bin called sendmaillogging

Make RT call that one, and in that script, take the arguments that RT is sending to sendmaillogging and call sendmail using those arguments. You now have intercepted RT’s call… that’s the ENTIRE sendmail command RT sends. You could even add yourself as a Bcc to get the actual email it sends… you can do anything, because you are now in control of the command.

Hope that helps!

Mike Johnson
Datatel Programmer/Analyst
Northern Ontario School of Medicine
955 Oliver Road
Thunder Bay, ON P7B 5E1
Phone: 807.766.7331
Email: mike.johnson@normed.ca
Technology assistance: email nosmhelpdesk@normed.ca
Technology Emergency Contact (TEC) Mon-Fri, 8am to 5pm excluding stat holidays:
Off campus toll free 1-800-461-8777, option 8, or locally either
(705)-662-7120 or (807)-766-7500

“Roode, Eric” eroode@barrack.com 30/09/2009 5:09 pm >>>

I believe RT executes the send mail command…

Do like you would for any program…

replace sendmail with a wrapper sendmail that calls sendmail :stuck_out_tongue: but
before it calls it, it logs how it calls it to a log file :smiley:

I turned logging on, and cranked the log level up to ‘debug’.
I see the headers of the e-mail message that RT::Action::SendEmail
creates,
but I do not see the send mail wrapper like you say.

I want to know which program (I assumed sendmail, but who knows)
RT calls, and what command-line options it uses.

Any helpful information would be appreciated.

– Eric Roode

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com ( 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 ( http://rtbook.bestpractical.com/ )