LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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, 11:17 AM   #1
captain_sensible
Member
 
Registered: Apr 2010
Posts: 72

Rep: Reputation: 0
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 11:18 AM.
 
Old 02-07-2013, 01:33 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,952

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
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, 12:46 PM   #3
captain_sensible
Member
 
Registered: Apr 2010
Posts: 72

Original Poster
Rep: Reputation: 0
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, 04:55 PM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,952

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
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


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


All times are GMT -5. The time now is 04:52 PM.

Main Menu
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