Hi, Here is my script to send out emails.
This script runs but i do not receive any email to my email address me@mycomp.com.
Can you please suggest how can i debug and fix the problem ?
---------- Post updated 04-25-17 at 02:47 AM ---------- Previous update was 04-24-17 at 05:07 PM ----------
Here is all of my troubleshooting.
mailx does not work as you can see below.
/var/adm/messages is empty ... there is no logging there.
Checking mail relay server in /etc/mail/submit.cf
Checking whether mail port (port 25) is listening. It indeed is.
The strange thing is that this server does send out emails which are set in crontab and does not when i m trying to manually run the crontab scripts.
Its more like intermittent behavior.
Important Note: A strange observation: while mailx command shown above does not work BUT the below mailx command works fine and WE do receive emails.
Can you please guide me to get this to work or debug the root cause ?
All of the above makes me believe there is something not write with our test.sh our code in the OP.
I further trimmed down my test.sh script as you see below.
But it still does not work
If someone can point that out ... it will be great.
Please suggest.
Last edited by mohtashims; 04-25-2017 at 05:21 AM..
The command:
works while the command:
hangs because the mailx command reads the text to be sent as the body of your message from standard input. When you type the second command above it is sitting there waiting for you to type in the text to be sent.
If you type in the text that you want to be the body of your message after entering the 2nd command above and then hit Ctl-D to terminate the message, the command should do what you seem to expect.
The command:
works while the command:
hangs because the mailx command reads the text to be sent as the body of your message from standard input. When you type the second command above it is sitting there waiting for you to type in the text to be sent.
If you type in the text that you want to be the body of your message after entering the 2nd command above and then hit Ctl-D to terminate the message, the command should do what you seem to expect.
True.. while i understand that > the main problem is with the OP test.sh script.
---------- Post updated at 09:40 AM ---------- Previous update was at 05:22 AM ----------
I got the line causing the email to fail and not showup in my inbox.
I changed this line test.sh From
to
and now it works.
Can you tell me why is this line print "From: Prod@`hostname`.mycomp.com"FAILS to send out emails and what is the FIX ??
Last edited by mohtashims; 04-25-2017 at 06:00 PM..
Hi All,
Sorry, for the double posting. Don't know how to move to a different forum.
I am very new to Unix. I have a test server running FreeBSD 10.1 and SendMail 8.14.9.
I need to filter incoming emails based on the sender's email address or domain and forward them to another address on a... (1 Reply)
I have a longstanding issue on my CentOS 5.6 VM where I am unable to send email from my PHP application.
This is the last bunch of lines from my /var/log/maillog file.
Feb 14 10:29:16 dev53 sendmail: s1EATEEo004637: Authentication-Warning: www.craig.dev-crmpicco.lan: apache set sender to... (2 Replies)
Hi everyone,
I'm trying to send an email on unix using sendmail command. For setting the priority to high I use:
X-Priority: 1
And it works on HP but when I tried it on AIX the email is sent but no priority!!
Anyone can help me
Thanks in advance,
Hiposh (3 Replies)
Hi ,
I'm using sendmail command to send a email.
To send a email sendmail taking 3minutes to complete the process.
Is there any configuration needs to be done in server or another solution is there to resolve this issue.
Thanks in Advance.
Regards
Latika (1 Reply)
Hi,
Can anyone kindly provide some information about how to populate the subject field of the email while using the sendmail utility ? Itried the following command line argument :
echo -e "Body of the email" | /usr/lib/sendmail -f from@from.com -t to@to.com -s " Subject of the email"
... (4 Replies)
I need to reconfigure Sendmail to strip the SMTP email addresses from all email and replace them with a single address used for testing purposes.
I have a vended application hosted on Solaris 10 servers. I have access to support the application framework (IBM WebShere Application Server 6.1),... (1 Reply)
I have several HP/UX nodes running Sendmail 8.13 ...some work fine, some don't.
When an Email is coming in, the 'DATA' command never ends. The other side of the connection gets to the point where it enters the '.' on a line by itself, but sendmail doesn't accept it...if fact it keeps on holding... (8 Replies)
Hi All
• Regarding installing sendmail pkg in server, I tried to install the pkg but getting the below errors as shown below - any idea on this?
• But I have successfully installed sendmail-cf pkg in the server box
• But that is not sufficient we also need to install sendmail pkg
• Help is... (2 Replies)
Hi
A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as
" usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)