Results 1 to 2 of 2

Thread: Seems sendmail still relaying spam. Please take a look.

  1. #1

    Seems sendmail still relaying spam. Please take a look.

    I'm running Fedora Core 3 and sendmail-8.13.1-2. I'm using SMTP server specifically for my personal use and to my opinion I set up pretty good restriction on who can access my mail server.

    /etc/mail/access:
    localhost.localdomain RELAY
    localhost RELAY
    127.0.0.1 RELAY

    /etc/host:
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 seregasite.com localhost.localdomain localhost

    seregasite.com is fully qualified domain name.

    And here is the output I'm getting from my maillog file:

    Oct 27 19:43:12 localhost last message repeated 191 times
    Oct 27 19:43:13 localhost sendmail[4370]: j9S0hATu004370: ruleset=check_rcpt, arg1=<chi8888@yam.com>, relay=61-62-186-197-adsl-kao.dynamic.so-net.net.tw [61.62.186.197], reject=550 5.7.1 <chi8888@yam.com>... Relaying denied
    Oct 27 19:43:13 localhost sendmail[4370]: j9S0hATu004370: from=<ryan@stv.27south.com>, size=0, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=61-62-186-197-adsl-kao.dynamic.so-net.net.tw [61.62.186.197]
    Oct 27 19:48:52 localhost sendmail[4390]: Bad line on /etc/mail/service.switch: 68.87.64.19668.87.66.196
    Oct 27 19:48:52 localhost last message repeated 191 times
    Oct 27 19:48:52 localhost sendmail[4390]: j9S0mqNs004390: from=<serega@seregasite.com>, size=283, class=0, nrcpts=1, msgid=<1130460532.3205.4.camel@seregasite.com>, proto=ESMTP, daemon=MTA, relay=seregasite.com [127.0.0.1]
    Oct 27 19:48:55 localhost sendmail[4393]: j9S0mqNs004390: to=<bfhu@hotmail.com>, ctladdr=<serega@seregasite.com> (500/500), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=120283, relay=mx2.hotmail.com. [65.54.252.230], dsn=2.0.0, stat=Sent ( <1130460532.3205.4.camel@seregasite.com> Queued mail for delivery)
    Oct 27 19:50:06 localhost sendmail[4394]: j9S0o5ew004394: 61-62-242-71-adsl-kao.dynamic.so-net.net.tw [61.62.242.71] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
    Oct 27 19:53:33 localhost sendmail[4396]: Bad line on /etc/mail/service.switch: 68.87.64.19668.87.66.196
    Oct 27 19:53:34 localhost last message repeated 191 times
    Oct 27 19:53:35 localhost sendmail[4396]: j9S0rWkK004396: ruleset=check_rcpt, arg1=<chice@yam.com>, relay=61-62-185-29-adsl-kao.dynamic.so-net.net.tw [61.62.185.29], reject=550 5.7.1 <chice@yam.com>... Relaying denied
    Oct 27 19:53:35 localhost sendmail[4396]: j9S0rWkK004396: from=<otto@stv.27south.com>, size=0, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=61-62-185-29-adsl-kao.dynamic.so-net.net.tw [61.62.185.29]
    Oct 27 19:54:40 localhost sendmail[4353]: j9RHUrB8019679: to=<wellco@libra.seed.net>, delay=06:46:01, xdelay=00:12:00, mailer=esmtp, pri=1177160, relay=dmatch.geo.yahoo.akadns.net. [66.218.65.229], dsn=4.0.0, stat=Deferred: Connection timed out with dmatch.geo.yahoo.akadns.net.
    Oct 27 19:54:40 localhost sendmail[4353]: j9RHUrB6019679: to=<ckkao@yahoo.com.tw>,<qrqx@yahoo.com.tw>, delay=06:46:08, xdelay=00:00:00, mailer=esmtp, pri=1177163, relay=mta-v2.mail.vip.tpe.yahoo.com., dsn=4.0.0, stat=Deferred
    Oct 27 20:00:28 localhost sendmail[4403]: j9S10RXx004403: 61-62-242-2-adsl-kao.dynamic.so-net.net.tw [61.62.242.2] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
    Oct 27 20:04:01 localhost sendmail[4417]: j9S13o9p004417: 61-62-187-206-adsl-kao.dynamic.so-net.net.tw [61.62.187.206] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

    At the very begining of the log file I can see that whoever tries to use my mail server got rejected (which is good) Also, those massages that got dropped contain From and To lines. But then take a look at the last lines of the log file: it seems like my smtp server tries to make a connection to yahoo.com. Does it mean it tries to relay massages?

    The interesting thing about it all is that when a massage has to and from part my server automatically reject it but then if it has only "to" part and yahoo.com as destination it tries to establish connection?


    Here is also my sendmail.mc file:
    divert(-1)dnl
    dnl #
    dnl # This is the sendmail macro config file for m4. If you make changes to
    dnl # /etc/mail/sendmail.mc, you will need to regenerate the
    dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
    dnl # installed and then performing a
    dnl #
    dnl # make -C /etc/mail
    dnl #
    include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
    VERSIONID(`setup for Red Hat Linux')dnl
    OSTYPE(`linux')dnl
    dnl #
    dnl # default logging level is 9, you might want to set it higher to
    dnl # debug the configuration
    dnl #
    dnl define(`confLOG_LEVEL', `9')dnl
    dnl #
    dnl # Uncomment and edit the following line if your outgoing mail needs to
    dnl # be sent out through an external mail server:
    dnl #
    dnl define(`SMART_HOST',`smtp.your.provider')
    define(`confDEF_USER_ID',``8:12'')dnl
    dnl define(`confAUTO_REBUILD')dnl
    define(`confTO_CONNECT', `1m')dnl
    define(`confTRY_NULL_MX_LIST',true)dnl
    define(`confDONT_PROBE_INTERFACES',true)dnl
    define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
    define(`ALIAS_FILE', `/etc/aliases')dnl
    define(`STATUS_FILE', `/var/log/mail/statistics')dnl
    define(`UUCP_MAILER_MAX', `2000000')dnl
    define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
    define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
    define(`confAUTH_OPTIONS', `A')dnl
    dnl #
    dnl # The following allows relaying if the user authenticates, and disallows
    dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
    dnl #
    define(`confAUTH_OPTIONS', `A p')dnl
    dnl #
    dnl # PLAIN is the preferred plaintext authentication method and used by
    dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
    dnl # use LOGIN. Other mechanisms should be used if the connection is not
    dnl # Please remember that saslauthd needs to be running for AUTH.
    dnl #
    dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
    dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
    dnl #
    dnl # Rudimentary information on creating certificates for sendmail TLS:
    dnl # cd /usr/share/ssl/certs; make sendmail.pem
    dnl # Complete usage:
    dnl # make -C /usr/share/ssl/certs usage
    dnl #
    dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')
    dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')
    dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')
    dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')
    dnl #
    dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
    dnl # slapd, which requires the file to be readble by group ldap
    dnl #
    dnl define(`confDONT_BLAME_SENDMAIL',`groupreadablekey file')dnl
    dnl #
    dnl # define(`confDONT_BLAME_SENDMAIL',`groupreadablekey file')dnl
    dnl #
    dnl define(`confTO_QUEUEWARN', `4h')dnl
    dnl define(`confTO_QUEUERETURN', `5d')dnl
    dnl define(`confQUEUE_LA', `12')dnl
    dnl define(`confREFUSE_LA', `18')dnl
    define(`confTO_IDENT', `0')dnl
    dnl FEATURE(delay_checks)dnl
    FEATURE(`no_default_msa',`dnl')dnl
    FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
    FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
    FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
    FEATURE(redirect)dnl
    FEATURE(always_add_domain)dnl
    FEATURE(use_cw_file)dnl
    FEATURE(use_ct_file)dnl

    dnl # CUSTOM MODIFICATIONS
    FEATURE(`dnsbl', `ipwhois.rfc-ignorant.org',`"550 Mail from " $&{client_addr} " refused. Rejected for bad WHOIS info on IP of your SMTP server - see http://www.rfc-ignorant.org/"')
    FEATURE(`dnsbl', `proxies.blackholes.easynet.nl', `"550 5.7.1 ACCESS DENIED to OPEN PROXY SERVER "$&{client_name}" by easynet.nl DNSBL (http://proxies.blackholes.easynet.nl/errors.html)"', `')dnl
    FEATURE(`dnsbl', `relays.ordb.org', `"550 Email rejected due to sending server misconfiguration - see http://www.ordb.org/faq/\#why_rejected"')dnl
    FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} " refused - see http://spamcop.net/bl.shtml"')
    FEATURE(`dnsbl',`sbl.spamhaus.org',`Rejected - see http://spamhaus.org/')dnl
    dnl # END OF MODIFICATIONS

    dnl # The following limits the number of processes sendmail can fork to accept
    dnl # incoming messages or process its message queues to 12.) sendmail refuses
    dnl # to accept connections once it has reached its quota of child processes.
    dnl #
    dnl define(`confMAX_DAEMON_CHILDREN', 12)dnl
    dnl #
    dnl # Limits the number of new connections per second. This caps the overhead
    dnl define(`confMAX_DAEMON_CHILDREN', 12)dnl
    dnl #
    dnl # Limits the number of new connections per second. This caps the overhead
    dnl # incurred due to forking new sendmail processes. May be useful against
    dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address
    dnl # limit would be useful but is not available as an option at this writing.)
    dnl #
    dnl define(`confCONNECTION_RATE_THROTTLE', 3)dnl
    dnl #
    dnl # The -t option will retry delivery if e.g. the user runs over his quota.
    dnl #
    FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
    FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
    FEATURE(`blacklist_recipients')dnl
    EXPOSED_USER(`root')dnl
    dnl #
    dnl # The following causes sendmail to only listen on the IPv4 loopback address
    dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
    dnl # address restriction to accept email from the internet or intranet.
    dnl #
    dnl # DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
    dnl #
    dnl # DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
    dnl #
    dnl # The following causes sendmail to additionally listen to port 587 for
    dnl # mail from MUAs that authenticate. Roaming users who can't reach their
    dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
    dnl # this useful.
    dnl #
    dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
    dnl #
    dnl # The following causes sendmail to additionally listen to port 465, but
    dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
    dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
    dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
    dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
    dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
    dnl #
    dnl # For this to work your OpenSSL certificates must be configured.
    dnl #
    dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
    dnl #
    dnl # The following causes sendmail to additionally listen on the IPv6 loopback
    dnl # device. Remove the loopback address restriction listen to the network.
    dnl #
    dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
    dnl #
    dnl # enable both ipv6 and ipv4 in sendmail:
    dnl #
    dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
    dnl #
    dnl # We strongly recommend not accepting unresolvable domains if you want to
    dnl # protect yourself from spam. However, the laptop and users on computers
    dnl # that do not have 24x7 DNS do need this.
    dnl #
    dnl #FEATURE(`accept_unresolvable_domains')dnl
    dnl #
    dnl FEATURE(`relay_based_on_MX')dnl
    dnl #
    dnl # Also accept email sent to "localhost.localdomain" as local email.
    dnl #
    LOCAL_DOMAIN(`localhost.localdomain')dnl
    dnl #
    dnl # The following example makes mail from this host and any additional
    dnl # specified domains appear to be sent from mydomain.com
    dnl #
    MASQUERADE_AS(`PoopyPants.com')dnl
    dnl #
    dnl #
    dnl # masquerade not just the headers, but the envelope as well
    dnl #
    FEATURE(masquerade_envelope)dnl
    dnl #
    dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
    dnl #
    FEATURE(masquerade_entire_domain)dnl


    dnl # CUSTOM CONFIGURATION#1
    MASQUERADE_DOMAIN(localhost)dnl
    MASQUERADE_DOMAIN(localhost.localdomain)dnl
    MASQUERADE_DOMAIN(PoopyPants.com)dnl
    dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
    dnl # END OF CUSTOM CONFIGURATION#1

    MAILER(smtp)dnl
    MAILER(procmail)dnl

  2. #2
    Senior Member
    Join Date
    May 2004
    Location
    Pakistan
    Posts
    253

    Re:

    Dear usa_serega,
    Hello,

    Change this in your sendmail.mc

    dnl define(`SMART_HOST',`smtp.your.provider')

    to

    dnl define(`SMART_HOST',`127.0.0.1')

    Best Regards.
    Frrkh hmd

Similar Threads

  1. SPAM control of sendmail @ RH9
    By lasanthaindika in forum Redhat / Fedora
    Replies: 1
    Last Post: 08-31-2006, 07:17 AM
  2. Sendmail + Relaying errors
    By Schotty in forum Linux - Hardware, Networking & Security
    Replies: 4
    Last Post: 10-24-2004, 02:58 PM
  3. Spam Ain't So Bad!
    By stryder144 in forum General Chat
    Replies: 10
    Last Post: 04-21-2004, 10:37 PM
  4. relaying doesn't work
    By elovkoff in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 08-20-2002, 01:55 PM
  5. Sendmail relaying problem.....
    By redhat1 in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 06-08-2002, 11:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •