Sponsored Content
Operating Systems Linux Unable to send email with sendmail from PHP 5.3 on CentOS VM Post 302888406 by crmpicco on Friday 14th of February 2014 06:23:30 AM
Old 02-14-2014
Unable to send email with sendmail from PHP 5.3 on CentOS VM

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.

Code:
Feb 14 10:29:16 dev53 sendmail[4637]: s1EATEEo004637: Authentication-Warning: www.craig.dev-crmpicco.lan: apache set sender to client.care@crmpicco.co.uk using -f
Feb 14 10:29:16 dev53 sendmail[4637]: s1EATEEo004637: from=client.care@crmpicco.co.uk, size=11017, class=0, nrcpts=0, msgid=<1392373753.d4a897919a124958e699170b2b1dc8f2@PHPMAILSERVER>, relay=apache@localhost
Feb 14 10:29:16 dev53 sendmail[5119]: s1EATG5R005119: Authentication-Warning: www.craig.dev-crmpicco.lan: apache set sender to client.care@crmpicco.co.uk using -f
Feb 14 10:29:16 dev53 sendmail[5119]: s1EATG5R005119: from=client.care@crmpicco.co.uk, size=9507, class=0, nrcpts=1, msgid=<1392373756.8e5e15c4e6d09c8333a17843461041a9@PHPMAILSERVER>, relay=apache@localhost
Feb 14 10:29:16 dev53 sendmail[5135]: s1EATGpY005135: from=<client.care@crmpicco.co.uk>, size=9684, class=0, nrcpts=1, msgid=<1392373756.8e5e15c4e6d09c8333a17843461041a9@PHPMAILSERVER>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Feb 14 10:29:16 dev53 sendmail[5119]: s1EATG5R005119: to=cmorton@crmpicco.co.uk, ctladdr=client.care@crmpicco.co.uk (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=39507, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s1EATGpY005135 Message accepted for delivery)
Feb 14 10:29:18 dev53 sendmail[5199]: s1EATGpY005135: to=<cmorton@crmpicco.co.uk>, delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=129684, relay=smx1.crmpiccov3.co.uk. [217.158.143.122], dsn=5.7.1, stat=User unknown
Feb 14 10:29:18 dev53 sendmail[5199]: s1EATGpY005135: s1EATIpY005199: DSN: User unknown
Feb 14 10:29:18 dev53 sendmail[5199]: s1EATIpY005199: to=<client.care@crmpicco.co.uk>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=40917, relay=smx1.crmpiccov3.co.uk. [217.158.143.122], dsn=5.7.1, stat=User unknown
Feb 14 10:29:18 dev53 sendmail[5199]: s1EATIpY005199: s1EATIpZ005199: return to sender: User unknown
Feb 14 10:29:18 dev53 sendmail[5199]: s1EATIpZ005199: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=41941, dsn=2.0.0, stat=Sent

I know for certain that the issue is not with the PHP code as the exact same code works in the office, however when WFH (on a seperate VM with the same code) I am unable to send emails.

I am trying to establish if this is because of my sendmail setup, IP whitelisting at the mail server end or hosts file setup or anything like that?

Note: I have masked the true name of the domain for security reasons for this post.

Last edited by Don Cragun; 02-14-2014 at 08:06 AM.. Reason: Change QUOTE tags to CODE tags.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

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)
Discussion started by: Vetrivela
2 Replies

2. Shell Programming and Scripting

unable to send an email attachment

i know its pretty repeated query, but i need to post it in this new thread coz i need it urgently uuencode /var/tmp/chandra/emaillist.txt emaillist.txt | mail -s "message with encoded attachment" am unable to send the attachment emaillist.txt present in the path /var/tmp/chandra/ Is... (11 Replies)
Discussion started by: cmaroju
11 Replies

3. Solaris

Unable to send email to the outside world

Hi all, Iam unable to send mail from my unix machine(solaris x86,version 5.10) to the outside world. I can able to access the internet,but not able to send to any yahoo or company email id. Before posting this,i have searched this forum many times,but could not get the results what i... (5 Replies)
Discussion started by: jayaprakash
5 Replies

4. Shell Programming and Scripting

Unable to populate subject field of the email while using sendmail

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)
Discussion started by: sdiptanil
4 Replies

5. Debian

sendmail taking too much time to send a email

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)
Discussion started by: latika
1 Replies

6. Linux

Sendmail takes too long to start and the host is unable to send emails

Hello All, Sendmail takes too long to start and the host is unable to send emails, below are the steps followed, Please let me know if I'm missing anything, is there a debug mode for mailx? # time service sendmail restart Shutting down sm-client: Shutting... (6 Replies)
Discussion started by: lovesaikrishna
6 Replies

7. UNIX for Advanced & Expert Users

