Fetchmail

Hello RT_Users,

I have exim4 working to send mails from RT and I am trying to use fetchmail to poll exchange and collect the messages.
Fetchmail returns Fetchmail MDA returned nonzero status 2 in the syslog. I also get POP3 Protocol error 19
I look at the exchange account and I can see that fetchmail is reading the messages.

I have also tried with imap and get error writing to mda broken pipe

Here is the fetchmail config

set daemon 30:
set invisible
set no bouncemail
set syslog

poll mail.server.ca protocol pop3
auth password
username “xxxxxxx@server.camailto:xxxxxxx@server.ca” password “xxxxxxxx”
mda “/opt/rt4/bin/rt-mailgate --queue xxxxxxx --action correspond --url http://xxxxxxx/
no keep
#sslfingerprint “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”

Syslog
reading message xxxxx@server.ca@mail.server.ca:9mailto:xxxxx@server.ca@mail.server.ca:9 of 10 (3310 octets) (log message incomplete)
not flushed

If your queue contains spaces in it, you may consider using single quotes:

poll oa-internal.domain.com protocol imap username “rt-correspondance”
password “my_password” mda “/opt/rt4/bin/rt-mailgate --queue ‘IT General’
–action correspond --url http://rt.domain.com/” no keepOn Tue, Jul 5, 2016 at 11:22 AM, Dunbar, Brian Brian.Dunbar@von.ca wrote:

Hello RT_Users,

I have exim4 working to send mails from RT and I am trying to use
fetchmail to poll exchange and collect the messages.

Fetchmail returns Fetchmail MDA returned nonzero status 2 in the syslog.
I also get POP3 Protocol error 19

I look at the exchange account and I can see that fetchmail is reading the
messages.

I have also tried with imap and get error writing to mda broken pipe

Here is the fetchmail config

set daemon 30:

set invisible

set no bouncemail

set syslog

poll mail.server.ca protocol pop3

auth password

username “xxxxxxx@server.ca” password “xxxxxxxx”

mda “/opt/rt4/bin/rt-mailgate --queue xxxxxxx --action correspond --url
http://xxxxxxx/

no keep

#sslfingerprint “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”

Syslog

reading message xxxxx@server.ca@mail.server.ca:9 of 10 (3310 octets) (log
message incomplete)

not flushed


RT 4.4 and RTIR Training Sessions https://bestpractical.com/training

  • Los Angeles - September, 2016

I think the problem is RT-Mailgate is corrupt I tried running /opt/rt4/bin ./rt-mailgate –help and it stops with
:/opt/rt4/bin$ sudo vi rt-mailgate
:/opt/rt4/bin$ ./rt-mailgate --help
syntax error at ./rt-mailgate line 71, near “test:”
syntax error at ./rt-mailgate line 74, near “comments:”
BEGIN not safe after errors–compilation aborted at ./rt-mailgate line 79.

The relevant lines from rt-mailgate

70
71 service.test: ‘|/opt/rt4/bin/rt-mailgate --queue service.test --action correspond
72 --url http://server/rt’;
73
74 servicetest.comments: ‘|/opt/rt4/bin/rt-mailgate --queue service.test --action comment
75 --url http://server/rt/’;
76
77 package RT::Client::MailGateway;
78
79 use LWP::UserAgent;From: trevorthorpe@gmail.com [mailto:trevorthorpe@gmail.com] On Behalf Of Trev
Sent: Tuesday, July 5, 2016 11:33 AM
To: Dunbar, Brian
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Fetchmail

If your queue contains spaces in it, you may consider using single quotes:

poll oa-internal.domain.comhttp://oa-internal.domain.com protocol imap username “rt-correspondance” password “my_password” mda “/opt/rt4/bin/rt-mailgate --queue ‘IT General’ --action correspond --url http://rt.domain.com/” no keep

Sorry about all the messages . They were being blocked by Barracuda so I whitelisted it and all my messages came.From: rt-users [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Dunbar, Brian
Sent: Tuesday, July 5, 2016 11:22 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Fetchmail

Hello RT_Users,

I have exim4 working to send mails from RT and I am trying to use fetchmail to poll exchange and collect the messages.
Fetchmail returns Fetchmail MDA returned nonzero status 2 in the syslog. I also get POP3 Protocol error 19
I look at the exchange account and I can see that fetchmail is reading the messages.

I have also tried with imap and get error writing to mda broken pipe

Here is the fetchmail config

set daemon 30:
set invisible
set no bouncemail
set syslog

poll mail.server.ca protocol pop3
auth password
username “xxxxxxx@server.camailto:xxxxxxx@server.ca” password “xxxxxxxx”
mda “/opt/rt4/bin/rt-mailgate --queue xxxxxxx --action correspond --url http://xxxxxxx/
no keep
#sslfingerprint “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”

Syslog
reading message xxxxx@server.ca@mail.server.ca:9mailto:xxxxx@server.ca@mail.server.ca:9 of 10 (3310 octets) (log message incomplete)
not flushed