general email question

Mike Meyer mwm-dated-1049481813.2ea41e at mired.org
Sun Mar 30 10:43:36 PST 2003


In <003e01c2f6e1$b7ba2760$f6cd07c4 at d>, DJ Boris <dj_boris at mail.ru> typed:
> I need help. I have done quite a bit of reading but it is all just beating
> around the bush.. or maybe I am missing something.
> I have one ISP POP3 account (maildrop) with 5 aliases. I need to collect all
> mail onto the local fbsd server mail server and sort it according to the
> "To:" field so LAN users can collect mail from that server. I also want
> users to be able to send mail to the LAN mail server and then the server has
> to relay that mail to the ISP's SMTP. all this has to be done over a Dial-up
> link.
> the dial-up is up and running OK.
> 
> as far as I understand I need fetchmail, sendmail, procmail, and some mail
> server. am I right?

Not quite. You don't need procmail, but it's handy to have around. You
need a pop mail server. Sendmail will be your smtp mail server.

> could someone point me to the right documentation or
> examples on the internet OR if possible to explain to me what comes first
> and how all the above components (fetchmail, sendmail, etc) come together
> and possibly suggest what combination of software packages I should use.

Personally, I don't use sendmail - it's massive overkill for job of
being an smtp server. But it's very popular, already installed on
FreeBSD, and you shouldn't have trouble getting help with it.

Basically, the flow goes:

mail arrives at your ISP's smtp server, which puts it where your POP
server can get it.

fetchmail picks up mail from the the pop server, and hands it to your
local delivery agent. Procmail can do that for you, or Sendmail can do
it. That needs to put the mail where your local POP mail server can
find it. There are a lots of choices for that - just check out
/usr/ports/mail/*pop*. I use qmail-pop3d, which comes in the qmail
port, which is what I use instead of sendmail.

Outbound is even simpler. Your users will tell their clients to
deliver outgoing mail to your local SMTP server. Since you have(?) to
use your ISP's SMTP server, you'll configure your sendmail to use that
as a SMARTER_HOST. There were details on that here in the last couple
of weeks. That will cause all outgoing mail to be sent to your ISP's
SMTP server to be forwarded to the actual destination.

I'd advise doing one direction at a time. Set up sendmail for local
delivery by setting sendmail_enable="YES" in /etc/rc.conf. Check
/etc/defaults/rc.conf for other sendmail flags you may want to set
up. Then install the fetchmail port, and set that up to read mail from
your ISP's POP server and deliver it to sendmail. Finally, choose a
pop mail server and install that so you can read mail locally. If you
have any questions about the individual steps, ask back here after
you've checked the ports documentation and the handbook.

Once that's done, all that's left is tweaking your sendmail config for
to set the SMARTER_HOST stuff up. Check the archives of this list for
information on how to do that.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.


More information about the freebsd-questions mailing list