LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-05-2013, 10:17 AM   #1
captain_sensible
Member
 
Registered: Apr 2010
Posts: 352

Rep: Reputation: 145Reputation: 145
php mailer, xampp ,sendmail on slackware14


I just want to ask is postfix easier to configure than sendmail.Looking in the system, sendmail is already installed as part of full install packages.

A have a simple php script which I use on my hosted web site, its basically a feedback form and the details get sent to my own email. It works fine on a web hosting site.

However I use XAMPP installed at /opt which I use as my testing/development environment . Basically i want to be able to test out my php mailer scripts using XAMPP running on local host; instead of keep having to load them to my web.

. I did a lot of googling and most posts(mostly about windows) seem to suggest I need to edit php.ini and sendmail.ini

I can not find sendmail.ini only files such as sendmail.cf (this says don't touch it)located /etc/mail

I edited php.ini (located at /opt/lampp/etc/php.ini)


to :

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = me@example.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path

;i uncomented next line and added path to sendmail
sendmail_path = /usr/sbin/sendmail -t -i

Looking in /var/log/maillog I got :

Feb 5 08:38:49 darkstar sendmail[3408]: r15Kcn4v003408: to=captin_sensible@gmail.com, ctladdr=nobody (99/99), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30226, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
\

Is there a fairly simple fix to the above ; how simple is postfix going to be?


cheers

Last edited by captain_sensible; 02-05-2013 at 10:18 AM.
 
Old 02-07-2013, 12:33 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Feb 5 08:38:49 darkstar sendmail[3408]: r15Kcn4v003408: to=captin_sensible@gmail.com, ctladdr=nobody (99/99), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30226, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Are you sure sendmail is running? Check by running:
Code:
ps -ef|grep sendmail
If it's not, check if /etc/rc.d/rc.sendmail is executable and then run:
Code:
/etc/rc.d/rc.sendmail start
Regards
 
Old 02-08-2013, 11:46 AM   #3
captain_sensible
Member
 
Registered: Apr 2010
Posts: 352

Original Poster
Rep: Reputation: 145Reputation: 145
no it dawned on me as I manually started up xampp with /opt/lampp/lampp start , i nearly kicked myself!

From there I decided to first try emailing from a command line to see if that worked, then if it did use that application from php.ini

which mail gives :
bash-4.2$ which mail
/usr/bin/mail

and which sendmail gives
bash-4.2$ which sendmail
/usr/bin/sendmail
bash-4.2$

it did this and on $mail ,was told there was a message in var/spool/mail/andrew

I guess the relevant section being:

----- Transcript of session follows -----
... while talking to gmail-smtp-in.l.google.com.:
>>> DATA
<<< 550-5.7.1 [176.248.5.40] The IP you're using to send mail is not authorized to
<<< 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
<<< 550-5.7.1 service provider instead. Learn more at
<<< 550 5.7.1 http://support.google.com/mail/bin/a...y?answer=10336 r10si10195621wjx.198 - gsmtp
554 5.0.0 Service unavailable


As an email client I use thunderbird, and this sends and receives emails no problem, so if I can get mail or sendmail working(whats the difference?) as well as thunderbird then I should be able to sort out email from a php script in xampp. could I use thunderbird in anyway ?I know its a gui based but must have underlying fuctionality, instead of
sendmail_path = /usr/sbin/sendmail -t -i

could I invoke thunderbird?
 
Old 02-08-2013, 03:55 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,
Quote:
<<< 550-5.7.1 [176.248.5.40] The IP you're using to send mail is not authorized to
<<< 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
<<< 550-5.7.1 service provider instead. Learn more at
<<< 550 5.7.1 http://support.google.com/mail/bin/a...y?answer=10336 r10si10195621wjx.198 - gsmtp
554 5.0.0 Service unavailable
That means that you box sent mail out to gmail, but it was rejected because google does not like your IP (FYI 176.248.5.40 is listed in some RBL datavases )


Quote:
As an email client I use thunderbird, and this sends and receives emails no problem, so if I can get mail or sendmail working(whats the difference?) as well as thunderbird then I should be able to sort out email from a php script in xampp. could I use thunderbird in anyway ?
The difference is that mail is a client (like thunderbird, but it's running from CLI), while sendmail is a server. And I don't think it's reasonable to use thunderbird from a php script to send out mail.
 
  


Reply



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
Sendmail - No local mailer defined. unclejessie77 Linux - Software 7 06-13-2012 07:50 AM
Ubuntu, XAMPP Server, PHP and sendmail issues tkokkinos Linux - Server 3 01-10-2011 12:27 PM
sendmail bulk mailer hockeyman_102 Linux - Software 5 07-28-2008 12:33 PM
about sendmail -mailer daemon. romeo_tango Linux - Server 1 01-21-2008 04:44 AM
sendmail local mailer problem kafnir Linux - Networking 1 06-28-2004 06:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:25 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
Open Source Consulting | Domain Registration