Community Discussions and Support
help/advice needed

well what am i supposed to use???

One way is to create a GMail account for just the purpose of sending mail via MercuryC. 

right, so you're saying i need this to help prevent my outgoing emails

being identified as spam. i was confused before because i thought you

meant i need it for sending local mail (by which, to be clear, i mean

mail destined for example to user1@localhost, which mercury should

stick into a test mailbox on the same system).

since mercury is relaying the message through my gmail account, is what

you suggested really necessary?

 I think so.  Have you looked at the headers on the messages you are sending.  The Mercury/32 server is going to identify itself in these headers for each message sent through this host. 

since merc is just essentially (afaik)

logging into the gmail account and giving gmail a message to send, why

should the real original destination matter? i mean i use thunderbird

to send mail from my computer all the time, that's essentially doing

exactly the same thing merc is doing here, and there's no problem with

mail being identified as spam there...

Not really, mail sent via T-bird is being send directly to the ISPs SMTP host for processing.  Mail sent by your application (or T-bird) via MercuryS is being processed via MercuryS and queued, Mercury core and queued and MercuryC.   Each process is adding a Recieved line to the message.

Here's the headers put on by Peter's Mercury/32 server for the message I got from the comunity server.  The web process is sending the mail via MercuryS.  If you are using "localhost" as both the name of the system and the domain then it will show at least 3 times in the message.  If you are forwarding mail from ma local user there can be many more instances.

 Received: from Spooler by mail.praktit.se (Mercury/32 v4.62) ID MO0003BA;
 10 Jul 2008 01:16:31 +0200
Received: from spooler by mail.praktit.se (Mercury/32 v4.62);
 10 Jul 2008 01:16:26 +0200
Received: from web2 (192.168.1.20) by mail.praktit.se (Mercury/32 v4.62) with
 ESMTP ID MG0003B4; 10 Jul 2008 01:16:22 +0200

 This message was first received by MercuryS and queued as MG0003B4, then processed by core and queued as MO00003BA and finally taken from the queue by MercuryE for delivery to my server.

 

<blockquote><p> well what am i supposed to use??? </p></blockquote><p>One way is to create a GMail account for just the purpose of sending mail via MercuryC.  </p><blockquote><p>right, so you're saying i need this to help prevent my outgoing emails being identified as spam. i was confused before because i thought you meant i need it for sending local mail (by which, to be clear, i mean mail destined for example to user1@localhost, which mercury should stick into a test mailbox on the same system). since mercury is relaying the message through my gmail account, is what you suggested really necessary? </p></blockquote><p> I think so.  Have you looked at the headers on the messages you are sending.  The Mercury/32 server is going to identify itself in these headers for each message sent through this host.  </p><blockquote><p>since merc is just essentially (afaik) logging into the gmail account and giving gmail a message to send, why should the real original destination matter? i mean i use thunderbird to send mail from my computer all the time, that's essentially doing exactly the same thing merc is doing here, and there's no problem with mail being identified as spam there... </p></blockquote><p>Not really, mail sent via T-bird is being send directly to the ISPs SMTP host for processing.  Mail sent by your application (or T-bird) via MercuryS is being processed via MercuryS and queued, Mercury core and queued and MercuryC.   Each process is adding a Recieved line to the message.</p><p>Here's the headers put on by Peter's Mercury/32 server for the message I got from the comunity server.  The web process is sending the mail via MercuryS.  If you are using "localhost" as both the name of the system and the domain then it will show at least 3 times in the message.  If you are forwarding mail from ma local user there can be many more instances. </p><p> Received: from Spooler by mail.praktit.se (Mercury/32 v4.62) ID MO0003BA;  10 Jul 2008 01:16:31 +0200 Received: from spooler by mail.praktit.se (Mercury/32 v4.62);  10 Jul 2008 01:16:26 +0200 Received: from web2 (192.168.1.20) by mail.praktit.se (Mercury/32 v4.62) with  ESMTP ID MG0003B4; 10 Jul 2008 01:16:22 +0200  This message was first received by MercuryS and queued as MG0003B4, then processed by core and queued as MO00003BA and finally taken from the queue by MercuryE for delivery to my server. </p><p> </p>

i've finally got fed up of not being able to use php's mail() function in my developer setup on my laptop (win xp pro sp3). i've been googling for a coupe of days, but i'm not 100% on what i need and how to set it up. i've settled on mercury because it seems to be pretty popular. i've tried setting it up but it's not working and i'm a little lost though...

what i need:


1) to simply be able to use php's mail() function


2) be able to send email to real addresses


3) possibly be able to work in a sort of offline mode - setup localhost mailboxes i can send email to, for when i have no internet connection. though i don't fancy having to setup such accounts in thunderbird, is there an easier way...pmail?...


4) i do not want the mail server to be accessible from the internet (no need, for security), but i do want it to be able to send messages to real addresses, like i said above


5) i'm not sure i have a preference as to whether the messages will be sent directly, or passed on to my gmail account to be sent on. i'd probably prefer not to have to give mercury my gmail password, but would sacrifice that if it's a better option. which do most other developers prefer in this situation?

what i've done:


1) installed mercury, selected just mercuryE


2) setup php.ini smtp settings to localhost, port 25


3) setup my firewall to allow all connections out from mercury, and only connections in from 127.0.0.1 (i don't want or need people connecting to the mail server from the net)


4) setup my php script to send from admin@localhost


5) set mercuries dns setting to 92.31.242.20,92.31.292.21

what's happening:


mail() doesn;t report any errors, seems to be passing the messages on to mercury successfully. murcury seems to then attempt to send the message a few seconds later. i never receive the email. i've also tried the file > send mail message option and still don't receive anything.

what do you think? is mercuryE everything i need? would the smtp relay version be better for me? how about sending mail to localhost mailboxes? what do you think might be the problem with receiving emails (what details do you require?)?

