Fetchmail

Has anyone us rt with fetchmail before? I’m on a network were i can
not have mail relayed to my box, so I will need to fetch the mail from
our exchange server back to my box then inject the mail into a ticket.
Anyone has an ideal on how i can get this done?

Has anyone us rt with fetchmail before? I’m on a network were i can
not have mail relayed to my box, so I will need to fetch the mail from
our exchange server back to my box then inject the mail into a ticket.
Anyone has an ideal on how i can get this done?

Since fetchmail injects mail into the local daemon, your problems will
likely mostly be figuring out what to call the machine, and what to
tell RT it’s called; these are similar to situations where mail is
forwarded from a gateway to an RT box (though not, I think, exactly
identical).

Is there anything on the wiki about this?

Cheers,
– jra
Jay R. Ashworth jra@baylink.com
Designer Baylink RFC 2100
Ashworth & Associates The Things I Think '87 e24
St Petersburg FL USA http://baylink.pitas.com +1 727 647 1274

  If you can read this... thank a system administrator.  Or two.  --me

Not that I’ve done this but…

I would setup my fetchmail as usual… then pipe the emails one at a time
to rt-mailgate directly from the command line. Check the list in the
past, I posted something about running rt-mailgate from the command line.

I would create two accounts per queue (correspond/comment), otherwise
you’re going to have to collate the mail and that gets significantly
harder.

Good Luck,

Ramon Kagan
York University, Computing and Network Services
Information Security - Senior Information Security Analyst
(416)736-2100 #20263
rkagan@yorku.ca


I have not failed. I have just I don’t know the secret to success,
found 10,000 ways that don’t work. but the secret to failure is
trying to please everybody.
- Thomas Edison - Bill Cosby
----------------------------------- ------------------------------------On Mon, 25 Apr 2005, spiv007 wrote:

Has anyone us rt with fetchmail before? I’m on a network were i can
not have mail relayed to my box, so I will need to fetch the mail from
our exchange server back to my box then inject the mail into a ticket.
Anyone has an ideal on how i can get this done?


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

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

This is how my setup is done:

This is my aliases entries:
rt: "|rt-mailgate --queue general --action correspond --url
http://10.64.87.248/"
rt-comment: “|rt-mailgate --queue general --action comment --url
http://10.64.87.248/

In my root directory I have put a .fetchmailrc file which contains this:
poll mail.mailserver.ca with proto POP3 timeout 200 user ‘rt’ password
’password’ is ‘rt@localhost’ here

So in my case the users email rt@mailserver.ca (for example), and I run
fetchamil as a deamon and get my email direct to RT on the localhost

And then to have fetchmail check email every two minutes I run this as
root (since the .fetchmailrc is under root’s account)

fetchmail --daemon 120

So every two minutes this is run.

If you want this to be around after a reboot you can enter it in
rc.local

Works great.

PhilFrom: Ramon Kagan [mailto:rkagan@yorku.ca]
Sent: Monday, April 25, 2005 1:21 PM
To: spiv007
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] fetchmail

Not that I’ve done this but…

I would setup my fetchmail as usual… then pipe the emails one at a
time
to rt-mailgate directly from the command line. Check the list in the
past, I posted something about running rt-mailgate from the command
line.

I would create two accounts per queue (correspond/comment), otherwise
you’re going to have to collate the mail and that gets significantly
harder.

Good Luck,

Ramon Kagan
York University, Computing and Network Services
Information Security - Senior Information Security Analyst
(416)736-2100 #20263
rkagan@yorku.ca

I have not failed. I have just I don’t know the secret to
success,
found 10,000 ways that don’t work. but the secret to failure is
trying to please everybody.
- Thomas Edison - Bill Cosby

This is how my setup is done:

This is my aliases entries:
rt: "|rt-mailgate --queue general --action correspond --url
http://10.64.87.248/"
rt-comment: “|rt-mailgate --queue general --action comment --url
http://10.64.87.248/

In my root directory I have put a .fetchmailrc file which contains this:
poll mail.mailserver.ca with proto POP3 timeout 200 user ‘rt’ password
’password’ is ‘rt@localhost’ here

