# localhost smtp server.. witch?

## Xenzeo

Hey all...

I would like to install a smtp server on my desktop workstation, i really just want the smtp side of the mail server, so i'm not depending on my isp's mail catching and mail saving servers, but witch should i choose??

I would like it too be as small as possible.. should i install Qmail or Postfix or is it possible to get a workalone smtp?

----------

## adaptr

Unless you own a domain for which your box is the primary MX you will never get mail that doesn't go through your ISP.

You need to understand the workings of SMTP to make sensible judgements about what you need.

If you want to collect your mail on your box (which will still come from your ISP's account) and send it from your box then you can use fetchmail and ssmtp - they're small, easy and stable.

If you want to use your box as a real mail host then the above holds true: you need to have a domain that points to your box for mail, and configure a full MTA / MDA system.

----------

## Xenzeo

Thanks a bunch

Xenzeo

----------

## Xenzeo

Well.. after a look a ssmtp i discovered at is wan not able to deliver mail by it self, it only sends them to a mailhub...

That was not the intension, i know if i install qmail of postfix it can do the job, by query the domain (the mail goes to) and find the MX record and deliver the mail direcly to there mail server...

Is it not possible to finde a standalone smtp server anywhere?

----------

## adaptr

ssmtp is a stand-alone smtp server - what exactly do you mean by that ?

An MTA usually has many parts that interact closely in order to deliver mail.

 *Quote:*   

> if i install qmail of postfix it can do the job, by query the domain (the mail goes to) and find the MX record and deliver the mail direcly to there mail server

 

That's the point - you can use your ISP for that, there's no need to do that yourself.

If you have anything like a decent ISP then they provide you with an outgoing SMTP address you can use to send any mail you like.

----------

## Xenzeo

Sure.. the problem is not beeing able to send mail, it's beeing able to send mails without thay are saved.. (my the isp)

On in denmark there are a law for ISP's thay are forced to SAVE every e-mail going through there system..

I want a MTA that do this:

I send "echo hello" | mail -s xenzeo@blackhat.dk root@blackhat.dk -> 

localhost:25 -> query blkackhat.dk finds MX mail.blackhat.dk

localhost:25 -> mail.blackhat.dk:25 and delivers the mail...

NO isp involved... I'm happy  :Wink: 

As i said i know qmali and postfix can do this cause thay are complete mailserver packages, with a smtp part and a imap/pop part... 

I just want the smtp part..  :Wink: 

----------

## adaptr

Absolutely not true - an MTA only deals with transporting mail from A to B, it doesn't do user logins or collecting mail.

Neither Postfix or Qmail have any mailbox functionality - you need an IMAP or POP server for that.

For hands down the easiest MTA there is, as well as one of the most secure ones, use Exim.

Configuring it is easier than either Postfix or Qmail.

----------

## Xenzeo

 *adaptr wrote:*   

> Absolutely not true - an MTA only deals with transporting mail from A to B, it doesn't do user logins or collecting mail.

 

d00d you got me all wrong.. 

The retrival of mail i can do, i connect to a secure imap somewhere on the wild internet, that's that.

The only thing i wantet was a MTA, and i'v got one now, i installed postfix, configured it to run on localhost:25 sending mail for blackhat.dk only for me, and i works  :Smile: 

Thanks anyway..  :Wink: 

----------

## adaptr

 *Xenzeo wrote:*   

> 
> 
> d00d you got me all wrong.. 

 

No, I got you exactly right, you said:

 *Quote:*   

> i know qmali and postfix can do this cause thay are complete mailserver packages, with a smtp part and a imap/pop part

 

...which is absolutely not so.

An MTA is an MTA - it has little to do with IMAP or POP3.

But it hardly matters anymore, since you solved your predicament.

It might only help to know that no, there was no simpler/shorter/smaller way to achieve that.

----------

## Xenzeo

 *adaptr wrote:*   

> 
> 
> An MTA is an MTA - it has little to do with IMAP or POP3.
> 
> 

 

I know.., I was just pointning out that both qmail and postfix consist of A SMTP, and B POP/IMAP.. 

So you DID get me wrong.. Muah just kidding,Don't take this too serious  :Wink: 

Thanks anyway

-Xenzeo

----------

## kashani

Actually qmail/postfix don't. If you wanted pop3/imap you'd have to install another package. Both of the those MTA's can deliver mail locally which is part of the whole MTA thing, but neither can present the mail to users as pop3 or imap. That might be the part causing the confusion.

kashani

----------

## Xenzeo

Sure, i forgot.. Excuse my ignorrence..

I suddenly remembered that i also installed Courior-IMAP that time in configured Qmail.. That was about 3 years ago.. And i have been brain washed my the military the last 2 years.. 

My fault.. 

-Xenzeo

----------

## adaptr

Well in that case - welcome back to the real world!

No hard feelings.

----------

## syn_ack

Greetings. 

I see that Xenzeo has solved his problem an couldn't resist to add to this thread.

I'm looking for some general guidance "not hand holding" for a particular home network set-up that I hope to achieve. 

What I would like to achieve is setting up an internal MTA/POP3 (Virus Scanning and AntiSpam if possible), server on one of my Gentoo systems.

Here's my setup.

ISP: Comcast. 

Hosts, SMTP and POP3 for my account and my wifes. (Separate accounts)

           |

CABLE MODEM

           |

Eth0 (running: dhcpcd -R)  

           |

>>>This is my Gentoo box with 2 nics

>>>Also running Shorewall Firewall, DJBDNS local dns caching-server and local dns(name) content-server for local only domain/clients on the Eth1 network.

           |

Eth1 (running: static pvt ip 192.168.10.1/24

           |

The 192.168.10.0/24 internal lan. (Internal domain not seen by the internet is deadmeat.com)

I have  1 other Gentoo system and 2 Windows pc's.

Ideally I want to install SMTP, POP3, Virsus scanning services and AntiSpam on the Internal Gentoo system. I would like to have the Gentoo system grab mail (POP3) off the ISP's mail servers for both mine and my wifes email accounts, and scan thoe emails for viruses. 

I would like to configure the local mail clients to point to the internal Gentoo system for SMTP and POP3 services and Forward internet bound emails generated by the local mail client, to use the internal Gentoo system to push via SMTP to the ISP's SMTP server?

Will "Exim" perform (SMTP) and "Fetchmail" perform (POP3) functions securely? Or am I way off base here? I'm also looking for easy intallability if possible since this is such a small network.

I'm pretty sure this is doable but I'm alittle confused with how one handles server setup in regards to "Multiple smtp, pop3 accounts externally. We use yahoo web mail as well.

I would think that this would be a pretty common setup but I'm somewhat new.

Thats why I'm asking for your opinion, thoughts and any feedback?

I won't have any issues with howto configure the firewall for smtp and pop3 traffic.. So I'm good to go in that arena. AntiVirus and Antispam measures I can worry about after I get the fundamentals working.  :Very Happy: 

Thanks,

----------

## Xenzeo

Hey.. 

I'm not the expert here, but i would like to help as much i can.. 

I would recommend Qmail for the hole internal mail thing, qmail + daemontools can do the smtp part and qmail can bve set up as mail forwaring host thingy  :Smile: , where you also will be able to configure it agains spam data base rbl or tmda, antivira is also relative simpel too implante in qmail mta rutine.. use qmail-scanner

I know that fetchmail can be patch to deliver the mails in maildir, but you properly just want to diliver to qmail-smtpd so that i will be checked against spam db and vira... 

using fetchmail from your home too your isp is as safe as checking your mail from home, same procedure, username/password are send plaintext !!!!  this sucks use SSL if you got the oppertunity..

Hope this was of some help.. 

You can take a look here:

http://www.flounder.net/qmail/qmail-howto.html

http://qmail-scanner.sourceforge.net/

----------

## adaptr

 *Xenzeo wrote:*   

> Hey.. 
> 
> I'm not the expert here, but i would like to help as much i can.. 
> 
> I would recommend Qmail for the hole internal mail thing,

 

As I said earlier, this is simply not possible - qmail is an MTA, not a POP3 server.

For your home network, the POP3 server is actually the most important part - the SMTP server (if any) just forwards everything to an outside MTA.

 *Xenzeo wrote:*   

>  qmail + daemontools can do the smtp part 

 

Just qmail (or even ssmtp) will do - no more is needed.

 *Xenzeo wrote:*   

> and qmail can bve set up as mail forwaring host thingy , where you also will be able to configure it agains spam data base rbl or tmda, 

 

Which is quite pointless - why scan your outgoing mail ?

Checking against a spam/rbl database is definitely not enough - just use spamassassin like a normal person  :Wink: 

 *Xenzeo wrote:*   

> antivira is also relative simpel too implante in qmail mta rutine.. use qmail-scanner

 

Again - qmail sends mail - with the setup he needs qmail will never receive any.

Scanning your own outgoing mail for viruses is putting the cart before the horse.

 *Xenzeo wrote:*   

> I know that fetchmail can be patch to deliver the mails in maildir, 

 

No patching is necessary - you can use fetchmail to forward mail it receives to your internal MTA, which will then deliver it to any local mailbox you desire.

 *Xenzeo wrote:*   

> So why use but you properly just want to diliver to qmail-smtpd so that i will be checked against spam db and vira... 

 

Yesss... but I wouldn't use qmail for that - if he's never used an MTA before Exim is the easiest to set up.

 *Xenzeo wrote:*   

> using fetchmail from your home too your isp is as safe as checking your mail from home, same procedure, username/password are send plaintext !!!!  this sucks use SSL if you got the oppertunity..

 

Want to lay odds on whether his ISP supports POP over SSL ?

Didn't think so...

----------

## adaptr

 *syn_ack wrote:*   

> Greetings. 
> 
> I see that Xenzeo has solved his problem an couldn't resist to add to this thread.
> 
> I'm looking for some general guidance "not hand holding" for a particular home network set-up that I hope to achieve. 

 

Let's get going then!

 *syn_ack wrote:*   

> What I would like to achieve is setting up an internal MTA/POP3 (Virus Scanning and AntiSpam if possible), server on one of my Gentoo systems.

 

Easy - just follow the bouncing dots...

 *syn_ack wrote:*   

> Here's my setup.
> 
> ISP: Comcast. 
> 
> Hosts, SMTP and POP3 for my account and my wifes. (Separate accounts)
> ...

 

Certainly ?

Here's how I'd do it:

- mail is pulled from your various POP accounts by fetchmail - it supports an unlimited number of accounts, users, etc.

- fetchmail pushes this locally to the MTA, so it seems as if it has just arrived there.

This is the closest you'll get to a "real" mail setup when you don't or can't run your own MX (Mail Exchanger).

- the MTA (qmail, exim, postfix, whatever) sends it through a virus scanner if necessary.

- the MTA delivers locally via procmail

- procmail sends it through spamassassin

- procmail delivers to local mailbox / maildir (depends on the MTA)

- the local MTA just forwards all mail directly to an outside MTA, rewriting sender addresses as necessary (trivial)

- a local IMAP server hands the users their mail; IMAP is way better than POP if you can use it (and you can, since it's your network).

My personal setup would be Exim as the MTA, fetchmail to get your POP mail, and Courier-IMAP to serve it up.

Exim is fast, simple, and quite flexible.

Courier-IMAP is very stable and fast as well.

That's it, really.

If you have questions on why or anything, just let me know.

 *syn_ack wrote:*   

> Will "Exim" perform (SMTP) and "Fetchmail" perform (POP3) functions securely? 

 

Probably, but that's not really that useful.

The other end of the conversation needs to support it to have any effect - and they won't, so it doesn't...

Your mail comes from an outside (insecure) POP3 connection - there's nothing you can do to secure it.

And the mail you send will have to go through your ISPs MTA - which trivially won't support neither receiving nor forwarding SSL-encrypted mail.

Securing your local mail traffic is a non-issue; what are you protecting it from ?

 *syn_ack wrote:*   

> Or am I way off base here? I'm also looking for easy intallability if possible since this is such a small network.

 

Well, the need for pulling in separate POP accounts pretty much dictates the use of fetchmail and an IMAP/POP server - I'd always go with IMAP if possible since POP sucks  :Wink: 

Installing and configuring fetchmail will require some work to get it right, but its setup is really quite easy.

The IMAP server is a breeze - install & run.

The biggest "challenge" will be configuring the MTA to suit your needs, and getting the virus and spam stuff sorted out.

But once it's up it requires very little maintenance.

And a fully-fledged MTA instead of just a forwarder like ssmtp gives you a lot of flexibility - you may be thankful for that later on....

 *syn_ack wrote:*   

> I'm pretty sure this is doable but I'm alittle confused with how one handles server setup in regards to "Multiple smtp, pop3 accounts externally. We use yahoo web mail as well.

 

Again - fetchmail is your puppy here.

 *syn_ack wrote:*   

> I would think that this would be a pretty common setup but I'm somewhat new.

 

Overall, it's pretty common, yes - but there are upwards of 31087 ways of doing it...

----------

## Xenzeo

syn_ack,

I'm sorry i didn't do much help here.. waste on bytes...   :Embarassed: 

But not on my account, thanks adaptr, for teaching me this lession, i'm sure i'll get it right from now on..     :Rolling Eyes: 

----------

## adaptr

No problem Xenzeo, I'm a sucker for education  :Wink: 

----------

## 3lithium

 *adaptr wrote:*   

> As I said earlier, this is simply not possible - qmail is an MTA, not a POP3 server.

 

qmail does include a POP3 server (qmail-popup/qmail-pop3d), it just needs a suitable checkpassword program. It's an MTA and MDA. You don't need procmail either, the .qmail mechanism is powerful enough to run spamassassin and deliver to mailboxes and maildirs as needed.

I use qmail myself and it has quite a few strong points, but for setting up a new mail system today postfix or exim are probably better choices. qmail will typically need a lot of patching and add-ons before it works the way you want it to.

 *adaptr wrote:*   

> IMAP is way better than POP if you can use it

 

...in your opinion. My experience is that IMAP support sucks in lots of clients, that it is slow and adds unnecessary network traffic (probably not an issue on a LAN). I can see why people might prefer IMAP, but for me POP3 is much easier to deal with both as an administrator and user.

 *adaptr wrote:*   

> Securing your local mail traffic is a non-issue; what are you protecting it from?

 

True unless you have a wireless network. The built-in encryption for wireless networks are often weak, in that case using TLS-secured connections make sense even locally.

----------

## adaptr

 *Quote:*   

> ...in your opinion.

 

Absolutely.

I have seen M$ Outlook crash again and again on Courier, and I use Thunderbird without a hitch - so much for the client side.

I didn't mean the specific implementations, which as an admin you'd have to account for of course - I mean the protocol.

POP3 is just very cumbersome when not on a reasonably speedy link.

And the wireless stuff... hmm yes I didn't think of that, but you have to admit that anybody who can configure a secure local wireless network will definitely know enough to secure a simple thing like mail too.

<slight sarcasm intended>

----------

## syn_ack

Thanks a-ton adaptr. You know exactly what I'm trying to do.

adaptr wrote:

 *Quote:*   

> 
> 
> Here's how I'd do it:
> 
> - mail is pulled from your various POP accounts by fetchmail - it supports an unlimited number of accounts, users, etc.
> ...

 

Ok this pretty much gets me thinking in the right direction. Thats mainly what i was looking for. I'm going to skip the Anti-virus Spam stuff for now until I can get the base essentials working first.  :Wink: 

I would just like to add that the 2 Windows Pc's  do use Outlook Express. So is my understanding that they have issues with using IMAP then? if they are going to have an issue with IMAP then I will want to use something else. POP3 variant..Any opinions in that area specifically? 

So if I don't want to use Anti-Virus of Spam checking then I wouldn't need Procmail correct?

If that is correct then it looks like what I need to research is "Exim", "Fetchmail" and "IMAP" or a suggested "POP3" service to do what I'm trying to do? If not then let me know where I'm wrong.

One of the things that I'm alittle hazy about is:

When I've skimmed over some of the Qmail and Exim documentation I'm under the impression that I need to create User Accounts on the Gentoo system that acts as the MTA for clients that connect to get mail, even knowing, that none of Windows machines will ever login to this system for anything other than clicking on thier respective "Send and Receive" button in Outlook Express.

If I do need to create user accounts is there anything special that needs to be added when creating the actual accounts or can I just follow whats listed in the "Gentoo install doc's for creating a user account?

Do I use the machine name they connect with for thier respective accounts? Probably redundant question that is already answered in the doc's. If so, sorry. Jumping the gun a little.

adapter wrote:

 *Quote:*   

> 
> 
> Securing your local mail traffic is a non-issue; what are you protecting it from ?
> 
> 

 

I know what you mean here. I was actually referring to any security risks with the actual said server services themselves (code wise) not security going accrossed the wire. Thats mute though and I'll research it. 

So... Exim, Fetchmail and IMAP or some POP3 service if IMAP and Outlook Express don't like eachother..?

Again thanks.. much appreciated.   :Cool: 

----------