i've finally got fed up of not being able to use php's mail() function in my developer setup on my laptop (win xp pro sp3). i've been googling for a coupe of days, but i'm not 100% on what i need and how to set it up. i've settled on mercury because it seems to be pretty popular. i've tried setting it up but it's not working and i'm a little lost though... <p>what i need: 1) to simply be able to use php's mail() function 2) be able to send email to real addresses 3) possibly be able to work in a sort of offline mode - setup localhost mailboxes i can send email to, for when i have no internet connection. though i don't fancy having to setup such accounts in thunderbird, is there an easier way...pmail?... 4) i do not want the mail server to be accessible from the internet (no need, for security), but i do want it to be able to send messages to real addresses, like i said above 5) i'm not sure i have a preference as to whether the messages will be sent directly, or passed on to my gmail account to be sent on. i'd probably prefer not to have to give mercury my gmail password, but would sacrifice that if it's a better option. which do most other developers prefer in this situation?</p> <p>what i've done: 1) installed mercury, selected just mercuryE 2) setup php.ini smtp settings to localhost, port 25 3) setup my firewall to allow all connections out from mercury, and only connections in from 127.0.0.1 (i don't want or need people connecting to the mail server from the net) 4) setup my php script to send from admin@localhost 5) set mercuries dns setting to 92.31.242.20,92.31.292.21</p> <p>what's happening: mail() doesn;t report any errors, seems to be passing the messages on to mercury successfully. murcury seems to then attempt to send the message a few seconds later. i never receive the email. i've also tried the file > send mail message option and still don't receive anything.</p> <p>what do you think? is mercuryE everything i need? would the smtp relay version be better for me? how about sending mail to localhost mailboxes? what do you think might be the problem with receiving emails (what details do you require?)?</p>

1.    Turn on session logging in MercuryS to see how the mail is being received.

2.   Checkout the domains setup in Mercury core.  To receive mail as user@localhost you need a domain setup for this domain.

3.   Turn on session logging in MercuryE as well.  This will let you know how the receiving server handles the mail.  FWIW, if you do not have a fixed IP address I'd strongly recommend you use MercuryC via a relay host to send mail.

4.    Examine the logs.  Check out how Mercury/32 is processing the mail?

 


 

<p>1.    Turn on session logging in MercuryS to see how the mail is being received.</p><p>2.   Checkout the domains setup in Mercury core.  To receive mail as user@localhost you need a domain setup for this domain.</p><p>3.   Turn on session logging in MercuryE as well.  This will let you know how the receiving server handles the mail.  FWIW, if you do not have a fixed IP address I'd strongly recommend you use MercuryC via a relay host to send mail.</p><p>4.    Examine the logs.  Check out how Mercury/32 is processing the mail?</p><p> </p><p>  </p>

You need mercS, as that is the SMTP server module that will receive your mail from PHP.

[quote]

murcury seems to then attempt to send the message a few seconds later

[/quote]

[:O]

In the mercS config, set interface to 127.0.0.1 so it wont listen to the inet interface.

With mercE some servers will reject the connection if you are on a dynamic IP  so if this is an issue you should use mercC instead and pass the mail to a smarthost.

You will also need to setup the local domains section of the core module, (with 'localhost' at least, although you will have trouble delivering mail from anyone@localhost to anywhere outside)

WHEN  YOU ARE SURE that mercS is NOT OPEN TO THE WORLD you can turn off the relaying controls so you can send using any address you wish. (Your smarthost may have restrictions though so YMMV).

 

<p>You need mercS, as that is the SMTP server module that will receive your mail from PHP.</p><p>[quote]</p><p>murcury seems to then attempt to send the message a few seconds later</p><p>[/quote]</p><p>[:O]</p><p>In the mercS config, set interface to 127.0.0.1 so it wont listen to the inet interface.</p><p>With mercE some servers will reject the connection if you are on a dynamic IP  so if this is an issue you should use mercC instead and pass the mail to a smarthost.</p><p>You will also need to setup the local domains section of the core module, (with 'localhost' at least, although you will have trouble delivering mail from anyone@localhost to anywhere outside) </p><p>WHEN  YOU ARE SURE that mercS is NOT OPEN TO THE WORLD you can turn off the relaying controls so you can send using any address you wish. (Your smarthost may have restrictions though so YMMV). </p><p> </p>

i turned on loging as suggested, and also set the interface of mercS to 127.0.0.1

the log for CORE is:

O 20080707 2353 MG000001 postmaster@localhost           me@aol.com        246
E 20080707 2353 MO001310 postmaster@localhost           Notification discarded - potential loop.
I 20080707 2353 MG001311 postmaster@localhost           Admin                          1210

the log for MERCURYE is:

T 20080707 235333 48729e1d Begin processing job MO001310 from postmaster@localhost
T 20080707 235334 48729e1d Established ESMTP connection to 64.12.138.153
E 20080707 235335 48729e1d 501 SYNTAX ERROR IN PARAMETERS OR ARGUMENTS
T 20080707 235335 48729e1d Connection closed normally.
T 20080707 235335 48729e1d Job MO001310 processing complete.

i've do have a dynamic ip so i'll try to get mercC setup...

edit: oh, in merc core, for local domains, i have one entry: local host or server = localhost; internet name = localhost

<p>i turned on loging as suggested, and also set the interface of mercS to 127.0.0.1</p> <p>the log for CORE is:</p> <p>O 20080707 2353 MG000001 postmaster@localhost           me@aol.com        246 E 20080707 2353 MO001310 postmaster@localhost           Notification discarded - potential loop. I 20080707 2353 MG001311 postmaster@localhost           Admin                          1210</p> <p>the log for MERCURYE is:</p> <p>T 20080707 235333 48729e1d Begin processing job MO001310 from postmaster@localhost T 20080707 235334 48729e1d Established ESMTP connection to 64.12.138.153 E 20080707 235335 48729e1d 501 SYNTAX ERROR IN PARAMETERS OR ARGUMENTS T 20080707 235335 48729e1d Connection closed normally. T 20080707 235335 48729e1d Job MO001310 processing complete. </p> <p>i've do have a dynamic ip so i'll try to get mercC setup...</p><p>edit: oh, in merc core, for local domains, i have one entry: local host or server = localhost; internet name = localhost </p>

Looks like the domains are not correct.  Show us what you have in the mercury.ini for the [Domains] section.

 it should look something like:

 

[Domains]

server : server
server : localhost

And FWIW a lot of servers will block on the user@localhost since the MAIL FROM: address is supposed to be a valid domain. 

<p>Looks like the domains are not correct.  Show us what you have in the mercury.ini for the [Domains] section.</p><p> it should look something like:</p><p> </p><p>[Domains]</p><p>server : server server : localhost</p><p>And FWIW a lot of servers will block on the user@localhost since the MAIL FROM: address is supposed to be a valid domain. </p>

the domains section looks like:

[Domains]
localhost: localhost

should i change it?

 

i switched from mercE to mercC last night, and have now successfully sent an email from within merc itself to both an aol address, and a gmail address. when i sent them i changed the from address from postmaster@loalhost to a second gmail address i have (the same one merc is setup to use).

i have changed the php script to use a gmail address for the from field (i believe thats what you meant i should do) (set it to the same address that merc is set to use). however, when trying to send an email from the script it failed with the following error: "Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry.". Is that gmail.com or merc giving me that error? why do you think it's occuring?

could that error simply be due to the headers i'm using, here's the relevant php code that assembles the email:

function sendEmail($to, $from=ADMIN_EMAIL, $subject, $message)
{
//Note, need to expand this function to allow for attachments / html alternative text

// Secure input from mail injection
$from = urldecode($from); //removes '%0A' to prevent multiple headers being inserted

// Parse input
$subject = nl2br($subject); //remove new lines which can cause send failure, convert them to br tags
$subject = str_replace('
', '', $subject);
$subject = str_replace('
', '', $subject);
$message = wordwrap($message, 70); //no more than 70 characters per line apparently

// Create unique message ID
$messageID = time() . rand(1,1000) . "@{$_SERVER['SERVER_NAME']}";

// Common Headers
// - NOTE: last header line should not have \r\n !!!
$headers = "From: $from\r\n";
$headers .= "Date: " . date('r') . "\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "Return-Path: $from\r\n";
$headers .= "Message-ID: <$messageID>\r\n"; //Helps avoid spam filters
$headers .= "X-Mailer: PHP v" . phpversion() . "\r\n"; //Helps avoid spam filters
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/plain; charset=UTF-8; format=flowed\r\n";
$headers .= "Content-Transfer-Encoding: 7bit";
// - NOTE: last header line should not have \r\n !!!

// Force the 'from' address to be used!
@ini_set('sendmail_from', $from);

if (mail($to, $subject, $message, $headers))
{
//debug('E-mail sent!');
$result = true;

} else {

debug('Failed to send E-mail!');
$result = false;
}

@ini_restore('sendmail_from');

return $result;
}


btw, i noticed that merc stores my password in the ini file unencrypted, is that really necessary? it concerns me a little!

&lt;p&gt;the domains section looks like:&lt;/p&gt; &lt;p&gt;[Domains] localhost: localhost&lt;/p&gt; &lt;p&gt;should i change it?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;i switched from mercE to mercC last night, and have now successfully sent an email from within merc itself to both an aol address, and a gmail address. when i sent them i changed the from address from postmaster@loalhost to a second gmail address i have (the same one merc is setup to use).&lt;/p&gt; &lt;p&gt;i have changed the php script to use a gmail address for the from field (i believe thats what you meant i should do) (set it to the same address that merc is set to use). however, when trying to send an email from the script it failed with the following error: &lt;b&gt;&quot;&lt;/b&gt;Warning: mail() [&lt;a href=&quot;http://localhost/02%20ap_pdms/00%20releases/12%20-%20working%20current/function.mail&quot; mce_href=&quot;http://localhost/02%20ap_pdms/00%20releases/12%20-%20working%20current/function.mail&quot;&gt;function.mail&lt;/a&gt;]: SMTP server response: 553 We do not relay non-local mail, sorry.&quot;. Is that gmail.com or merc giving me that error? why do you think it&#039;s occuring?&lt;/p&gt; &lt;p&gt;could that error simply be due to the headers i&#039;m using, here&#039;s the relevant php code that assembles the email: &lt;/p&gt; &lt;pre&gt;function sendEmail($to, $from=ADMIN_EMAIL, $subject, $message) { //Note, need to expand this function to allow for attachments / html alternative text // Secure input from mail injection $from = urldecode($from); //removes &#039;%0A&#039; to prevent multiple headers being inserted // Parse input $subject = nl2br($subject); //remove new lines which can cause send failure, convert them to br tags $subject = str_replace(&#039; &#039;, &#039;&#039;, $subject); $subject = str_replace(&#039; &#039;, &#039;&#039;, $subject); $message = wordwrap($message, 70); //no more than 70 characters per line apparently // Create unique message ID $messageID = time() . rand(1,1000) . &quot;@{$_SERVER[&#039;SERVER_NAME&#039;]}&quot;; // Common Headers // - NOTE: last header line should not have \r\n !!! $headers = &quot;From: $from\r\n&quot;; $headers .= &quot;Date: &quot; . date(&#039;r&#039;) . &quot;\r\n&quot;; $headers .= &quot;Reply-To: $from\r\n&quot;; $headers .= &quot;Return-Path: $from\r\n&quot;; $headers .= &quot;Message-ID: &amp;lt;$messageID&amp;gt;\r\n&quot;; //Helps avoid spam filters $headers .= &quot;X-Mailer: PHP v&quot; . phpversion() . &quot;\r\n&quot;; //Helps avoid spam filters $headers .= &quot;MIME-Version: 1.0\r\n&quot;; $headers .= &quot;Content-Type: text/plain; charset=UTF-8; format=flowed\r\n&quot;; $headers .= &quot;Content-Transfer-Encoding: 7bit&quot;; // - NOTE: last header line should not have \r\n !!! // Force the &#039;from&#039; address to be used! @ini_set(&#039;sendmail_from&#039;, $from); if (mail($to, $subject, $message, $headers)) { //debug(&#039;E-mail sent!&#039;); $result = true; } else { debug(&#039;Failed to send E-mail!&#039;); $result = false; } @ini_restore(&#039;sendmail_from&#039;); return $result; }&lt;/pre&gt; &lt;p&gt;btw, i noticed that merc stores my password in the ini file unencrypted, is that really necessary? it concerns me a little!&lt;/p&gt;

[quote user="theblazingangel"]

the domains section looks like:

[Domains]
localhost: localhost

should i change it?

 It's not how I would do it but it should work as long as a user@localhost address never is sent outside as either the MAIL FROM: or RCPT TO: address.


 

i switched from mercE to mercC last night, and have now successfully sent an email from within merc itself to both an aol address, and a gmail address. when i sent them i changed the from address from postmaster@loalhost to a second gmail address i have (the same one merc is setup to use).

i have changed the php script to use a gmail address for the from field (i believe thats what you meant i should do) (set it to the same address that merc is set to use). however, when trying to send an email from the script it failed with the following error: "Warning: mail() [function.mail]: SMTP server response: 553 We do not relay non-local mail, sorry.". Is that gmail.com or merc giving me that error? why do you think it's occuring?

You are trying to relay off a server that is set to not allow relaying. That is the RCPT TO: address is not local to the receiving server.  You can turn this off in MercuryS since you said you are blocking all access except from localhost.

 David has setup to use CRAM-MD5 and I know that SquirrelMail can use this means of authentication via PHP.

 

could that error simply be due to the headers i'm using, here's the relevant php code that assembles the email:

function sendEmail($to, $from=ADMIN_EMAIL, $subject, $message)
{
//Note, need to expand this function to allow for attachments / html alternative text

// Secure input from mail injection
$from = urldecode($from); //removes '%0A' to prevent multiple headers being inserted

// Parse input
$subject = nl2br($subject); //remove new lines which can cause send failure, convert them to br tags
$subject = str_replace('
', '', $subject);
$subject = str_replace('
', '', $subject);
$message = wordwrap($message, 70); //no more than 70 characters per line apparently

// Create unique message ID
$messageID = time() . rand(1,1000) . "@{$_SERVER['SERVER_NAME']}";

// Common Headers
// - NOTE: last header line should not have \r\n !!!
$headers = "From: $from\r\n";
$headers .= "Date: " . date('r') . "\r\n";
$headers .= "Reply-To: $from\r\n";
$headers .= "Return-Path: $from\r\n";
$headers .= "Message-ID: <$messageID>\r\n"; //Helps avoid spam filters
$headers .= "X-Mailer: PHP v" . phpversion() . "\r\n"; //Helps avoid spam filters
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/plain; charset=UTF-8; format=flowed\r\n";
$headers .= "Content-Transfer-Encoding: 7bit";
// - NOTE: last header line should not have \r\n !!!

// Force the 'from' address to be used!
@ini_set('sendmail_from', $from);

if (mail($to, $subject, $message, $headers))
{
//debug('E-mail sent!');
$result = true;

} else {

debug('Failed to send E-mail!');
$result = false;
}

@ini_restore('sendmail_from');

return $result;
}


btw, i noticed that merc stores my password in the ini file unencrypted, is that really necessary? it concerns me a little!

 

I'm not sure what you are talking about.  Where is this stored unencrypted in an ini file?

 

[/quote]

[quote user=&quot;theblazingangel&quot;]&lt;p&gt;the domains section looks like:&lt;/p&gt; &lt;p&gt;[Domains] localhost: localhost&lt;/p&gt; &lt;p&gt;should i change it?&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;&amp;nbsp;It&#039;s not how I would do it but it should work as long as a user@localhost address never is sent outside as either the MAIL FROM: or RCPT TO: address.&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt; &amp;nbsp;&lt;/p&gt; &lt;p&gt;i switched from mercE to mercC last night, and have now successfully sent an email from within merc itself to both an aol address, and a gmail address. when i sent them i changed the from address from postmaster@loalhost to a second gmail address i have (the same one merc is setup to use).&lt;/p&gt; &lt;p&gt;i have changed the php script to use a gmail address for the from field (i believe thats what you meant i should do) (set it to the same address that merc is set to use). however, when trying to send an email from the script it failed with the following error: &lt;b&gt;&quot;&lt;/b&gt;Warning: mail() [&lt;a href=&quot;http://localhost/02%20ap_pdms/00%20releases/12%20-%20working%20current/function.mail&quot; mce_href=&quot;http://localhost/02%20ap_pdms/00%20releases/12%20-%20working%20current/function.mail&quot;&gt;function.mail&lt;/a&gt;]: SMTP server response: 553 We do not relay non-local mail, sorry.&quot;. Is that gmail.com or merc giving me that error? why do you think it&#039;s occuring?&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;i&gt;You are trying to relay off a server that is set to not allow relaying. That is the RCPT TO: address is not local to the receiving server.&amp;nbsp; You can turn this off in MercuryS since you said you are blocking all access except from localhost.&lt;/i&gt; &lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;&amp;nbsp;David has setup to use CRAM-MD5 and I know that SquirrelMail can use this means of authentication via PHP.&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;could that error simply be due to the headers i&#039;m using, here&#039;s the relevant php code that assembles the email: &lt;/p&gt; &lt;pre&gt;function sendEmail($to, $from=ADMIN_EMAIL, $subject, $message) { //Note, need to expand this function to allow for attachments / html alternative text // Secure input from mail injection $from = urldecode($from); //removes &#039;%0A&#039; to prevent multiple headers being inserted // Parse input $subject = nl2br($subject); //remove new lines which can cause send failure, convert them to br tags $subject = str_replace(&#039; &#039;, &#039;&#039;, $subject); $subject = str_replace(&#039; &#039;, &#039;&#039;, $subject); $message = wordwrap($message, 70); //no more than 70 characters per line apparently // Create unique message ID $messageID = time() . rand(1,1000) . &quot;@{$_SERVER[&#039;SERVER_NAME&#039;]}&quot;; // Common Headers // - NOTE: last header line should not have \r\n !!! $headers = &quot;From: $from\r\n&quot;; $headers .= &quot;Date: &quot; . date(&#039;r&#039;) . &quot;\r\n&quot;; $headers .= &quot;Reply-To: $from\r\n&quot;; $headers .= &quot;Return-Path: $from\r\n&quot;; $headers .= &quot;Message-ID: &amp;lt;$messageID&amp;gt;\r\n&quot;; //Helps avoid spam filters $headers .= &quot;X-Mailer: PHP v&quot; . phpversion() . &quot;\r\n&quot;; //Helps avoid spam filters $headers .= &quot;MIME-Version: 1.0\r\n&quot;; $headers .= &quot;Content-Type: text/plain; charset=UTF-8; format=flowed\r\n&quot;; $headers .= &quot;Content-Transfer-Encoding: 7bit&quot;; // - NOTE: last header line should not have \r\n !!! // Force the &#039;from&#039; address to be used! @ini_set(&#039;sendmail_from&#039;, $from); if (mail($to, $subject, $message, $headers)) { //debug(&#039;E-mail sent!&#039;); $result = true; } else { debug(&#039;Failed to send E-mail!&#039;); $result = false; } @ini_restore(&#039;sendmail_from&#039;); return $result; }&lt;/pre&gt; &lt;p&gt;btw, i noticed that merc stores my password in the ini file unencrypted, is that really necessary? it concerns me a little!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;I&#039;m not sure what you are talking about.&amp;nbsp; Where is this stored unencrypted in an ini file?&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[/quote]&lt;/p&gt;

I would be a bit stricter than Thomas and say that "localhost" never should be used as part of any address or domain declaration in Mercury. If you have a reasonable hostname for your computer use that and the local IP in the domains section.

Instead of using MercuryC it would perhaps be simpler to use your ISPs SMTP server directly in your php script?

/Rolf 

 
 

&lt;p&gt;I would be a bit stricter than Thomas and say that &quot;localhost&quot; never should be used as part of any address or domain declaration in Mercury. If you have a reasonable hostname for your computer use that and the local IP in the domains section.&lt;/p&gt;&lt;p&gt;Instead of using MercuryC it would perhaps be simpler to use your ISPs SMTP server directly in your php script?&lt;/p&gt;&lt;p&gt;/Rolf&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;/p&gt;

[quote user="Thomas R. Stephenson"]It's not how I would do it but it should work as long as a user@localhost address never is sent outside as either the MAIL FROM: or RCPT TO: address.[/quote]

I don't have a clue how to set it, the only thing i've done here is remove a second entry that was exactly the same as the first, appart from that, this is the result of the installer... (i do remember specifying 'localhost' during that)

[quote user="Thomas R. Stephenson"]You are trying to relay off a server that is set to not allow relaying. That is the RCPT TO: address is not local to the receiving server.  You can turn this off in MercuryS since you said you are blocking all access except from localhost.[/quote]

i presume you mean to tell me that the error i was seeing was from mercury, and not gmail/aol.


i have since gone to configuration > mercuryS smtp server > connection control, and i 1) unchecked the "do not permit smtp replaying of non local mail" option, and 2) used the 'add restriction button', entering 127.0.0.1 as the address, and checking the first and third options (allow replaying, and autoenable session logging).


after doing this, i have managed to new get my php script to send mail out to me :)

[quote user="Thomas R. Stephenson"]I'm not sure what you are talking about.  Where is this stored unencrypted in an ini file?[/quote]

mercury.ini > [MercuryC] > SMTP_Password

 

do you think i need to possibly fiddle around with anything else for security or anything. should i attach my mercury.ini file here so you can check everything?

now i've got mail going out, how about setting things up for when i need to work without an internet connection...


1) what do i need to do to setup some @localhost accounts to receive the mail, and


2) how can i then access that mail. as i mentioned above i'd prefer not to have to create accounts in thunderbird for this; not because it's hard to do, more because i don't want to clutter it up, and because i'm hoping there's an easier way. what are my options?

&lt;p&gt;[quote user=&quot;Thomas R. Stephenson&quot;]&lt;i&gt;It&#039;s not how I would do it but it should work as long as a user@localhost address never is sent outside as either the MAIL FROM: or RCPT TO: address.&lt;/i&gt;[/quote]&lt;/p&gt; &lt;p&gt;I don&#039;t have a clue how to set it, the only thing i&#039;ve done here is remove a second entry that was exactly the same as the first, appart from that, this is the result of the installer... (i do remember specifying &#039;localhost&#039; during that)&lt;/p&gt; &lt;p&gt;[quote user=&quot;Thomas R. Stephenson&quot;]&lt;i&gt;You are trying to relay off a server that is set to not allow relaying. That is the RCPT TO: address is not local to the receiving server.&amp;nbsp; You can turn this off in MercuryS since you said you are blocking all access except from localhost.&lt;/i&gt;[/quote]&lt;/p&gt; &lt;p&gt;i presume you mean to tell me that the error i was seeing was from mercury, and not gmail/aol. i have since gone to configuration &amp;gt; mercuryS smtp server &amp;gt; connection control, and i 1) unchecked the &quot;do not permit smtp replaying of non local mail&quot; option, and 2) used the &#039;add restriction button&#039;, entering 127.0.0.1 as the address, and checking the first and third options (allow replaying, and autoenable session logging). after doing this, i have managed to new get my php script to send mail out to me :)&lt;/p&gt; &lt;p&gt;[quote user=&quot;Thomas R. Stephenson&quot;]&lt;i&gt;I&#039;m not sure what you are talking about.&amp;nbsp; Where is this stored unencrypted in an ini file?&lt;/i&gt;[/quote]&lt;/p&gt; &lt;p&gt;mercury.ini &amp;gt; [MercuryC] &amp;gt; SMTP_Password&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;do you think i need to possibly fiddle around with anything else for security or anything. should i attach my mercury.ini file here so you can check everything?&lt;/p&gt; &lt;p&gt;now i&#039;ve got mail going out, how about setting things up for when i need to work without an internet connection... 1) what do i need to do to setup some @localhost accounts to receive the mail, and 2) how can i then access that mail. as i mentioned above i&#039;d prefer not to have to create accounts in thunderbird for this; not because it&#039;s hard to do, more because i don&#039;t want to clutter it up, and because i&#039;m hoping there&#039;s an easier way. what are my options? &lt;/p&gt;

[quote user="Rolf Lindby"]Instead of using MercuryC it would perhaps be simpler to use your ISPs SMTP server directly in your php script?[/quote]

possibly, but rather than try to hack some else's mail class into my code, i thought it might be nicer to do it this way. even if i do end up doing that, it's good to learn how to do it this way!

[quote user=&quot;Rolf Lindby&quot;]&lt;i&gt;Instead of using MercuryC it would perhaps be simpler to use your ISPs SMTP server directly in your php script?&lt;/i&gt;[/quote]&lt;p&gt;possibly, but rather than try to hack some else&#039;s mail class into my code, i thought it might be nicer to do it this way. even if i do end up doing that, it&#039;s good to learn how to do it this way!&lt;/p&gt;

Those mercS settings make you an open relay for any spammers that find you.

If all you want to do is send mail from php to outside addresses then why not (as suggested earlier) just set php to use your ISP SMTP server for outgoing, and your regular mail client to read the replies.

You are adding needless complexity to your system.

 

P.S.

If someone can read the unencrypted passwords on your mail server's file system, you already have bigger problems than a compromised SMTP account.[:)] 

Edit: You posted while I was writing.

No hacking required, just server address, username & password, same as for using Mercury.

 

&lt;p&gt;Those mercS settings make you an open relay for any spammers that find you.&lt;/p&gt;&lt;p&gt;If all you want to do is send mail from php to outside addresses then why not (as suggested earlier) just set php to use your ISP SMTP server for outgoing, and your regular mail client to read the replies.&lt;/p&gt;&lt;p&gt;You are adding needless complexity to your system.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;P.S.&lt;/p&gt;&lt;p&gt;If someone can read the unencrypted passwords on your mail server&#039;s file system, you already have bigger problems than a compromised SMTP account.[:)]&amp;nbsp;&lt;/p&gt;&lt;p&gt;Edit: You posted while I was writing.&lt;/p&gt;&lt;p&gt;No hacking required, just server address, username &amp;amp; password, same as for using Mercury. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

Thomas R. Stephenson:
I'm not sure what you are talking about.  Where is this stored unencrypted in an ini file?

mercury.ini > [MercuryC] > SMTP_Password

The only password there is the ESMTP AUTH password and that's not security risk at all. 

do you think i need to possibly fiddle around with anything else for

security or anything. should i attach my mercury.ini file here so you

can check everything?
 

now i've got mail going out, how about setting things up for when i need to work without an internet connection...

Without having any idea at all as to what you are trying to accomplish I doubt if this will help at all.


1) what do i need to do to setup some @localhost accounts to receive the mail, and