So in my case the users email rt@mailserver.ca (for example), and I run
fetchamil as a deamon and get my email direct to RT on the localhost

And then to have fetchmail check email every two minutes I run this as
root (since the .fetchmailrc is under root’s account)

fetchmail --daemon 120

So every two minutes this is run.

If you want this to be around after a reboot you can enter it in
rc.local

Works great.

PhilFrom: Ramon Kagan [mailto:rkagan@yorku.ca]
Sent: Monday, April 25, 2005 1:21 PM
To: spiv007
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] fetchmail

Not that I’ve done this but…

I would setup my fetchmail as usual… then pipe the emails one at a
time
to rt-mailgate directly from the command line. Check the list in the
past, I posted something about running rt-mailgate from the command
line.

I would create two accounts per queue (correspond/comment), otherwise
you’re going to have to collate the mail and that gets significantly
harder.

Good Luck,

Ramon Kagan
York University, Computing and Network Services
Information Security - Senior Information Security Analyst
(416)736-2100 #20263
rkagan@yorku.ca

I have not failed. I have just I don’t know the secret to
success,
found 10,000 ways that don’t work. but the secret to failure is
trying to please everybody.
- Thomas Edison - Bill Cosby

Has anyone us rt with fetchmail before?

Yes.

I use this .fetchmailrc:

set daemon 600
poll mail.ii.uib.no protocol imap user rt with password illnevertell ssl idle mda ‘/usr/bin/procmail -m /export/home/rt/rt-home/.procmailrc’

and the following .procmailrc to select which queue to route the
messages to:

PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:/localnet/bin:.
PATH=/export/home/rt/perl/bin/:/export/home/rt/rt/bin/:/bin:/usr/bin
MAILDIR=$HOME/Mail # You’d better make sure it exists
DEFAULT=$MAILDIR/inbox/
LOGFILE=$HOME/.maillog
LOCKFILE=$HOME/.lockmail

:0 c

:0 c

Save a copy of all tickets just in case something should fail:

:0
$MAILDIR/inbox/

Works perfectly fine for us.

-jf

spiv007 wrote:

Has anyone us rt with fetchmail before? I’m on a network were i can
not have mail relayed to my box, so I will need to fetch the mail from
our exchange server back to my box then inject the mail into a ticket.
Anyone has an ideal on how i can get this done?


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

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

It’s in the wiki.
http://wiki.bestpractical.com/index.cgi?POP3Mailgate

This works for me, together with qmail.
The biggest problem is always finding out how to make the mail sent-out
from RT not contain a subdomain that doesn’t have an MX-record…

cheers,
Rainer

I am running RT as root and do not have a user on my Fedora Core 3 system
called “RT”.

If I run fetchmail to process email that it grabs from an exchange server
and place into a specified queue do I need to create
a rt@localhost mailto:rt@localhost (on the rt server) user or can I just
place the .fetchmailrc file into the /root directory?

Also does anybody have some tips on how/where to enter the aliases for rt:
and rt-comment: ?
this is in reference to the archive list on fetchmail at
http://lists.bestpractical.com/pipermail/rt-users/2005-April/030786.html
http://lists.bestpractical.com/pipermail/rt-users/2005-April/030786.html

T.J. Maciak

Internet/Intranet Developer
Department of IT
City of Grand Rapids
P: (616)456-3713
F: (616)456-3448

Maciak, TJ wrote:

I am running RT as root and do not have a user on my Fedora Core 3
system called “RT”.

If I run fetchmail to process email that it grabs from an exchange
server and place into a specified queue do I need to create
a rt@localhost mailto:rt@localhost (on the rt server) user or can I
just place the .fetchmailrc file into the /root directory?

Also does anybody have some tips on how/where to enter the aliases for
rt: and rt-comment: ?
this is in reference to the archive list on fetchmail at
http://lists.bestpractical.com/pipermail/rt-users/2005-April/030786.html

You might want to go to wiki.bestpractical.com and search for “fetchmail”.
The setup discribed in the article works very well.

