From: Brian Telford on
I'm fairly new to Linux, although well experienced with windows, I have set
up a server with Suse 10.2 running Apache and PHP5. I want to be able to
send email from php scripts. How do I configure sendmail to do this ( I
don't want the server to receive mail.) I've searched the web but just can't
find a simple description of how to configure sendmail?

Brian


From: birre on
On 2007-05-08 11:00, Brian Telford wrote:
> I'm fairly new to Linux, although well experienced with windows, I have set
> up a server with Suse 10.2 running Apache and PHP5. I want to be able to
> send email from php scripts. How do I configure sendmail to do this ( I
> don't want the server to receive mail.) I've searched the web but just can't
> find a simple description of how to configure sendmail?
>
> Brian
>
>

Well . "experienced with windows" will not help you here

Sendmail in suse is often postfix, but the command sendmail still
exist since many programs expect to find sendmail.

rpm -qf /usr/sbin/sendmail will show you the package.

But if you have a mail server, you must also accept or drop the bounces,
and read mail to postmaster(a)your.domain or you break the rules.

Or you must setup your ISP smtp server as relay, sending everything
non local to it, and use a valid sender address to a mailbox you own.

Anything else is abuse, something that experienced windows users are doing well.

The function in php is named mail()
and when you use it, you must provide headers and all, not only dump
the message.

You can get some examples from here:
http://se2.php.net/manual/en/ref.mail.php#73508

google for more.

/birre
From: David Bolt on
On Tue, 8 May 2007, Brian Telford wrote:-

>I'm fairly new to Linux, although well experienced with windows, I have set
>up a server with Suse 10.2 running Apache and PHP5. I want to be able to
>send email from php scripts.

I hope you're checking them closely to make sure they can't be
exploited. The last thing you're going to want is to put up a script
that is used to blast out 10,000 "make penis fast" spams.

>How do I configure sendmail to do this

What's to configure. Sendmail listens on localhost:25, scripts connect
to localhost:25 to send the mails. If they don't do that, there's always
the possibility that they could directly inject the mails into the mail
queue.

>( I
>don't want the server to receive mail.)

Not a problem. You'll find that on openSUSE, the mail server defaults
are to _not_ accept remote connections.


Regards,
David Bolt

--
Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/
RISCOS 3.11 | SUSE 10.0 32bit | SUSE 10.1 32bit | openSUSE 10.2 32bit
RISCOS 3.6 | SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit
TOS 4.02 | SUSE 9.3 32bit | | openSUSE 10.3a3 32bit
From: David Bolt on
On Tue, 8 May 2007, birre wrote:-

<snip>

>But if you have a mail server, you must also accept or drop the bounces,
^^^^^^
I'm guessing you mean reject during the SMTP transmission or, if the
server accepts the mail, and either deliver it locally or discard it.

>and read mail to postmaster(a)your.domain or you break the rules.

That's a part of the ISPs TOS[0], so should be no problem there.

>Or you must setup your ISP smtp server as relay,

Not a must. I've been handling my own mail for seven or eight years now,
and the only mails I send that pass through the my ISPs mail servers are
those sent to other users of my ISP. Everything else is delivered
directly.

>sending everything
>non local to it,

Or, have the local mail server do the delivery. There's (almost) no
reason to not do so yourself, especially if you have a static IP and a
correct rDNS.

>and use a valid sender address to a mailbox you own.

That's also a must.

>Anything else is abuse, something that experienced windows users are
>doing well.

Just one minor change and I'm in full agreement with that sentence:

s/experienced/almost all/


[0] Both Brian and myself share the same ISP and, TTBOMK, that has been
a clause in the TOS since day one.

Regards,
David Bolt

--
Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/
RISCOS 3.11 | SUSE 10.0 32bit | SUSE 10.1 32bit | openSUSE 10.2 32bit
RISCOS 3.6 | SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit
TOS 4.02 | SUSE 9.3 32bit | | openSUSE 10.3a3 32bit
From: Brian Telford on

"David Bolt" <blacklist-me(a)davjam.org> wrote in message
news:8C69L2GNNFQGFwUU(a)dev.null.davjam.org...
> On Tue, 8 May 2007, Brian Telford wrote:-
>
>>I'm fairly new to Linux, although well experienced with windows, I have
>>set
>>up a server with Suse 10.2 running Apache and PHP5. I want to be able to
>>send email from php scripts.
>
> I hope you're checking them closely to make sure they can't be
> exploited. The last thing you're going to want is to put up a script
> that is used to blast out 10,000 "make penis fast" spams.

The script is only available to restricted users and then they have no
access to any email settings.

>>How do I configure sendmail to do this
>
> What's to configure. Sendmail listens on localhost:25, scripts connect
> to localhost:25 to send the mails. If they don't do that, there's always
> the possibility that they could directly inject the mails into the mail
> queue.
>
>>( I
>>don't want the server to receive mail.)
>
> Not a problem. You'll find that on openSUSE, the mail server defaults
> are to _not_ accept remote connections.
>
>
How do I tell sendmail the outgoing mail server address? I've tried setting
the details in MTA via yast, but it doesn't work. I'm conversant with php
and the script works fine on a different server(not mine)


 |  Next  |  Last
Pages: 1 2
Prev: What sets up network interfaces?
Next: LFS errors