To do this you are really going to have to use something other than localhost since there is to many problems with a domain that really is not a domain.


2) how can i then access that mail. as i mentioned above i'd prefer

not to have to create accounts in thunderbird for this; not because

it's hard to do, more because i don't want to clutter it up, and

because i'm hoping there's an easier way. what are my options?

Pegasus Mail?  To access mail in local accounts you are going to need some sort of mail client. 

&lt;blockquote&gt;&lt;div&gt;&lt;img src=&quot;http://community.pmail.com/Themes/default/images/icon-quote.gif&quot;&gt; &lt;strong&gt;Thomas R. Stephenson:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;I&#039;m not sure what you are talking about.&amp;nbsp; Where is this stored unencrypted in an ini file?&lt;/i&gt;&lt;/div&gt;&lt;/blockquote&gt; &lt;p&gt;mercury.ini &amp;gt; [MercuryC] &amp;gt; SMTP_Password&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;The only password there is the ESMTP AUTH password and that&#039;s not security risk at all.&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/p&gt; &lt;p&gt;do you think i need to possibly fiddle around with anything else for security or anything. should i attach my mercury.ini file here so you can check everything? &amp;nbsp;&lt;/p&gt;&lt;p&gt; now i&#039;ve got mail going out, how about setting things up for when i need to work without an internet connection... &lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Without having any idea at all as to what you are trying to accomplish I doubt if this will help at all.&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt; 1) what do i need to do to setup some @localhost accounts to receive the mail, and &lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;To do this you are really going to have to use something other than localhost since there is to many problems with a domain that really is not a domain.&lt;/b&gt;&lt;/i&gt; 2) how can i then access that mail. as i mentioned above i&#039;d prefer not to have to create accounts in thunderbird for this; not because it&#039;s hard to do, more because i don&#039;t want to clutter it up, and because i&#039;m hoping there&#039;s an easier way. what are my options?&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Pegasus Mail?&amp;nbsp; To access mail in local accounts you are going to need some sort of mail client.&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;

