AIX

AIX

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


#Power
 View Only
Expand all | Collapse all

sendmail

  • 1.  sendmail

    Posted Fri August 29, 2025 11:15 AM

    I want to send emails to the AD domain group of exchange via sendmail in AIX. How should I configure it? 

    By configuring the/etc/sendmail/sendmail.cf configuration file and modify DSsmtpserver, can only be sent to the members of the AD domain.



    ------------------------------
    bowen dai
    ------------------------------


  • 2.  RE: sendmail

    Posted Mon September 01, 2025 10:22 AM
    Edited by Andrey Klyachkin Mon September 01, 2025 10:21 AM

    You did it correctly. By setting DS, you send all your emails from the AIX server to the Exchange server. In this case, Exchange determines how to handle the email. You may ask your Exchange administrators, and they will probably find the reason in their logs.

    Meanwhile, you can configure syslog to log sendmail error messages, in case you didn't do it before.

    • Add the line like 'mail.debug /var/log/maillog rotate time 1d files 4' into /etc/syslog.conf
    • Create the log file -> touch /var/log/maillog
    • Restart syslogd -> refresh -s syslogd

    Then try to send the email again and look in the log, if it was sent to the Exchange server and if it answered anything.



  • 3.  RE: sendmail

    Posted Fri September 05, 2025 02:44 AM

               Hi Andrey.
          Thank you for your reply.
           For the convenience of analysis, I have uploaded the output log.

    Sep  1 17:16:08 HGF9NIM01V syslog:info syslogd: restart
    Sep  1 17:16:12 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E661F211
    Sep  1 17:16:49 HGF9NIM01V daemon:info src[24248756]: The iptrace subsystem was requested to STARTED by user root
    Sep  1 17:17:21 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E6621FC1
    Sep  1 17:17:38 HGF9NIM01V daemon:notice last message repeated 3 times
    Sep  1 17:17:51 HGF9NIM01V mail:crit sendmail[24248764]: My unqualified host name (HGF9NIM01V) unknown; sleeping for retry
    Sep  1 17:17:54 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E6621FC1
    Sep  1 17:18:10 HGF9NIM01V mail:crit sendmail[24117540]: My unqualified host name (HGF9NIM01V) unknown; sleeping for retry
    Sep  1 17:18:26 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E6621FC1
    Sep  1 17:18:38 HGF9NIM01V daemon:notice last message repeated 2 times
    Sep  1 17:18:51 HGF9NIM01V mail:alert sendmail[24248764]: unable to qualify my own domain name (HGF9NIM01V) -- using short name
    Sep  1 17:18:51 HGF9NIM01V mail:info sendmail[24248764]: 5819Ipq124248764: from=root, size=53, class=0, nrcpts=1, msgid=<202509010918.5819Ipq124248764@HGF9NIM01V>, relay=root@localhost
    Sep  1 17:18:51 HGF9NIM01V mail:notice sendmail[11403680]: 5819Ippr11403680: <WXIP@HGF9NIM01V>... User unknown
    Sep  1 17:18:51 HGF9NIM01V mail:info sendmail[24248764]: 5819Ipq124248764: to=WXIP, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30053, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
    Sep  1 17:18:51 HGF9NIM01V mail:info sendmail[11403680]: 5819Ippr11403680: from=<root@HGF9NIM01V>, size=53, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=loopback [127.0.0.1]
    Sep  1 17:18:51 HGF9NIM01V mail:info sendmail[24248764]: 5819Ipq124248764: 5819Ipq224248764: DSN: User unknown
    Sep  1 17:18:51 HGF9NIM01V mail:info sendmail[11403680]: 5819Ippt11403680: from=<>, size=1860, class=0, nrcpts=1, msgid=<202509010918.5819Ipq224248764@HGF9NIM01V>, proto=ESMTP, daemon=MTA, relay=loopback [127.0.0.1]
    Sep  1 17:18:51 HGF9NIM01V mail:info sendmail[24248764]: 5819Ipq224248764: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31077, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (5819Ippt11403680 Message accepted for delivery)
    Sep  1 17:18:51 HGF9NIM01V mail:info sendmail[27328854]: 5819Ippt11403680: to=<root@HGF9NIM01V>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32040, dsn=2.0.0, stat=Sent
    Sep  1 17:18:55 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E6621FC1
    Sep  1 17:19:10 HGF9NIM01V mail:alert sendmail[24117540]: unable to qualify my own domain name (HGF9NIM01V) -- using short name
    Sep  1 17:19:10 HGF9NIM01V mail:info sendmail[24117540]: 5819JA8P24117540: from=root, size=71, class=0, nrcpts=1, msgid=<202509010919.5819JA8P24117540@HGF9NIM01V>, relay=root@localhost
    Sep  1 17:19:10 HGF9NIM01V mail:info sendmail[27328856]: 5819JAl227328856: from=<root@HGF9NIM01V>, size=342, class=0, nrcpts=1, msgid=<202509010919.5819JA8P24117540@HGF9NIM01V>, proto=ESMTP, daemon=MTA, relay=loopback [127.0.0.1]
    Sep  1 17:19:10 HGF9NIM01V mail:info sendmail[24117540]: 5819JA8P24117540: to=WXIP&OA_SP@hhgrace.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30071, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (5819JAl227328856 Message accepted for delivery)
    Sep  1 17:19:10 HGF9NIM01V mail:info sendmail[23265700]: STARTTLS=client, relay=f7smtp1.hhgrace.com., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
    Sep  1 17:19:10 HGF9NIM01V mail:info sendmail[23265700]: 5819JAl227328856: to=<WXIP&OA_SP@hhgrace.com>, ctladdr=<root@HGF9NIM01V> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120342, relay=f7smtp1.hhgrace.com. [172.17.51.5], dsn=2.0.0, stat=Sent (<202509010919.5819JA8P24117540@HGF9NIM01V> [InternalId=4269197496592, Hostname=HHF7EXSV02.wx1.hg.local] 1947 bytes in 0.118, 16.054 KB/sec Queued mail for delivery)
    Sep  1 17:20:02 HGF9NIM01V mail:crit sendmail[23265704]: My unqualified host name (HGF9NIM01V) unknown; sleeping for retry
    Sep  1 17:20:11 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E6621E61
    Sep  1 17:20:47 HGF9NIM01V daemon:notice last message repeated 4 times
    Sep  1 17:21:02 HGF9NIM01V mail:alert sendmail[23265704]: unable to qualify my own domain name (HGF9NIM01V) -- using short name
    Sep  1 17:21:18 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E661F211
    Sep  1 17:21:19 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E6621E61
    Sep  1 17:21:22 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E661F211
    Sep  1 17:21:23 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E6621E61
    Sep  1 17:21:26 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E661F211
    Sep  1 17:21:32 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E6621E61
    Sep  1 17:21:34 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E661F211
    Sep  1 17:21:48 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E6621E61
    Sep  1 17:21:51 HGF9NIM01V daemon:notice bootpd[10551768]: hardware address not found: D404E661F211
    Sep  1 17:22:53 HGF9NIM01V daemon:notice last message repeated 4 times

              
            



    ------------------------------
    bowen dai
    ------------------------------



  • 4.  RE: sendmail

    Posted Mon September 08, 2025 01:08 AM

    At Sep  1 17:19:10 it looks like a mail is relayed to your Exchange server.
    Check with the Exchange admin team if they added your AIX server's name or IP address to the list of hosts permitted to relay SMTP mail.



    ------------------------------
    Zaki Jääskeläinen
    ------------------------------



  • 5.  RE: sendmail

    Posted Mon September 08, 2025 09:51 AM
    Hi bowen,
    >Sep  1 17:19:10 mail:info sendmail[23265700]:  dsn=2.0.0, stat=Sent  Queued mail for delivery
     
    From the above log, dsn=2.0.0, stat=Sent means that the message was sent successfully, but since it is recorded as "Queued mail for delivery", it is still stored in the sending queue.
    This indicates that the message has not yet been completely delivered.
    >Sep  1 17:20:02 mail:crit sendmail[23265704]: My unqualified host name  unknown; sleeping for retry
    >Sep  1 17:21:02 mail:alert sendmail[23265704]: unable to qualify my own domain name  -- using short name
     
    If you see "Queued mail for delivery" followed by "sleeping for retry" in the log output, it's likely that the relay server is rejecting the email due to an unresolved sender hostname.
     
    If the sender server's hostname is inappropriate (e.g., a short hostname that is not an FQDN), the destination server may refuse to relay.
     
    In addition, a verify=FAIL log message is also output for STARTTLS. To troubleshoot the issue, first check that the AIX server entry is added to the list of hosts allowed to relay SMTP email on the Exchange relay server mentioned above, and also check the FQDN setting.
     
    Solution
    - Check DNS or the /etc/hosts file and add an entry so that the hostname and FQDN can be resolved.
     
     Example:
      HGF9NIM01V HGF9NIM01V.example.com
     
    - Check the Dj setting in the sendmail.cf file and specify the appropriate FQDN (domain name).
     Example:
      # my official domain name
      # ... define this only if sendmail cannot automatically determine your domain
      #Dj$w.Foo.COM
     
       DjHGF9NIM01V.example.com
     
    *Replace example.com with your fully qualified domain name (FQDN).
     
    Best regards,



    ------------------------------
    wataru nakanishi
    ------------------------------



  • 6.  RE: sendmail

    Posted Mon September 08, 2025 11:57 PM

    Thank you for your reply.

    May I configure "sender masquerading" for sendmail on AIX,and can it solve the problem of DNS?if yes,how configure the masquerading?

    Thanks a lot.



    ------------------------------
    bowen dai
    ------------------------------



  • 7.  RE: sendmail

    Posted Tue September 09, 2025 09:54 AM
    Hi Bowen,
     
    Configuring "sender masquerading" in Sendmail on AIX will display the sending host's name as an FQDN.
    However, sending masquerading alone may not resolve DNS issues.
    When the receiving server receives an email, it performs a reverse lookup of the sending server's IP address to verify that the correct FQDN is returned.
    If the reverse lookup is not configured correctly, the email may be considered spam and not delivered, depending on the receiving mail server's policy.
     
    When configuring this in the sendmail.mc configuration file, the following items apply:
     
     MASQUERADE_AS(`mydomain.com')dnl: Rewrites the domain name in the header.
     FEATURE(masquerade_envelope)dnl: Rewrites the domain name in the envelope information.
     MASQUERADE_DOMAIN(localhost)dnl: Apply rewriting only to the specified domain.
    Best regards,



    ------------------------------
    wataru nakanishi
    ------------------------------



  • 8.  RE: sendmail

    Posted Tue September 09, 2025 09:20 PM

    Due to it's not convenient to configure DNS resolution in the production environment. Can I configure the mailx service to send exchange group emails,just like redhat, or is there any better way?

    Thanks a lot.



    ------------------------------
    Bowen Dai
    ------------------------------



  • 9.  RE: sendmail

    Posted Wed September 10, 2025 08:32 AM
    Hi,
     
    It is possible to avoid using DNS on an AIX server.
    For example, to resolve names using host files on aix, to define relay servers (Exchange servers) with a static IP address.
     
    Please let me know the results of the email delivery status on the Exchange relay server side and the FQDN setting status of the AIX server.
     
    Best regards,



    ------------------------------
    wataru nakanishi
    ------------------------------



  • 10.  RE: sendmail

    Posted Wed September 17, 2025 06:54 AM

    You can, but it is not a recommended best practice.  There are many reasons for havinga correctly working DNS on a server - delivery of email being one of them.



    ------------------------------
    Phill Rowbottom
    Unix Consultant
    Service Express
    Bedford
    ------------------------------



  • 11.  RE: sendmail

    Posted Wed September 17, 2025 08:06 AM

    How can I configure with mailx service like redhat?configure file is /etc/mail.rc. But the AIX has not the configure file.

    thanks very much.



    ------------------------------
    Bowen Dai
    ------------------------------



  • 12.  RE: sendmail

    Posted Wed September 17, 2025 08:18 AM

    AIX and Red Hat utilise different email programs, thus the config is different.  AIX uses sendmail, Red Hat uses postfix.



    ------------------------------
    Phill Rowbottom
    Unix Consultant
    Service Express
    Bedford
    ------------------------------