Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail delay, mailx, AIX and Exchange server

Status
Not open for further replies.

new2unix

Programmer
Feb 5, 2001
143
US
Hi,

Not sure the best forum to post my question so I am starting with the general section first.

We have an AIX server and a script to generate a text log file. At the end of the script we use the following command to send the file out via internet email address (for sake of example):

mailx -s $SUBJECT -c "user1@ourcompany.org,user2@ourcompany.org,user3@ourcompany.org" `cat $EMAIL_LIST ` < $IQ_STATUS

The $IQ_STATUS is the test file name and $EMAIL_LIST is just another text file containing several email address as distribution list.

Recently, we have begun to experience significant dealy from the time the log file email was supposedly generated to the time when users would receive this email in their Outlook box (we have the Exchange server here). At the same time, there is not other type of email delay noticeble.

I changed the script to send email out to individual user separately and it did help "most" of the time (see below). Meaning for the most part, the same email sent via the distribution list style would arrive much later (30-50 min) then email being sent with only one email address given to mailx.

mailx -s $SUBJECT user1@ourcompany.org < $IQ_STATUS
mailx -s $SUBJECT user2@ourcompany.org < $IQ_STATUS
mailx -s $SUBJECT user3@ourcompany.org < $IQ_STATUS

The server administrator suggested that we add "exchange" to the email address (see below) and that somehow had improved the speed of email received by users, but did not help much when the script sent out email via the distribution list style. The mailx with one user address would tend to arrive immediately.

mailx -s $SUBJECT user3@exchange.ourcompany.org < $IQ_STATUS

Is there anything wrong with the mailx code we have here or there maybe something going on between the AIX server and the exchange server?

Thanks,

Mike
 
The first thing I'd do is look at the full mail headers and examine the "Received-By" headers to see where it's getting held up.
 
Probably not the issue, but I don't seperate my addresses with commas. I just use spaces.

mailx -s $SUBJECT -c "user1@ourcompany.org user2@ourcompany.org user3@ourcompany.org" `cat $EMAIL_LIST ` < $IQ_STATUS

Code:
-c Address(es) Specifies the list of users to which a copy of the message is
sent. You can specify one or more addresses. When specifying more than one
address, the list of addresses must be in (" ") quotes.
 
Thanks, I looked at the header but not sure how to interpert it. It would seem the delay was between mypc.mycompany.org and mysmspc1.mycompany.ROOT.mycompany.ORG?


Received: from mypc.mycompany.org ([102.178.36.103]) by mysmspc1.mycompany.ROOT.mycompany.ORG with Microsoft SMTPSVC(6.0.3206.7824);
Thu, 13 Jan 2005 12:31:47 -0500
Received: (from myid45@localhost)
by mygate1.mycompany.org (AIX4.3/8.9.3/8.9.3) id LBB71713;
Thu, 13 Jan 2005 11:38:56 -0500
 
So, mygate1 is your AIX box and the mysmspc1 is the exchange server?

In that case, the mail is hanging on your AIX box, send mail, look at the output of "mailq" and see what the mail system has to say about the status of the outgoing messages.
 
Also, check if sendmail is running in daemon mode 'ps -augx | grep sendmail' otherwise it's probably running in 'runqueue' mode out of cron.
 
When I ran this command I did not get anything returned:

ps -augx | grep sendmail

Should I use some other ps argument?

Also tried mailq and the output said the queue is empty.


Thanks,

Mike
 
I'll put a couple of dollars on the hypothesis that sendmail is running out of cron. You need to trace an email through the system, though.

Send an email, look at the queue, wait for it to leave your AIX box, then look at the headers after it is received. Then check all your crontabs and look for sendmail.

This is all operating under the assumption that your AIX box is running sendmail, and not postfix, qmail or exim, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top