Page 1 of 1

The required SMPT server ?

Posted: Sat Dec 13, 2008 1:58 am
by geddi
Hi,
I read on the docs that I need to an SMPT server available

This is what you wrote:

"The SMTP connection is probably the most heavily used connection, and almost certainly the most consistent and portable. This connection opens up a socket with TCP and speaks “SMTP” to a remote SMTP server. You need to have a SMTP server which is capable of relaying mail from the domain of your web server for this to work. Some hosts provide a SMTP server for you as part of your package. "

Now I have a dedicated server and am running Webmin and VirtualMin Pro to manage it.

Under servers, I have these listed:

AWstats Reporting
Apache Webserver
BIND DNS Server

Dovecot IMAP/POP3 Server
Postfix Mail Server
Sendmail Mail Server
Read User Mail

Procmail Mail Filter
SpamAssassin Mail Filter
Virtualmin Mailman Mailing Lists

MySQL Database Server
PostgreSQL Database Server
ProFTPD Server
SSH Server
Squid Proxy Server
Virtualmin Subversion Repositories
Virtualmin Virtual Servers
Webalizer Logfile Analysis

So I have four servers that are to do with mail, but from this can you tell if I have the required SMPT server ?

If I do why does it not list it as "SMPT server" ?

Thanks for your help.

Re: The required SMPT server ?

Posted: Sat Dec 13, 2008 2:06 am
by geddi
If I do have the SMPT server on my erm ... server
the I guess that I should use:

require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";

//Connect to localhost on port 25
$swift =& new Swift(new Swift_Connection_SMTP("localhost"));

to connect to it/use it ?

As you can tell I am a bit new to this :?

Thanks

Re: The required SMPT server ?

Posted: Sat Dec 13, 2008 2:28 am
by Chris Corbyn
Did you try it? ;)

It looks like you'll need to use sendmail based on the details you copied and pasted, but connecting to localhost may work.

Re: The required SMPT server ?

Posted: Sat Dec 13, 2008 3:05 am
by geddi
When you say:
It looks like you'll need to use sendmail
Does that mean that I can NOT swift, and I should use sendmail instead ?

OR

Do I use swift in conjuction with sendmail?

(I understood that swift does NOT use sendmail but directly uses the SMPT)

But doesn't sendmail ALSO use SMPT ?
soooo - I must have SMPT ?

Well I am new to this so if you can clarify what you meant, that would be great :)

Re: The required SMPT server ?

Posted: Sat Dec 13, 2008 4:38 am
by Chris Corbyn
Swift can do both, that's why there are different connection types. See the SendmailConnection ;)

But seriously, try connecting to localhost first... it'll either work or it won't.

Re: The required SMPT server ?

Posted: Sat Dec 13, 2008 5:05 am
by geddi
OK I am going try using the localhost method

I contacted my server provider and they sent me this message.

message 1:
Postfix is the SMTP server on your system. Configure it to connect to localhost on port 25, and everything should be fine. Local connections do not need to authenticate.

message 2:
Actually, I should mention that my previous comment assumes you have a system installed using our automated installer (install.sh). If you installed Virtualmin manually, you may have used any of four mail servers (Postfix, qmail, Sendmail, or exim). But, in pretty much all cases, assuming your mail server is correctly configured, you would configure any local clients to connect in the same way (SWIFT is no different than any other SMTP client).
--------------

Does this make sense to you?

I am going check the Postfix config. to connect to localhost on port 25,

Hope thats ok
Then I'll start testing. :)

Re: The required SMPT server ?

Posted: Sat Dec 13, 2008 5:08 am
by Chris Corbyn
Yep, sounds like all you need to know is "localhost" port 25.

Re: The required SMPT server ?

Posted: Sat Dec 13, 2008 7:19 am
by geddi
On my dedicated server, I have about 20 virtual servers.

I would like to allow all these virtual servers to be able to use Swift to send emails but
I don want to have 20 different copies of the swift directory under each of the virtual servers home directory.

Do you know where I should place the Swif dir. and if I need to configure Swift so that it is available to all the virtual servers?

Thanks

Re: The required SMPT server ?

Posted: Sat Dec 13, 2008 7:22 am
by Chris Corbyn
geddi wrote:On my dedicated server, I have about 20 virtual servers.

I would like to allow all these virtual servers to be able to use Swift to send emails but
I don want to have 20 different copies of the swift directory under each of the virtual servers home directory.

Do you know where I should place the Swif dir. and if I need to configure Swift so that it is available to all the virtual servers?

Thanks
This is unrelated to Swift itself, but the only way to do that sort of thing generally is to use a shared filesystem on the host machine (i.e. on your dedicated server) and mount that filesystem on each VPS.

Re: The required SMPT server ?

Posted: Sat Dec 13, 2008 9:05 am
by geddi
I just had another read in your documentation for Swift.

It says:
Upload the lib directory via FTP or whatever facility your web host provides to upload files and rename it if you desire to do so. Swift does not need to be inside the web root, but it does need to be in a location which you are able to refer to in your PHP scripts which will use it (i.e. PHP needs to be able to see it, but your end-users don’t).


So it looks like I just need a directory that the php will definitely see

I also have been looking at the File Manager via Webmin
and the php.ini file ...
...
It looks like if I put the swift library directory
under the /usr/lib
then it should be found by php and work ok.

So I will have :

/usr/lib/swift

Sound ok ?

Re: The required SMPT server ?

Posted: Sat Dec 13, 2008 6:24 pm
by Chris Corbyn
Sure :) Did you try it? I don't know anything about your server setup ;)