Setting up sendmail to use external smtp server - Unix

This is a discussion on Setting up sendmail to use external smtp server - Unix ; I need to set up a sco unixware 7 box to allow sendmail to use our external dsl email server to send mail. I do not have to use a username or password and only want to send mail through ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: Setting up sendmail to use external smtp server

  1. Setting up sendmail to use external smtp server

    I need to set up a sco unixware 7 box to allow sendmail to use our external
    dsl email server to send mail. I do not have to use a username or password
    and only want to send mail through this server if the mail address is
    unknown to the internal sendmail program. How do I go about setting this
    up?? I've done a bit of googling but have gotten a bit confused about this
    since I'm not going to be receiving mail. Can anyone point me in the right
    direction??

    Thanks

    Bill



  2. Re: Setting up sendmail to use external smtp server

    Try to put this

    define(`SMART_HOST', `hostname-of-external-email-server')

    in your sendmail.mc file and generate the sendmail.cf new.


    Wolfgang



    At Mon, 26 Apr 2004 09:55:35 -0400,
    Bill wrote:
    >
    > I need to set up a sco unixware 7 box to allow sendmail to use our external
    > dsl email server to send mail. I do not have to use a username or password
    > and only want to send mail through this server if the mail address is
    > unknown to the internal sendmail program. How do I go about setting this
    > up?? I've done a bit of googling but have gotten a bit confused about this
    > since I'm not going to be receiving mail. Can anyone point me in the right
    > direction??
    >
    > Thanks
    >
    > Bill
    >
    >



  3. Re: Setting up sendmail to use external smtp server

    I don't seem to have a sendmail.mc but I do have a sendmail.cf, any ideas?
    I think this is where I came to a halt when I was trying to figure it out
    myself. The system was set up by someone else and send mail works but I'm
    not sure how he set it up.

    Bill

    "Wolfgang Hottgenroth" wrote in message
    news:nszisfmdd5z.wl@uu.net...
    > Try to put this
    >
    > define(`SMART_HOST', `hostname-of-external-email-server')
    >
    > in your sendmail.mc file and generate the sendmail.cf new.
    >
    >
    > Wolfgang
    >
    >
    >
    > At Mon, 26 Apr 2004 09:55:35 -0400,
    > Bill wrote:
    > >
    > > I need to set up a sco unixware 7 box to allow sendmail to use our

    external
    > > dsl email server to send mail. I do not have to use a username or

    password
    > > and only want to send mail through this server if the mail address is
    > > unknown to the internal sendmail program. How do I go about setting

    this
    > > up?? I've done a bit of googling but have gotten a bit confused about

    this
    > > since I'm not going to be receiving mail. Can anyone point me in the

    right
    > > direction??
    > >
    > > Thanks
    > >
    > > Bill
    > >
    > >

    >




  4. Re: Setting up sendmail to use external smtp server

    In comp.unix.misc Bill wrote:
    > I need to set up a sco unixware 7 box to allow sendmail to use our external
    > dsl email server to send mail. I do not have to use a username or password
    > and only want to send mail through this server if the mail address is
    > unknown to the internal sendmail program. How do I go about setting this
    > up?? I've done a bit of googling but have gotten a bit confused about this
    > since I'm not going to be receiving mail. Can anyone point me in the right
    > direction??


    > Thanks


    > Bill


    create a 'SMART_HOST' in your .mc file. Tells sendmail to deliver
    outbound mail there.



    --
    Peter Håkanson
    IPSec Sverige ( At Gothenburg Riverside )
    Sorry about my e-mail address, but i'm trying to keep spam out,
    remove "icke-reklam" if you feel for mailing me. Thanx.

  5. Re: Setting up sendmail to use external smtp server

    In comp.unix.misc Bill wrote:
    > I don't seem to have a sendmail.mc but I do have a sendmail.cf, any ideas?
    > I think this is where I came to a halt when I was trying to figure it out
    > myself. The system was set up by someone else and send mail works but I'm
    > not sure how he set it up.


    > Bill


    Your .cf probably contains something simular to:
    # "Smart" relay host (may be null)
    DS


    replace with :
    DSyour-smart-mailer


    no spaces. Then stop and start sendmail.

    ( be aware, if you have no .mc file and no ways of "compiling it"
    you probably habe a vendor-supplied sendmail thats old and most
    likley has security problems.)

    --
    Peter Håkanson
    IPSec Sverige ( At Gothenburg Riverside )
    Sorry about my e-mail address, but i'm trying to keep spam out,
    remove "icke-reklam" if you feel for mailing me. Thanx.

  6. Re: Setting up sendmail to use external smtp server

    Nope, nothing like that in the sendmail.cf file. Any more ideas?


    wrote in message
    news:c6jr95$212d$4@nyheter.ipsec.se...
    > In comp.unix.misc Bill wrote:
    > > I don't seem to have a sendmail.mc but I do have a sendmail.cf, any

    ideas?
    > > I think this is where I came to a halt when I was trying to figure it

    out
    > > myself. The system was set up by someone else and send mail works but

    I'm
    > > not sure how he set it up.

    >
    > > Bill

    >
    > Your .cf probably contains something simular to:
    > # "Smart" relay host (may be null)
    > DS
    >
    >
    > replace with :
    > DSyour-smart-mailer
    >
    >
    > no spaces. Then stop and start sendmail.
    >
    > ( be aware, if you have no .mc file and no ways of "compiling it"
    > you probably habe a vendor-supplied sendmail thats old and most
    > likley has security problems.)
    >
    > --
    > Peter Håkanson
    > IPSec Sverige ( At Gothenburg Riverside )
    > Sorry about my e-mail address, but i'm trying to keep spam out,
    > remove "icke-reklam" if you feel for mailing me. Thanx.




  7. Re: Setting up sendmail to use external smtp server

    In article ,
    Bill wrote:
    >Nope, nothing like that in the sendmail.cf file. Any more ideas?


    I've not seen a sendmail.cf with out a DS in it. That's a standard
    thing in Sendmail. Could someone have diddled your .cf file.
    The standard rule is not to make changes to .cf, but if you stay
    only in the upper part and out of the 'noise' you usually have no
    problem. Make a copy first.

    But you could try to add a DS entry to your sendmail.cf.

    It should be a line of two below a line that starts Dj

    Or alternatively you could set up mailer table for all the
    extensions.

    Since RoadRunner refuses mail from my I have a mailertable entry
    that looks just like this.

    ..rr.com smtp:mail.domainIuse.net

    I have several other similar entries for specific domains that do
    aggressive and multi-IP-block refusals from some providers.

    That should work and you just have a set of rules for
    ..com, .net, org, .

    Bill

    >
    >
    > wrote in message
    >news:c6jr95$212d$4@nyheter.ipsec.se...
    >> In comp.unix.misc Bill wrote:
    >> > I don't seem to have a sendmail.mc but I do have a sendmail.cf, any

    >ideas?
    >> > I think this is where I came to a halt when I was trying to figure it

    >out
    >> > myself. The system was set up by someone else and send mail works but

    >I'm
    >> > not sure how he set it up.

    >>
    >> > Bill

    >>
    >> Your .cf probably contains something simular to:
    >> # "Smart" relay host (may be null)
    >> DS
    >>
    >>
    >> replace with :
    >> DSyour-smart-mailer
    >>
    >>
    >> no spaces. Then stop and start sendmail.
    >>
    >> ( be aware, if you have no .mc file and no ways of "compiling it"
    >> you probably habe a vendor-supplied sendmail thats old and most
    >> likley has security problems.)
    >>
    >> --
    >> Peter Håkanson
    >> IPSec Sverige ( At Gothenburg Riverside )
    >> Sorry about my e-mail address, but i'm trying to keep spam out,
    >> remove "icke-reklam" if you feel for mailing me. Thanx.

    >
    >



    --
    Bill Vermillion - bv @ wjv . com

  8. Re: Setting up sendmail to use external smtp server

    In comp.unix.misc Bill wrote:
    > Nope, nothing like that in the sendmail.cf file. Any more ideas?


    Get "the original sendmail distribution, unpack and identify
    the .mc repository. See if your m4 will build .cf from one
    of the .mc files, if not, sh Build to build your own modern sendmail.
    ( it's not that complicated and you will have a full version in the
    process)

    You might not need to change your sendmail binary, you _could_
    use the sendmail distribution just to "create" your sendmail.cf.

    Given enough interest, i show an example of how FreeBSD
    organized their sendmail :

    /etc/mail contains what's needed create your sendmail.cf,
    in addition it has a Makefile that governs all phases of
    thsi process.

    Here is a ls -l from one machine :
    > cd /etc/mail
    > ll

    total 350
    -rw-r--r-- 1 root wheel 6570 Apr 3 2003 Makefile
    -rw-r--r-- 1 root wheel 2899 Apr 3 2003 README
    -rw-r--r-- 1 root wheel 411 Apr 3 2003 access.sample
    -rw-r--r-- 1 root wheel 1474 Sep 15 2003 aliases
    -rw-r----- 1 root wheel 65536 Sep 15 2003 aliases.db
    -rw-r--r-- 1 root wheel 57066 Apr 3 2003 freebsd.cf
    -rw-r--r-- 1 root wheel 4192 Sep 19 2003 freebsd.mc
    -r--r--r-- 1 root wheel 38840 Apr 3 2003 freebsd.submit.cf
    -r--r--r-- 1 root wheel 803 Apr 3 2003 freebsd.submit.mc
    -r--r--r-- 1 bin bin 5588 Sep 19 2003 helpfile
    -rw-r--r-- 1 root wheel 404 Apr 3 2003 mailer.conf
    -rw-r--r-- 1 root wheel 245 Apr 3 2003 mailertable.sample
    -rw-r--r-- 1 root wheel 57023 Sep 19 2003 nyheter.ipsec.se.cf
    -rw-r--r-- 1 root wheel 4172 Sep 19 2003 nyheter.ipsec.se.mc
    -r--r--r-- 1 root wheel 57023 Sep 19 2003 sendmail.cf
    -rw------- 1 root bin 0 Sep 19 2003 statistics
    -r--r--r-- 1 root wheel 38840 Sep 19 2003 submit.cf
    -rw-r--r-- 1 root wheel 573 Apr 3 2003 virtusertable.sample

    Note the nyheter.ipsec.se.mc ( the machine is named "nyheter.ipsec.se")

    Typing a single 'make' is all that is needed to regenerate
    aliases, access and any usertables, in addition to .mc to
    ..cf generation. Lets do an example of this :
    ( i'll touch the .mc file to simulate an edit )
    # touch nyheter.ipsec.se.mc
    # make
    /usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/ /usr/share/sendmail/cf/m4/cf.m4 nyheter.ipsec.se.mc > nyheter.ipsec.se.cf
    #

    great we have a new .cf file :
    # ll nyhe*
    -rw-r--r-- 1 root wheel 57023 Apr 28 00:17 nyheter.ipsec.se.cf
    -rw-r--r-- 1 root wheel 4172 Apr 28 00:17 nyheter.ipsec.se.mc
    #
    The file needs to be renamed to "sendmail.cf" which is what sendmail
    expects :
    # make install
    install -m 444 nyheter.ipsec.se.cf /etc/mail/sendmail.cf
    install -m 444 freebsd.submit.cf /etc/mail/submit.cf
    #

    We need to restart sendmail , lets do it:
    # make restart
    Restarting: sendmail sendmail-clientmqueue.
    #

    And we are done, the bottom line of maillog shows :
    Apr 28 00:19:18 nyheter sm-mta[95]: restarting /usr/sbin/sendmail due to signal
    Apr 28 00:19:18 nyheter sm-msp-queue[98]: restarting /usr/sbin/sendmail due to signal
    Apr 28 00:19:18 nyheter sm-mta[98730]: starting daemon (8.12.10): SMTP+queueing@00:30:00
    Apr 28 00:19:18 nyheter sm-msp-queue[98732]: starting daemon (8.12.10): queueing@00:30:00

    The whole process is thus controlled by a makefile and all
    commands needed is summarized as :
    make
    make install
    make restart

    You could use a FreeBSD system to generate sendmail.cf for your
    current system ( while porting the above Makefile)



    --
    Peter Håkanson
    IPSec Sverige ( At Gothenburg Riverside )
    Sorry about my e-mail address, but i'm trying to keep spam out,
    remove "icke-reklam" if you feel for mailing me. Thanx.

  9. Re: Setting up sendmail to use external smtp server

    In article , wrote:
    >In comp.unix.misc Bill wrote:
    >> Nope, nothing like that in the sendmail.cf file. Any more ideas?


    >Get "the original sendmail distribution, unpack and identify
    >the .mc repository. See if your m4 will build .cf from one
    >of the .mc files, if not, sh Build to build your own modern sendmail.
    >( it's not that complicated and you will have a full version in the
    >process)


    >You might not need to change your sendmail binary, you _could_
    >use the sendmail distribution just to "create" your sendmail.cf.


    >Given enough interest, i show an example of how FreeBSD
    >organized their sendmail :


    The FreeBSD has one of the nicest ways of handling this of any I've
    seen.

    [deleted ...]


    >And we are done, the bottom line of maillog shows :
    >Apr 28 00:19:18 nyheter sm-mta[95]: restarting /usr/sbin/sendmail due to signal
    >Apr 28 00:19:18 nyheter sm-msp-queue[98]: restarting /usr/sbin/sendmail due to signal
    >Apr 28 00:19:18 nyheter sm-mta[98730]: starting daemon (8.12.10): SMTP+queueing@00:30:00
    >Apr 28 00:19:18 nyheter sm-msp-queue[98732]: starting daemon (8.12.10): queueing@00:30:00


    Such an old version :-)

    Apr 27 20:25:59 bilver sm-mta[10945]: restarting /usr/sbin/sendmail due to signal
    Apr 27 20:25:59 bilver sm-msp-queue[10948]: restarting /usr/sbin/sendmail due to signal
    Apr 27 20:26:04 bilver sm-msp-queue[31614]: starting daemon (8.12.11): queueing@00:30:00
    Apr 27 20:26:04 bilver sm-mta[31615]: starting daemon (8.12.11): SMTP+queueing@00:30:00

    ....

    >You could use a FreeBSD system to generate sendmail.cf for your
    >current system ( while porting the above Makefile)


    And the only caveat would be that if he's going to use a FreeBSD
    version to generate the .cf file, he should get the version
    for BSD that matches his current running version in SCO.

    I've used older .cfs with newer versions, and I think I remember
    using a newer .cf with an older version and while nothing broke it
    complained loudly. Well maybe not loudly, but spewed some error
    messages.

    Bill



    --
    Bill Vermillion - bv @ wjv . com

+ Reply to Thread