View previous topic :: View next topic |
Author |
Message |
ecosta Guru


Joined: 09 May 2003 Posts: 477 Location: Brussels,BE
|
Posted: Sun Sep 10, 2006 9:42 am Post subject: Relaying and smtp-auth with Qmail |
|
|
I have followed a few gentoo howto on configuring relay for Qmail+courier+vpopmail but I just can't seem to get relaying to work properly.
Any advice is welcome... I've been at it for a while but can't figure it out.
The following is what happens. My mail never reaches "john.doe.costa@gmail.com"
WAN Telnet connection to QMail server in an attempt to Relay my mail
Code: |
telnet mydomain.com 25
Trying 85.230.19.40...
Connected to mydomain.com.
Escape character is '^]'.
220 mail.mydomain.com ESMTP
helo bkup.mydomain.com
250 mail.mydomain.com
MAIL FROM:<jdoe@mydomain.com>
250 ok
RCPT TO:<john.doe@gmail.com>
250 ok
data
354 go ahead
This is a test.
.
250 ok 1157879860 qp 16115
quit
221 mail.mydomain.com
Connection closed by foreign host.
|
Server side logs resulting from above telnet
Code: |
==> /var/log/qmail/qmail-smtpd/current <==
@400000004503d81c106cf2cc tcpserver: status: 1/40
@400000004503d81c106d314c tcpserver: pid 16113 from 200.253.64.12
@400000004503d81c130fb12c tcpserver: ok 16113 :192.168.254.1:25 remotebox.mydomain.com:200.253.64.12::1367
==> /var/log/qmail/qmail-send/current <==
@400000004503d83e09c57cdc new msg 274184
@400000004503d83e09c5b774 info msg 274184: bytes 248 from <jdoe@mydomain.com> qp 16115 uid 201
@400000004503d83e0b8d254c starting delivery 4: msg 274184 to remote john.doe@gmail.com
@400000004503d83e0b8d6f84 status: local 0/10 remote 1/20
@400000004503d83f17714a14 delivery 4: success: User_and_password_not_set,_continuing_without_authentication./<john.doe@gmail.com>_64.233.183.27_accepted_message./Remote_host_said:_250_2.0.0_OK_1157879782_p72si10120621nfc/
@400000004503d83f1771b38c status: local 0/10 remote 0/20
@400000004503d83f1771cafc end msg 274184
==> /var/log/qmail/qmail-smtpd/current <==
@400000004503d872131fa334 tcpserver: end 16113 status 0
@400000004503d872131fddcc tcpserver: status: 0/40
|
Some config files that are important for relaying
/etc/tcprules.d/tcp.qmail-smtp
Code: |
127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD=""
192.168.1.2:allow,RELAYCLIENT="",RBLSMTPD=""
200.253.64.12:allow,RELAYCLIENT="",RBLSMTPD=""
:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue"
|
/etc/courier/authlib/authdaemonrc
Code: |
authmodulelist="authvchkpw"
authmodulelistorig="authvchkpw"
daemons=5
authdaemonvar=/var/lib/courier/authdaemon
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
|
/etc/courier-imap/imapd-ssl
Code: |
SSLPORT=993
SSLADDRESS=0
SSLPIDFILE=/var/run/imapd-ssl.pid
SSLLOGGEROPTS="-name=imapd-ssl"
IMAPDSSLSTART=NO
IMAPDSTARTTLS=YES
IMAP_TLS_REQUIRED=0
COURIERTLS=/usr/sbin/couriertls
TLS_PROTOCOL=SSL3
TLS_STARTTLS_PROTOCOL=TLS1
TLS_CERTFILE=/etc/courier-imap/imapd.pem
TLS_VERIFYPEER=NONE
TLS_CACHEFILE=/var/lib/courier-imap/couriersslcache
TLS_CACHESIZE=524288
MAILDIRPATH=Maildir
MAILDIR=.maildir
MAILDIRPATH=.maildir
MAXPERIP=20
PRERUN="envdir /etc/relay-ctrl relay-ctrl-chdir"
LOGINRUN="relay-ctrl-allow"
|
/var/qmail/control/conf-smtpd
Code: |
TCPSERVER_OPTS="${TCPSERVER_OPTS} -R"
QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-chdir"
QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} relay-ctrl-check"
QMAIL_SMTP_AUTHHOST=$(<${QMAIL_CONTROLDIR}/me)
[ -z "${QMAIL_SMTP_POST}" ] && QMAIL_SMTP_POST=/bin/true
QMAIL_SMTP_CHECKPASSWORD="/var/vpopmail/bin/vchkpw"
QMAIL_SMTP_POST="${QMAIL_SMTP_CHECKPASSWORD} ${QMAIL_SMTP_POST}"
|
Any advice is more than welcome
Thank you all.
-Ed _________________ Linux user #201331
A8N-SLI Delux / AMD64 X2 3800+ / 1024 MB RAM / 5 x 250 GB SATA RAID 1/5 / ATI Radeon X700 256MB. |
|
Back to top |
|
 |