Rainer

Subject: Re: “Asymmetrical” mail processing

From: Rainer Duffner [mailto:rainer@ultra-secure.de]
You might want to go to wiki.bestpractical.com and search for
"fetchmail".
The setup discribed in the article works very well.

Never mind… :wink:

Chris Doherty
On contract to Crompton Co./Cie
Elmira: (519) 669-1671 x319

Ok thanks that is helpful for the aliases part! so I have placed:

rt: "|/etc/smrsh/rt-mailgate --queue ‘Solutions Queue’ --action correspond
–url http://helpdesk/rt/"
rt-comment: “|/opt/rt3/bin/rt-mailgate --queue general --action comment
–url http://helpdesk/rt/

I placed the /etc/smrsh/rt-mailgate as stated for Redhat Distros (checked
the directory and the rt-mailgate was already there)
into the /etc/aliases file as I read in the documentation.

I then send a test message to each queue,

echo ‘hello1018’ | mail -s “Test subject” rt-comment

And

echo ‘hello1015’ | mail -s “Test subject” rt

If I do it to some other user, I get an error in my root mailbox (saying
user is not known) so I know the mail part is working.
After I send the test messages, I do not get any error or informational
messages in /opt/rt3/var/log/rt.log nor /var/log/messages
Yet the tickets are not created. I also restarted apache as stated in the
documentation.

T.J. Maciak

Internet/Intranet Developer
Department of IT
City of Grand Rapids
P: (616)456-3713
F: (616)456-3448From: Rainer Duffner [mailto:rainer@ultra-secure.de]
Sent: Wednesday, June 29, 2005 9:54 AM
To: Maciak, TJ
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] fetchmail

Maciak, TJ wrote:

I am running RT as root and do not have a user on my Fedora Core 3
system called “RT”.

If I run fetchmail to process email that it grabs from an exchange
server and place into a specified queue do I need to create a
rt@localhost mailto:rt@localhost (on the rt server) user or can I
just place the .fetchmailrc file into the /root directory?

Also does anybody have some tips on how/where to enter the aliases for
rt: and rt-comment: ?
this is in reference to the archive list on fetchmail at
http://lists.bestpractical.com/pipermail/rt-users/2005-April/030786.ht
ml

You might want to go to wiki.bestpractical.com and search for “fetchmail”.
The setup discribed in the article works very well.

Rainer

Hi there, has anyone figured out yet how to assign queues to non-privileged
users yet?

Basically non-privileged users can see only their queues when they are
opening a ticket.

Thanks in advance!

Best Regards,
Ravin MathooraFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Doherty,
Chris - Elmira, ON
Sent: 29 June 2005 15:06
To: rt-users@lists.bestpractical.com
Subject: RE: [rt-users] fetchmail

Subject: Re: “Asymmetrical” mail processing

From: Rainer Duffner [mailto:rainer@ultra-secure.de]
You might want to go to wiki.bestpractical.com and search for
"fetchmail".
The setup discribed in the article works very well.

Never mind… :wink:

Chris Doherty
On contract to Crompton Co./Cie
Elmira: (519) 669-1671 x319
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

ok I think I know what the problem is but how do I solve it?
on Fedora Core 3 - I have edited the /etc/aliases files to:

rt: "|/etc/smrsh/rt-mailgate --queue ‘Solutions Queue’ --action correspond
–url http://helpdesk/rt/ http://helpdesk/rt/"
rt-comment: “|/opt/rt3/bin/rt-mailgate --queue general --action comment
–url http://helpdesk/rt/ http://helpdesk/rt/

however, upon looking at /var/log/maillog I see the old command being run:

Jun 29 11:45:13 helpdesk sendmail[8046]: j5TFQ6LD007797:
to="|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url htt
p://serverDev/rt/", ctladdr=<rt@helpdesk mailto:rt@helpdesk > (8/0),
delay=00:19:07, xdelay=00:00:02, mailer=prog, pri=300497, dsn=4.0.0,
stat=Deferred: prog
mailer (/usr/sbin/smrsh) exited with EX_TEMPFAIL

as you can see, it is pointing to the wrong server name (serverDev) which is
what was in the original aliases file.

I have done a “makemap hash aliases <aliases” and see this:

Jun 29 11:45:11 helpdesk sendmail[8040]: alias database /etc/aliases rebuilt
by tmaciak
Jun 29 11:45:11 helpdesk sendmail[8040]: /etc/aliases: 82 aliases, longest
105 bytes, 1239 bytes total
Jun 29 11:45:11 helpdesk sendmail[8045]: starting daemon (8.13.1):
SMTP+queueing@01:00:00 mailto:SMTP+queueing@01:00:00
Jun 29 11:45:11 helpdesk sm-msp-queue[8053]: starting daemon (8.13.1):
queueing@01:00:00 mailto:queueing@01:00:00

Also I have restarted the /etc/init.d/sendmail task but even though the
alias db file has been updated it is still pointing to the old web server.

Is this configured somewhere else? or is there some other service I have to
restart in order for aliases.db to get read correctly?

HELP!

T.J. Maciak

Internet/Intranet Developer
Department of IT
City of Grand Rapids
P: (616)456-3713
F: (616)456-3448From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Maciak, TJ
Sent: Wednesday, June 29, 2005 10:24 AM
To: Rainer Duffner
Cc: rt-users@lists.bestpractical.com
Subject: RE: [rt-users] fetchmail

Ok thanks that is helpful for the aliases part! so I have placed:

rt: "|/etc/smrsh/rt-mailgate --queue ‘Solutions Queue’ --action correspond
–url http://helpdesk/rt/ http://helpdesk/rt/ "
rt-comment: "|/opt/rt3/bin/rt-mailgate --queue general --action comment
–url http://helpdesk/rt/ http://helpdesk/rt/ "

I placed the /etc/smrsh/rt-mailgate as stated for Redhat Distros (checked
the directory and the rt-mailgate was already there)

into the /etc/aliases file as I read in the documentation.

I then send a test message to each queue,

echo ‘hello1018’ | mail -s “Test subject” rt-comment

And

echo ‘hello1015’ | mail -s “Test subject” rt

If I do it to some other user, I get an error in my root mailbox (saying
user is not known) so I know the mail part is working.

After I send the test messages, I do not get any error or informational
messages in /opt/rt3/var/log/rt.log nor /var/log/messages

Yet the tickets are not created. I also restarted apache as stated in the
documentation.

T.J. Maciak

Internet/Intranet Developer
Department of IT
City of Grand Rapids
P: (616)456-3713
F: (616)456-3448

From: Rainer Duffner [mailto:rainer@ultra-secure.de
mailto:rainer@ultra-secure.de ]
Sent: Wednesday, June 29, 2005 9:54 AM
To: Maciak, TJ
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] fetchmail

Maciak, TJ wrote:

I am running RT as root and do not have a user on my Fedora Core 3
system called “RT”.

If I run fetchmail to process email that it grabs from an exchange
server and place into a specified queue do I need to create a
rt@localhost <mailto:rt@localhost mailto:rt@localhost > (on the rt
server) user or can I
just place the .fetchmailrc file into the /root directory?

Also does anybody have some tips on how/where to enter the aliases for
rt: and rt-comment: ?
this is in reference to the archive list on fetchmail at
http://lists.bestpractical.com/pipermail/rt-users/2005-April/030786.ht
http://lists.bestpractical.com/pipermail/rt-users/2005-April/030786.ht
ml

You might want to go to wiki.bestpractical.com and search for “fetchmail”.
The setup discribed in the article works very well.

Rainer

I solved my problem related to the rt-mailgate.
Turned out that the DNS servers were not set up right and the local server
did not know how to access itself by its http://helpdesk http://helpdesk
name.
Also ran newaliases instead of doing the makemap hash aliases <aliases
and that seemed to work much better!

T.J. Maciak

Internet/Intranet Developer
Department of IT
City of Grand Rapids
P: (616)456-3713
F: (616)456-3448