I added some points that how you can configure Sendmail client on HP-UX. Please check the step and apply changes to start Sendmail client on the HP-UX server. If you didn't change this configuration you 'll probably use the Sendmail server version. It's not recommended to use the Sendmail server on a production server.
Step 1:Add your mail server hosts file
#vi /etc/hosts 192.168.180.17 mail.domain.com.tr domainservermail
Step 2:Create a sendmail.cf file with send_only option
bash-4.2# cd /usr/newconfig/etc/mail/cf/cf bash-4.2# ./gen_cf ------------------------------------------------------------------------ Sendmail Configuration File generator : ------------------------------------------------------------------------ 1: General Features 2: Relay Options 3: Anti Spamming Options 4: Security Options 5: Generate sendmail.cf 6: Generate submit.cf 7: Verify permissions for the sendmail files 8: Correct permissions for the sendmail files 9: Create User and Queue for MSP 10: Help ------------------------------------------------------------------------ 0: Exit from selection ------------------------------------------------------------------------
Press "1" to define option that we need send_only
1 ------------------------------------------------------------------------ General Features ------------------------------------------------------------------------ 1. Delay checks 2: No default MSA 3: LDAP Routing 4: Mailertable 5: Genericstable 6: Domaintable 7: Virtusertable 8: Send only 9: Receive only 10: Queue Groups 11: Accept unresolvable domains 12: Accept unqualified senders ------------------------------------------------------------------------ 0: Main Menu ------------------------------------------------------------------------
Press "8" for "Send only"
------------------------------------------------------------------------ General Features ------------------------------------------------------------------------ 1. Delay checks 2: No default MSA 3: LDAP Routing 4: Mailertable 5: Genericstable 6: Domaintable 7: Virtusertable 8: Send only 9: Receive only 10: Queue Groups 11: Accept unresolvable domains 12: Accept unqualified senders ------------------------------------------------------------------------ 0: Main Menu ------------------------------------------------------------------------ 8 Options: send_only
Then Press "0" go back to generate sendmail.cfg screen.
0 ------------------------------------------------------------------------ Sendmail Configuration File generator : ------------------------------------------------------------------------ 1: General Features 2: Relay Options 3: Anti Spamming Options 4: Security Options 5: Generate sendmail.cf 6: Generate submit.cf 7: Verify permissions for the sendmail files 8: Correct permissions for the sendmail files 9: Create User and Queue for MSP 10: Help ------------------------------------------------------------------------ 0: Exit from selection ------------------------------------------------------------------------ 5
Press " 5 " to create sendmail.cfg file
------------------------------------------------------------------------ Sendmail Configuration File generator : ------------------------------------------------------------------------ 1: General Features 2: Relay Options 3: Anti Spamming Options 4: Security Options 5: Generate sendmail.cf 6: Generate submit.cf 7: Verify permissions for the sendmail files 8: Correct permissions for the sendmail files 9: Create User and Queue for MSP 10: Help ------------------------------------------------------------------------ 0: Exit from selection ------------------------------------------------------------------------ 5 The Selected Options are: send_only Do you want to continue and build the confuguration file Press any key to continue or [n/N] to unset all options Including send_only \nNote:\n To enable IPv6 support for the send_only feature, use the following entry for DaemonPortOptions in the /etc/mail/sendmail.cf file: O DaemonPortOptions=Name=MTA,Family=inet6, Addr=::1 If Sendmail is configured with MSP, use the following entry for MTAHost in the /etc/mail/submit.cf file: D{MTAHost}[127.0.0.1] to D{MTAHost}[::1] Building sendmail.cf.gen... bash-4.2#
Step 3:Create sendmail user and copy sendmail.cfg
#cp /usr/newconfig/etc/mail/cf/cf/sendmail.cf.gen /etc/mail/sendmail.cfg #useradd -d /var/spool/clientmqueue -m smmsp
Step 4:Add your mailserver information to sendmail.cfg
-Dj > define your domain
-DS >define your mailserver
#bash-4.2# cat /etc/mail/sendmail.cf|grep DS|grep -v '#' DSmail.domain.com.tr bash-4.2# bash-4.2# cat /etc/mail/sendmail.cf|grep Dj|grep -v '#' Dj$w.domain.com.tr bash-4.2#
Step 5: Edit sendmail daemon configuration for only send mail.
-It's important to define SENDMAIL_SENDONLY=1[
bash-4.2# cat /etc/rc.config.d/mailservs ######################################### # Mail configuration. See sendmail(1m) # # @(#) mailservs version 8.11 ######################################### # # BSD's popular message handling system # # SENDMAIL_SERVER: Set to 1 if this is a mail server and should # run the sendmail deamon. # SENDMAIL_SERVER_NAME: If this is not a mail server, but a client being # served by another system, then set this variable # to the name of the mail server system name so that # site hiding can be performed. # SENDMAIL_RECVONLY: If set to 1, then sendmail perform "receive only" # function. In other words, users are not allowed # to send mail from this domain or process the mail # queue. # SENDMAIL_SENDONLY: If set to 1, then sendmail perform "send only" # function. In other words, users are not allowed # to receive mails in this domain. # # # The priority(from high to low) set for the above mentioned flags # are in the order SENDMAIL_SERVER, SENDMAIL_SERVER_NAME, # SENDMAIL_RECVONLY, SENDMAIL_SENDONLY. # export SENDMAIL_SERVER=0 export SENDMAIL_SERVER_NAME= export SENDMAIL_RECVONLY=0 export SENDMAIL_SENDONLY=1
Step 6:Restart Sendmail Daemon
# /sbin/init.d/mail stop # /sbin/init.d/mail start