LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 05-16-2014, 08:49 AM   #1
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Rep: Reputation: 72
Unhappy AIX java sendmail inconsistent sending of email


Hello,

I really need everyone's help on this case which is driving me crazy for about a month now.

We have a process which send out emails, by 2 loops, one after the other:

Code:
MAILTO="email1@server.com email2@server.com"
for i in $MAILTO
do
java utils.SendMail $i /var/somefile /var/somelogfile -subject:"some subject"
done
for i in $MAILTO
do
java utils.SendMail $i /var/somefile /var/somelogfile -subject:"some subject"
done
When you add about 33 valid email addresses to the variable MAILTO, "some" emails are sent out, say for example, 32 recipients in the first loop, errors out on the 33rd, then errors out on ALL on the next loop.

Then I had the idea to let sendmail rest for some time, he might just be exhausted:

Code:
MAILTO="email1@server.com email2@server.com"
for i in $MAILTO
do
java utils.SendMail $i /var/somefile /var/somelogfile -subject:"some subject"
sleep 5
done
and wola, everything is sent out, no matter how many email addresses I add in the MAILTO variable.

The problem is, I am not that familiar with Java and Sendmail.

So, I have the following questions:
1. How can I possibly check the email sending rate limit for my user?
2. How does java know which user to use as the email sender?
3. Where should I look at the class file of util.SendMail

Thanks!
 
Old 05-18-2014, 05:54 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
I know beans about java...

However I ran an email server around the turn of the century that used sendmail on VAX, before I fled for happier hunting grounds like a bat outta hell.
Quote:
errors out on the 33rd, then errors out on ALL on the next loop.
Could you post those errors?

Quote:
1. How can I possibly check the email sending rate limit for my user?
Edit: The following is just a guess, please post the errors

Sendmail just dumps them into an outbound cue for processing and delivery, the problem you may have is the cue has a size limit (the could correspond roughly to, say...33 emails). Once you blow up that cue, all the mail get's routed to /DEV/NULL cause sendmail has no place else to put it.
What's probably happening is the first email hits the servers outbound cue and it takes it a couple of seconds to initiate the push out, by which time your java program blew the back off the cue and sendmail can only process the first 33.
Have only the first email wait 5 seconds before the second and see if you don't end up sending more emails as a result, though the fix is figure out what the maximum number of emails your java program is going to generate and adjust the outbound cue capacity a little above that.


Quote:
Then I had the idea to let sendmail rest for some time, he might just be exhausted:
Seriously? As many times as I called that sendmail server a cross-eyed biaaaaatch and now you tell me it's a dude? No wonder it didn't like me....

Last edited by dijetlo; 05-18-2014 at 06:09 PM.
 
Old 05-19-2014, 04:21 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Where this utils.SendMail is coming from?
 
  


Reply

Tags
aix, java, sendmail



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Use sendmail in Cacti to sending email trungmv Linux - Newbie 4 04-28-2012 02:22 AM
Sendmail - not sending email to outside. Blash Linux - Networking 2 05-03-2007 05:09 AM
sendmail not sending or receiving email kaplan71 Linux - Software 1 12-20-2005 08:26 AM
sending email from a script without sendmail tangle Linux - Networking 1 12-06-2005 01:32 AM
Automatic email sending with sendmail? Stingreen Linux - General 10 04-15-2002 02:55 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 12:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration