# Sending Mail via my Internet Provider



## NightTripper (Mar 20, 2012)

I have FreeBSD 8.2 running with a NOAAport program on it.  I would like to have the mail generated by FreeBSD sent to me by way of my internet provider (mediacom) email account.  I would prefer not to run a mail server.  And I do not need to have FreeBSD receiving any mail.  Is this possible?

Mark


----------



## DutchDaemon (Mar 20, 2012)

Just set the root: alias in /etc/mail/aliases to your external address and run *newaliases*.


----------



## NightTripper (Mar 20, 2012)

root  myaddress@mchsi.com

Then run newaliases  That is all there is to it.  That was way easier that I expected.

Thank you very much
Mark


----------



## NightTripper (Mar 20, 2012)

I left out the : after root

root:  myaddress@mchsi.com


It's all in the details that get you 

Mark


----------



## NightTripper (Mar 20, 2012)

Is it possible to have the mail already on the computer for root be sent to the alias email address?

Mark


----------



## phoenix (Mar 20, 2012)

Not easily or automatically, no.  You have to use the mail(1) program to view the messages, and then forward them manually from there.


----------



## kpa (Mar 20, 2012)

formail(1) may be useful for the task, it's part of mail/procmail


----------



## NightTripper (Mar 20, 2012)

What did I just do with the alias?

Mark


----------



## NightTripper (Mar 20, 2012)

I'm very green at this.  It took me over a month to get the NOAAport system running on FreeBSD.  But I'm game for just about anything.

Mark


----------



## phoenix (Mar 20, 2012)

NightTripper said:
			
		

> What did I just do with the alias?



Configured the system to forward any *new* messages to the e-mail address you listed in /etc/aliases.

Old messages have been "delivered" to root's e-mail account on the system (aka /var/spool/mail/root).  In order to forward those messages on to somewhere else, you need to read them (via mail(1)) and then manually forward them along (or delete them).


----------



## NightTripper (Mar 20, 2012)

SO my FreeBSD system will now send the auto generated root mail to my address@mchsi.com?  Some say yes others no.  So I'm a little confused.

Mark


----------



## DutchDaemon (Mar 20, 2012)

*New* mail will be sent on. *Already delivered* mail sits in /var/mail/root, and will not. It's not that confusing.


----------



## NightTripper (Mar 21, 2012)

> New mail will be sent on. Already delivered mail sits in /var/mail/root, and will not. It's not that confusing.


You are right.  It was just that easy.  My reports were delivered to my commercial account.

Thank you very much DutchDaemon

Mark


----------

