Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not receiving mail from other domains

Status
Not open for further replies.

Wishdiak

Technical User
Mar 7, 2004
1,787
US
I don't know how long this problem has existed.

I'm running FreeBSD 5.4, and I installed Qmail 1.03 from ports at least a year ago with the qmail-queue patch. I can receive email from my own domain (such as daily reports that are generated by the server), but I seem unable to receive email from other domains. They don't seem to get kicked back, I've sent two from other addresses tonight and didn't get a bounce.

I can telnet into my server on port 110 and 25, but email just seems to die at some point.

Any ideas?

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
1) Are your MX records in DNS correct?
2) Are your A records in DNS corresponding to your MX?
3) Are these records available to the public?

4) Does your /var/qmail/rcpthosts contain the appropriate domains?

5) Have you actually sent yourself a message manually from the SMTP command line like you were someone else? My guess is that you've got a misconfiguration in your smtp run file that is abending non-local delivery.

6) Some senders may deny sending to you if you do not have reverse DNS capabilities, but MOST will, so I wouldn't chase this down yet.

D.E.R. Management - IT Project Management Consulting
 
thedaver,

Thanks for your suggestions. On #'s 1-3, DNS and MX records are correct, and haven't been changed in over a year.

On #4, I'm fairly sure that this is correct.

On #5, I have done that now, and gotten no errors, only 250 reponses from SMTP.

However... I did get a Symantec popup(?) with the message "451 qq temporary problem (#4.3.0)

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
thedaver,

Yes. In fact in /var/qmail/alias, .qmail-default, .qmail-postmaster, .qmail-mailer-daemon, and .qmail-root all alias to the same user account, which is able to receive email messages generated by the server.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Also, I'm not sure how relevant it is, but

# tail /var/log/maillog

shows

Jun 8 17:29:30 jubal X-Qmail-Scanner-1.25: [host.domain.com111826617051123274] cannot open /usr/local/qmailscan/qmail-scanner-queue-version.txt - did you initialise the system by running "qmail-scanner-queue.pl -z"? - Permission denied

Interestingly enough, after 'chown qscand /usr/local/qmailscan/qmail-scanner-queue-version.txt', 'qmail-scanner-queue.pl -z' changes the owner back to root.

Shouldn't the owner be qscand?

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
check group ownership on qmail-scanner-queue.pl

chown qscand.qscand qmail-scanner-queue.pl

and check the permissions (the sticky bit)

chmod 6755 qmail-scanner-queue.pl

should look something like this:

-rwsr-sr-x 1 qscand qscand
 
BIS,

Thanks for the suggestions. Although the owner and group were both qscand, the sticky bit did not seem to be set. After chmod:

-rwsr-sr-x 1 qscand qscand 98536 Jun 7 22:29 qmail-scanner-queue.pl

I even restarted qmail just for good measure, but I'm still having the same problem.

Jun 9 13:50:56 jubal X-Qmail-Scanner-1.25: [host.domain.com111833945651155926] cannot open /usr/local/qmailscan/qmail-scanner-queue-version.txt - did you initialise the system by running "qmail-scanner-queue.pl -z"? - Permission denied

-rw------- 1 qscand qscand 44 Jun 8 17:31 /usr/local/qmailscan/qmail-scanner-queue-version.txt

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
thedaver,

That's a reasonable question, and short answer: yes.

I changed the owner and group of /usr/local/qmailscan/qmail-scanner-queue-version.txt to qscand. Running 'qmail-scanner-queue.pl -z' changes the owner back to root and the permissions only allow read and write for the owner.

Changing the owner back to qscand seems to make no difference.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
My installation in in /var/qmail/bin/

-rwsr-xr-x 1 qscand qscand 89004 Aug 7 2004 qmail-scanner-queue.pl

What is in your qmail-smtpd/run file? Have assigned enough RAM for each instance?

D.E.R. Management - IT Project Management Consulting
 
thedaver,

My qmail-scanner-queue.pl is in /var/qmail/bin/. /var/log/maillog shows that the error is with qmail-scanner-queue-version.txt, which is in /usr/local/qmailscan/.

In any event, my /var/qmail/supervise/qmail-smtpd/run is as follows:

#!/bin/sh
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`

if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi

if [ ! -f /var/qmail/control/rcpthosts ]; then
echo "No /var/qmail/control/rcpthosts!"
echo "Refusing to start SMTP listener because it'll create an open relay"
exit 1
fi

exec /usr/local/bin/softlimit -m 20000000 \
/usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd 2>&1

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
thedaver,

I tried the link above, but still no joy. I wonder at this point if it wouldn't be better to do a clean reinstall of Qmail/Qmail-scanner/SpamAssassin.

Thanks for your help.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Since I really need to get this resolved, I got past the permissions problem with a chown and a chmod, but now I seem to be having other problems with Qmail-Scanner.

Tail /var/log/maillog shows:

X-Qmail-Scanner-1.25: [host.domain.com111845063451130973] /usr/local/qmailscan/tmp/host.domain.com111845063451130973 exists - try again later...

Needless to say, the obvious fix would be to clean out /usr/local/qmailscan/tmp, but it contains no files. Instead of getting mail, I'm just getting these errors.

It's possible that there might be something strange going on with my filesystem, so I'll run fsck, but other than that I'm fresh out of ideas.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Ok, I am finally getting close to resolving this problem, so for posterity, here's some insight.

It seems that there's a problem with suidperl in FreeBSD 5.4, and probably other distro's/versions. Basically, I have no suidperl in /usr/bin or otherwise.

The Qmail-Scanner port (on FreeBSD anyway) has a workaround. There is a tcp wrapper, written in C, that one has to make.

Code:
cd /usr/ports/mail/qmail-scanner/work/qmail-scanner-1.25/contrib && make && make install

Then one needs to

Code:
chmod 0755 /var/qmail/bin/qmail-scanner-queue.pl

To get rid of the suid bit. Then, and this seems to be the important part, one needs to modify /etc/tcp.smtp. Mine looks like:

Code:
127.0.0.1:allow,RELAYCLIENT=""
192.168.0.:allow,RELAYCLIENT=""
:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue"

Note the end of the last line. It's qmail-scanner-queue, not qmail-scanner-queue.pl. qmail-scanner-queue is the tcp wrapper that was built before.

From there it's just a matter of resolving permissions and owners in /usr/local/qmailscan.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top