LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Email MX accounts (https://www.linuxquestions.org/questions/linux-newbie-8/email-mx-accounts-507701/)

gloveny 12-05-2006 01:21 PM

Email MX accounts
 
Hi I have a root server with 1and1 and I don’t want to use there 1and1 mail server. I want to use my own. All of my domains are stated as MX in the 1and1 control panel and I think this means they are using my (the root) servers default email server. But it doesn’t work. I can log in on some accounts using outlook, but cant receive or send email. On other accounts I cant even log in. Is the default server set to be disabled and I have to enable it? All 1and1 can suggest is that I use there mail server and I don’t want to do this because of the restrictions they impose.

All I want to do is be able to use PHP sending email through MY mail server and also make outlook to use my web server. Is this possible and why does it currently not work?

I have Linux 2.6, Pleask 8 and Apache ?

Thanks,
Graham Vincent

FlipHDK 12-05-2006 01:50 PM

Don't quite understand all that, "All I want to do is be able to use PHP sending email through MY mail server and also make outlook to use my web server. Is this possible and why does it currently not work?"

But, to send email with php you can use this code:
PHP Code:

<?php
$to 
'flip@domain'//Change this to your email address
$subject 'Wakeup bob!'// This is the subject of your email
$message '<b>yo</b>, whassup?';
$headers "From: flip@domain\r\n" .
       
'X-Mailer: PHP/' phpversion() . "\r\n" .
       
"MIME-Version: 1.0\r\n" .
       
"Content-Type: text/html; charset=utf-8\r\n" .
       
"Content-Transfer-Encoding: 8bit\r\n\r\n";

// Send
mail($to$subject$message$headers);
?>


gloveny 12-05-2006 03:13 PM

Yes but will this go through my mail server or 1and1's. I guess this depends on if I set it to MX or not? Ok.

What about the emails not working when I use MX mail server. Does linux automatically block the ports for email? DO I have to set up a mail server in plesk?

FlipHDK 12-05-2006 03:20 PM

What distro are you using? Does it have a firewall installed?

gloveny 12-05-2006 05:03 PM

Flip, I’m using Linux 2.6.16-rc6-060427a and YES it does have a firewall. I’ve just been reading some of the (absolutely terrible and completely out of date) 1and1's FAQ (f’in awful Qrap) and they suggest ways in blocking and allowing port 110 and 25 which are email ports right?

I'll check my iptables settings....

My default policy is set to denie and port 110 and 25 arent shown as allow so they are blocked.

My Iptables control panel only gives UDP, TCP and ICMP. If I wanted to open email ports which one should I use?

FlipHDK 12-05-2006 05:33 PM

I think most of them are UDP
But theres a list here or all of them and port's for everything: http://en.wikipedia.org/wiki/List_of...P_port_numbers

gloveny 12-06-2006 09:41 AM

ok I've opened ports 110 and 25 on the firewall.

I can use a domain that is still set to MX but only when using pop.1and1.co.uk as the pop3 incomming and auth.smtp.1and1.co.uk as the outgoing. Shoudlnt I be able to use mail.myDomain.com for both? or at least one of the incomming or out going. I cant seem to use it for either.
By using the pop.1and1.co.uk AND auth.smtp.1and1.co.uk servers, does this mean that Im not using my servers at all, and that Im still using 1and1's email servers?


All times are GMT -5. The time now is 08:45 PM.