Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fetchmail and postfix: fetchmail can't connect to smtp
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
SerfurJ
l33t
l33t


Joined: 10 Apr 2004
Posts: 824
Location: Texas

PostPosted: Tue May 18, 2004 3:22 pm    Post subject: fetchmail and postfix: fetchmail can't connect to smtp Reply with quote

i'm trying to use fetchmail with postfix. when fetchmail tries to download messages, it can't connect to the smtp. i invoke fetchmail using the following command:
Code:
fetchmail -v -v -d0

i can see that it logs in, gets a list of messages, and starts processing the first one. after a while the following message appears.
Code:
fetchmail: smtp listener protocol error
fetchmail: SMTP connect to localhost failed

netstat -a shows that postfix is listening on the smtp port. i've tried using ssmtp and the same thing happens.

what am i missing here?

thanks.
Back to top
View user's profile Send private message
jkt
Retired Dev
Retired Dev


Joined: 06 Feb 2004
Posts: 1250
Location: Prague, Czech republic, EU

PostPosted: Tue May 18, 2004 3:37 pm    Post subject: Reply with quote

does `nc localhost smtp` work for you?
Back to top
View user's profile Send private message
SerfurJ
l33t
l33t


Joined: 10 Apr 2004
Posts: 824
Location: Texas

PostPosted: Tue May 18, 2004 3:47 pm    Post subject: Reply with quote

jkt,

`nc6 localhost smtp` just gave me a non-responsive blank line (no prompt). i tried typing smtp commands, nothing.

i've verified that i can send mail using mutt through postfix, so i don't know what could be going on here.
Back to top
View user's profile Send private message
jkt
Retired Dev
Retired Dev


Joined: 06 Feb 2004
Posts: 1250
Location: Prague, Czech republic, EU

PostPosted: Tue May 18, 2004 3:51 pm    Post subject: Reply with quote

setup domainname. I had same error and I think that fixed it ;-)
Back to top
View user's profile Send private message
SerfurJ
l33t
l33t


Joined: 10 Apr 2004
Posts: 824
Location: Texas

PostPosted: Tue May 18, 2004 4:10 pm    Post subject: Reply with quote

now that you mention it, that's probably it. for some reason when i type
Code:
domainname
i get
Code:
(none)
but /etc/dnsdomainname contains mydomain.edu. i've tried restarting the domainname init script. what's the dilly yo?

thanks for your help.
Back to top
View user's profile Send private message
jkt
Retired Dev
Retired Dev


Joined: 06 Feb 2004
Posts: 1250
Location: Prague, Czech republic, EU

PostPosted: Tue May 18, 2004 4:13 pm    Post subject: Reply with quote

add "domain yourdomain.edu" to /etc/resolv.conf, if not present.
Back to top
View user's profile Send private message
SerfurJ
l33t
l33t


Joined: 10 Apr 2004
Posts: 824
Location: Texas

PostPosted: Tue May 18, 2004 4:19 pm    Post subject: Reply with quote

it's already there. i noticed that dnsdomainname gives the correct domain name, so it must be something else.
Back to top
View user's profile Send private message
SerfurJ
l33t
l33t


Joined: 10 Apr 2004
Posts: 824
Location: Texas

PostPosted: Fri May 21, 2004 1:33 pm    Post subject: Reply with quote

any ideas?
Back to top
View user's profile Send private message
jkt
Retired Dev
Retired Dev


Joined: 06 Feb 2004
Posts: 1250
Location: Prague, Czech republic, EU

PostPosted: Tue May 25, 2004 2:07 pm    Post subject: Reply with quote

sorry for delay. I had some problems, because I'm using our domain which is not listed in DNS servers :-), so I had to do some magic:
1) /etc/init.d/domainname - add it to boot runlevel, setup /etc/dnsdomainname, maybe reboot.
2) add something like:
192.168.0.1 server server.example.org
- not sure if it could be on 1 line, check it.

the problem is that postfix is trying to resolve ip addr. which you're connecting from, but is not successful.
Back to top
View user's profile Send private message
SerfurJ
l33t
l33t


Joined: 10 Apr 2004
Posts: 824
Location: Texas

PostPosted: Wed Jun 02, 2004 3:21 pm    Post subject: Reply with quote

hmm, i tried what you suggested.. same thing. before i just had example.org in my /etc/dnsdomainname.

the wierd thing is i have another computer with an identical setup, and postfix, mutt, and fetchmail work fine together. i've copied their config files to the other computer, checked network settings... all the obvious stuff. i have no idea what's going on.
Back to top
View user's profile Send private message
jkt
Retired Dev
Retired Dev


Joined: 06 Feb 2004
Posts: 1250
Location: Prague, Czech republic, EU

PostPosted: Fri Jun 04, 2004 3:54 pm    Post subject: Reply with quote

hm, weird. `emerge netcat` and `nc your-hostname smtp`. if it says something like
Code:

jkt@jezek ~ $ nc jezek smtp
220 jezek.elmes.cz ESMTP Postfix


the error is somewhere else. if it hangs up for long time (> 30 secs), you have problems with domain name resolving.
Back to top
View user's profile Send private message
SerfurJ
l33t
l33t


Joined: 10 Apr 2004
Posts: 824
Location: Texas

PostPosted: Tue Jun 15, 2004 7:47 pm    Post subject: Reply with quote

well, i figured out what the problem was: fetchmail sucks. never has a unix program given me so much grief.

i now have getmail, ssmtp, and mutt working flawlessly together.
Back to top
View user's profile Send private message
jkt
Retired Dev
Retired Dev


Joined: 06 Feb 2004
Posts: 1250
Location: Prague, Czech republic, EU

PostPosted: Wed Jun 16, 2004 6:52 am    Post subject: Reply with quote

just to continue with flame ;-), I'm using fetchmail without problems :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum