RT 4.0.8 still not receiving incoming tickets via email on ubuntu

I have had problems with incoming tickets not being received into RT.

My setup is:

ubuntu RT server 12.4
sendmail is the MTA

Emails sent from the exchange server (domain X) into RTserver
Emails sent from RT to exchange (outgoing) are working
Emails sent into RT from exchange server (inbound) are not working.
/var/log/mail.log does not have any entry for this. I am not sure if the
mail is reaching the RT server. Is there any configuration required for
rt-mailgate? sendmails /etc/aliases has the correspondence address for
general queue already setup.

Could anyone shed some light please?

Many thanks.

Incoming mail is a manual process to grab the mail from exchange, then pass it through mailgate.

Here’s what I used to achieve incoming mails via Exchange.

I used fetchmail with the IMAP protocol - also the ssl flag was necessary for our server.

Fetchmail command:
fetchmail -f /var/www/html/rt/bin/fetchmailrc --ssl -B 10 --nokeep

While testing fetchmail I used the -c flag so it would just check the mailbox. Upon success it will give you a count of the number of emails in the box. Also use the -v for verbose output while testing.
Until this command reflects a successful connection to your email server, it’s not going to work.

Example fetchmailrc – replace all with your own values:
poll <Your_Exchange_Server> protocol imap:
username <USERNAME_HERE> password <PASSWORD_HERE> mda “/var/www/html/rt/bin/rt-mailgate --url http:// --queue ‘’ --action correspond”

Once you get the settings correct, toss the fetchmail script into crontab and have it check regularly.From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of testwreq wreq
Sent: Friday, November 16, 2012 1:13 PM
To: rt-users@lists.bestpractical.com; rt-users-request@lists.bestpractical.com
Subject: [rt-users] RT 4.0.8 still not receiving incoming tickets via email on ubuntu

I have had problems with incoming tickets not being received into RT.

My setup is:

ubuntu RT server 12.4
sendmail is the MTA

Emails sent from the exchange server (domain X) into RTserver
Emails sent from RT to exchange (outgoing) are working
Emails sent into RT from exchange server (inbound) are not working. /var/log/mail.log does not have any entry for this. I am not sure if the mail is reaching the RT server. Is there any configuration required for rt-mailgate? sendmails /etc/aliases has the correspondence address for general queue already setup.

Could anyone shed some light please?

Many thanks.

Incoming mail is a manual process to grab the mail from exchange, then
pass it through mailgate.

Just to clarify, it doesn’t have to be. Other users have pointed the OP
towards running postfix locally on the RT server and having Exchange
deliver directly to it.

I apoligize that things are not clear to me on the mail side.

According to RT documentation, we should have MTA e.g. sendmail and it can
be configured for incoming or outgoing emails. Then why do we need
fetchmail? Is this necessary?On Fri, Nov 16, 2012 at 1:22 PM, Edsall, William (WJ) WJEdsall@dow.comwrote:

Incoming mail is a manual process to grab the mail from exchange, then
pass it through mailgate.****


Here’s what I used to achieve incoming mails via Exchange.****


I used fetchmail with the IMAP protocol – also the ssl flag was necessary
for our server.****


Fetchmail command:****

fetchmail -f /var/www/html/rt/bin/fetchmailrc --ssl -B 10 --nokeep****


While testing fetchmail I used the –c flag so it would just check the
mailbox. Upon success it will give you a count of the number of emails in
the box. Also use the –v for verbose output while testing. ****

Until this command reflects a successful connection to your email server,
it’s not going to work. ****


Example fetchmailrc – replace all with your own values:****

poll <Your_Exchange_Server> protocol imap:****

username <USERNAME_HERE> password <PASSWORD_HERE> mda
“/var/www/html/rt/bin/rt-mailgate --url http:// --queue
‘’ --action correspond”****


Once you get the settings correct, toss the fetchmail script into crontab
and have it check regularly.****


From: rt-users-bounces@lists.bestpractical.com [mailto:
rt-users-bounces@lists.bestpractical.com] On Behalf Of testwreq wreq
Sent: Friday, November 16, 2012 1:13 PM
To: rt-users@lists.bestpractical.com;
rt-users-request@lists.bestpractical.com
Subject: [rt-users] RT 4.0.8 still not receiving incoming tickets via
email on ubuntu
**


I have had problems with incoming tickets not being received into RT.****

My setup is:

ubuntu RT server 12.4
sendmail is the MTA

Emails sent from the exchange server (domain X) into RTserver
Emails sent from RT to exchange (outgoing) are working
Emails sent into RT from exchange server (inbound) are not working.
/var/log/mail.log does not have any entry for this. I am not sure if the
mail is reaching the RT server. Is there any configuration required for
rt-mailgate? sendmails /etc/aliases has the correspondence address for
general queue already setup. ****

Could anyone shed some light please?

Many thanks.****

I stand corrected, it does not have to be a manual download of mail.

This is just what worked for me, using exchange. In our environment I have very little control over the exchange setup, so I went the route of fetching the mail myself.From: testwreq wreq [mailto:testwreq@gmail.com]
Sent: Friday, November 16, 2012 2:28 PM
To: Edsall, William (WJ)
Cc: rt-users@lists.bestpractical.com; rt-users-request@lists.bestpractical.com
Subject: Re: [rt-users] RT 4.0.8 still not receiving incoming tickets via email on ubuntu

I apoligize that things are not clear to me on the mail side.

According to RT documentation, we should have MTA e.g. sendmail and it can be configured for incoming or outgoing emails. Then why do we need fetchmail? Is this necessary?

We are a small setup. I would like to avoid setting up the extra fetch mail
step. All outgoing emails from RT server are working. Emails sent into RT
from exchange server (inbound via email) are not working. They are not
reaching the RT server.

Any ideas about troubleshooting this will be appreciated.

Thanks so much!On Fri, Nov 16, 2012 at 2:46 PM, Edsall, William (WJ) WJEdsall@dow.comwrote:

I stand corrected, it does not have to be a manual download of mail.****

This is just what worked for me, using exchange. In our environment I have
very little control over the exchange setup, so I went the route of
fetching the mail myself.****


From: testwreq wreq [mailto:testwreq@gmail.com]
Sent: Friday, November 16, 2012 2:28 PM
To: Edsall, William (WJ)
Cc: rt-users@lists.bestpractical.com;
rt-users-request@lists.bestpractical.com
Subject: Re: [rt-users] RT 4.0.8 still not receiving incoming tickets
via email on ubuntu****


I apoligize that things are not clear to me on the mail side.****


According to RT documentation, we should have MTA e.g. sendmail and it can
be configured for incoming or outgoing emails. Then why do we need
fetchmail? Is this necessary?****

On Fri, Nov 16, 2012 at 1:22 PM, Edsall, William (WJ) WJEdsall@dow.com
wrote:****

Incoming mail is a manual process to grab the mail from exchange, then
pass it through mailgate.****


Here’s what I used to achieve incoming mails via Exchange.****


I used fetchmail with the IMAP protocol – also the ssl flag was necessary
for our server.****


Fetchmail command:****

fetchmail -f /var/www/html/rt/bin/fetchmailrc --ssl -B 10 --nokeep****


While testing fetchmail I used the –c flag so it would just check the
mailbox. Upon success it will give you a count of the number of emails in
the box. Also use the –v for verbose output while testing. ****

Until this command reflects a successful connection to your email server,
it’s not going to work. ****


Example fetchmailrc – replace all with your own values:****

poll <Your_Exchange_Server> protocol imap:****

username <USERNAME_HERE> password <PASSWORD_HERE> mda
“/var/www/html/rt/bin/rt-mailgate --url http:// --queue
‘’ --action correspond”****


Once you get the settings correct, toss the fetchmail script into crontab
and have it check regularly.****


