Dovecot versus Postfix

Jan Sneep jan at azureservices.ca
Wed Nov 14 17:39:36 UTC 2007


Rashkae wrote:
> To use Postfis:
>
> configure a mail client to send e-mails either through smtp: localhost

I've been assuming that either Postfix or Dovecot is an SMTP server?
If so, there must be some setting in some file that can be looked at to
verify what port(s) it is listening to and if it requires an SSL connection?
If so, then there must be some setting in some file that identifies this?
If so, then does it use the same password that each individual uses to login
to the server? i.e. the password given to each user via Services ->
Administration -> Users and Groups from Gnome or do you have to go someplace
else to set a username & pswd?


> Or, some unix only mail systems (like Mutt or Evolution) can
> simply pipe
> outgoing e-mail to sendmail program.  I suggest using a
> different e-mail
> program than your usual one to test and play with the configuration.
> Note: when you have postfix installed, it creates a symlink from
> sendmail to postfix, so programs that call sendmail directly
> will work
> with postfix.

OK, using Synaptic Package Manager and searching on "sendmail" I see a
number of programs, including Postfix (the check box is green indicating the
software is installed), that show up. There is a program called "Sendmail"
(the check box is empty) with a description of "powerful, efficient,
scaleable Mail Transport Agent" Which is what I thouht Postfix is? So do I
need to install Sendmail inorder for Postfix to work?

> If you want to send e-mail to a local user, send it to
> username at localhost  As you already discovered, that won't
> work if your
> e-mail program is forwarding e-mail to your ISP's smtp server, so use
> your own.

OK, what program is acting as the SMTP server on my LAMP server? How can I
check what the current settings are?

> To make life complicated, some ISP's block port 25, which
> means you will
> no be able to send e-mail from your own smtp server to others on the
> Internet directly.  And if that weren't annoying enough, some
> small time
> e-mail servers try to control spam by not accepting e-mails sent from
> dynammic IP's.  To get around these, you have to configure postfix on
> your system to forward any outgoing e-mails to your ISP smtp server.
> This is called a 'smarthost' configuration.  I believe debian (and
> Ubuntu) allows basic smarthost configuration through the the

At the moment I just want to use the server(s) to pass emails between users
on the LAN, so don't have to worry about Internet issues for now.  At some
point it would be nice to have the server retrieve all out emails from the
various Internet mailboxes and forward emails to our ISP, but I thought I
would take things in 'baby' steps ... :O)

> dpkg-reconfigure postfix command.

Very leary and reluctant to just run a configuration script! Remeber I just
clicked on the "Upgrade" button in the Update Manager a couple of weeks ago,
figuring it MUST be 100% safe and that cost me / lost me three days of work
getting the Samba server back up and working and had to re-install the
entire eGroupware application so we could access our business contacts files
again. Actually I had to completely erase, i.e. manually delete each and
every file and then install the entire thing again as the re-install in the
Package Manager didn't work! LUCKILY the MySQL didn't die or we would have
been totally <explitive>.

Do you know of a document that walks through this and explains what and why?
In the past I have found a lot of these things assume you know what, for
example, your domain name is, which if this was a server with Internet
access it would need to have, and you would know what it is, but when you
don't have one, because in a way you don't need one, it makes answering some
of the basic setup questions difficult. (I have since figured out that on my
server the Ubuntu default is localhost.localdomain, but that took me a while
to find.


> Ok, once you've gone this far, you want to be able to see all these
> e-mails you've been sending your local users.
>
> Open your favorite test e-mail client, and add an account, type Imap,
> server is localhost, and use Secure SSL Imap (default port of 993).

My old Outlook 2000, account setup doesn't seem to have a place to select
IMAP as the type of server, I'll have to see if I can install what some have
recommended ... Thunderbird, assuming it has an IMAP capability.

> I know that using encryption to talk to localhost seems like a waste,
> but I think by default, dovecot only enables encrypted communication.
>
> When your e-mail client opens the new account, you should be
> able to see
> all the e-mails you've sent to that user at localhost.


> Once you have all this working, if you want to extend the services to
> the other hosts in your network, assuming you have a small enough
> network that it's not worth the bother setting up DNS and
> what not....
> (Note, you will have to give postfix a hostname so it knows
> which e-mail
> it needs to deliver to local users.  You will also have to cofigure
> postfix so it can relay mail from your local network)

Hmmm, I don't think I have other hosts.

> If it doesn't already, give your server a static IP address
> rather than
> using DHCP.  The static address you choose should be outside
> the range
> used by your router DHCP server. (Most routers I've seen
> start at 100,
> so, for example, if your normal IP is something like
> 192.168.1.101, you
> can safely assign 192.168.1.2 as your server IP, Never use address
> ending with .1, that's almost always used by the router itself)

Yes, my LinkSys DSL router uses 192.168.1.1 and I have a second one on the
network acting as a "splitter" which is 192.168.1.2, so you think I should
assign a static IP for the server instead of using the one that the DHCP
assignes. The problem I have with that is that unless the DHCP assigns the
address the device can't get out onto the Internet. I have an old Windows
'98 box that is currently running that Microsoft Mail application that I'm
trying to get rid of. I have it using 192.168.1.99, but when I want to
update the anti-virus softare I have to change the configuration to grab an
IP from the DHCP so I can do the update and then have to put it back to
192.168.1.99, which is a real pain. I don't need the static IP for the
Microsoft Mail application to work, but the machine is weird, if I leave it
as a DHCP assigned IP the machine freeses and locks up more frequently than
if it is a static IP. I have spent hours trying to figure out why, but in
the end decided that it was better to just leave it as a static address.

I was hopeing to avoid having to resort to assigning a static address to the
Ubuntu server, just so it is easier to do the updates.

> Now when you configure the e-mail clients on other stations
> of your home
> network, use smtp 192.168.1.2 (from my example) for outgoing
> e-mail, and
> add an IMAP account to 192.168.1.2 so they can receive any locally
> generated mail.

So what software / application would I add the IMAP account to Postfix or
Dovecot or both or ?

>
> I'm sorry I'm not including any step by step for any of this, but I
> figure for now, what you need is an overview/roadmap of what needs be
> done.  Now you can pursue documentation for these software
> servers and
> ask targetted questions for any of the steps.


Many thanks for your long reply.




More information about the ubuntu-users mailing list