now i've got mail going out, how about setting things up for when i need to work without an internet connection...


1) what do i need to do to setup some @localhost accounts to receive the mail, and


2) how can i then access that mail. as i mentioned above i'd prefer

not to have to create accounts in thunderbird for this; not because

it's hard to do, more because i don't want to clutter it up, and

because i'm hoping there's an easier way. what are my options?

Assuming what you said in your first post still applies:

3) possibly be able to work in a sort of offline mode - setup localhost

mailboxes i can send email to, for when i have no internet connection.

though i don't fancy having to setup such accounts in thunderbird, is

there an easier way...pmail?...

If so then Mercury will keep any sent messages in queue until you again connect to the Internet, when the mail will be sent to the recipient (using MercuryC). So you won't need to create local mailboxes for external recipients. This would actually be a reason to use Mercury instead of php-ing directly to your ISPs SMTP server.

/Rolf 

&lt;blockquote&gt;&lt;p&gt;&lt;i&gt;now i&#039;ve got mail going out, how about setting things up for when i need to work without an internet connection... 1) what do i need to do to setup some @localhost accounts to receive the mail, and 2) how can i then access that mail. as i mentioned above i&#039;d prefer not to have to create accounts in thunderbird for this; not because it&#039;s hard to do, more because i don&#039;t want to clutter it up, and because i&#039;m hoping there&#039;s an easier way. what are my options? &lt;/i&gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Assuming what you said in your first post still applies:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;i&gt;3) possibly be able to work in a sort of offline mode - setup localhost mailboxes i can send email to, for when i have no internet connection. though i don&#039;t fancy having to setup such accounts in thunderbird, is there an easier way...pmail?... &lt;/i&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;If so then Mercury will keep any sent messages in queue until you again connect to the Internet, when the mail will be sent to the recipient (using MercuryC). So you won&#039;t need to create local mailboxes for external recipients. This would actually be a reason to use Mercury instead of php-ing directly to your ISPs SMTP server. &lt;/p&gt;&lt;p&gt;/Rolf&amp;nbsp;&lt;/p&gt;