From: rt-users-bounces@lists.bestpractical.com [mailto:
rt-users-bounces@lists.bestpractical.com] On Behalf Of testwreq wreq
Sent: Friday, November 16, 2012 1:13 PM
To: rt-users@lists.bestpractical.com;
rt-users-request@lists.bestpractical.com
Subject: [rt-users] RT 4.0.8 still not receiving incoming tickets via
email on ubuntu
**


I have had problems with incoming tickets not being received into RT.****

My setup is:

ubuntu RT server 12.4
sendmail is the MTA

Emails sent from the exchange server (domain X) into RTserver
Emails sent from RT to exchange (outgoing) are working
Emails sent into RT from exchange server (inbound) are not working.
/var/log/mail.log does not have any entry for this. I am not sure if the
mail is reaching the RT server. Is there any configuration required for
rt-mailgate? sendmails /etc/aliases has the correspondence address for
general queue already setup. ****

Could anyone shed some light please?

Many thanks.****


We are a small setup. I would like to avoid setting up the extra fetch
mail step. All outgoing emails from RT server are working. Emails sent
into RT from exchange server (inbound via email) are not working. They
are not reaching the RT server.

Any ideas about troubleshooting this will be appreciated.

Read your local RT mail server logs, and provide them to the list if you
don’t know what’s happening.

Read your Exchange server logs.

Confirm that mail gets from Exchange to the local RT mail server. If
not, fix that.

Confirm that mail gets from the local RT mail server to rt-mailgate and
then RT itself. Test by sending mail locally on the RT server using
/usr/sbin/sendmail.

I used sendmail command locally on the Rt server to send mail to rt4. I am
unable to see the ticket generated in the RT interface. These are from
mail.log on the RT server.
Nov 20 09:43:18 rt4 sendmail[23208]: qAKEhIs6023208: from=wreq, size=34,
class=0, nrcpts=1, msgid=201211201443.qAKEhIs6023208@rt4.sc.sbu.edu,
relay=wreq@localhost
Nov 20 09:43:18 rt4 sm-mta[23209]: qAKEhIl0023209: from=wreq@rt4.sc.sbu.edu,
size=347, class=0, nrcpts=1, msgid=<
201211201443.qAKEhIs6023208@rt4.sc.sbu.edu>, proto=ESMTP, daemon=MTA-v4,
relay=localhost [127.0.0.1]
Nov 20 09:43:18 rt4 sendmail[23208]: qAKEhIs6023208: to=rt4@sc.sbu.edu,
ctladdr=wreq (10007/10007), delay=00:00:00, xdelay=00:00:00, mailer=relay,
pri=30034, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent
(qAKEhIl0023209 Message accepted for delivery)
Nov 20 09:43:18 rt4 sm-mta[23211]: STARTTLS=client, relay=edge1.sc.sbu.edu.,
version=TLSv1/SSLv3, verify=FAIL, cipher=AES128-SHA, bits=128/128
Nov 20 09:43:19 rt4 sm-mta[23211]: qAKEhIl0023209: to=rt4@sc.sbu.edu,
ctladdr=wreq@rt4.sc.sbu.edu (10007/10007), delay=00:00:01,
xdelay=00:00:01, mailer=esmtp, pri=120347, relay=edge1.sc.sbu.edu.
[130.245.9.210], dsn=2.0.0, stat=Sent (<
201211201443.qAKEhIs6023208@rt4.sc.sbu.edu> [InternalId=2648267] Queued
mail for delivery)

Does this mean that the mail does not get from the local RT mail server to
rt-mailgate and then RT itself? What should be done to fix this?

When I send email to rt4 using exchange, then it does not reach the server
mail.log.

Thanks a bunch.On Mon, Nov 19, 2012 at 3:30 PM, Thomas Sibley trs@bestpractical.comwrote:

On 11/19/2012 12:27 PM, testwreq wreq wrote:

