Re: question about sending mail and postfix
On Tue, 19 Jan 2010 13:00:15 +0000, Adam Hardy wrote:
> Camaleón on 19/01/10 07:47, wrote:
>> Explain a bit so we can get the whole scenario about your Postfix
>> setup.
>
> All I need is for my system to send various administrative emails to my
> own personal email account (on this email's domain, completely different
> from the system). For instance, emails containing the results of nmap
> and netstat launched by crontab and other such security checks.
>
> The system won't have any other users than root and adam so no local
> emails between accounts are needed. Everything should be directed to my
> personal email.
>
> And the system shouldn't accept any external emails or allow any
> relaying. That was why I had the line about inet_interfaces = loopback.
> I thought that would secure it. I've taken the setting out of main.cf
> now.
O.k. I think all is more clear now :-)
You can leave that value if you are not going to use Postfix in an
intranet environment neither you are going to use it as an external/
remote MTA.
So just restore back:
***
inet_interfaces = loopback-only
***
And run "etc/init.d/postfix restart" to activate it.
As you *explicitly* installed Postfix I thought you knew beforehand what
you were doing and what you wanted to achieve.
As per your described setup, Postfix can do the job (sending e-mails to
external hosts, which is usually named "using Postfix as client") with no
problems at all, but you (being the administrator of the host) need to
understand what type of configs are available in Postfix.
Postfix is very flexible and can be configure to manage not only local
mails (let's say, between you and your own host) but also can be used to
address thousand of e-mail domains (virtual domains), usually known as
"running Postfix as server".
You can get an idea of the different setups you can get by reading this
page:
Postfix Standard Configuration Examples
http://www.postfix.org/STANDARD_CONFIGURATION_README.html
So, it should just work "out-of-the-box" without tweaking anything, at
least when installed from sources. Debian scpecific setup may vary, but
should be quite the same.
> However postfix is still ignoring my attempts to alias "root" and
> "adam". My main.cf is quite slim:
O.k. Let's evaluate again your current setup.
> mydomain = ecocore.org
What is this domain for?
I get:
sm01@stt008:~$ host ecocore.org
ecocore.org has address 205.153.118.230
ecocore.org mail is handled by 10 mx2.athnic.net.
This host actually exists and is running a mail server. Is that your
Postfix? I think not, I think this is your ISP address/domain name and
should not be listed here.
Just leave the default value untouched (that is, #comment it).
# mydomain = ecocore.org
> myhostname = $mydomain
> myorigin = $mydomain
You can leave these ones:
> mynetworks_style = host
> append_dot_mydomain = no
> local_recipient_maps =
> relay_domains =
And then, restart Postfix and try to send an e-mail to "root". You can do
it as follows:
***
telnet localhost 25
mail from:root
rcpt to:root
data
testing e-mail
.
quit
***
And just review (and report back) for any error or messages you got in
the log ("/var/log/mail.log") :-)
Greetings,
--
Camaleón
Reply to: