Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SMTP not working. (server setup problem) [SOLVED]
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
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Sat Dec 31, 2005 7:02 am    Post subject: SMTP not working. (server setup problem) [SOLVED] Reply with quote

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
Back to top
View user's profile Send private message
tumbak
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 230
Location: supposedly Palestine

PostPosted: Sat Dec 31, 2005 7:22 am    Post subject: Reply with quote

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
Code:
#/home/vpopmail/bin/vuserinfo your@emailaddress.com

_________________
less QQ more pewpew!
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Sat Dec 31, 2005 7:31 am    Post subject: Reply with quote

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: ******************************************
clear passwd:
comment: postmaster
uid: 0
gid: 0
flags: 0
gecos: postmaster
limits: No user limits set.
dir: /var/vpopmail/domains/certciv.com/postmaster
quota: NOQUOTA
usage: NOQUOTA
last auth: Sat Dec 31 01:29:03 2005
last auth ip: pop3
Back to top
View user's profile Send private message
tumbak
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 230
Location: supposedly Palestine

PostPosted: Sat Dec 31, 2005 8:15 am    Post subject: Reply with quote

what installation instructions did you follow? a guide?
_________________
less QQ more pewpew!
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Sat Dec 31, 2005 8:49 am    Post subject: Reply with quote

qmail/vpopmail Virtual Mail Hosting System Guide
Back to top
View user's profile Send private message
tumbak
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 230
Location: supposedly Palestine

PostPosted: Sat Dec 31, 2005 9:38 am    Post subject: Reply with quote

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
Code:
#tail -f /var/log/qmail/qmail-send/current

_________________
less QQ more pewpew!
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Sat Dec 31, 2005 10:59 am    Post subject: Reply with quote

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
250-8BITMIME
250-AUTH LOGIN PLAIN CRAM-MD5
250 SIZE 0
auth plain *****************************
535 authentication failed (#5.7.1)


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.
Back to top
View user's profile Send private message
tumbak
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 230
Location: supposedly Palestine

PostPosted: Sat Dec 31, 2005 6:46 pm    Post subject: Reply with quote

can you please post the qmail-smtpd log file.
and
Code:
#ls -al  /var/vpopmail/bin/vchkpw

and
Code:
#cat /var/qmail/control/conf-smtpd


sorry for the late reply.
_________________
less QQ more pewpew!
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Sat Dec 31, 2005 6:48 pm    Post subject: Reply with quote

no prob just woke up 5 min. ago :D

I'll do it now ....
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Sat Dec 31, 2005 6:58 pm    Post subject: Reply with quote

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
@4000000043b664632721826c tcpserver: end 16298 status 256
@4000000043b6646327219dc4 tcpserver: status: 0/40
@4000000043b664632e3e14d4 tcpserver: status: 1/40
@4000000043b664632e3e2c44 tcpserver: pid 16301 from 71.112.49.103
@4000000043b664632e5532cc tcpserver: ok 16301 certciv.com:***.***.***.***:25 dsl-w.verizon.net:***.***.***.***::62455
@4000000043b664640842306c qmail-smtpd: Attempted relay from postmaster@certciv.com at ***.***.***.*** to ********@gmail.com
@4000000043b664640f12a674 tcpserver: end 16301 status 0
@4000000043b664640f12b614 tcpserver: status: 0/40


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 $

# Stuff to run before tcpserver
#QMAIL_TCPSERVER_PRE=""
# Stuff to run qmail-smtpd
#QMAIL_SMTP_PRE=""
# Stuff to after qmail-smtpd
#QMAIL_SMTP_POST=""

# this turns off the IDENT grab attempt on connecting
TCPSERVER_OPTS="${TCPSERVER_OPTS} -R"

# fixcrio inserts missing CRs at the ends of lines. See:
# http://cr.yp.to/ucspi-tcp/fixcrio.html
# http://cr.yp.to/docs/smtplf.html
# DO NOT enable this when you are using SSL/TLS (USE=ssl)!
#QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} fixcrio"

# You might want to use rblsmtpd with this, but you need to fill in a RBL
# server here first, see http://cr.yp.to/ucspi-tcp/rblsmtpd.html for more
# details
#QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} rblsmtpd -r RBL-SERVER"

# If you are interested in providing POP or IMAP before SMTP type relaying,
# emerge relay-ctrl, then uncomment the next 2 lines
#QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-chdir"
#QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} relay-ctrl-check"
# In /etc/courier-imap/authdaemonrc add the next line to the end:
#authmodulelist="${authmodulelist} relay-ctrl-allow"
# Then in /etc/courier-imap/{imapd,imapd-ssl,pop3d,pop3d-ssl}
# Add this at the end
#PRERUN="${PRERUN} envdir /etc/relay-ctrl relay-ctrl-chdir"

# This next block is for SMTP-AUTH

# WARNING: If you've installed qmail with USE=noauthcram, and you want to use
# the following programs, you proably need to install them.

# Example using cmd5checkpw
# See the manpage for cmd5checkpw for details on the passwords
#QMAIL_SMTP_CHECKPASSWORD="/bin/cmd5checkpw"

# Example for checkpassword-pam (emerge checkpassword-pam)
# Don't forget to make /usr/bin/checkpassword-pam sticky (see README.auth)
#QMAIL_SMTP_CHECKPASSWORD="/usr/bin/checkpassword-pam -s system-auth"

QMAIL_SMTP_CHECKPASSWORD="/var/vpopmail/bin/vchkpw"

[[ -n "${QMAIL_SMTP_CHECKPASSWORD}" ]] && {
[[ -z "${QMAIL_SMTP_POST}" ]] && QMAIL_SMTP_POST=/bin/true
QMAIL_SMTP_POST="${QMAIL_SMTP_CHECKPASSWORD} ${QMAIL_SMTP_POST}"
}
Back to top
View user's profile Send private message
tumbak
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 230
Location: supposedly Palestine

PostPosted: Sat Dec 31, 2005 9:17 pm    Post subject: Reply with quote

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
Code:
#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.
_________________
less QQ more pewpew!
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Sun Jan 01, 2006 7:21 am    Post subject: Reply with quote

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 ....
Back to top
View user's profile Send private message
tumbak
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 230
Location: supposedly Palestine

PostPosted: Sun Jan 01, 2006 8:22 am    Post subject: Reply with quote

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.
_________________
less QQ more pewpew!
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Sun Jan 01, 2006 8:26 am    Post subject: Reply with quote

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:
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Mon Jan 02, 2006 7:33 am    Post subject: Reply with quote

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 :lol:
Back to top
View user's profile Send private message
tumbak
Apprentice
Apprentice


Joined: 10 Jan 2004
Posts: 230
Location: supposedly Palestine

PostPosted: Mon Jan 02, 2006 2:21 pm    Post subject: Reply with quote

glad to know that is got solved, care to share the solution?
_________________
less QQ more pewpew!
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Mon Jan 02, 2006 7:22 pm    Post subject: Reply with quote

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