We are a small setup. I would like to avoid setting up the extra fetch
mail step. All outgoing emails from RT server are working. Emails sent
into RT from exchange server (inbound via email) are not working. They
are not reaching the RT server.

Any ideas about troubleshooting this will be appreciated.

Read your local RT mail server logs, and provide them to the list if you
don’t know what’s happening.

Read your Exchange server logs.

Confirm that mail gets from Exchange to the local RT mail server. If
not, fix that.

Confirm that mail gets from the local RT mail server to rt-mailgate and
then RT itself. Test by sending mail locally on the RT server using
/usr/sbin/sendmail.


We’re hiring! http://bestpractical.com/jobs

I used sendmail command locally on the Rt server to send mail to rt4. I am unable to see the ticket generated in the RT interface. These are from mail.log on the RT server.
Nov 20 09:43:18 rt4 sendmail[23208]: qAKEhIs6023208: from=wreq, size=34, class=0, nrcpts=1, msgid=201211201443.qAKEhIs6023208@rt4.sc.sbu.edu, relay=wreq@localhost
Nov 20 09:43:18 rt4 sm-mta[23209]: qAKEhIl0023209: from=wreq@rt4.sc.sbu.edu, size=347, class=0, nrcpts=1, msgid=201211201443.qAKEhIs6023208@rt4.sc.sbu.edu, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Nov 20 09:43:18 rt4 sendmail[23208]: qAKEhIs6023208: to=rt4@sc.sbu.edu, ctladdr=wreq (10007/10007), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30034, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (qAKEhIl0023209 Message accepted for delivery)
Nov 20 09:43:18 rt4 sm-mta[23211]: STARTTLS=client, relay=edge1.sc.sbu.edu., version=TLSv1/SSLv3, verify=FAIL, cipher=AES128-SHA, bits=128/128
Nov 20 09:43:19 rt4 sm-mta[23211]: qAKEhIl0023209: to=rt4@sc.sbu.edu, ctladdr=wreq@rt4.sc.sbu.edu (10007/10007), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120347, relay=edge1.sc.sbu.edu. [130.245.9.210], dsn=2.0.0, stat=Sent (201211201443.qAKEhIs6023208@rt4.sc.sbu.edu [InternalId=2648267] Queued mail for delivery)

Does this mean that the mail does not get from the local RT mail server to rt-mailgate and then RT itself? What should be done to fix this?

I don’t know, I don’t speak sendmail (I use exim on our RT server). But what this suggests is that the config is correct for accepting the mail from the local host is correct, but the config for delivering the mail to rt-mailgate is wrong. If you run mailq, you’ll probably find that your test message is still sitting in sendmail’s queue.

If I were you, I’d fix this part of the problem before moving on to the second part, because you clearly have two separate issues.

When I send email to rt4 using exchange, then it does not reach the server mail.log.

Not at all? Not even in the rejection logs?

That sounds like you have also misconfigured sendmail’s listening to the outside world. If you go to another machine and telnet to port 25 on your RT server, do you get an SMTP prompt, or a connection timeout? If you get the timeout, or connection refused, than you know that sendmail isn’t listening properly, so you’ll need to fix that part of the configuration.

One question I have for you: why did you choose sendmail as the Mail Transfer Agent to use? It’s not the default on Ubuntu (nullmailer is), and there are at least three alternatives which are (a) command line compatible with sendmail and (b) a lot simpler to configure, and those are, in no particular order, exim, postfix and smail.

You might save a lot of pain by finding a local UNIX mail expert in one of those mail transfer agents (it doesn’t matter which), and get them to help you configure it properly. It’s not something we can easily help you with remotely on this list; there are too many variables, and if you’ve never configured a UNIX mail transfer agent before there are a lot of pitfalls involved, in which you could accidentally set yourself up as a mail relay and have spammers abusing your system, for example.

The fetchmail alternative might sound more complex to you, but it’s actually simpler and less vulnerable to the above sort of mistake, because it avoids the step of having to configure your MTA correctly with regard to receiving external email. It only has to handle the much simpler case of local mail, internal to your RT server, and sending out to your Exchange server (which you already have working).

Regards,

Tim

The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.

Hi, It was our configuration in sendmail. Once configured correctly, the
mail is working.

I agree with the pitfalls involved using sendmail MTA.
I would like to know more about fetchmail. What is fetchmail? Do I have
to configure sendmail to use fetchmail?
We have rt, rt-web, rt-linux, rt-email addresses in exchange. I would
prefer mail to be sent directly from anywhere to any of these addresses and
vice-a-versa, and the communication recorded in RT.

Can I eliminate MTA completely from this setup?On Tue, Nov 20, 2012 at 11:51 AM, Tim Cutts tjrc@sanger.ac.uk wrote:

On 20 Nov 2012, at 14:58, testwreq wreq testwreq@gmail.com wrote:

I used sendmail command locally on the Rt server to send mail to rt4. I
am unable to see the ticket generated in the RT interface. These are from
mail.log on the RT server.
Nov 20 09:43:18 rt4 sendmail[23208]: qAKEhIs6023208: from=wreq, size=34,
class=0, nrcpts=1, msgid=201211201443.qAKEhIs6023208@rt4.sc.sbu.edu,
relay=wreq@localhost
Nov 20 09:43:18 rt4 sm-mta[23209]: qAKEhIl0023209: from=<
wreq@rt4.sc.sbu.edu>, size=347, class=0, nrcpts=1, msgid=<
201211201443.qAKEhIs6023208@rt4.sc.sbu.edu>, proto=ESMTP, daemon=MTA-v4,
relay=localhost [127.0.0.1]
Nov 20 09:43:18 rt4 sendmail[23208]: qAKEhIs6023208: to=rt4@sc.sbu.edu,
ctladdr=wreq (10007/10007), delay=00:00:00, xdelay=00:00:00, mailer=relay,
pri=30034, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent
(qAKEhIl0023209 Message accepted for delivery)
Nov 20 09:43:18 rt4 sm-mta[23211]: STARTTLS=client, relay=
edge1.sc.sbu.edu., version=TLSv1/SSLv3, verify=FAIL, cipher=AES128-SHA,
bits=128/128
Nov 20 09:43:19 rt4 sm-mta[23211]: qAKEhIl0023209: to=rt4@sc.sbu.edu,
ctladdr=wreq@rt4.sc.sbu.edu (10007/10007), delay=00:00:01,
xdelay=00:00:01, mailer=esmtp, pri=120347, relay=edge1.sc.sbu.edu.
[130.245.9.210], dsn=2.0.0, stat=Sent (<
201211201443.qAKEhIs6023208@rt4.sc.sbu.edu> [InternalId=2648267] Queued
mail for delivery)

Does this mean that the mail does not get from the local RT mail server
to rt-mailgate and then RT itself? What should be done to fix this?

I don’t know, I don’t speak sendmail (I use exim on our RT server). But
what this suggests is that the config is correct for accepting the mail
from the local host is correct, but the config for delivering the mail to
rt-mailgate is wrong. If you run mailq, you’ll probably find that your
test message is still sitting in sendmail’s queue.

If I were you, I’d fix this part of the problem before moving on to the
second part, because you clearly have two separate issues.

When I send email to rt4 using exchange, then it does not reach the
server mail.log.

Not at all? Not even in the rejection logs?

That sounds like you have also misconfigured sendmail’s listening to the
outside world. If you go to another machine and telnet to port 25 on your
RT server, do you get an SMTP prompt, or a connection timeout? If you get
the timeout, or connection refused, than you know that sendmail isn’t
listening properly, so you’ll need to fix that part of the configuration.

One question I have for you: why did you choose sendmail as the Mail
Transfer Agent to use? It’s not the default on Ubuntu (nullmailer is), and
there are at least three alternatives which are (a) command line compatible
with sendmail and (b) a lot simpler to configure, and those are, in no
particular order, exim, postfix and smail.

