Anybody know why /etc/relayhosts is not being written to?

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
Nobody on my server is able to send email to non-local domains. For some reason /etc/relayhosts is empty which I believe is why emails cannot be sent out. Here's the error that is coming up in Outlook:

Code:
Task 'mail.domain.com - Sending' reported error (0x800CCC65) : 'Your outgoing (SMTP) e-mail server has reported an internal error. If you continue to receive this message, contact your server administrator or Internet service provider (ISP).  The server responded: 503 valid RCPT command must precede DATA'
Does anybody know how to fix this so the IP addresses will be logged in /etc/relayhosts?

EDIT: I just manually entered my IP address in this file and the mail was sent out, so the problem is definately because the IPs of mail senders are not being recorded in this file.
 
Last edited:

dezignguy

Well-Known Member
Sep 26, 2004
533
0
166
is antirelayd running?

Might want to just restart cpanel... or exim at least.
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
I am having this problem again and am not sure how I fixed it last time. I'm pretty sure it was resolved by restarting the server which I just did and it's still not working. Can someone please help?

Code:
# ps -aux | grep antirelayd
root        2100  0.0  0.1  2072 1708  ??  S     1:08PM   0:00.04 antirelayd (perl)
root        6554  0.0  0.0   304  156  p0  R+    1:16PM   0:00.00 grep antirelayd
 
C

cPanelBilly

Guest
/scripts/restartsrv_exim
will restart antirelayd... I would have to see an strace to see why it isnt working right now though
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
Thanks for your response. Can you tell me what you mean by strace?

I've been searching the forums the past hour and this issue appears to mainly affect FreeBSD users. I tried upgrading to the latest CURRENT release and also tried /scripts/exim4 and restarting exim but it didn't help. I really need to get this fixed ASAP!

Here is what bounces back when trying to send emails:

Code:
Your message did not reach some or all of the intended recipients.

      Subject:	abcdef
      Sent:	4/22/2005 1:50 PM

The following recipient(s) could not be reached:

      '[email protected]' on 4/22/2005 1:50 PM
            503 valid RCPT command must precede DATA
I just tried running /scripts/restartsrv_exim but the /etc/relayhosts file is still empty.
 
Last edited:

sparek-3

Well-Known Member
Aug 10, 2002
2,039
229
368
cPanel Access Level
Root Administrator
Make sure /etc/syslog.conf has a line like:

# Log all the mail messages in one place.
local0.notice;local0.debug;mail.*;mail.none;mail.info;local0.info /var/log/maillog


Then restart syslogd and antirelayd

/scripts/restartsrv_syslogd
/scripts/restartsrv_exim


and see if that fixes the problem.
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
Unfortunately, that didn't fix the problem. I did however notice there are many instances of the line you mentioned. Should I delete all the additional lines?

Code:
# $FreeBSD: src/etc/syslog.conf,v 1.13.2.3 2002/04/15 00:44:13 dougb Exp $
# 
#       Spaces ARE valid field separators in this file. However,
#       other *nix-like systems still insist on using tabs as field 
#       separators. If you are sharing this file between systems, you
#       may want to use only tabs as field separators here.
#       Consult the syslog.conf(5) manpage.
*.err;kern.debug;auth.notice;mail.crit          /dev/console
*.notice;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
security.*                                      /var/log/security
auth.info;authpriv.info                         /var/log/auth.log
local0.notice;local0.debug;mail.*;mail.none;mail.info;local0.info /var/log/maillog
lpr.info                                        /var/log/lpd-errs
cron.*                                          /var/log/cron
*.emerg                                         *
# uncomment this to log all writes to /dev/console to /var/log/console.log
#console.info                                   /var/log/console.log
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.*                                            /var/log/all.log
# uncomment this to enable logging to a remote loghost named loghost
#*.*                                            @loghost
# uncomment these if you're running inn
# news.crit                                     /var/log/news/news.crit
# news.err                                      /var/log/news/news.err
# news.notice                                   /var/log/news/news.notice
!startslip
*.*                                             /var/log/slip.log
!ppp
*.*                                             /var/log/ppp.log
local0.notice;local0.debug;mail.*;mail.none;mail.info;local0.info /var/log/maillog
local0.notice;local0.debug;mail.*;mail.none;mail.info;local0.info /var/log/maillog
local0.notice;local0.debug;mail.*;mail.none;mail.info;local0.info /var/log/maillog
local0.notice;local0.debug;mail.*;mail.none;mail.info;local0.info /var/log/maillog
local0.notice;local0.debug;mail.*;mail.none;mail.info;local0.info /var/log/maillog
local0.notice;local0.debug;mail.*;mail.none;mail.info;local0.info /var/log/maillog
local0.notice;local0.debug;mail.*;mail.none;mail.info;local0.info /var/log/maillog
For some reason vBulletin is adding a space in i nfo but it's really just info in the file.
 

sparek-3

Well-Known Member
Aug 10, 2002
2,039
229
368
cPanel Access Level
Root Administrator
The /var/log/maillog file is where logging for POP3 access is logged. I see 8 entries (correct me if I'm wrong, my math's a bit sketchy here lately). So this means each time someone logs into your POP3 server to check for mail, then the log will log 8 duplicate entries. You only need 1 entry, so you can delete the other 7.

Try restarting cppop. I don't know if that would have any affect on the relayhosts file or not

/scripts/restartsrv_cppop
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
Those entries are located in /etc/syslog.conf. I thought /etc/relayhosts was where IPs were stored from users who access their account via POP? Then it enables them to send mail through SMTP if their IP is listed in relayhosts.
 

Jeff75

Well-Known Member
Apr 11, 2003
555
0
166
There isn't a file on my server at /var/log/maillog. Could this be the problem? If so, what kind of permissions should I give it?