LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-19-2009, 08:07 AM   #1
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Rep: Reputation: 34
Fetchmail Configuration Problem


Hi,

I'm following the steps here http://www.debianadmin.com/howto-set...bian-etch.html to get e-mail notifications working with RT. It suggests using Fetchmail, which I have not used before.

I get the following in my error log:

fetchmail: connection to server-08:pop3 [127.0.1.1/110] failed: Connection refused.
fetchmail: POP3 connection to server-08 failed: Connection refused
fetchmail: Query status=2 (SOCKET)
fetchmail: sleeping at Mon 19 Oct 2009 13:58:52 BST for 60 seconds

Is this an error due to my /etc/fetchmailrc file? If so my configuration is below.

set daemon 60
set invisible
set no bouncemail
set no syslog
set logfile /var/log/fetchmail.log
# support@example.org
poll server-08
protocol pop3
username "rt" password "mypassword"
mda "/usr/bin/rt-mailgate-3.6 --queue support --action correspond --url http://server-08/rt/"
no keep

I'm not sure if the username and password have to be a user on the computer, or if the username and password are being set here for the mailbox. I'm new to Fetchmail so any help would be appreciated.

Thanks
 
Old 10-19-2009, 08:17 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
fetchmail: connection to server-08op3 [127.0.1.1/110] failed: Connection refused.
Are you connecting to your own server?
If yes, port 110 is closed, and probably there is notting running behind the port.
Do you have a popserver configured to listen on port 10 ?
 
Old 10-19-2009, 09:05 AM   #3
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
Yes, I'm just working with the one computer.

To explain further, my server is running RT and I'm trying to set up Fetchmail on the same computer. We use an MS Exchange server here to manage users e-mail accounts, so what I want is for my server to forward mail to them. Is this the correct way to do this? Apart from following the instructions linked in my first post, I have not done anything else (RE popserver).

Last edited by jsteel; 10-19-2009 at 10:38 AM.
 
Old 10-19-2009, 11:22 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Fetchmail is used to retrieve mails from a pop server, not to sent mail.
If you want to sent mail, you need to configure postfix.
Don't know if the Microsoft Exchange server acts as a smtp server though.
 
Old 10-20-2009, 04:38 AM   #5
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
OK thanks for pointing me in the right direction. I've got Postfix set up now, and outgoing e-mails work fine! Incoming ones are a problem though. When I try to reply to an e-mail sent out from RT, it says:

The following recipient(s) cannot be reached: <rt@server-08>. Reason: Domain <server-08> does not exist (DNS lookup failure)

I believe my server is set up OK, but the mail server we use (Exchange) might have a problem seeing it (maybe it's looking out on the Internet for it, but my server is on the same network). server-08 has a DNS entry which points to the server's IP address. Any ideas with this?

Thanks
 
Old 10-20-2009, 05:46 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
server-08 has a DNS entry which points to the server's IP address
where is that dns entry?
Do you use the dns server which has the entry?
To resolve the server quick and durty,
You can add the ip in the hosts file of the sending machine
Code:
xxx.xxx.xxx.xxx server-08
 
Old 10-20-2009, 06:00 AM   #7
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
Thanks for the reply. It's set on my only DNS server which all of the computers use. From the RT server, the MS Exchange server and the computer that I am using, I can ping "server-08" and that works fine.

I have just found that my Exchange server uses a smart host (external) to manage mail. I wonder if this is the server that cannot see my local RT server. I briefly set it to use DNS to manage mail instead but this did not make any difference (unless I need to restart the mail service/server before the changes take affect?).
 
Old 10-20-2009, 06:27 AM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
If exchange uses a smarthost, it can not resolve your server.
Don't know exchange, but can't you add a rule in the exchange server to resolve locally for your domain?

Quote:
I briefly set it to use DNS to manage mail instead but this did not make any difference
This will break exchange if it wants to sent mail to the outside

Last edited by repo; 10-20-2009 at 06:29 AM.
 
Old 10-20-2009, 07:20 AM   #9
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
Thanks, I'll have a look into adding a rule as you suggested.
RE: Breaking Exchange: That's why I only briefly changed it!

I'm trying Fetchmail again to pick up the e-mails from an Exchange account instead of using Postfix. At least I know how it works now!

Fetchmail sees that there are e-mails waiting on the account I set up, but it gives the following error. Any ideas with this? I've seen a comment online saying that the queue name may be wrong, but I am sure it is correct:

fetchmail: awakened at Tue 20 Oct 2009 13:16:58 BST
fetchmail: 1 message for support at 10.11.12.13.
An Error Occurred
=================

403 Forbidden
fetchmail: reading message support@10.11.12.13:1 of 1 (839 header octets) (3035 body octets) (log message incomplete)fetchmail: MDA returned nonzero status 75
fetchmail: not flushed
fetchmail: sleeping at Tue 20 Oct 2009 13:16:59 BST for 60 seconds
 
Old 10-20-2009, 07:26 AM   #10
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
I've seen a comment online saying that the queue name may be wrong, but I am sure it is correct:
Found the same
http://wiki.bestpractical.com/view/TroubleShooting

Try to restart fetchmail, so it will read the conf file again.
 
Old 10-20-2009, 07:32 AM   #11
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
I've tried restarting fetchmail (each time I change the /etc/fetchmailrc file I restart fetchmail).
 
Old 10-20-2009, 09:53 AM   #12
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
I think I have got Exchange to work with my local server now by adding/configuring another SMTP connector.

Now my Postfix is saying:

Oct 20 15:50:21 server-08 postfix/local[18572]: A7B78145A25: to=<rt@server-08>, relay=local, delay=584, delays=582/0.03/0/1.8, dsn=4.3.0, status=deferred (temporary failure. Command output: An Error Occurred ================= 403 Forbidden )

Another 403 forbidden! I wonder what is forbidden with both fetchmail and postfix! My mail doesn't bounce back now. But nothing gets through to RT; just these errors in postfix.
 
Old 10-20-2009, 10:22 AM   #13
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Your server (rt) needs to accept connections on port 25
 
Old 10-21-2009, 02:11 AM   #14
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
111/tcp open rpcbind

From the above, port 25 is open. Is that sufficient?
 
Old 10-21-2009, 03:10 AM   #15
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Original Poster
Rep: Reputation: 34
Fixed!

In the file:

/etc/request-tracker3.6/apache2-modperl2.conf

At the bottom it says:

# Limit mail gateway access to localhost by default
<Location /rt/REST/1.0/NoAuth>
Order Allow,Deny
Allow from 127.0.0.1
</Location>

I changed 127.0.0.1 to all, restarted Apache and Postfix and it works! Thanks for your help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fetchmail configuration struggled_newbie Linux - Newbie 4 09-16-2009 03:16 AM
Fetchmail Configuration shibu_sp Linux - Newbie 1 07-08-2008 06:47 AM
fetchmail configuration ?? dansawyer Linux - Software 2 01-24-2007 03:08 PM
Fetchmail Configuration reply2vinay Linux - General 2 10-21-2005 07:49 AM
Fetchmail configuration Van Gogh Linux - Software 2 08-04-2004 11:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration