sendmail - should be simple, but I don't get it.

Glaanieboy

OSNN Veteran Addict
Joined
6 Mar 2002
Messages
2,628
Alright, this should be simple to setup, but all the guides I have found are going too deep, to a point that I don't get it.
On my Windows box, I have setup PHP to forward mail to smtp.wanadoo.nl with From:glaanieboy@msn.com. But on my FreeBSD box, I see I have to use sendmail, but how? I don't want to create a SMTP server, I just want it to forward to a SMTP server. But so far all guides on sendmail I have found, talk about setting up a SMTP server. Can anyone help me and/or guide me in the good direction? Thanks.
 
in /etc/rc.conf

sendmail_enable="YES"

I think that would do it
 
Yes, it has been set to "yes", but when I haven't seen an option where I specify a smtp server and from: address. Where can I find that?
 
Woops, I see I forgot to point the php.ini file to the sendmail path:
[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail
The first two options enabled me in Windows to specify a smtp and mail from: address, but in Unix you can only point to a sendmail, which must have a similar function then (redirecting to a smtp with from: ), I guess.
 
First off, I dont know Sendmail or Qmail, or PosFIX etc.

Now that I got that out of the way, I believe that Sendmail is unnecessarily confusing and unintuitive to setup. From what I've read, unless you know sendmail, use qmail, its easier, again from what I've read. Also sendmail has some known securiity issues.
 
Yeah, maybe he can tell me how he setup the server OSNN is hosted on, I believe it runs on FreeBSD as well...
 
qMail Guide

then once that is in then change the sendmail_path to "/var/qmail/bin/qmail-inject"

I know the smtp settings are Win32 only, but does changing them have the right effect??
 
Cool, I see X-Istence wrote that guide, good to know I can go to him for help :) Thanks Geffy!
 
yep, its one of the most popular guides on that site
 
Unfortunately it doesn't cover how to redirect mail to an external smtp server :(. I have just tested out settings the Win32 settings, but they did not work :( Must I use an extra option in mail() in PHP? I now have this:
mail("glaanieboy@msn.com","Subject test","Body test");
 
Sendmail is basically a basic SMTP system. All it does is routes email form your machine to whatever email address you send it to. There may be a way to forward it to an SMTP, but why would you want to do that?

If you have a more advanced installation of Sendmail, try typing in

locate sendmail.cf

That is the normal config file for sendmail. It's usually located in /etc/mail
 
Well, my ISP has blocked port 25, wouldn't that block any SMTP server I set up? Or is port 25 only used for incoming requests?
 
25 is for connecting to a smtp server, afaik it should send out on a different port, but connecting to port 25 on another machine
 
So the blocking of port 25 won't affect me, as I would only use the SMTP to send out mails?
 
I believe so as ports below 1024 are reserved for server listening, not server transfer, I am pretty sure that the data is sent out on a port higher than 1024
 
Alright, qmail installed, thanks to the guidance of X-Istence, but I can't get it to work in PHP. Here are the current settings in [Mail functions] in the php.ini file:
[mail function]
; For Win32 only.
SMTP = smtp.wanadoo.nl

; For Win32 only.
sendmail_from = glaanieboy@msn.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = /usr/sbin/sendmail -t -i
Altough sendmail is not installed anymore, qmail is able to emulate it's functions and I created a symlink from /usr/bin/sendmail to the sendmail emulator in the qmail bin. I first tried Geffy's suggestion, that is setting the Win32 settings anyway, but that doesn't seem to work. Then I uncommented the [Unix] bit, adding the line you see in the quote, but that did not help either. What can I do? It's not in the test script, I just tested it in Windows and there it's working fine. qmail is up and running, so there must be a setting in qmail somewhere. For reference, I followed the guide about qmail found on bsdguides.org that X-Istence wrote (all but the Spam part, as I don't use it), is there a setting I missed? Or missing from the guide?
Again, all I want is a way of sending mail from the server, for use in php mail() functions. I don't need any new mailaddress, although I am tempted by the idea of having infinite mail addresses.I would rather just use the smtp server from my ISP, just like in Windows, but that seems hard under Unix.
 
Geffy said:
then once that is in then change the sendmail_path to "/var/qmail/bin/qmail-inject"
do that

btw you also need to remove the ; from the sendmail_path line as lines starting with ; are comments and so are ignored
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back