You might save a lot of pain by finding a local UNIX mail expert in one of
those mail transfer agents (it doesn’t matter which), and get them to help
you configure it properly. It’s not something we can easily help you with
remotely on this list; there are too many variables, and if you’ve never
configured a UNIX mail transfer agent before there are a lot of pitfalls
involved, in which you could accidentally set yourself up as a mail relay
and have spammers abusing your system, for example.

The fetchmail alternative might sound more complex to you, but it’s
actually simpler and less vulnerable to the above sort of mistake, because
it avoids the step of having to configure your MTA correctly with regard to
receiving external email. It only has to handle the much simpler case of
local mail, internal to your RT server, and sending out to your Exchange
server (which you already have working).

Regards,

Tim


The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.

Hi, It was our configuration in sendmail. Once configured correctly, the mail is working.

I agree with the pitfalls involved using sendmail MTA.
I would like to know more about fetchmail. What is fetchmail? Do I have to configure sendmail to use fetchmail?
We have rt, rt-web, rt-linux, rt-email addresses in exchange. I would prefer mail to be sent directly from anywhere to any of these addresses and vice-a-versa, and the communication recorded in RT.

Since you now have it working with direct transmission of the email from your Exchange server to RT, I’d leave it alone; it’s the best solution in general, because it means new messages to tickets will enter RT immediately that Exchange sees them, whereas using fetch mail adds a delay.

Fetchmail is basically just a standard POP or IMAP client which fetches mail (obviously) and inserts it into a local mail transfer agent (i.e. a local copy of sendmail). This is usually done by people who have no control or influence on the configuration of their mail server, and so can’t arrange for delivery to be made directly, and all they have is an account on the mail server from which they can download mail.

So, when using fetchmail, you still have to configure your local sendmail copy to deliver the mail to rt-mailgate correctly, that part doesn’t change. The difference is how the mail gets from your mail server to RT. With fetchmail, it’s periodically downloaded using something like POP or IMAP. Without fetchmail, it’s sent directly to your RT server’s sendmail by SMTP. fetchmail has to be run from cron every few minutes, so there’s always a small delay when using that method before replies to tickets will be seen in RT.

Tim

The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.

Thank you for this explanation.On Wed, Nov 21, 2012 at 4:31 AM, Tim Cutts tjrc@sanger.ac.uk wrote:

On 20 Nov 2012, at 20:41, testwreq wreq testwreq@gmail.com wrote:

Hi, It was our configuration in sendmail. Once configured correctly, the
mail is working.

I agree with the pitfalls involved using sendmail MTA.
I would like to know more about fetchmail. What is fetchmail? Do I have
to configure sendmail to use fetchmail?
We have rt, rt-web, rt-linux, rt-email addresses in exchange. I would
prefer mail to be sent directly from anywhere to any of these addresses and
vice-a-versa, and the communication recorded in RT.

Since you now have it working with direct transmission of the email from
your Exchange server to RT, I’d leave it alone; it’s the best solution in
general, because it means new messages to tickets will enter RT immediately
that Exchange sees them, whereas using fetch mail adds a delay.

Fetchmail is basically just a standard POP or IMAP client which fetches
mail (obviously) and inserts it into a local mail transfer agent (i.e. a
local copy of sendmail). This is usually done by people who have no
control or influence on the configuration of their mail server, and so
can’t arrange for delivery to be made directly, and all they have is an
account on the mail server from which they can download mail.

So, when using fetchmail, you still have to configure your local sendmail
copy to deliver the mail to rt-mailgate correctly, that part doesn’t
change. The difference is how the mail gets from your mail server to RT.
With fetchmail, it’s periodically downloaded using something like POP or
IMAP. Without fetchmail, it’s sent directly to your RT server’s sendmail
by SMTP. fetchmail has to be run from cron every few minutes, so there’s
always a small delay when using that method before replies to tickets will
be seen in RT.

Tim


The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.