# Mail Server Question



## Wrexxman (Jun 14, 2013)

Howdy,

Is it possible to run a mail server without having to install Xorg/X11?  Google searches lead me to think that it is not possible, but I would rather hear it from people in the know.


----------



## kpa (Jun 14, 2013)

The builtin sendmail(8) has no dependencies outside of the base system, hence it does not need X11.


----------



## Crest (Jun 14, 2013)

FreeBSD includes a MTA (sendmail) in the base system. Other MTAs are available in the mail category of the ports tree. Unless you enable every option just because it exists you shouldn't get dependencies on X11. If you want to disable X11 by default in most ports add 
	
	



```
WITHOUT_X11=yes
```
 to /etc/make.conf.


----------



## SirDice (Jun 14, 2013)

Wrexxman said:
			
		

> Is it possible to run a mail server without having to install Xorg/X11?  Google searches lead me to think that it is not possible, but I would rather hear it from people in the know.


Why would a _mail server_ require X11? That would be very uncommon so I wonder what makes you believe it's not possible?


----------



## Wrexxman (Jun 14, 2013)

I was reading up on Sendmail, but I am more interested in using the system as a mail server (send/receive mail under a domain that I would own).   Thanks for the WITHOUT_X11 tip, did not know that it could be set up as a default.


----------



## kpa (Jun 14, 2013)

That's what sendmail(8) is for, sending email and receiving email for a domain. It's probably the most used mail server in the world. If you mean that also want to read mail from the server after it has been delivered to local users look into for example mail/dovecot2 that is a POP3/IMAP server.


----------



## DutchDaemon (Jun 14, 2013)

Sendmail is the default mail server on FreeBSD. Again, it is a mail _server_. It runs as such under millions of domains. The part 'Send' does not mean otherwise.


----------



## Wrexxman (Jun 14, 2013)

Ok, muddy waters are getting clearer.  Sendmail is the server (send/receive from server to server) and programs like MUTT and ELMO are the email clients.

Thanks for the help all.


----------



## ShelLuser (Jun 14, 2013)

Wrexxman said:
			
		

> I was reading up on Sendmail, but I am more interested in using the system as a mail server (send/receive mail under a domain that I would own).


I think you're mixing up your priorities a bit here, especially if you wish to utilize FreeBSD in all this. Start by learning how the system roughly works, then focus your attention on something specific.

In this case I'd advice you to check the ports(7) manual page (and remember its existence), as well as reading the FreeBSD handbook on how to use the Ports Collection. That will teach you neat tricks such as this:


```
root@smtp2:/usr/ports/mail/postfix # make all-depends-list
/usr/ports/lang/perl5.14
/usr/ports/databases/tinycdb
/usr/ports/devel/pcre
/usr/ports/security/cyrus-sasl2
/usr/ports/databases/db41
/usr/ports/devel/gmake
/usr/ports/devel/libtool
/usr/ports/devel/gettext
/usr/ports/converters/libiconv
```
I personally don't really like sendmail and as such resort to using mail/postfix on my servers. Here I requested a list of all the ports dependencies, and as you can see: nothing relates to X11 or Xorg.



			
				Wrexxman said:
			
		

> Thanks for the WITHOUT_X11 tip, did not know that it could be set up as a default.


And this is what led up to my comment above. Be careful here, while it is indeed possible to specify specific build options system-wide using /etc/make.conf some care is required. Because if you start setting too many, and too specific options in there it could disrupt the build process of other ports.

Because there are ports where selecting "X11 support" doesn't automatically mean you'll end up with an entire X11 graphical environment.


----------



## throAU (Jun 17, 2013)

Wrexxman said:
			
		

> Howdy,
> 
> Is it possible to run a mail server without having to install Xorg/X11?  Google searches lead me to think that it is not possible, but I would rather hear it from people in the know.



Yes.

Install FreeBSD base and it includes Sendmail.


----------

