last day (14 days later) » 

9:19 AM
0
A: Mail sending with shell Scipt is not working

tripleeeYour fundamental problem is that you must use proper quoting. This is basically a duplicate of a question which gets asked here every day. Without quotes, the second token in $SUBJECT is interpreted as the address to send to. An email is submitted for delivery to mail (the second word in "Tes...

 
No change in the output. :(
 
What's in /var/spool/mail/jaykay? I'm guessing you are getting a bounce message or automatic response for some other reason, and that the bounce message tells you why.
 
yea, right..i will update that file also.
 
Guessing the -r option is erroneous, I can't find any documentation for it. Did you mean -f?
 
am in new with this shell script. :(
 
9:19 AM
It worked. You sent the email to yourself.
 
But from and to are different, and the mail is not delivering.
 
The address you put in -r is apparently your own, and so you get a copy in your inbox
deliverability problems on the MTA level cannot be diagnosed without access to mail logs
I'm guessing you have the messages spooled locally but really, this is no longer a programming question
on proper sendmail systems, mailq would display your pending outgoing mail queue
 
so what should i can do?
 
SMTP is store and forward so that means the local sendmail will hold the messages and reattempt delivery for a few days, then send you a bounce message if it was not able to connect to the recipient's server
you can run mailq and see if there are outgoing messages which could not be delivered, and try to find out why
if this is on your personal computer, the answer is trivial -- your ISP does not want you to send SMTP mail, so it blocks it on the firewall
the workaround is to use your ISP's mail server
but if you are within a company network, talk to your company mail admin
 
oh... i thought it was related with my code.
but actually, this automation is simply testing whether it is working or not.
 
9:25 AM
as far as we can tell from the diagnostics you have provided, it is working
but
we'd need to properly understand which address(es) are local and/or your own
 
yea...i got the point..
 
so is pinky.paulose yours and local?
 
mine is Jini.Johny and i need to send it to Pinky.Paulose
from : Jini, to :Pinky
 
well, the delivered message is "To: Jini" so you seem to have these mixed up
e7021.com is not your real domain name it seems
 
is it bounced because of undeliverable domain?
 
9:30 AM
it didn't bounce, it was delivered, apparently to jini.johny but potentially to others as well
the Received: header looks like several of these are aliased locally but without access to the mail server configs, this is pure speculation
 
that means, by log we are getting the idea that, it is delivered to me..right?
 
bounce messages look like "the attached message was undeliverable because bla bla bla 4.2.1"
 
but it is not receiving in my inbox
 
/var/spool/mail/jaykay is your inbox
 
but...
it is a local directory....
 
9:33 AM
if you have read access to /var/log/mail.log (or something like that) you can see what the mail server did with it
 
yea i have the access
 
looks like you would expect it to be delivered somewhere else (like an IMAP account maybe?) but we have no idea whether that exists and if so, who configured it and how
this is how traditional email on Unix works -- your inbox is /var/spool/mail/<you>
 
ohh.....i have expected it in a different way..
its my mistake
 
is this on your own personal box? did you configure sendmail?
on Debian you would set it up as a "satellite" to the mail SMTP server and then probably things will start working more like you expect them to
 
i hope that, if we are sending to something@gmail.com , according to my expectation, it will reach there on something@gmail.com :)
 
9:37 AM
but I would strongly advise against sendmail if you don't have particular reasons to prefer it
maybe switch to postfix
testing against a local mailbox changes many things, if you want to deliver to gmail, test delivery to gmail
there are many things that can go wrong with that as well but they are quite different
one of the things to beware of is that gmail will throttle you if you send many identical messages
or otherwise behave like a spammer
 
yea.....actually, as i mentioned in question, this is just for checking whether the mail is sending.
then i can automate the releases.
 
asking again: are these local addresses you are testing with?
did you configure sendmail yourself?
 
yea
its configured
till now, i have used grails
 
so you have jini.johny set up as a local alias which points to jaykay (your local user account)?
 
and the application is in pure grails framework
yes..
 
9:41 AM
right. so what you tested worked.
after you fixed the quoting
 
in grails, sending a mail is directly reaching the inbox itself.
its looks like
 
which is where?
 
/home/jaykay/dead.letter... Saved message in /home/jaykay/dead.letter
 
that's not your inbox, that's a failed message you tried to send
 
yea....this is happening while sending with shell script
 
9:45 AM
16
Q: What does dead.letter files do

Maciej PiechotkaI find dead.letter files from time to time in my $HOME directory. What they are for?

I'm afraid I'll have to go now. You have not been answering my follow-up questions and it's still not clear what you are trying to accomplish. Good luck with your project.
 
i was checking the /var/logs
anyway, thanks for the support.. :)
 

last day (14 days later) »