• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

#1
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.
 
#3
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?
 
#4
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.
 

j79zlr

Glaanies script monkey
Political User
#5
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.
 
#9
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??
 
#12
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");
 

Reg

eXperienced!
#13
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
 
#15
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
 
#17
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
 
#19
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.
 
#20
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

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,962
Messages
673,240
Members
89,015
Latest member
loxioalix