[quote user="dilberts_left_nut"]

Those mercS settings make you an open relay for any spammers that find you.

If all you want to do is send mail from php to outside addresses then why not (as suggested earlier) just set php to use your ISP SMTP server for outgoing, and your regular mail client to read the replies.

You are adding needless complexity to your system.

 

[/quote]

well i have setup my firewall to only allowed connections to mercury from 127.0.0.1, as i said earlier, so are you sure? i also added a restriction to relaying to 127.0.0.1 (although i'm not sure if that means only 127.0.0.1 can relay, or not...)

[quote user="Thomas R. Stephenson"]The only password there is the ESMTP AUTH password and that's not security risk at all.[/quote]

oh??? how come? i wouldn't have thought it to be a good idea to leave the password to an inbox of mine lying around unencrypted in an .ini file on my system...

[quote user="Thomas R. Stephenson"]Without having any idea at all as to what you are trying to accomplish I doubt if this will help at all.[/quote]

perhaps i need to re-clarify?:

i want to be able to send mail from my php scripts, running off my laptop (running xp sp3), where i'm developing and testing them. i'd like to be able to send mail both to real addresses out on the web, and also to local addresses. i have so far managed to setup mercury so that my scripts can send mail out to real addresses. although i have got this working, i haven't necessarily got everything configured as it should be, which is why i proposed attaching my mercury.ini file so someone can take a look. i don't know how to also set mercury up so that i can send mail to local addresses. somehow i need to create some simple mail boxes on my computer, but i don't know how. then i need mercury to be able to place messages in them that are destined for them, again, unsure how. then i need some way of accessing them (need to setup a client for this).

[quote user="Thomas R. Stephenson"]To do this you are really going to have to use something other than localhost since there is to many problems with a domain that really is not a domain.[/quote]

how do i do it then?

[quote user="Thomas R. Stephenson"]Pegasus Mail?  To access mail in local accounts you are going to need some sort of mail client. [/quote]

ok, perhaps that was a dumb question.

[quote user="Rolf Lindby"]Assuming what you said in your first post still applies:[/quote]

yes...

[quote user="Rolf Lindby"]If so then Mercury will keep any sent messages in queue until you again connect to the Internet, when the mail will be sent to the recipient (using MercuryC). So you won't need to create local mailboxes for external recipients. This would actually be a reason to use Mercury instead of php-ing directly to your ISPs SMTP server.[/quote]

yeh i get that mercury would cache them until a connection is available, but that's not what i want. should i be working without an internet connection, i would like to be able to receive the messages. in this situation i would like to simply be able to change the to addresses the scripts are using from say user123@gmail.com to user1@localhost, then mercury will put it in a mailbox on localhost for account 'user1', and then i can access that mail through pmail or some php software or something. i.e. i still need to be able to send and receive this email without an internet connection!

[quote user=&quot;dilberts_left_nut&quot;]&lt;p&gt;Those mercS settings make you an open relay for any spammers that find you.&lt;/p&gt;&lt;p&gt;If all you want to do is send mail from php to outside addresses then why not (as suggested earlier) just set php to use your ISP SMTP server for outgoing, and your regular mail client to read the replies.&lt;/p&gt;&lt;p&gt;You are adding needless complexity to your system.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;[/quote] well i have setup my firewall to only allowed connections to mercury from 127.0.0.1, as i said earlier, so are you sure? i also added a restriction to relaying to 127.0.0.1 (although i&#039;m not sure if that means only 127.0.0.1 can relay, or not...) [quote user=&quot;Thomas R. Stephenson&quot;]The only password there is the ESMTP AUTH password and that&#039;s not security risk at all.[/quote] oh??? how come? i wouldn&#039;t have thought it to be a good idea to leave the password to an inbox of mine lying around unencrypted in an .ini file on my system... [quote user=&quot;Thomas R. Stephenson&quot;]Without having any idea at all as to what you are trying to accomplish I doubt if this will help at all.[/quote] perhaps i need to re-clarify?: i want to be able to send mail from my php scripts, running off my laptop (running xp sp3), where i&#039;m developing and testing them. i&#039;d like to be able to send mail both to real addresses out on the web, and also to local addresses. i have so far managed to setup mercury so that my scripts can send mail out to real addresses. although i have got this working, i haven&#039;t necessarily got everything configured as it should be, which is why i proposed attaching my mercury.ini file so someone can take a look. i don&#039;t know how to also set mercury up so that i can send mail to local addresses. somehow i need to create some simple mail boxes on my computer, but i don&#039;t know how. then i need mercury to be able to place messages in them that are destined for them, again, unsure how. then i need some way of accessing them (need to setup a client for this). [quote user=&quot;Thomas R. Stephenson&quot;]To do this you are really going to have to use something other than localhost since there is to many problems with a domain that really is not a domain.[/quote] how do i do it then? [quote user=&quot;Thomas R. Stephenson&quot;]Pegasus Mail?&amp;nbsp; To access mail in local accounts you are going to need some sort of mail client.&amp;nbsp;[/quote] ok, perhaps that was a dumb question. [quote user=&quot;Rolf Lindby&quot;]Assuming what you said in your first post still applies:[/quote] yes... [quote user=&quot;Rolf Lindby&quot;]If so then Mercury will keep any sent messages in queue until you again connect to the Internet, when the mail will be sent to the recipient (using MercuryC). So you won&#039;t need to create local mailboxes for external recipients. This would actually be a reason to use Mercury instead of php-ing directly to your ISPs SMTP server.[/quote] yeh i get that mercury would cache them until a connection is available, but that&#039;s not what i want. should i be working without an internet connection, i would like to be able to receive the messages. in this situation i would like to simply be able to change the to addresses the scripts are using from say user123@gmail.com to user1@localhost, then mercury will put it in a mailbox on localhost for account &#039;user1&#039;, and then i can access that mail through pmail or some php software or something. i.e. i still need to be able to send and receive this email without an internet connection!

Thomas R. Stephenson:
The only password there is the ESMTP AUTH password and that's not security risk at all.

oh??? how come? i wouldn't have thought it to be a good idea to leave

the password to an inbox of mine lying around unencrypted in an .ini

file on my system...

It's the SMTP authorization password that is only used to authenticate to the SMTP server, it does not control access to any data at all.  If for some strange reason it was ever compromised by someone accessing your local system it would be no big deal.

perhaps i need to re-clarify?:

i want to be able to send mail from my php scripts, running off my

laptop (running xp sp3), where i'm developing and testing them. i'd

like to be able to send mail both to real addresses out on the web, and

also to local addresses. i have so far managed to setup mercury so that

my scripts can send mail out to real addresses. although i have got

this working, i haven't necessarily got everything configured as it

should be, which is why i proposed attaching my mercury.ini file so

someone can take a look. i don't know how to also set mercury up so

that i can send mail to local addresses. somehow i need to create some

simple mail boxes on my computer, but i don't know how. then i need

mercury to be able to place messages in them that are destined for

them, again, unsure how. then i need some way of accessing them (need

to setup a client for this).

Thomas R. Stephenson:
To

do this you are really going to have to use something other than

localhost since there is to many problems with a domain that really is

not a domain.

how do i do it then?

Get a valid domain and use that.  There are a number of places that you can do this cheaply even if you have a dynamic IP address.  Checkout http://www.dyndns.com/services/dns/dyndns/ for starters to get a free domain.  The problem with using the localhost for a domain is that it can get out to the internet and cause problems.

You would then setup the domain names using the name of your system and domain names.   It would look something like

 [Domains]

server : server
server : yourdomain.dyndns.org

Since this is a real domain pointing to your current dynamic IP address the bounces to postmaster@yourdomain.dyndns.org should be handled properly even when found in the wild.

 

&lt;blockquote&gt;&lt;blockquote&gt;&lt;div&gt;&lt;img src=&quot;http://community.pmail.com/Themes/default/images/icon-quote.gif&quot;&gt; &lt;strong&gt;Thomas R. Stephenson:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;The only password there is the ESMTP AUTH password and that&#039;s not security risk at all.&lt;/div&gt;&lt;/blockquote&gt;&lt;p&gt; oh??? how come? i wouldn&#039;t have thought it to be a good idea to leave the password to an inbox of mine lying around unencrypted in an .ini file on my system...&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;It&#039;s the SMTP authorization password that is only used to authenticate to the SMTP server, it does not control access to any data at all.&amp;nbsp; If for some strange reason it was ever compromised by someone accessing your local system it would be no big deal. &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;perhaps i need to re-clarify?: i want to be able to send mail from my php scripts, running off my laptop (running xp sp3), where i&#039;m developing and testing them. i&#039;d like to be able to send mail both to real addresses out on the web, and also to local addresses. i have so far managed to setup mercury so that my scripts can send mail out to real addresses. although i have got this working, i haven&#039;t necessarily got everything configured as it should be, which is why i proposed attaching my mercury.ini file so someone can take a look. i don&#039;t know how to also set mercury up so that i can send mail to local addresses. somehow i need to create some simple mail boxes on my computer, but i don&#039;t know how. then i need mercury to be able to place messages in them that are destined for them, again, unsure how. then i need some way of accessing them (need to setup a client for this). &lt;/p&gt;&lt;blockquote&gt;&lt;div&gt;&lt;img src=&quot;http://community.pmail.com/Themes/default/images/icon-quote.gif&quot;&gt; &lt;strong&gt;Thomas R. Stephenson:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;To do this you are really going to have to use something other than localhost since there is to many problems with a domain that really is not a domain.&lt;/div&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt; how do i do it then?&lt;/blockquote&gt;&lt;p&gt;Get a valid domain and use that.&amp;nbsp; There are a number of places that you can do this cheaply even if you have a dynamic IP address.&amp;nbsp; Checkout http://www.dyndns.com/services/dns/dyndns/ for starters to get a free domain.&amp;nbsp; The problem with using the localhost for a domain is that it can get out to the internet and cause problems.&lt;/p&gt;&lt;p&gt;You would then setup the domain names using the name of your system and domain names. &amp;nbsp; It would look something like&lt;/p&gt;&lt;p&gt;&amp;nbsp;[Domains]&lt;/p&gt;&lt;p&gt;server : server server : yourdomain.dyndns.org&lt;/p&gt;&lt;p&gt;Since this is a real domain pointing to your current dynamic IP address the bounces to postmaster@yourdomain.dyndns.org should be handled properly even when found in the wild. &amp;nbsp;&lt;/p&gt;

[quote user="Thomas R. Stephenson"]It's the SMTP authorization password that is only used to authenticate to the SMTP server, it does not control access to any data at all.  If for some strange reason it was ever compromised by someone accessing your local system it would be no big deal.[/quote]

What do you mean no big deal, this is the password to one of my gmail accounts. if someone discovered this the could read all of my mail and send out mail in my name. most scary of all, they could also take over any accounts on websites that i have linked to this address because they can access the rest password confirmation emails...

[quote user="Thomas R. Stephenson"]

Get a valid domain and use that.  There are a number of places that you can do this cheaply even if you have a dynamic IP address.  Checkout http://www.dyndns.com/services/dns/dyndns/ for starters to get a free domain.  The problem with using the localhost for a domain is that it can get out to the internet and cause problems.

You would then setup the domain names using the name of your system and domain names.   It would look something like

 [Domains]

server : server
server : yourdomain.dyndns.org

Since this is a real domain pointing to your current dynamic IP address the bounces to postmaster@yourdomain.dyndns.org should be handled properly even when found in the wild.

[/quote]

right. sorry, are we talking about for use when sending email to real addresses or to local addresses, because if local, i don't see how dyndns will work with no internet connection :/

[quote user=&quot;Thomas R. Stephenson&quot;]It&#039;s the SMTP authorization password that is only used to authenticate to the SMTP server, it does not control access to any data at all.&amp;nbsp; If for some strange reason it was ever compromised by someone accessing your local system it would be no big deal.[/quote] What do you mean no big deal, this is the password to one of my gmail accounts. if someone discovered this the could read all of my mail and send out mail in my name. most scary of all, they could also take over any accounts on websites that i have linked to this address because they can access the rest password confirmation emails... [quote user=&quot;Thomas R. Stephenson&quot;]&lt;p&gt;Get a valid domain and use that.&amp;nbsp; There are a number of places that you can do this cheaply even if you have a dynamic IP address.&amp;nbsp; Checkout http://www.dyndns.com/services/dns/dyndns/ for starters to get a free domain.&amp;nbsp; The problem with using the localhost for a domain is that it can get out to the internet and cause problems.&lt;/p&gt;&lt;p&gt;You would then setup the domain names using the name of your system and domain names. &amp;nbsp; It would look something like&lt;/p&gt;&lt;p&gt;&amp;nbsp;[Domains]&lt;/p&gt;&lt;p&gt;server : server server : yourdomain.dyndns.org&lt;/p&gt;&lt;p&gt;Since this is a real domain pointing to your current dynamic IP address the bounces to postmaster@yourdomain.dyndns.org should be handled properly even when found in the wild.&lt;/p&gt;[/quote] right. sorry, are we talking about for use when sending email to real addresses or to local addresses, because if local, i don&#039;t see how dyndns will work with no internet connection :/

yeh i get that mercury would cache them until a connection is

available, but that's not what i want. should i be working without an

internet connection, i would like to be able to receive the messages.

in this situation i would like to simply be able to change the to

addresses the scripts are using from say user123@gmail.com to

user1@localhost, then mercury will put it in a mailbox on localhost for

account 'user1', and then i can access that mail through pmail or some

php software or something. i.e. i still need to be able to send and

receive this email without an internet connection!

If mail is being sent from your computer to a mailbox on your computer I suppose this is for testing purposes. In that case you could perhaps add a cc or bcc in your php script to the corresponding local account to view a copy of the message. Or simply create a global filtering rule that copies all mail (or all mail from the sender used in php) to a single local account if you don't actually need to deliver them to different mailboxes.

/Rolf 

&lt;blockquote&gt;&lt;i&gt;yeh i get that mercury would cache them until a connection is available, but that&#039;s not what i want. should i be working without an internet connection, i would like to be able to receive the messages. in this situation i would like to simply be able to change the to addresses the scripts are using from say user123@gmail.com to user1@localhost, then mercury will put it in a mailbox on localhost for account &#039;user1&#039;, and then i can access that mail through pmail or some php software or something. i.e. i still need to be able to send and receive this email without an internet connection!&lt;/i&gt;&lt;/blockquote&gt;&lt;p&gt;If mail is being sent from your computer to a mailbox on your computer I suppose this is for testing purposes. In that case you could perhaps add a cc or bcc in your php script to the corresponding local account to view a copy of the message. Or simply create a global filtering rule that copies all mail (or all mail from the sender used in php) to a single local account if you don&#039;t actually need to deliver them to different mailboxes.&lt;/p&gt;&lt;p&gt;/Rolf&amp;nbsp;&lt;/p&gt;

[quote user="Rolf Lindby"]

If mail is being sent from your computer to a mailbox on your computer I suppose this is for testing purposes. In that case you could perhaps add a cc or bcc in your php script to the corresponding local account to view a copy of the message. Or simply create a global filtering rule that copies all mail (or all mail from the sender used in php) to a single local account if you don't actually need to deliver them to different mailboxes.

[/quote]

yeh, everything's for testing purposes. you seem to have perhaps missed the point, i've got no problem getting my code to send to either real addresses, or local test addresses, it's setting up mercury that's the problem. i've already managed to set it up be abe to send mail to real addresses, and that's working fine. the main problem now is how to create some local test mail boxes that my code can send mail to instead of real addresses for when i want to work without having an internet connection...

[quote user=&quot;Rolf Lindby&quot;]&lt;p&gt;If mail is being sent from your computer to a mailbox on your computer I suppose this is for testing purposes. In that case you could perhaps add a cc or bcc in your php script to the corresponding local account to view a copy of the message. Or simply create a global filtering rule that copies all mail (or all mail from the sender used in php) to a single local account if you don&#039;t actually need to deliver them to different mailboxes.&lt;/p&gt;[/quote] yeh, everything&#039;s for testing purposes. you seem to have perhaps missed the point, i&#039;ve got no problem getting my code to send to either real addresses, or local test addresses, it&#039;s setting up mercury that&#039;s the problem. i&#039;ve already managed to set it up be abe to send mail to real addresses, and that&#039;s working fine. the main problem now is how to create some local test mail boxes that my code can send mail to instead of real addresses for when i want to work without having an internet connection...

Configuration/Manage local users... If the hostname of your mailserver is mercury you can then address it to testuser@mercury (assuming that the Local domains section is correct).

/Rolf
 

&lt;p&gt;Configuration/Manage local users... If the hostname of your mailserver is mercury you can then address it to testuser@mercury (assuming that the Local domains section is correct). &lt;/p&gt;&lt;p&gt;/Rolf &amp;nbsp;&lt;/p&gt;
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft