# [SOLVED]Qmail - doesnt send email to other domains

## leosgb

I have a working qmail setup. It works except if I try to send emails to other domains that not my own.

My /var/log/qmail/qmail-send/current looks like this:

@400000004448f5f5188a8dfc starting delivery 46: msg 1146905 to remote john_doe@yahoo.com

@400000004448f5f5188a95cc status: local 0/10 remote 1/20

@400000004448f5f6334b8204 delivery 46: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/

But I get emails sent from that account to my server. And I get local email.

According to this guide: http://www.gentoo.org/doc/en/qmail-howto.xml

I have a 3rd level domain because plusdomain and defaultdomain are just homelinux.net whereas the rest is mydomain.homelinux.net.

I dont have vpopmail installed because everytime I do it all system collapses. Since I dont need any virtual domain (that is what I think maybe what I am doing is a virtual domain) I dont plan to install vpopmail for now. All I want is a simple user account related email that can send and receive emails from external domains.

I would appreciate it if someone could give me a hand here. Thanks in advance.Last edited by leosgb on Sat Apr 22, 2006 10:51 pm; edited 1 time in total

----------

## gtfx123

have u confirmed that ur ISP doesnt block outgoing SMTP connections?

try 

emerge netkit-telnetd

telnet mx1.mail.yahoo.com 25

u may try mx2, mx3, mx4 too

same for mx1.hotmail.com 25 as well

see if u dont get a connection & yahoo/hotmail banner thn chances are ur ISP is blocking outgoign SMTP.

...HTH

----------

## leosgb

I guess that is the case then:

telnet mx1.mail.yahoo.com 25

Trying 67.28.113.71...

Trying 67.28.113.73...

Trying 4.79.181.14...

Trying 4.79.181.15...

telnet: Unable to connect to remote host: Connection timed out

telnet mx2.mail.yahoo.com 25

Trying 4.79.181.134...

Trying 4.79.181.135...

Trying 67.28.113.19...

Trying 67.28.113.70...

telnet: Unable to connect to remote host: Connection timed out

telnet mx1.hotmail.com 25

Trying 65.54.245.8...

Trying 64.4.50.50...

Trying 65.54.244.8...

Trying 65.54.244.136...

telnet: Unable to connect to remote host: Connection timed out

Why would they block my smtp traffic? What can I do to unblock it? Thanks for your help!

----------

## gtfx123

its just one of the many tactics used to control spam origination from one's network. Efficacy of it is probably outside the objective here.

what u can do is 

a) find out the address (FQDN or IP) of SMTP relay provided by ur ISP .. say its mailrelay.yourisp.tld

b) edit smtproute /var/qmail/control/smtproutes and add this line towards the bottom ":mailrelay.yourisp.tld"

c) svc -h /service/qmail-send

d) watch logs

it shud function now... HTH

----------

## leosgb

Hi gtfx123,

thank you so much for all your assistance. Unfortunatelly I dont have the smtproutes file in my /var/qmail/control. Should I just create it? My domain name was given me by dyndns.org not my ISP. Do I have to request them to unblock the port or these actions should let me use my port?

/var/qmail/control contents:

clientcert.pem  conf-send          dh1024.pem  plusdomain      servercert.cnf

conf-common     conf-smtpd         dh512.pem   plusdomain.old  servercert.pem

conf-pop3d      defaultdelivery    locals      rcpthosts       smtpplugins

conf-qmqpd      defaultdomain      me          rsa1024.pem     tlshosts

conf-qmtpd      defaultdomain.old  mfcheck     rsa512.pem

----------

## leosgb

It didnt work. Unless I got the wrong address. And with the changes I dont have local delivery anymore. I will try to undo it now. And call my ISP later to check the address they gave me.

----------

## gtfx123

ur domain goes into 'rcpthosts' and yes, create smtproutes if it doesnt exist.

----------

## leosgb

Ok I got local delivery again! Thank God :) I am going to call them and give it another try. Thanks! Will post back once I have results.

----------

## leosgb

Just got this:

Remote host said: 530 authentication required 

Do you know how can I authenticate using qmail? I think it is almost there now!

----------

## leosgb

I just sent a request to them so they unblock the port. Thanks for all your assistance! I was stuck in this for over a month now.

If anyone needs it I believe you could do this:

vi /var/qmail/control/smtproutes

:smtp.yourispsrelay.net   my_username@yourisp.net:my_passw

As suggested here:

http://www.hypexr.org/linux_mail_server.php

----------

## gtfx123

well done dude ... glad it worked out.

----------

## leosgb

Hi gtfx123,

I was wondering if you could give me some extra help in my last issue w/ this email server:

I just realized that when I send emails w/ qmail-inject and mutt I get different return addresses. an example:

When I use qmail-inject my return mail is: myemail@mydomain.net

When I use mutt my return mail is: myemail@myservername.mydomain.net

Why does that happen? Is there a way around this? I have all the files under /var/qmail/control (like me, hostname and the rest) with mydomain.net

BUT if I do:

"hostname" I get myservername

"hostname --fqdn" I get mydomain.net

Can you help me here? Thanks in advance.

----------

## gtfx123

http://wiki.mutt.org/?MuttFaq/Header see about setting From address.

...HTH

----------

## leosgb

Thanks for your help! Yeah I found that solution and I thought it was just a temporary one but I guess I will have to live w/ it. But it is fine since qmail works perfectly fine. Now I am trying to configure pop3 access and I have new problems... if I cant figure out the solution I will get back to the forum. Thanks again.

----------

