Find the answer to your Linux question:
Results 1 to 10 of 10
Hello, I'm having issues with a Sendmail box here running SMTP. I'm noticing that the service fails every 10-15 minutes. After a lot of troubleshooting, I noticed that the SMTP ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2007
    Posts
    7

    Sendmail - SMTP Issues


    Hello,

    I'm having issues with a Sendmail box here running SMTP.

    I'm noticing that the service fails every 10-15 minutes.

    After a lot of troubleshooting, I noticed that the SMTP listening daemons seem to be the problem.

    It looks as though the spam coming in to the box is taking up all of the listening daemons. When the system goes down, I tried a net stat and noticed none of the smtp listening daemons are running. I killed a few processes from the spam and the daemons became free so the system was up and running.

    The system is not even receiving a lot of spam but this is becoming very annoying.

    Anyone have any ideas? This system has been running fine for a year and the spam has been pretty much the same every since then and never failed to operate. The issue started after a reboot of the system

    Thanks all

    Im running Suse 8.1

  2. #2
    Just Joined!
    Join Date
    Jan 2007
    Posts
    7
    Anyone?

    In brief, this issue started after a reboot of the system.

    When the SMTP goes down, it stays down for 5 minutes and then comes back up.
    When it goes down, I list the processes and I notice that SMTP listening on port 25 is not running.

    I notice about 20-30 smtp connections on port 25 (mostly spam). Does anyone think theres a problem with email flow? Why would so many connections hog the smtp port 25 processes and for such a long duration?

    Any ideas? thanks

  3. #3
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    One obvious solution would be to block some of those spamming addresses.
    You can also config the system to run more daemons.

  4. #4
    Just Joined!
    Join Date
    Jan 2007
    Posts
    7
    sorry, I forgot to mention. I set up about 100 blocks on spammers already but I can't keep up anymore. The I.P's are all different and spoofed.

    How do you configure the system to run more daemons?

  5. #5
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    This setting helps you keep your system from running out of memory due to too many processes. It lets you set the maximum number of child processes that sendmail will spawn. Putting a limit on the number of processes will keep you from running out of memory. If you figure that each sendmail process uses about two megabytes of memory, then decide how much total memory you want to spend on mail handling and do the division. I have two gigabytes on my current machine, and I figure I can waste half of that on mail, so one gigabyte divided by 2 megabytes is 500:

    define(`confMAX_DAEMON_CHILDREN', `500')dnl

    Typically I have more like 200 sendmail processes going, but I have run into the 500-process limit on occasion. When that happens, sendmail just stops accepting new connections until some of the existing processes finish.
    Mail Filtering - Sendmail Config

  6. #6
    Just Joined!
    Join Date
    Jan 2007
    Posts
    7
    Thanks for the response

    I like the suggestion and that link was great. The problem is, I can't find the sendmail.mc file. I tried a whereis and I can't find it anywhere. I found a sendmail.cf file but it states to not edit the file.

    Any ideas?

    Thanks

  7. #7
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    5.3.2.1 -- Where is the sendmail.mc file on SuSE Linux?
    Date: May 5, 2002

    On SuSE Linux systems there is no real sendmail.mc file. This file is generated 'on the fly' by SuSEconfig using several variables in /etc/rc.config and /etc/rc.config.d/sendmail.rc.config (SuSE <= 7.3) or /etc/sysconfig/sendmail (SuSE >= 8.0).

    SuSEconfig executes the script /sbin/conf.d/SuSEconfig.sendmail to a) build a temorary .mc file b) execute m4 to generate /etc/sendmail.cf and c) delete the temporary .mc file afterwards.

    To make customisations you cannot achieve by modifying the variables in the configuration files mentioned above (using YaST or YaST2), you have two options:

    1. Use /etc/mail/linux.mc (or /etc/mail/linux.nullclient.mc) as a starting point. Both files contain several helpful comments.
    2. To get a .mc file based on your current configuration, modify /sbin/conf.d/SuSEconfig.sendmail to keep the temporary .mc file and execute SuSEconfig afterwards. Then use that copy as starting point.

    In both cases you have to build your /etc/sendmail.cf (note: SuSE still uses /etc not /etc/mail as suggested in the manual) using the m4 macroprocessor:

    m4 your.mc.file > /etc/sendmail.cf

    Then reload sendmail with "rcsendmail reload".

    To prevent SuSEconfig from overiding your new sendmail.cf in future runs, set the variable "SENDMAIL_TYPE" in /etc/rc.config.d/sendmail.rc.config to "no" (SuSE Linux <= 7.3). On systems >= 8.0 you probably will have to set an "exit" command atop of the file /sbin/conf.d/SuSEconfig.sendmail to do the same. SuSE 8.0 does not know the SENDMAIL_TYPE variable.
    Sendmail FAQ, Section 5

  8. #8
    Just Joined!
    Join Date
    Jan 2007
    Posts
    7
    damn, this is getting much more difficult.

    I browsed the /etc/mail/linux.mc file and I saw some nice options. It doesn't correspond with the sendmail.mc file though. I would like to edit that file if possible and I also like the link you gave me for spam prevention.

    To get that file, do you know what I must edit in this file /sbin/conf.d/SuSEconfig.sendmail ?

    After it's edited, where would the file be located, does it just appear?

    Thanks

  9. #9
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    where would the file be located, does it just appear?
    2. To get a .mc file based on your current configuration, modify /sbin/conf.d/SuSEconfig.sendmail to keep the temporary .mc file and execute SuSEconfig afterwards. Then use that copy as starting point.
    The whole process sounds like a pain, but the sendmail.org link should
    explain it all.

  10. #10
    Just Joined!
    Join Date
    Jan 2007
    Posts
    7
    sendmail.org just tells me to edit SuSEconfig.sendmail. It doesn't tell me what to edit, what to add, etc. I can't find anything in the file that must be edited to keep the temp .mc file.

    I'm reading elswhere that linux.mc replaces the sendmail.mc, I can't configure daemon children or spam prevention in the file.

    Has anyone done this before and know exactly what must be edited in the file and where the system would place the temp sendmail.mc file.

    Also, what happens if I edit the sendmail.cf file?

    I was also taking a look at the linux.mc file. It has an option to setup live RBL's. The RBL sites in the configuraiton file point to maps.vix.com and orbs.org, which it doesn't look as though they exist anymore. Can anyone confirm?

    Thanks again

Posting Permissions

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