# Setting up Email-Server with PostFix



## folivora (Jul 19, 2011)

I want to setup mail/postfix server.

I have been reading different tutorials about this, I do have domain. I don't want to setup web-access, but I want that server can be accessed via different email-clients, so is it enough if i follow this tutorial: http://www.purplehat.org/?page_id=4 and I skip apache and php5 parts? 

Best Regards

folivora


----------



## graudeejs (Jul 19, 2011)

It's a good tutorial.
You may also try mine: http://wiki.bsdroot.lv/postfix:mailserver it's based on tutorial you mentioned and some other info


----------



## vand777 (Jul 19, 2011)

Dear folivora,

all the links mentioned in this topic are really good tutorials. I was using all of them when setting up my first email server.

I'll add one more: http://blog.tusoffka.org/2009/07/31/freebsd-postfix-mysql-spamassassin-maia-virtual-setup/.

There are few mistakes in the tutorial from my link but they are very easy to find and fix. Should you have any further questions during the setup please feel free to ask. We will try to help if we can.


----------



## folivora (Jul 19, 2011)

Thanks for the replies, 

Could someone tell me which parts of these tutorials I need to configure / install, so clients can access mail-server via email-clients. They don't need web-based access.


Best Regards

folivora


----------



## graudeejs (Jul 19, 2011)

Postfix & Dovecot part, but you should read all of it... Perhaps you will find something more

In these configs, you're supposed to have database to manage user accounts.
So you need to read about that, or to read postfix and dovecot documentation and improvize


----------



## folivora (Jul 19, 2011)

Ok, I started with http://www.purplehat.org/?page_id=16 instructions. I get following error: 


```
usr/ports/mail/p5-Mail-SPF-Query

===>  p5-Mail-SPF-Query-1.999.1 conflicts with installed package(s): 
      p5-Mail-SPF-2.007

      They install files into the same place.
      You may want to stop build with Ctrl + C.
```


----------



## vand777 (Jul 19, 2011)

AFAIK you should not use Mail::SPF::Query any more: it's obsoleted. Mail::SPF is its official replacement. Just deinstall p5-Mail-SPF-Query and use p5-Mail-SPF instead. But maybe I'm wrong.


----------



## folivora (Jul 19, 2011)

Dear vand777,

Somehow in the installation process of maia it wants to install p5-Mail-SPF-Query-1.999.1 after it has installed p5-Mail-SPF-2.007.

This is confusing me. 

Could someone tell, how I could fix this error.


----------



## vand777 (Jul 20, 2011)

I just tested the installation of security/maia in a new jail (with default settings). It didn't give me any errors... It installed only p5-Mail-SPF-Query.

Can you check which port has installed p5-Mail-SPF?


----------



## amitabh (Aug 2, 2011)

folivora said:
			
		

> Dear vand777,
> 
> Somehow in the installation process of maia it wants to install p5-Mail-SPF-Query-1.999.1 after it has installed p5-Mail-SPF-2.007.
> 
> ...



If you want to replace the p5-Mail-SPF-Query dependency with p5-Mail-SPF in the Makefile of the maia port. Somewhere down in the Makefile, you would have

```
.if defined(WITH_SPFQUERY)
RUN_DEPENDS+=   ${SITE_PERL}/Mail/SPF/Query.pm:${PORTSDIR}/mail/p5-Mail-SPF-Query
.endif
```

replace it with

```
.if defined(WITH_SPFQUERY)
RUN_DEPENDS+=   ${SITE_PERL}/Mail/SPF/Query.pm:${PORTSDIR}/mail/p5-Mail-SPF
.endif
```

Amitabh


----------