Unable to send the email in formatted way

Legends, I have following entries in /tmp/a.txt file GAP Ric XEOJ181477500.W Flag2 5 Sym XEO1418J775-E msg SEQ_NO:159 db:5 diff 154 process msg GAP Ric XEOJ181400.W Flag2 19 Sym XE418J815-E msg SEQ_NO:101 db:5 diff 96 process msg GAP Ric XEOJ18140.W Flag2 18 Sym XEO18J855-E msg SEQ_NO:88... (21 Replies)
Discussion started by: sdosanjh
21 Replies

8. Shell Programming and Scripting

Shell scripting unable to send the sql query data in table in body of email

I have written a shell script that calls below sql file. It is not sending the query data in table in the body of email. spool table_update.html; SELECT * FROM PROCESS_LOG_STATS where process = 'ActivateSubscription'; spool off; exit; Please use code tags next time for your code and data.... (9 Replies)
Discussion started by: Sharanakumar
9 Replies

9. Programming

Unable to send email using Java in Linux

Hi All, We recently moved to Red Hat Enterprise Linux Server release 6.6 from Solaris 10. The existing Java code to send emails in Solaris is public class card_cardMessenger{ /** * Send an e-mail message via the Runtime class * @see Runtime * @return boolean (success or failure of... (1 Reply)
Discussion started by: Meghan2525
1 Replies

10. Shell Programming and Scripting

Unable to recieve email using sendmail

Hi, Here is my script to send out emails. #!/bin/ksh { print "From: Prod@`hostname`.mycomp.com" print "To: me@mycomp.com" print "MIME-Version: 1.0" print "Content-Type: text/html" print "Subject: Usage Report" print "" print... (2 Replies)
Discussion started by: mohtashims
2 Replies
etrn(1M)						  System Administration Commands						  etrn(1M)

NAME
etrn - start mail queue run SYNOPSIS
etrn [-b] [-v] server-host [client-hosts] DESCRIPTION
SMTP's ETRN command allows an SMTP client and server to interact, giving the server an opportunity to start the processing of its queues for messages to go to a given host. This is meant to be used in start-up conditions, as well as for mail nodes that have transient connec- tions to their service providers. The etrn utility initiates an SMTP session with the host server-host and sends one or more ETRN commands as follows: If no client-hosts are specified, etrn looks up every host name for which sendmail(1M) accepts email and, for each name, sends an ETRN command with that name as the argument. If any client-hosts are specified, etrn uses each of these as arguments for successive ETRN commands. OPTIONS
The following options are supported: -b System boot special case. Make sure localhost is accepting SMTP connections before initiating the SMTP session with server-host. This option is useful because it prevents race conditions between sendmail(1M) accepting connections and server-host attempting to deliver queued mail. This check is performed automatically if no client-hosts are specified. -v The normal mode of operation for etrn is to do all of its work silently. The -v option makes it verbose, which causes etrn to display its conversations with the remote SMTP server. ENVIRONMENT VARIABLES
No environment variables are used. However, at system start-up, svc:/network/smtp:sendmail reads /etc/default/sendmail. In this file, if the variable ETRN_HOSTS is set, svc:/network/smtp:sendmail parses this variable and invokes etrn appropriately. ETRN_HOSTS should be of the form: "s1:c1.1,c1.2 s2:c2.1 s3:c3.1,c3.2,c3.3" That is, white-space separated groups of server:client where client can be one or more comma-separated names. The :client part is optional. server is the name of the server to prod; a mail queue run is requested for each client name. This is comparable to running: /usr/lib/sendmail -qR client on the host server. EXAMPLES
Example 1 Using etrn Inserting the line: ETRN_HOSTS="s1.domain.com:clnt.domain.com s2.domain.com:clnt.domain.com" in /etc/default/sendmail results in svc:/network/smtp:sendmail invoking etrn such that ETRN commands are sent to both s1.domain.com and s2.domain.com, with both having clnt.domain.com as the ETRN argument. The line: ETRN_HOSTS="server.domain.com:client1.domain.com,client2.domain.com" results in two ETRN commands being sent to server.domain.com, one with the argument client1.domain.com, the other with the argument client2.domain.com. The line: ETRN_HOSTS="server1.domain.com server2.domain.com" results in set of a ETRN commands being sent to both server1.domain.com and server2.domain.com; each set contains one ETRN command for each host name for which sendmail(1M) accepts email, with that host name as the argument. FILES
/etc/mail/sendmail.cf sendmail configuration file /etc/default/sendmail Variables used by svc:/network/smtp:sendmail ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsndmu | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
sendmail(1M), attributes(5) RFC 1985 NOTES
Not all SMTP servers support ETRN. SunOS 5.11 10 Aug 2004 etrn(1M)
All times are GMT -4. The time now is 01:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy