Page 1 of 1

FIXED: All incoming mail being refused

Posted: Tue Oct 17, 2006 4:34 pm
by bluemike
I have had this server for awhile and all had been pretty good. Today, I mistakenly made a small change to submit.mc (thinking I was editing sendmail.mc).

The changes made were adding these two lines:

Code: Select all

define(`confPRIVACY_FLAGS', `goaway,noreceipts')dnl
define(`confDONT_PROBE_INTERFACES',true)dnl

(i was trying to stop massive spam attempts)

Then all email stopped coming in. Even legitimate email was being rejected with something similar to this:

Code: Select all

  ----- The following addresses had permanent fatal errors -----
        <sysadmin@bbpi-pdc.billsblue.com>
            (reason: 550 5.7.1 Unable to relay for sysadmin@bbpi-pdc.billsblue.com)
       
           ----- Transcript of session follows -----
        ... while talking to bbpi-pdc.billsblue.com.:
        >>> DATA
        <<< 550 5.7.1 Unable to relay for sysadmin@bbpi-pdc.billsblue.com
        550 5.1.1 <sysadmin@bbpi-pdc.billsblue.com>... User unknown
        <<< 554 5.5.2 No valid recipients
       


Then I started looking for the problem and realized that I had edited submin, instead of sendmail. I immeadiately changed it back, but the problem remains. I have never really messed with my smtpd.cfg since the initial install, but here it is anyway:

Code: Select all

SMTPFILTER=TRUE

# uncomment this line to activate the catch-all address (postmaster)
# CATCH @billsblue.com postmaster@billsblue.com

RELAY accept 127.0.0.1
RELAY accept 192.168.111.0/255.255.255.0
RELAY accept 66.224.156.58
RELAY accept 66.224.156.62
RELAY accept .bbpi-pdc.billsblue.com
RELAY Log_Reject ALL

# extra rules added to prevent open relay usage
RECIPIENT Log_Reject *@*@*
RECIPIENT Log_Reject *%*
RECIPIENT Log_Reject *!*
RECIPIENT Log_Reject *#*@*


And here is the output from lsof i:25

Code: Select all

COMMAND   PID USER   FD   TYPE DEVICE SIZE NODE NAME
omsmtpd  2481 root    5u  IPv4   7484       TCP emailserver.bbpi-pdc.billsblue.com:smtp (LISTEN)
sendmail 4377 root    3u  IPv4  28003       TCP localhost:smtp (LISTEN)
sendmail 4378 root    8u  IPv4  33196       TCP emailserver.bbpi-pdc.billsblue.com:44283->mx.tpnet.pl:smtp (CLOSE_WAIT)
sendmail 4378 root    9u  IPv4  33196       TCP emailserver.bbpi-pdc.billsblue.com:44283->mx.tpnet.pl:smtp (CLOSE_WAIT)
sendmail 4378 root   13u  IPv6  34251       TCP emailserver.bbpi-pdc.billsblue.com:55264->spf-jail1.us4.outblaze.com:smtp (ESTABLISHED)
sendmail 4378 root   14u  IPv6  34251       TCP emailserver.bbpi-pdc.billsblue.com:55264->spf-jail1.us4.outblaze.com:smtp (ESTABLISHED)

Posted: Tue Oct 17, 2006 5:28 pm
by bluemike
Okay, I got it working again. For some reason just 'undoing' the chages to the file wern't working. Once I deleted both subnit.mc & sendmail.mc, pasted my backups in theri place, and then re-made sendmail, all was well again.

Posted: Tue Oct 17, 2006 5:53 pm
by vlaurenz
bluemike wrote:Okay, I got it working again. For some reason just 'undoing' the chages to the file wern't working. Once I deleted both subnit.mc & sendmail.mc, pasted my backups in theri place, and then re-made sendmail, all was well again.


This is because sendmail only looks at the *.cf files. The *.mc files are there for ease of configuration. If you edit sendmail.mc, for instance, you'll have to run:

Code: Select all

#cd /etc/mail
#cp sendmail.cf sendmail.cf.bak
#m4 sendmail.mc > sendmail.cf


You'll then have to restart sendmail. Hope this clarifies things.

Posted: Tue Oct 17, 2006 8:34 pm
by ScalixSupport
And if you rebuild your sendmail.cf you must run omsendin.

Regards,
Don

Posted: Wed Oct 18, 2006 10:18 am
by vlaurenz
ScalixSupport wrote:And if you rebuild your sendmail.cf you must run omsendin.

Regards,
Don


Good catch, Don.