Re: Help needed for my first mail server

2011-03-16 Thread Andrew McGlashan

Stan Hoeppner wrote:

Rubbish. ;)  There is no technical difference between a static IP and
dynamic WRT SMTP, thus one can properly run a mail server for both
sending and receiving directly.  The problem one runs into here, which
is probably what you meant to say, is merely receiver policy.  There are
few today that accept connections from PBL/DUL listed IPs, or those with
dynamic/generic rDNS.  Thus, use SASL auth to forward all outbound mail
through your ISP.


Thank you for all your clarifications, I'm sure you understand exactly 
what I meant and you are 100% correct with your response, I agree with 
it totally.


I did run a mail server for quite some time without rDNS, but then it 
started to be a problem.  Static IP _should_ be standard and then there 
are usually no issues like this, typically.  Although using a static IP 
from a range that is considered to be dynamic can still be a real 
issue, even if the IP really is a permanent static assignment from the ISP.


Heck, there are also potential issues if your static IP is close by an 
offender [one that is a spammer, runs an open relay or even if they have 
a bad reputation for whatever reason] -- some lookups / services fail 
you on that and you have to do follow up :(


So yes, in some cases, it is simply easier to use your ISP for sending. 
 Although I've heard that even using SASL auth via the ISP or a hosting 
company isn't enough as some providers get more trouble with that due to 
many users having a very simple and guessable username/password, so they 
dis-allow it too.  For me, well, I like to run my own server as best I 
can and then not have to rely too much on any third parties which can 
add another failure point as well.


Thanks again.

--
Kind Regards
AndrewM

Andrew McGlashan
Broadband Solutions now including VoIP


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4d8174d6.7070...@affinityvision.com.au



Help needed for my first mail server

2011-03-15 Thread Jason Hsu
This is my first time ever working with a mail server.  Thus, I don't know what 
I'm doing, but I'm trying to learn.  

All I'm trying to do right now is send and receive email messages through my 
free DynDNS account.  Let's say it's subdomain1.dyndns-free.com .

The OS is Debian Lenny.  The mail server is exim4.

Let's say that the host name listed in my /etc/hosts file is 
subdomain2.domain.com .

I have been able to run the exim4 configuration script by entering 
dpkg-reconfigure exim4-config.  However, I don't know what I'm supposed to 
enter for all those fields I'm asked about.  If I'm even slightly wrong on just 
one thing, my system won't work properly.

Do I need an MX hostname?  There are so many unknowns that I don't know where 
to begin.

-- 
Jason Hsu jhsu802...@jasonhsu.com


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110315011357.0b594777.jhsu802...@jasonhsu.com



Re: Help needed for my first mail server

2011-03-15 Thread Jo Galara
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 Do I need an MX hostname?  There are so many unknowns that I don't know where 
 to begin.

Yes, you need a MX hostname and reverse DNS. Set the reverse DNS
hostname to the HELO hostname your SMTP server uses, as well as  your MX
hostname.


About the rest: Take a look at http://www.exim.org/docs.html and make
sure your mailserver can not be abused as an open relay (spam-sender)!


- -- 
Regards,

Jo Galara jogal...@gmail.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBAgAGBQJNfweFAAoJEBKHQOClQyrCJSIP/1TYH+p8J6cj0DzMPWOQ8NPr
yPhFBUqb/svz79WLtnHDCJZlQ0R05G2ncjPzBczQ9Gehonhnn3z7pkz4tHjZX4GL
wekHz5kZArw35aDaC9j8erjU4gOJTWU+BBbcpupapWguvt70XvevjMBKxBw3Pmw9
LuMQNN/TiUonAUAgT1PW+Ce/XmTAC2xGaWRH5wDBkMabeR4pHFEyO4UVCIgohdwd
kCq6m0zaE8vOmDIEwD2VMb1uDfD29LpiNe4xtrpMNSWSu/3oOeuJBw1lc2m60mMk
DOyTysplgyWFfwfgw2E0eCBOpBqb4XVs9/39RuMtkHqHADCtUwVdMdZBXBoPmQJ4
0k982gDm0eA04yvj/Dm6WIFL7+Uw0FdiDuDcDFA654ahR/Hd9A063y3deCVn+KDN
yuPFzWkgg9FxStd33uU2jKBPYu2SMNSXV/JBI85fhhQUtlIpJAjwXgl4eTWaaNcI
Y+tE5pp1O4Mm0jqXvG1th4EzPvsDbsmGvq8heSPEghsop/KFM4u82VAQjeU09aI9
U7RAEHpFnqbSPAbSsQB46kyGZa7msgKFufaZSbE4CP6i8MiWvcHlCDTEMzys8HfS
emQ/MnSOVsv5wwF/giW7o/TgYKQpJIdtZMSxJm/Dhu0jHeFj1s5NyKmEoVMb98XZ
oBjLwzhlOo4dCjbdWpDR
=C/FY
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4d7f0786.4050...@gmail.com



Re: Help needed for my first mail server

2011-03-15 Thread Joe
On Tue, 15 Mar 2011 01:13:57 -0500
Jason Hsu jhsu802...@jasonhsu.com wrote:

 This is my first time ever working with a mail server.  Thus, I don't
 know what I'm doing, but I'm trying to learn.  
 
 All I'm trying to do right now is send and receive email messages
 through my free DynDNS account.  Let's say it's
 subdomain1.dyndns-free.com .
 
 The OS is Debian Lenny.  The mail server is exim4.
 
 Let's say that the host name listed in my /etc/hosts file is
 subdomain2.domain.com .
 
 I have been able to run the exim4 configuration script by entering
 dpkg-reconfigure exim4-config.  However, I don't know what I'm
 supposed to enter for all those fields I'm asked about.  If I'm even
 slightly wrong on just one thing, my system won't work properly.
 
 Do I need an MX hostname?  There are so many unknowns that I don't
 know where to begin.
 

And that's the problem, nor do we. This isn't really a subject which
can be covered well by question and answer. The exim4 manual is
excellent, but it's a giant man page. It's great for looking up
details, but it's not a tutorial on email, or even exim4. Don't forget
later that exim4 does also have a man page. It won't be much use yet,
but some of those sendmail two- and three- letter commands are
extremely useful for troubleshooting.

Unfortunately, most email tutorials bring in clamav, spamassassin and
other stuff, which you may want later but only complicates the first
attempts to get SMTP working. Try this one:

http://library.linode.com/email/exim/send-only-mta-debian-6-squeeze

 to begin with, but even that needs some changes. To receive external
email, it will also need to listen on the interface connected to the
router, not just 127.0.0.1 (though you do want that as well). You'll
also want the FQDN to be the domain name, without the computer name at
the beginning. You'll want Maildir format if you plan to use IMAP
with email clients, but it's probably a good idea anyway. There may be
other details I haven't noticed...

Once you've got the sending working (and check first using Mutt or mail
to a variety of email address styles to accounts on the machine itself,
then to outside addresses) then receiving is just a matter of piping
external email to the server. Forward port TCP/25 to the server, and do
the same at your domain host, DNYDNS in this case, by setting the MX
record to a *hostname* (an IP address will often work, but not for every
sender, and it's not relevant in your case anyway) which points to the A
record for your public IP address (your external public hostname for
remote purposes). Don't forget to configure the server firewall to allow
TCP/25 access on the INPUT chain. Check that Shields Up!! on
http://grc.com can see an open port 25. There are also free DNS and
email domain testing tools out there, which may help with getting the
DNS records as right as you can. Bookmark this page somewhere until you
know how to do it without looking it up:

http://support.microsoft.com/kb/153119

Yes, I know it comes from the Dark Side, but it's explained clearly for
Microsoft users.

One of the problems of having a dynamic IP address is that you won't
be able to send email to everyone directly. Email blacklists tend to
contain most of the world's dynamically allocated address blocks, and
mail servers using them will refuse your connections. Unfortunately,
you are indistinguishable from a virus-infected home PC. I suspect the
only way you will get email out to many people is to use a trusted SMTP
server e.g. your ISP's server as smarthost. It's possible DYNDNS offer
use of a smarthost, I've never dealt with them. If need to do this, you
tell exim4 the name of the SMTP server, just as you would an email
client. If you select 'smarthost', it will ask different questions.

The best way to do this is to have a go and come back with specific
questions and error messages. Exim4 has a somewhat cryptic log,
(mainlog in /var/log/exim4) but it should help a lot. Oh, and remember
when you have port 25 open. the whole world will hammer on your door.
It's been a bit quieter in recent weeks, but I've had up to 5,000 bogus
SMTP connection attempts in a single day. I have very aggressive mail
server policies...

-- 
Joe


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110315090143.33baa...@jresid.jretrading.com



Re: Help needed for my first mail server

2011-03-15 Thread Stan Hoeppner
Jason Hsu put forth on 3/15/2011 1:13 AM:
 This is my first time ever working with a mail server.  Thus, I don't know 
 what I'm doing, but I'm trying to learn.  

This is bad because you're trying to do it with DynDNS.  This prevents
you from being able to setup a standard internet mail host with MX.

 All I'm trying to do right now is send and receive email messages through my 
 free DynDNS account.  Let's say it's subdomain1.dyndns-free.com .

Docs for this are available at dyndns.org.  You will need to use their
mail forwarder.

 The OS is Debian Lenny.  The mail server is exim4.

The OS/smtpd don't matter much here, as long as you know what parameters
to configure.

 Let's say that the host name listed in my /etc/hosts file is 
 subdomain2.domain.com .

The only thing that matters is that this hostname match the Exim config
for local domains and that dyndns be told this is the hostname to
forward mail to.

 I have been able to run the exim4 configuration script by entering 
 dpkg-reconfigure exim4-config.  However, I don't know what I'm supposed to 
 enter for all those fields I'm asked about.  If I'm even slightly wrong on 
 just one thing, my system won't work properly.

I can't help you here as I'm a Postfix user, not Exim.

 Do I need an MX hostname?  There are so many unknowns that I don't know where 
 to begin.

MX records are for second level domains, thus you can't us an MX record
in this case as your system is a third level domain.  The MX records in
your case are for dyndns.org, your parent domain.


Now, all of that said, there is a way you can set this up to work with a
real domain and MX record so mail is delivered directly to your server.
 To do this, register a domain name, your-domain.com, with any
registrar, and setup a DNS hosting account (most registrars offer DNS
hosting today, as well as mail, web, etc).  Create a DNS MX record
pointing to subdomain1.dyndns-free.com, and configure Exim to accept
mail for the domain your-domain.com.

Now, any time anyone sends mail to your-domain.com it'll go directly to
your Exim host.  Depending on which domain you register, it'll cost you
anywhere from $5-$15 USD/year for a cheap domain.  I pay ~$15 USD/year
for my vanity domain.  I've had it since 2002.

-- 
Stan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4d7ffc30.3030...@hardwarefreak.com



Re: Help needed for my first mail server

2011-03-15 Thread Andrew McGlashan

Hi,

Stan Hoeppner wrote:

MX records are for second level domains, thus you can't us an MX record
in this case as your system is a third level domain.  The MX records in
your case are for dyndns.org, your parent domain.


Rubbish, you can have an MX at any level you like.

What is important is that the MX record has a corresponding A record as 
well.


Also, as has been mentioned already, it is highly advisable to have rDNS 
 {reverse DNS) -- without it, you should be using smart host, ie your 
ISP as an upstream sender.


Using dynamic IP means that you can't properly run your own mail server 
for both sending and receiving directly.


--
Kind Regards
AndrewM

Andrew McGlashan
Broadband Solutions now including VoIP


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4d8013d8.5010...@affinityvision.com.au



Re: Help needed for my first mail server

2011-03-15 Thread Stan Hoeppner
Andrew McGlashan put forth on 3/15/2011 8:35 PM:
 Hi,
 
 Stan Hoeppner wrote:
 MX records are for second level domains, thus you can't us an MX record
 in this case as your system is a third level domain.  The MX records in
 your case are for dyndns.org, your parent domain.
 
 Rubbish, you can have an MX at any level you like.

Andrew, you're not thinking in the context of the thread.  In response
to your out of thread thinking, sure, a DNS admin can create a fully
delegated sub zone to allow an MX for that sub zone.

What you've missed here is that the OP doesn't control his DNS.  He's
using the freebie DynDNS service, where there is no possibility of sub
zone delegation.  Therefore, to receive direct SMTP mail, he must use
the DynDNS paid service, another paid dynamic DNS service such as TZO,
or stick with free DynDNS and register his own domain as I suggested,
which is the cheapest solution, $5-20/year USD.

 What is important is that the MX record has a corresponding A record as
 well.

A static A record isn't required, and he has an A record already
provided by DynDNS.  If he registers his own domain, he'd simply have
the registrar create an MX record pointing to the DynDNS hostname name
assigned to him, such as:

  IN  MX 10  jason-hsu.dyndns-free.com.

The DNS server that hosts the SOA and MX for his domain isn't required
to also host the A record for the target of the MX entry, as long as an
A record exists for that FQDN on a DNS server somewhere on the net.

 Also, as has been mentioned already, it is highly advisable to have rDNS
  {reverse DNS) -- without it, you should be using smart host, ie your
 ISP as an upstream sender.

Again, he's using DynDNS with a dynamic broadband IP.  He can't get
custom rDNS.  But this doesn't matter as he can setup relay via SMTP
auth to his ISPs relays.

 Using dynamic IP means that you can't properly run your own mail server
 for both sending and receiving directly.

Rubbish. ;)  There is no technical difference between a static IP and
dynamic WRT SMTP, thus one can properly run a mail server for both
sending and receiving directly.  The problem one runs into here, which
is probably what you meant to say, is merely receiver policy.  There are
few today that accept connections from PBL/DUL listed IPs, or those with
dynamic/generic rDNS.  Thus, use SASL auth to forward all outbound mail
through your ISP.

-- 
Stan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4d802f43.40...@hardwarefreak.com