AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only

sendmail always via DS (smart host)

  • 1.  sendmail always via DS (smart host)

    Posted Thu February 28, 2019 10:56 AM

    Originally posted by: avkaam


    Hi,

     

    Over the past few months a few things have changed with my 4 AIX machines

     

    1. instead of 1 company there are 2 companies on the machine, each with their own email addresses

    2. a change of smtp relay server

     

    I solved this issue in the following way:

     

    Hostname:

    aixmch01

     

    sendmail.cf:

    DSsapexchange01.company01.local
    Dj$w.company01.com
    Ds$w.$m
    O FallbackMXhost=sapexchange01.company01.local
    Kgenerics hash /etc/mail/genericstable
    

    With genericstable holding the userid and their respective email addresses, including root

     

    How ever the administrator of the sapexchange01.company01.local is complaining that the domain from which I send should not be aixmch01.company01.com but should be company01.com because they seem to be using a whitelist of what domains are allowed to use the sapexchange01.company01.local and my aixmch01.company01.com is messing something up sometimes.

     

    If I (as root) do a sendmail -v user1@company01.comyou see:>>> MAIL From:<root@aixmch01.company01.com which is what they complain about.

    if I (as root) do a sendmail -v user2@company02.com you see: >>> MAIL From:<root@aixmch01.company01.com which is what they company about

     

    So I changed Dj$w.company01.com to Djcompany01.com

     

    If I now send a mail (as root) sendmail -v user2@company02.comyou see >>> MAIL From:<root@company01.com so that looks all good, the mail is excepted and send and arrives.

     

    However if I try a sendmail -v user1@company01.comI get:

    user1@company01.comUser Unknown…

    Which makes sense since sendmail sees user1@company01.comnow as a local user and tries to send it locally

     

    So I looked into the DH (MAIL_HUB) option and tried this:

     

    DHcompany01.com.

     

    sendmail -bv user1@company01.com

    user1@company01.com... deliverable: mailer relay, host company01.com. user user1@company01.com

     

    so it tries to use the DH as the relay host, I figured I might have misunderstood the DH option so did

     

    DHsapexchange01.company01.local

    sendmail -bv user1@company01.com

    user1@company01.com... deliverable: mailer relay, host sapexchange01.company01.local

    user user1@sapexchange01.company01.local

     

    so now it seems the DH is used for both the host as the user1 email ?

     

    I also turned off this line:

     

    # Added for AIX

    # figure out what should stay in our local mail system

    # Comment out this rule if you want all mail to go to the

    # Smart-Host relay defined by "DS" macro.

    #R$* < @ $* .$=m. > $* $#esmtp $@ $2.$3. $: $1 < @ $2.$3. > $4

     

    But that has no effect, not with DH enabled and DH disabled.

    Checked DR option out also but no luck there, also what I read one should no longer use it

     

    So what am I missing, what do I need to change.

     

    Thank you very much