From: Basanta shrestha on
Dear All,

CentOS 5.2

Followed http://wiki.centos.org/HowTos/postfix and installed
postfix dovecot system-switch-mail system-switch-mail-gnome

Local delivery and local receipt works ok. Couldn't send email to
external mail using 127.0.0.1 as smtp server.

Now trying to make my computer a full fledged mail server. I am behind ADSL NAT

got a dyndns address lal.homelinux.org.
In adsl router, configured the above address, port forward tcp port
110 to 192.168.0.x ( x being ip address of my computer)
can resolve lal.homelinux.org to ADSL WAN IP address.

hostname of the computer set to lal.homelinux.org

/etc/postfix/main.cf

myhostname = lal.homelinux.org
mydomain = homelinux.org
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.0.0/24, 127.0.0.0/8
relay_domains =
home_mailbox = Maildir/


nmaping lal.homelinux.org

22/tcp open ssh
25/tcp open smtp
110/tcp open pop3
111/tcp open rpcbind
143/tcp open imap
735/tcp open unknown
993/tcp open imaps
995/tcp open pop3s

Can't get to send mail outside the system nor receive from external
mail like gmail.com using smtp/pop3 as lal.homelinux.org

Please help.

Regards,
Basanta

From: Stan Hoeppner on
Basanta shrestha put forth on 6/27/2010 3:53 AM:
> Dear All,
>
> CentOS 5.2
>
> Followed http://wiki.centos.org/HowTos/postfix and installed
> postfix dovecot system-switch-mail system-switch-mail-gnome
>
> Local delivery and local receipt works ok. Couldn't send email to
> external mail using 127.0.0.1 as smtp server.
>
> Now trying to make my computer a full fledged mail server. I am behind ADSL NAT

This should get your outbound working:
http://www.hardwarefreak.com/postfix-adsl-relay-config.txt

You may have to install libsasl if it's not already installed.


This is why inbound mail to your domain isn't going to your server:

homelinux.org. 86400 IN MX 20 mx2.mailhop.org.
homelinux.org. 86400 IN MX 10 mx1.mailhop.org.

You don't own or control the domain "homelinux.org". Ownership/control is
required to route mail for a given domain to an MX. The only way to get
_your_ mail for your _subdomain_ lal.homelinux.org to your Postfix server
lal.homelinux.org is to setup an arrangement with homelinux.org (a.k.a.
dyndns.org) to forward your mail to your server. This is where "free" dynamic
dns services make the money that keeps them in business: add-on services:
http://www.dyndns.com/services/mailhop/relay.html

$49.95/yr USD for their mail forwarding service that does what you need, but
with their domain name, not yours.

Pay someone like TZO ~$60 USD/yr for top notch dynamic DNS service, and pay a
registrar between $5-$15/yr for a domain name of _your_ choosing, and this all
becomes a whole lot more direct, and a lot easier for you to control and
configure. That's about 20 cents per day combined cost--less than a cup of
coffee per day. Is running your own mail server behind an adsl consumer
connection worth 201 cents a day to you? If so, this is by far the best way
to do it.

It's how I've been doing it with TZO since 2005, though I've had static IP
service for over a year. I stick with TZO just in case I move and can't get
static IP service. I've had zero problems with TZO in 5 years, 100% uptime
AFAICT. http://www.tzo.com

Many routers fully support TZO just as they do DynDNS.org:
http://www.tzo.com/MainPageSupport/TZO_Included.htm

--
Stan

From: Basanta shrestha on
Dear Stan,
I doubt it is absolutely necessary to pay for that service.
Please refer

http://www.linuxforums.org/forum/servers/6797-email-server-setup.html

Regards,
Basanta


On Sun, Jun 27, 2010 at 3:35 PM, Stan Hoeppner <stan(a)hardwarefreak.com> wrote:
> Basanta shrestha put forth on 6/27/2010 3:53 AM:
>> Dear All,
>>
>> CentOS 5.2
>>
>> Followed http://wiki.centos.org/HowTos/postfix and installed
>> postfix dovecot system-switch-mail system-switch-mail-gnome
>>
>> Local delivery and local receipt works ok. Couldn't send email to
>> external mail using 127.0.0.1 as smtp server.
>>
>> Now trying to make my computer a full fledged mail server. I am behind ADSL NAT
>
> This should get your outbound working:
> http://www.hardwarefreak.com/postfix-adsl-relay-config.txt
>
> You may have to install libsasl if it's not already installed.
>
>
> This is why inbound mail to your domain isn't going to your server:
>
> homelinux.org.          86400   IN      MX      20 mx2.mailhop.org.
> homelinux.org.          86400   IN      MX      10 mx1.mailhop.org.
>
> You don't own or control the domain "homelinux.org".  Ownership/control is
> required to route mail for a given domain to an MX.  The only way to get
> _your_ mail for your _subdomain_ lal.homelinux.org to your Postfix server
> lal.homelinux.org is to setup an arrangement with homelinux.org (a.k.a.
> dyndns.org) to forward your mail to your server.  This is where "free" dynamic
> dns services make the money that keeps them in business:  add-on services:
> http://www.dyndns.com/services/mailhop/relay.html
>
> $49.95/yr USD for their mail forwarding service that does what you need, but
> with their domain name, not yours.
>
> Pay someone like TZO ~$60 USD/yr for top notch dynamic DNS service, and pay a
> registrar between $5-$15/yr for a domain name of _your_ choosing, and this all
> becomes a whole lot more direct, and a lot easier for you to control and
> configure.  That's about 20 cents per day combined cost--less than a cup of
> coffee per day.  Is running your own mail server behind an adsl consumer
> connection worth 201 cents a day to you?  If so, this is by far the best way
> to do it.
>
> It's how I've been doing it with TZO since 2005, though I've had static IP
> service for over a year.  I stick with TZO just in case I move and can't get
> static IP service.  I've had zero problems with TZO in 5 years, 100% uptime
> AFAICT.  http://www.tzo.com
>
> Many routers fully support TZO just as they do DynDNS.org:
> http://www.tzo.com/MainPageSupport/TZO_Included.htm
>
> --
> Stan
>

From: Stan Hoeppner on
Mihira Fernando put forth on 6/28/2010 2:20 AM:

> you can use the dyndns.org free account for email by using the dyndns
> FQDN allocated for the server in your domain's MX entry.
>
> May not be the perfect way but it works.

What domain MX entry?

Why would someone pay for DNS hosting for a single domain, and a domain
registration, when the combined cost of both may likely be about the same as
just paying for the DynDNS mail forwarding service? On top of that, by using
your suggestion, one would have to use a CNAME for the MX, no?. Ask Wietse
about using CNAME for MX.

--
Stan

From: Mihira Fernando on
On 06/28/2010 01:16 PM, Stan Hoeppner wrote:
> Mihira Fernando put forth on 6/28/2010 2:20 AM:
>
>
>> you can use the dyndns.org free account for email by using the dyndns
>> FQDN allocated for the server in your domain's MX entry.
>>
>> May not be the perfect way but it works.
>>
> What domain MX entry?
>
> Why would someone pay for DNS hosting for a single domain, and a domain
> registration, when the combined cost of both may likely be about the same as
> just paying for the DynDNS mail forwarding service? On top of that, by using
> your suggestion, one would have to use a CNAME for the MX, no?. Ask Wietse
> about using CNAME for MX.
>
>
Hey, I told you its not perfect.
Also its not CNAME that you use. Its the A record.
DynDNS client takes care of updating the IP for it.
Besides, most domain registrars provide DNS hosting for the same price
so there's only the cost of registration.

Mihira.