ecosta Guru


Joined: 09 May 2003 Posts: 477 Location: Brussels,BE
|
Posted: Sun Sep 10, 2006 5:08 pm Post subject: |
|
|
Well I guess relaying does work as I can gt as far as sending the mail
Quote: |
data
354 go ahead
This is a test.
.
250 ok 1157879860 qp 16115
|
what doesn't seem to work is authentication
Quote: |
User_and_password_not_set,_continuing_without_authentication./<john.doe@gmail.com>_64.233.183.27_accepted_message./Remote_host_said:_250_2.0.0_OK_1157879782_p72si10120621nfc/
@400000004503d83f1771b38c status: local 0/10 remote 0/20
|
... and the delivery of the email. Can anyone help me? The mail logs seem to indicate the mail has been sent but I never got it.
Thanks for your help.
-Ed _________________ Linux user #201331
A8N-SLI Delux / AMD64 X2 3800+ / 1024 MB RAM / 5 x 250 GB SATA RAID 1/5 / ATI Radeon X700 256MB. |
|
Back to top |
|
 |
newtonian Guru


Joined: 19 Jan 2005 Posts: 465 Location: Hokkaido Japan
|
Posted: Sun Sep 10, 2006 9:41 pm Post subject: stab in the dark |
|
|
Here's what I get when I send from localhost without using a password to send an email with qmail,
setup with the same howto:
Code: |
@40000000450482892ca5d134 new msg 6422613
@40000000450482892d9bc60c info msg 6422613: bytes 2386 from <xxxx@xxxxx.com> qp 31193 uid 201
@400000004504828d24795d3c starting delivery 3: msg 6422613 to remote yyyyyy@yyyyy.com
@400000004504828d247974ac status: local 0/10 remote 1/20http://forums.gentoo.org/posting.php?mode=editpost&p=3568808
@400000004504828d2581c0d4 new msg 6422615
@400000004504828d2581dc2c info msg 6422615: bytes 2323 from <shop@xxxxxx.com> qp 31196 uid 201
@400000004504828f1aa4cb0c starting delivery 4: msg 6422615 to remote yyyyyy@yyyyy.com
@400000004504828f1aa5098c status: local 0/10 remote 2/20
@400000004504829018a90e94 delivery 3: success: User_and_password_not_set,_continuing_without_authentication./<xxxxx@xxxx.com>_202.171.141.150_accepted_message./Remote_host_said:_250_ok_1157923146_qp_16518/
@400000004504829018a929ec status: local 0/10 remote 1/20
|
So I get the same continuing_without_authentication message without any problems. My messages arrive fine.
Could it be your MTU? That will chop your messages up so that some clients can't read them at all.
setting the wrong MTU in your router will allow you to view web pages like normal, send/recieve mail but cause some cilents to not be able to read mail. Check out the MTU section in this howto:
http://www.gentoo.org/doc/en/home-router-howto.xml
I'd also try sending your test mail to a couple different mail servers, not just google and see if the mail arrives there without any problems. |
|
Back to top |
|
 |
|
|
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
|
|