php-general Digest 15 Jan 2011 17:57:14 -0000 Issue 7134
Topics (messages 310777 through 310786):
Re: which php file is sending emails?
310777 by: Nilesh Govindarajan
310782 by: Jim Lucas
310783 by: Nilesh Govindarajan
310785 by: Daniel Brown
310786 by: tedd
Re: Rewriting string
310778 by: Evil Son
310784 by: David McGlone
lists, email, 1 each
310779 by: kbailey.howlermonkey.net
310780 by: Daniel Brown
310781 by: Judson Vaughn
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
On 01/15/2011 06:21 AM, Mesut GULNAZ wrote:
is it possible to see which php file(s) is/are sending emails on my server
by php.ini or with any other way?
coz i have a server and i have many domains and subdomains. on my smtp
systems i saw that many random mails are being sent from www server which
has RELAY permission. I know i must not give RELAY (i can use SMTP-AUTH) but
some kind of issues i have to give it.
so i have to find the domain or subdomain and the file or files which send
this emails.
how can i solve this issue?
my system ise freebsd.
thanks...
grep -l mail $(find -name *.php)
There can be nothing more simpler than this!!!
Seriously man, you need to revise your sysadmin skills!
--
Regards,
Nilesh Govindarajan
Facebook: http://www.facebook.com/nilesh.gr
Twitter: http://twitter.com/nileshgr
Website: http://www.itech7.com
--- End Message ---
--- Begin Message ---
On 1/14/2011 9:53 PM, Nilesh Govindarajan wrote:
> On 01/15/2011 06:21 AM, Mesut GULNAZ wrote:
>> is it possible to see which php file(s) is/are sending emails on my server
>> by php.ini or with any other way?
>>
>> coz i have a server and i have many domains and subdomains. on my smtp
>> systems i saw that many random mails are being sent from www server which
>> has RELAY permission. I know i must not give RELAY (i can use SMTP-AUTH) but
>> some kind of issues i have to give it.
>>
>> so i have to find the domain or subdomain and the file or files which send
>> this emails.
>>
>> how can i solve this issue?
>>
>> my system ise freebsd.
>>
>> thanks...
>>
>
> grep -l mail $(find -name *.php)
> There can be nothing more simpler than this!!!
> Seriously man, you need to revise your sysadmin skills!
>
Um, I use OpenBSD and that command gives me an error or two...
$ grep -l mail $(find -name *.php)
find: unknown option -- n
find: unknown option -- a
find: unknown option -- m
find: unknown option -- e
formmail.php
$ grep -l mail $(find ./ -name "*.php")
Output a big long list of files...
Jim Lucas
--- End Message ---
--- Begin Message ---
On 01/15/2011 10:22 PM, Jim Lucas wrote:
Um, I use OpenBSD and that command gives me an error or two...
$ grep -l mail $(find -name *.php)
find: unknown option -- n
find: unknown option -- a
find: unknown option -- m
find: unknown option -- e
formmail.php
$ grep -l mail $(find ./ -name "*.php")
Output a big long list of files...
So the second one is right.
--
Regards,
Nilesh Govindarajan
Facebook: http://www.facebook.com/nilesh.gr
Twitter: http://twitter.com/nileshgr
Website: http://www.itech7.com
--- End Message ---
--- Begin Message ---
On Sat, Jan 15, 2011 at 12:21, Nilesh Govindarajan <[email protected]> wrote:
> On 01/15/2011 10:22 PM, Jim Lucas wrote:
>>
>> Um, I use OpenBSD and that command gives me an error or two...
>>
>> $ grep -l mail $(find -name *.php)
>> find: unknown option -- n
>> find: unknown option -- a
>> find: unknown option -- m
>> find: unknown option -- e
>> formmail.php
>>
>> $ grep -l mail $(find ./ -name "*.php")
>> Output a big long list of files...
>
> So the second one is right.
His point was in the irony --- you sent a rather insulting message
to the OP suggesting he needs to "revise [his] sysadmin skills,"
whereas your own example was broken. Probably just a typo, but
something worth a second thought for next time.
--
</Daniel P. Brown>
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/
--- End Message ---
--- Begin Message ---
At 11:23 AM +0530 1/15/11, Nilesh Govindarajan wrote:
On 01/15/2011 06:21 AM, Mesut GULNAZ wrote:
is it possible to see which php file(s) is/are sending emails on my server
by php.ini or with any other way?
coz i have a server and i have many domains and subdomains. on my smtp
systems i saw that many random mails are being sent from www server which
has RELAY permission. I know i must not give RELAY (i can use SMTP-AUTH) but
some kind of issues i have to give it.
so i have to find the domain or subdomain and the file or files which send
this emails.
how can i solve this issue?
my system ise freebsd.
thanks...
grep -l mail $(find -name *.php)
There can be nothing more simpler than this!!!
Seriously man, you need to revise your sysadmin skills!
--
Regards,
Nilesh Govindarajan
Hey count me in that ignorant group.
My sysadmin skills must really suck because I would not have thought
of that. Instead, I would have used my editor to look globally for
"mail" appearing in my code. But I'm pretty simple.
Cheers,
tedd
--
-------
http://sperling.com/
--- End Message ---
--- Begin Message ---
On Sat, Jan 15, 2011 at 10:20 AM, David McGlone <[email protected]> wrote:
> On Thursday, January 13, 2011 12:45:30 pm Nathan Rixham wrote:
>> ...
>> $categorys = array('home', 'services', 'gallery', 'about_us',
>> 'contact_us', 'testimonials');
>> foreach($categorys as $category) {
>> $temp = str_replace("_", " ", $category);
>> $_GET['page'] != $category && $temp = '<a href="index.php?page='.
>> $category .'">'.$replace.'</a>';
>> echo "<li>{$temp}</li>" . PHP_EOL;
>> }
>
> Nathan, thanks for showing me this. I understand the code, except I don't
> understand how you got by without using a conditional (if/else). If it were
> me, I would have written it like:
> ...
The logical operators are lazy i.e. for "&&", if the expression on the
left is true, then and only then is the right part evaluated. So $temp
is only modified if
$_GET['page'] != $category is true.
Either way, you get the same answer, vis a vis if the left is false,
the "&&" must be false, so no need to evaluate the right side.
This idiom is common in shell scripts and is called among other
things: "short cut or short circuit evaluation"
> My questions are, is this wrong? is it amaturish?
Not in other languages, I doubt in PHP.
--
Regards
Evil Son
--- End Message ---
--- Begin Message ---
On Saturday, January 15, 2011 07:36:33 am Evil Son wrote:
> On Sat, Jan 15, 2011 at 10:20 AM, David McGlone <[email protected]> wrote:
> > On Thursday, January 13, 2011 12:45:30 pm Nathan Rixham wrote:
> >> ...
> >> $categorys = array('home', 'services', 'gallery', 'about_us',
> >> 'contact_us', 'testimonials');
> >> foreach($categorys as $category) {
> >> $temp = str_replace("_", " ", $category);
> >> $_GET['page'] != $category && $temp = '<a href="index.php?page='.
> >> $category .'">'.$replace.'</a>';
> >> echo "<li>{$temp}</li>" . PHP_EOL;
> >> }
> >
> > Nathan, thanks for showing me this. I understand the code, except I don't
> > understand how you got by without using a conditional (if/else). If it
> > were me, I would have written it like:
> > ...
>
> The logical operators are lazy i.e. for "&&", if the expression on the
> left is true, then and only then is the right part evaluated. So $temp
> is only modified if
> $_GET['page'] != $category is true.
>
> Either way, you get the same answer, vis a vis if the left is false,
> the "&&" must be false, so no need to evaluate the right side.
>
> This idiom is common in shell scripts and is called among other
> things: "short cut or short circuit evaluation"
Thank you. It's all clear to me now. :-)
>
> > My questions are, is this wrong? is it amaturish?
>
> Not in other languages, I doubt in PHP.
My skills must be improving :-)
--
Blessings
David M.
--- End Message ---
--- Begin Message ---
ok, my site uses the Cpanel. Cpanel does NOT like creating forwarding
aliases with multiple TO address'. I want to make a bone butt simple
list using a php script, and this must accept a file with 2 email
address' in it. Any advice?
--- End Message ---
--- Begin Message ---
On Sat, Jan 15, 2011 at 10:58, <[email protected]> wrote:
> ok, my site uses the Cpanel. Cpanel does NOT like creating forwarding
> aliases with multiple TO address'. I want to make a bone butt simple list
> using a php script, and this must accept a file with 2 email address' in it.
> Any advice?
cPanel does multiple forwarders. Just add one, then another with
the same local name but a different destination. With that in mind,
do you still need a list to handle the mail?
--
</Daniel P. Brown>
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/
--- End Message ---
--- Begin Message ---
What about sending the one-recipient message to a php script that would forward
the message to as many addresses as you specify?
Not very elegant but a fast fix.
Jud
Sent from my iPad
Jud at bizville.com
Phone 703-303-4271
On Jan 15, 2011, at 10:58 AM, [email protected] wrote:
> ok, my site uses the Cpanel. Cpanel does NOT like creating forwarding aliases
> with multiple TO address'. I want to make a bone butt simple list using a php
> script, and this must accept a file with 2 email address' in it. Any advice?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---