How forward email to rt in internal network

Would like to know the process of forwarding email from Office 365 into RT Have used fetchmail but it doesn’t work Also have added this to the etc/aliases but still nothing Any help would be greatly apricated

bugs: “|/opt/rt5/bin/rt-mailgate --queue bugs --action correspond --url http://localhost
'–no-verify-ssl`
Thanks
ssg

Do you have a rule in your Office 365 to forward emails going to “bugs@” to the RT server? If so when you send an email that should go into RT do you see any logging in your mail logs or webserver logs?

Hi
First I want to say Thank you for for help so far am a newbie at this so your help is REALLY appreciated
I think I might not have explained properly my problem or maybe I did not sure we have an email going to itsupport@jon******.*** which is in office 365 and am trying to get it into Request Tracker do we have to create a rule in office365 to forward it into the bugs queue If I do may I ask what the rule should look like ? Haven’t gotten email to RT so can’t answer the second question
Again Thanks so much
ssg(newbie) Hopefully won’t be after this :smiley:

You need to create some kind of forward rule in 365 that goes to the RT server IP or domain. How to do that in office I have no idea though since I don’t use 365

1 Like

OK Thanks
So we have to create a rule from office365 to forward the mail to that “bugs” queue Were do we create that “bugs” queue is that a folder within RT then the rule in /etc/aliases will then push the email into RT is that correct?

Thanks
ssg

So we have to create a rule from office365 to forward the mail to that “bugs” queue Were do we create that “bugs” queue is that a folder within RT then the rule in /etc/aliases will then push the email into RT is that correct?

For the record since your email appears to be “itsupport” you should have “itsupport” in place of “bugs” in your aliases file. And for now instead of piping the email into the “bugs” queue in RT you can do the
“general” queue since that queue is created by default in RT.

Assuming you have something like Postfix installed and handling the incoming email on the RT server, all you need to do is update the aliases file entry and run new aliases then you should be able to watch the mail logs:

tail -f /var/log/mail.log

And see your email being sent to the server, once you confirm your email is making it to the RT server ( If it isn’t maybe port 25 is blocked via firewall settings? ) you can then watch the webserver logs ( Apache is most common ):

tail -f /var/log/apache/error.log

You should either see the ticket created in RT or some logging about why it wasn’t created in RT if the incoming email used you aliases entry.

Hi
Thanks for your help have changed the aliases file to the following
itsupport: “|/opt/rt5/bin/rt-mailgate --queue General --no-verify-ssl --action correspond --url http://localhost
Just now have to figure out the rule for Office365 to send the emails to RT Last peice of the puzzle I think
I just want to thank you for your help

ssg

1 Like

Before fiddling with Office365, it’s probably worth confirming that your RT setup is working. Send a mail to your RT server not using Office365 (for example using the mail command on the server command line). That way you’ll be able to confirm that your RT side is set up correctly before doing a filter rule in Office365.

As for setting up rules in Office365, Microsoft have some instructions for using them.

Hi @GreenJimll - can you confirm the email we should be sending to?

Thanks
Pippa

Um, no - that’s something you need to have configured at your site. There’s no standard addresses.

Hi GreenJimII
Thanks for getting back to me I think there may be a problem with the receiving of emails When we send out an email from RT no problem all is good but receiving an email nothing I know for outing going mail we were able to set it up thru tools system configuration Outgoing mail but for incoming I don’t think anything has been setup and not even sure where to set that up have looked but no luck Is there a config file for the incoming mail that I missed Again any help would really be appreciated
Thanks
Gary
PS did try to send mail from command but nothing was received

Can you share how you sent the email locally from the RT machine? Was there anything logged in the mail log when you sent it or anything output from the mail command?

Hi knation
I used mutt to send out the email and it says mail sent but I see nothing in mutt and in the log
To be honest think I am doing something wrong It get to ssg1492@hotmail but not to RT not sure what I am doing wrong
Jan 18 19:56:05 itsupport sm-mta[68773]: 10J0u4RH068770: to=ssg1492@hotmail.com, ctladdr=gary@itsupport.johnabbott.qc.ca (1002/1002), delay=00:00 :01, xdelay=00:00:01, mailer=esmtp, pri=120481, relay=hotmail-com.olc.protection.outlook.com. [104.47.55.161], dsn=2.0.0, stat=Sent (<20210119005604. GB66796@itsupport.johnabbott.qc.ca> [InternalId=53562537196764, Hostname=BN8NA…od.protection.outlook.com] 7588 bytes in 0.273, 27.056 KB/sec Queued mail for delivery → 250 2.1.5)

Unless I’m misreading it (I’m not a mornings person!) that log entry is for your server sending an email to ssg1492@hotmail.com. Is there a log entry on the server for you using mutt to send to itsupport@localhost?

If not, you might want to just check that the mail daemon on the server is actually running and listening to the SMTP ports. The command to do that will depend on the MTA you’re using as your daemon and the operating system you’re using. Often something like service sendmail restart might work (or exim or postfix in place of sendmail depending on what you have).

1 Like

Hi GreenJimII
Have run the command service sendmail restart then sent an email via mutt to itsupport@localhost and below is the log entry.
Jan 19 07:40:12 itsupport sm-mta[18711]: 10JCeCrA018709: to=“|/opt/rt5/bin/rt-mailgate --queue General --no-verify-ssl --action correspon d --url http://localhost/rt”, ctladdr=itsupport@itsupport.johnabbott.qc.ca (8/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=307 49, dsn=4.0.0, stat=Deferred: prog mailer (/bin/sh) exited with EX_TEMPFAIL

You can also check the Apache log to see if RT said anything, but it looks like there is a space in correspond were there shouldn’t be one ^

Another thing to check is that the “Everyone” group has rights to create tickets in your General queue.

You might also want to try pointing a web browser at http://localhost/rt/REST/1.0/NoAuth/mail-gateway and seeing if you get asked for a username/password.

The reason for the space was when d was on the second line and when I copied and pasted it it created the space have checked the line and it is correct no space

The everyone group does have rights to create a ticket when I goto http://localhost/rt/REST/1.0/NoAuth/mail-gateway all I get is the following
HTTP Error 404.0 - Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Detailed Error Information:

Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:80/rt/REST/1.0/NoAuth/mail-gateway
Physical Path C:\inetpub\wwwroot\rt\REST\1.0\NoAuth\mail-gateway
Logon Method Anonymous
Logon User Anonymous

Hi Green
Not sure if this helps but if I send when I send an email to root@itsupport .john******* it does get into the send mail read user mail but that is far as it goes and in the mail log I see nothing not sure why that is not sure if that helps

G