Professional Web Applications Themes

disabling sendmail - Sun Solaris

I recently deleted the two sendmail packages on a Solaris 8 system (both root and user components). mail, mailx etc rely on the existance of sendmail to send out mail. What method should I use to disable external connections on port 25, but still allow users to send mail from the box?...

  1. #1

    Default disabling sendmail

    I recently deleted the two sendmail packages on a Solaris 8 system
    (both root and user components). mail, mailx etc rely on the
    existance of sendmail to send out mail. What method should I use to
    disable external connections on port 25, but still allow users to send
    mail from the box?
    Charles Guest

  2. #2

    Default Re: disabling sendmail

    Charles Chips wrote: 

    Well, you could of course prevent sendmail from starting at system boot
    by moving the /etc/rc2.d/SXXsendmail startup script. That is, if you did
    not have deleted the packages.

    Frank Guest

  3. #3

    Default Re: disabling sendmail

    com (Charles Chips) writes: 

    You shouldn't have removed the packages...

    There's no problem with leaving sendmail on the box, but just not running
    it as a daemon. That means that anyone can send mail by piping it to
    sendmail, but there's nothing listening on port 25.

    --
    "The road to Paradise is through Intercourse."
    The uk.transport FAQ; http://www.huge.org.uk/transport/FAQ.html
    [email me at huge [at] huge [dot] org [dot] uk]


    Huge Guest

  4. #4

    Default Re: disabling sendmail

    Huge wrote:
     [/ref]
     

    Alternatively, I prefer to leave it running as a daemon, but not
    listening on port 25. The advantage of this is that it still
    processes the queue periodically to deal with mail that couldn't
    be sent because of network outages, etc.

    Luckily, this is really easy to do. It should be as simple as:

    echo 'MODE=""' > /etc/default/sendmail
    /etc/init.d/sendmail stop
    /etc/init.d/sendmail start

    Normally, MODE is set to "-bd", which means (in my goofy translation)
    "Be a Daemon", which further translated means "listen on port 25".
    If you set MODE to the empty string as above, then sendmail will
    still launch with the "-q15m" option, which makes it process the queue
    every 15 minutes to send out messages that haven't been sent before.

    If you'd like to change that interval to a larger number (which might
    be a good idea on a desktop machine), you could do this instead:

    echo 'MODE=""; QUEUEINTERVAL=15m' > /etc/default/sendmail
    /etc/init.d/sendmail stop
    /etc/init.d/sendmail start

    Hope that helps.

    - Logan

    Logan Guest

  5. #5

    Default Re: disabling sendmail

    To disable sendmail listening on port 25 just remove from /etc/rc2.d.
    This does not interferre with the sending of mail . When sending using a
    mail client such as mailx a temporary sendmail porcess is started to deliver
    the mail .
    GEorge


    george Guest

  6. #6

    Default Re: disabling sendmail

    Logan Shaw <rr.com> wrote in message news:<1lIbb.69479$austin.rr.com>... [/ref]

    >
    > Alternatively, I prefer to leave it running as a daemon, but not
    > listening on port 25. The advantage of this is that it still
    > processes the queue periodically to deal with mail that couldn't
    > be sent because of network outages, etc.
    >
    > Luckily, this is really easy to do. It should be as simple as:
    >
    > echo 'MODE=""' > /etc/default/sendmail
    > /etc/init.d/sendmail stop
    > /etc/init.d/sendmail start
    >
    > Normally, MODE is set to "-bd", which means (in my goofy translation)
    > "Be a Daemon", which further translated means "listen on port 25".
    > If you set MODE to the empty string as above, then sendmail will
    > still launch with the "-q15m" option, which makes it process the queue
    > every 15 minutes to send out messages that haven't been sent before.
    >
    > If you'd like to change that interval to a larger number (which might
    > be a good idea on a desktop machine), you could do this instead:
    >
    > echo 'MODE=""; QUEUEINTERVAL=15m' > /etc/default/sendmail
    > /etc/init.d/sendmail stop
    > /etc/init.d/sendmail start
    >
    > Hope that helps.
    >
    > - Logan[/ref]

    Thanks, great advice!
    Charles Guest

  7. #7

    Default Re: disabling sendmail

    It depends on your Solaris version. On Solaris 8 for example there is
    only one sendmail daemon; you can modify the /etc/default/sendmail to
    only contain something like
    <<
    MODE=""
    QUEUEINTERVAL="15m"
    OPTIONS="" [/ref]

    This file is sourced from the rc startup script. So this works on
    Solaris 8 with a minimum of modifications. (after this sendmail does
    not listen on the smtp port anymore, but still sends local mails and
    if local mail is not deliverable and put in a queue still processes
    the queue)


    However on Solaris 9 there are two sendmail daemons (I can't tell you
    the details as I don't work too much with sendmail; I only wanted
    sendmail systems to be able to send mail to the central mailhost,
    without having the 25 port opened). So the above method does not work.
    I don't know all steps required to make it work on Solaris 9, but
    there is a JASS finish script that does just that (the finish script
    is called disable-sendmail.fin). The script tells sendmail to listen
    on 25 but to only bind to the local address (127.0.0.1).

    So what I did (since I know JASS but don't know very well sendmail ):
    I created a simple driver script called sendm_stop.driver which looks
    like this:
    <<
    DIR="`/bin/dirname $0`"
    export DIR
    .. ${DIR}/driver.init
    JASS_FILES="
    "

    JASS_SCRIPTS="
    print-jass-environment.fin
    disable-sendmail.fin
    "
    .. ${DIR}/driver.run [/ref]

    and then executed with ./jass-execute -d sendm_stop.driver from the
    JASS directory.


    Vlad Grama.

    com (Charles Chips) wrote in message news:<google.com>... [/ref]

    > >
    > > Alternatively, I prefer to leave it running as a daemon, but not
    > > listening on port 25. The advantage of this is that it still
    > > processes the queue periodically to deal with mail that couldn't
    > > be sent because of network outages, etc.
    > >
    > > Luckily, this is really easy to do. It should be as simple as:
    > >
    > > echo 'MODE=""' > /etc/default/sendmail
    > > /etc/init.d/sendmail stop
    > > /etc/init.d/sendmail start
    > >
    > > Normally, MODE is set to "-bd", which means (in my goofy translation)
    > > "Be a Daemon", which further translated means "listen on port 25".
    > > If you set MODE to the empty string as above, then sendmail will
    > > still launch with the "-q15m" option, which makes it process the queue
    > > every 15 minutes to send out messages that haven't been sent before.
    > >
    > > If you'd like to change that interval to a larger number (which might
    > > be a good idea on a desktop machine), you could do this instead:
    > >
    > > echo 'MODE=""; QUEUEINTERVAL=15m' > /etc/default/sendmail
    > > /etc/init.d/sendmail stop
    > > /etc/init.d/sendmail start
    > >
    > > Hope that helps.
    > >
    > > - Logan[/ref]
    >
    > Thanks, great advice![/ref]
    Vlad Guest

  8. #8

    Default Re: disabling sendmail

    Logan Shaw wrote:
     

    Leave sendmail off.

    crontab -l
    3,18,33,48 * * * * /usr/lib/sendmail -q >/dev/null2>&1

    dp

    Dennis Guest

Similar Threads

  1. SENDMAIL
    By martinjamesroberts in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: December 3rd, 10:42 AM
  2. sendmail
    By DBSMITH@OhioHealth.com in forum PERL Beginners
    Replies: 2
    Last Post: June 4th, 02:58 PM
  3. Sendmail
    By Bill Vermillion in forum SCO
    Replies: 0
    Last Post: July 28th, 11:57 PM
  4. Replies: 2
    Last Post: June 27th, 05:47 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139