LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Fetchmail Configuration Problem (https://www.linuxquestions.org/questions/linux-software-2/fetchmail-configuration-problem-762940/)

jsteel 10-19-2009 08:07 AM

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

repo 10-19-2009 08:17 AM

Quote:

fetchmail: connection to server-08:pop3 [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 ?

jsteel 10-19-2009 09:05 AM

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).

repo 10-19-2009 11:22 AM

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.

jsteel 10-20-2009 04:38 AM

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

repo 10-20-2009 05:46 AM

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

jsteel 10-20-2009 06:00 AM

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?).

repo 10-20-2009 06:27 AM

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

jsteel 10-20-2009 07:20 AM

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

repo 10-20-2009 07:26 AM

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.

jsteel 10-20-2009 07:32 AM

I've tried restarting fetchmail (each time I change the /etc/fetchmailrc file I restart fetchmail).

jsteel 10-20-2009 09:53 AM

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.

repo 10-20-2009 10:22 AM

Your server (rt) needs to accept connections on port 25

jsteel 10-21-2009 02:11 AM

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?

jsteel 10-21-2009 03:10 AM

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 :)


All times are GMT -5. The time now is 09:11 PM.