LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 09:49 AM   #1
ilesterg
Member
 
Registered: Jul 2012
Location: Philippines
Distribution: CentOS, Oracle Linux, AIX
Posts: 354

Rep: Reputation: 46
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, 06:54 PM   #2
dijetlo
Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Slackware Current 64bit Multi-Lib/RHEL
Posts: 743

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 07:09 PM.
 
Old 05-19-2014, 05:21 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,942

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


Reply

Tags
aix, java, sendmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:22 AM
Sendmail - not sending email to outside. Blash Linux - Networking 2 05-03-2007 06:09 AM
sendmail not sending or receiving email kaplan71 Linux - Software 1 12-20-2005 09:26 AM
sending email from a script without sendmail tangle Linux - Networking 1 12-06-2005 02:32 AM
Automatic email sending with sendmail? Stingreen Linux - General 10 04-15-2002 03:55 PM


All times are GMT -5. The time now is 11:53 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration