[rt-users] Question about using an external SMTP server

Curtis Bruneau curtisb at vianet.ca
Tue Apr 27 16:20:25 EDT 2010


Ideally it would be on the RT server itself. The SMTP relaying and MTA 
are technically separate. You can do just local deliveries on the RT 
server which accepts port 25 smtp traffic but think of it as the final 
relay destination. You would also have to set up the MTA to recognize 
the hostname as accepted so it doesn't try to relay it back out to 
relayhost. I think regardless of your $SMTPServer setting if you had RT 
server accepting mail you may want to set up relayhost for bounces and such.

For postfix in /etc/postfix/main.cf you should see the following. The my 
networks is to ensure that only localhost can relay through it. This 
should for the most part be default already assuming the server was set 
up with the RT hostname.

myhostname = rt.domain.com
alias_maps = hash:/etc/aliases
mydestination = rt.domain.com, localhost
mynetworks = 127.0.0.0/8

One thing to note; this is the default domain setup. If you hosted 
multiple email domains you'd have to look into the virtual domain 
settings. This is mostly likely the case on your SMTP as well so simply 
doing /etc/aliases may not be good enough unless your default domain is 
the same as the RT server.

As for setting it up on your 'real' SMTP, you may be able to copy the 
perl script but you will most likely still require some of the perl 
modules from the 'make testdeps'. Then again I've never tried to do it 
before so I'm not really sure what dependencies it has.

Chris Hall wrote:
> well.. none yet.  I think I see where I've mis-stepped.  the 
> modifications to /etc/aliases needs to be ON the SMTP server, not the 
> RT server, is that correct?  and if so, that means I need to install 
> the rt-mailgate on the SMTP server?  If that's true, could I just copy 
> my rt-mailgate from my bin dir on the rt server to the SMTP server, or 
> do I really have to go through the entirety of the installation?  
> ...lotsa questions there, sry.
>
> On Tue, Apr 27, 2010 at 3:51 PM, Curtis Bruneau <curtisb at vianet.ca 
> <mailto:curtisb at vianet.ca>> wrote:
>
>     Assuming the SMTPFrom setting isn't overriding the reply addresses
>     specified in the queue config queue@ queue-comment@ etc. You may
>     need to rebuild the alias hash with the newaliases command. Are
>     you getting any bounces from your smtp?
>
>     Chris Hall wrote:
>
>         ahh, nevermind, I got it...
>
>         Set($SMTPServer, '##########');
>         Set($SMTPFrom , 'rt at rt.#########.com');
>
>         but now, my question has evolved slightly.. email seems to be
>         successfully sent out, but I get the email saying "reply to
>         this address if you have questions, etc..." I reply to it, and
>         nothing seems to happen.
>
>         I've added the following lines to /etc/aliases
>
>         rt: "|/opt/rt3/bin/rt-mailgate --queue 'General' --action
>         correspond --url http://rt.###########.com"
>         rt-comment: "|/opt/rt3/bin/rt-mailgate --queue 'General'
>         --action comment --url http://rt.##########.com"
>
>         (obviously w/o the # signs...) but nothing seems to happen
>         when I reply to the email... any ideas as to why?
>
>
>         On Tue, Apr 27, 2010 at 3:37 PM, Curtis Bruneau
>         <curtisb at vianet.ca <mailto:curtisb at vianet.ca>
>         <mailto:curtisb at vianet.ca <mailto:curtisb at vianet.ca>>> wrote:
>
>            You should be able to set up postfix using the parameter
>            'relayhost' for relaying, you can specify a different port if
>            needed. This would allow you to still use the sendmail
>         commands to
>            send. This is assuming you can still receive on port 25 for MX
>            deliveries. Otherwise you may have no choice but to set it
>         up on
>            your real smtp server.
>
>            Chris Hall wrote:
>
>                We're tightly controlling port 25 on our site here, so
>         using
>                the local method for sending email is a no go.  I read
>                something about installing mailgate on the smtp server
>         here,
>                but that has some people... nervous....  My boss seems to
>                think it should be a matter of switching a line or two
>         to set
>                a smarthost to our smtp server to make it work.  So my
>                question is, without dropping additional software or
>         whatnot
>                on the smtp server... how can I use an external server for
>                sending mail?  What's the preferred and correct
>         configuration
>                needed?
>
>
>              
>          ------------------------------------------------------------------------
>
>
>
>
>                Discover RT's hidden secrets with RT Essentials from
>         O'Reilly
>                Media.
>                Buy a copy at http://rtbook.bestpractical.com
>
>
>
>
>




More information about the rt-users mailing list