Web Hosting Talk







View Full Version : small qmail problem


clocker1996
02-05-2002, 03:08 AM
*sigh*
I am running qmail. Ive installed qmail this way:
http://www.lifewithqmail.org/lwq.html

I have vpopmail setup, the domains, EVERYthing is setup.
i can receive mail
e.g.
user@csna.net

I just want it, so if i give a friend an email account, on my csn.net domain, he weill be able to send, and receive mail easily, and not have any problems. BUT at the same time i would also want it so nobody can use the mail server for spam/relay/bad stuff.

qmail is suppose to do this by default... but i am running into this small problem, can anyone please help?

The message could not be sent because one of the recipients was rejected by the server. The rejected e-mail address was 'clocker1996@hotmail.com'. Subject 'hey test', Account: 'mail.csna.net', Server: 'mail.csn.net', Protocol: SMTP, Server Response: '553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)', Port: 25, Secure(SSL): No, Server Error: 553, Error Number: 0x800CCC79

note: csna.net is just an example domain

clocker:/var/qmail/supervise# ll
total 6.0k
drwxr-xr-x 6 root root 1.0k Feb 5 14:53 .
drwxr-xr-x 12 root qmail 1.0k Feb 5 14:58 ..
drwxr-xr-x 3 root root 1.0k Feb 5 14:53 backup
drwxr-xr-x 4 root root 1.0k Feb 5 14:53 qmail-pop3d
drwxr-xr-x 4 root root 1.0k Feb 5 14:53 qmail-send
drwxr-xr-x 4 root root 1.0k Feb 5 14:53 qmail-smtpd
clocker:/var/qmail/supervise# cd qmail-pop3d/
clocker:/var/qmail/supervise/qmail-pop3d# cat run
#!/bin/sh
exec /usr/local/bin/tcpserver -H -R -v -c100 0 110 /var/qmail/bin/qmail-popup mail.csna.net \
/home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 2>&1

clocker:/var/qmail/supervise/qmail-pop3d# cd ../qmail-send/
clocker:/var/qmail/supervise/qmail-send# cat run
#!/bin/sh
exec /var/qmail/rc

clocker:/var/qmail/supervise/qmail-send# cd ../qmail-smtpd/
clocker:/var/qmail/supervise/qmail-smtpd# cat run
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" ]; then
echo QMAILDUID, NOFILESGID, or MAXSMTPD is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi
exec /usr/local/bin/softlimit -m 2000000 \
/usr/local/bin/tcpserver -v -R -l 0 -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1
clocker:/var/qmail/supervise/qmail-smtpd# cd ../
clocker:/var/qmail/supervise# ps -ef


ps -ef output:
root 21888 1 0 14:59 ? 00:00:00 /bin/sh /command/svscanboot
root 21890 21888 0 14:59 ? 00:00:00 svscan /service
root 21891 21888 0 14:59 ? 00:00:00 readproctitle service errors: ...ail: access denied?multilog: fatal: unable to lock
root 21892 21890 0 14:59 ? 00:00:00 supervise qmail-send
root 21893 21890 0 14:59 ? 00:00:00 supervise log
root 21899 21890 0 14:59 ? 00:00:00 supervise qmail-smtpd
root 21900 21890 0 14:59 ? 00:00:00 supervise log
root 21901 21890 0 14:59 ? 00:00:00 supervise qmail-pop3d
root 21905 21901 0 14:59 ? 00:00:00 /usr/local/bin/tcpserver -H -R -v -c100 0 110 /var/qmail/bin/qmail-popup mail.csna.ne
root 21909 21890 0 14:59 ? 00:00:00 supervise log
qmaill 21910 21909 0 14:59 ? 00:00:00 /usr/local/bin/multilog t s100000 n20 /var/log/qmail/qmail-pop3d
qmaild 21940 1 0 14:59 ? 00:00:00 /var/qmail/bin/qmail-smtpd
qmaild 22144 21899 0 15:00 ? 00:00:00 /usr/local/bin/tcpserver -v -R -l 0 -x /etc/tcp.smtp.cdb -c 20 -u 732 -g 731 0 smtp
qmails 22154 21892 0 15:00 ? 00:00:00 qmail-send
qmaill 22155 22154 0 15:00 ? 00:00:00 splogger qmail
root 22156 22154 0 15:00 ? 00:00:00 qmail-lspawn ./Maildir/
qmailr 22157 22154 0 15:00 ? 00:00:00 qmail-rspawn
qmailq 22158 22154 0 15:00 ? 00:00:00 qmail-clean
qmailr 23236 22157 0 15:05 ? 00:00:00 qmail-remote strategyinstitute.com Postmaster@strategyinstitute.com
qmaill 23243 21893 1 15:05 ? 00:00:00 [multilog <defunct>]
qmaill 23244 21900 1 15:05 ? 00:00:00 [multilog <defunct>]
qmailr 23249 22157 0 15:05 ? 00:00:00 qmail-remote strategyinstitute.com Postmaster@strategyinstitute.com
root 23250 10283 0 15:05 pts/2 00:00:00 ps -ef

cat /etc/tcp.smtp shows:

127.:allow,RELAYCLIENT=""

i can sendmail to clocker1996@hotmail.com if i type hotmail.com in /var/qmail/control/rcpthosts

however, i don't want to enter domains everytime i want to send mail.

can somebody please help?

serve-you
02-05-2002, 03:44 AM
The problem is, that you have not setup qmail to allow your friend to relay mail through your server. This is not done by default. If your friend does not have a static IP, I would not recommend allowing him to relay, as you'll need to add an entire subnet if not more, allowing anyone on his network to utilize your mailserver.

Anyhow, all you need to do, is add his IP address to /etc/tcp.smtp as follows:
10.1.1.1:allow,RELAYCLIENT=""

retstart qmail. You can read more about this at http://www.palomine.net/qmail/selectiverelay.html

-Dan

cperciva
02-05-2002, 03:49 AM
or, if you prefer, you could use smtp-after-pop3 semantics to make the necessary changes to tcp.smtp.cdb.

priyadi
02-05-2002, 04:45 AM
Have you compiled your tcp.smtp file?


cd /etc
tcprules tcp.smtp.cdb tcp.smtp.tmp < tcp.smtp

clocker1996
02-05-2002, 05:00 PM
i got it working now
thanks guys

i appreciate you guys taking the time to answer

-clocker