# SMTP not working. (server setup problem) [SOLVED]

## certocivitas

I just setup a qmail - vpopmail - mysql - courier-imap MTA and have run into one problem. When I try to send mail using SMTP it only works for my server's domain. I get this error if I try to send anything out to the rest of the world:

 *Quote:*   

> RCPT TO <*****@gmail.com> failed: Requested action not taken: mailbox name not allowed

 

Any idea what I did wrong?Last edited by certocivitas on Mon Jan 02, 2006 7:29 am; edited 3 times in total

----------

## tumbak

You need to enable SMTP AUTH in your mail client, you can't relay unless you authenticate.

what mail client do you use? thunderbird? evolution?

EDIT: can you also please provide

```
#/home/vpopmail/bin/vuserinfo your@emailaddress.com
```

----------

## certocivitas

I'm using Evolution with the SMTP authentication turned on. This seems like a server problem and considering that I setup the server ...   :Wink: 

The server has no problem sending mail to domains hosted on the server.

 *Quote:*   

> # vuserinfo postmaster@certciv.com
> 
> name:   postmaster
> 
> passwd: ******************************************
> ...

 

----------

## tumbak

what installation instructions did you follow? a guide?

----------

## certocivitas

qmail/vpopmail Virtual Mail Hosting System Guide

----------

## tumbak

I never installed using this guide but it says

 *Quote:*   

> The last detail is to make sure you tell your mail client to use SSL/TLS for SMTP communication. qmail will not let you authenticate if the session is not encrypted.

 

and here is a step by step guide to testing your TLS connection.

since the guide also uses the supervise scripts, it will be helpful to

```
#tail -f /var/log/qmail/qmail-send/current
```

----------

## certocivitas

well I guess we're making progress here ... I turned on SSL as the guide suggested and narrowed down the source of the problem. You were right on the money that SSL/TLS has to be on. I looked closer at the logs and any mail getting sent to a outside domains involve relaying and unlike mail to local domains that requires successful authentication.

The link for TLS testing was great and clearified that authentication is not working.

 *Quote:*   

> ehlo
> 
> 250-gladius.certciv.com
> 
> 250-PIPELINING
> ...

 

I triple checked everything to make sure I had done the base64 encoding part correctly etc.

So I have been looking around for a solution but no dice. What should I do?

UPDATE:

I ran "ebuild /var/db/pkg/mail-mta/qmail-1.03-r16/qmail-1.03-r16.ebuild config" again and followed the instructions on making a new ssl-certificate but that did not do anything.

----------

## tumbak

can you please post the qmail-smtpd log file.

and

```
#ls -al  /var/vpopmail/bin/vchkpw
```

and

```
#cat /var/qmail/control/conf-smtpd
```

sorry for the late reply.

----------

## certocivitas

no prob just woke up 5 min. ago   :Very Happy: 

I'll do it now ....

----------

## certocivitas

Here is the end of /var/log/qmail/qmail-smtpd/current that shows two emails. The first was to a local domain and the second failed to relay.

 *Quote:*   

> @4000000043b66463115fde4c tcpserver: status: 1/40
> 
> @4000000043b66463115ff9a4 tcpserver: pid 16298 from 71.112.49.103
> 
> @4000000043b6646311714b3c tcpserver: ok 16298 certciv.com:***.***.***.***:25 dsl-w.verizon.net:***.***.***.***::62453
> ...

 

 *Quote:*   

> # ls -al  /var/vpopmail/bin/vchkpw
> 
> -rwx--x--x  1 root root 92912 Dec 30 23:11 /var/vpopmail/bin/vchkpw

 

 *Quote:*   

> # cat /var/qmail/control/conf-smtpd
> 
> # Configuration file for qmail-smtpd
> 
> # $Header: /var/cvsroot/gentoo-x86/mail-mta/qmail/files/conf-smtpd-r16,v 1.2 2005/08/14 11:01:44 hansmi Exp $
> ...

 

----------

## tumbak

 *certocivitas wrote:*   

>  *Quote:*   # ls -al  /var/vpopmail/bin/vchkpw
> 
> -rwx--x--x  1 root root 92912 Dec 30 23:11 /var/vpopmail/bin/vchkpw 
> 
> 

 

do this

```
#chmod 4711 /var/vpopmail/bin/vchkpw
```

the binary needs the sticky bit

/me crosses fingers

and btw, did you try pop3 and pop3s? if they are working correctly then there is no problem with vchkpw but most probably between qmail-smtpd and vchkpw.

back to reading more mails, I'll post if I find something else.

----------

## certocivitas

Well no change. The only thing that is working at this point is pop3 and pop3s for recieving mail. I tried imap and imaps but I get authentication errors.

Maybe I should just un-emerge all the mail packages, delete the config files and start over ....

----------

## tumbak

 *certocivitas wrote:*   

> Well no change. The only thing that is working at this point is pop3 and pop3s for recieving mail. I tried imap and imaps but I get authentication errors.
> 
> Maybe I should just un-emerge all the mail packages, delete the config files and start over ....

 

I'm sorry I couldn't be of any more help, put [UNSOLVED] in the thread's title, maybe someone else went through this.

----------

## certocivitas

It's OK tumbak you were steering me in the right direction I think. And I learned quite a bit in the process.

Thanks for spending so much time helping me   :Wink: 

----------

## certocivitas

Well I tried again using a Gentoo Wiki Howto and most everything works now. 

The only thing is that the wiki howto does not go into is TLS/SSL so while I got the imap-ssl and pop-ssl to work smtp with ssl is not. But it's just a matter of time before I figure it out   :Laughing: 

----------

## tumbak

glad to know that is got solved, care to share the solution?

----------

## certocivitas

I'm not really sure what I had done wrong the first time. It was probubly that the instructions were written for different package versions and since I knew nothing about qmail or MTA's I did not know how to change them to get it to work. With the wiki there are specific package versions listed and I used those. 

One major difference between the two howto's was that the wiki had me emerge relay-ctrl.

----------

