I'm not sure what you were told was correct. Linux still needs a MTA (Mail
Transfer Agent) to send mail away from its self. It can manage mail for
local users without an MTA (ie. sending an email to root). I ran through the
man pages for the mail command, and did some tests. It looks like you can
use environment variables to send mail, setting the smtp variable allows you
to specify the mail relay. Use the command "export smtp=relayNameorIP". You
can test the set up using the "mail -v emailaddress" command, changing the
emailaddress to one on your exchange servers. If that fails, the -v you used
should print out the response of why it failed. You can post it here and we
can figure out why.

With all that being said, postfix is already installed, and just needs one
tweak to use the exhange servers as it's relay.
http://www.gungeralv.org/notes/archives/2003/06/howto_configure_postfix_to_use_a_remote_smtp_relay_host.phpshows
you add "relayhost =
smtp.yourisp.com" into /etc/postfix/main.cf, then restart postfix. So you
have two options on how to get mail flowing. Let us know of any problems,
and when you do get it working, let us know what you did.


Jeremiah E. Bess
Network Ninja, Penguin Geek, Father of four


On Fri, May 29, 2009 at 06:31, Kenneth Holter <[email protected]> wrote:

> Thanks for the informative reply.
>
> Actually, as of now I'm going to send mail within my organization, thus not
> through our ISP. We have a bunch of linux servers that I'd like to set up to
> send emails to our Exchange server. As of now I've configured postfix on the
> servers to be able to send email, but someone told me that postfix is not
> needed for this, because linux boxes are capable of sending mail without it.
> But this is where I'm stuck - where do I configure my linux boxes to send
> mail to our exchange server? Somewhere I've got to specify the IP address of
> the server, but I'm nor sure where...
>
> Btw, I'm gonna use your tutorial on my home network when I get around to
> it. :)
>
>
> Kenneth
>
>
> On 5/27/09, Jeremiah Bess <[email protected]> wrote:
>>
>> Keyboard jacked up there, sorry, sent before I meant it to.
>>
>> First question you need to have answered is does your ISP allow outbound
>> SMTP traffic. Mine happens to (Qwest), so I have daily reports mailed from
>> my home server to my gmail account. Once you have answered that, if postfix
>> is setup, you should be good to go.  Postfix does a MX lookup for the
>> destination email address (gmail.com, for example), and sends to one
>> ofthe IPs listed.The only thing you might have to additionally set up is a
>> reverse DNS entry. Dynamic DNS hosting, such as dyndns or no-ip.com are
>> free for this kind of set up. You may need this because many mail servers do
>> a reverse lookup of your IP when they accept mail to make sure it is coming
>> from yourdomain. Meaning, I send an email from my lin box from
>> mydomain.com, my IP needs to map back to mydomain.com. After you set up a
>> DNS domain, in the /etc/postfix/main.cf file, make sure your registered
>> domain is listed in "myhostname = myregistereddomain.com", then restart
>> postfix.
>>
>> A simple way to test for allowed SMTP traffic is to telnet to you test
>> destination. Get the IP by doing a dig or nslookup:
>> dig -t mx gmail.com
>>
>> grab one of the IPs listed (gmail-smtp-in.l.google.com. 54  IN
>> A       209.85.217.65)
>>
>> type:
>> telnet 209.85.217.65 25 (there HAS to be a space then 25 at the end, which
>> is the SMTP port)
>>
>> At the prompt:
>>
>> Trying 209.85.217 .65...
>>> Connected to mail-gx0-f65.google.com (209.85.217.65).
>>> Escape character is '^]'.
>>> 220 mx.google.com ESMTP 21si21103927gxk.6
>>>
>>
>> type:
>> helo myregistereddomain.com (yes, 1 "L" in that helo)
>>
>> The response from gmail:
>>
>>> 250 mx.google.com at your service
>>>
>>
>> type:
>> mail from:<[email protected]>
>>
>> The response:
>>
>>> 250 2.1.0 OK 21si21103927gxk.6
>>>
>>
>> type:
>> rcpt to:<[email protected]>
>>
>> The response:
>>
>>> 250 2.1.5 OK 21si21103927gxk.6
>>>
>>
>> type:
>> data <hit return>
>> test message
>> . <single period on new line then return to end message>
>> quit <return>
>>
>> If you connected, then you are probably allowed by your ISP. If the email
>> arrives and you don't get any errors when telneting into your destination,
>> then your IP maps back to your host, or the destination server doesn't care.
>> If you are not using gmail as your test destination, drop the <>'s around
>> the addresses if the server gives you errors.
>>
>>
>> Jeremiah E. Bess
>> Network Ninja, Penguin Geek, Father of four
>>
>>
>> >
>> >
>> > On Wed, May 27, 2009 at 04:38, Kenneth Holter <[email protected]>
>> wrote:
>> >>
>> >> Hello all.
>> >>
>> >>
>> >> I'm sorry if this is a very basic question, but here it goes: How do I
>> set up a my linux boxes to enable them to send mail to my mail account
>> (Outlook account)? I've got it working by installing and configuring
>> Postfix, but not sure how to do it without Postfix (where do I define the
>> mail relay server/exchange server?).
>> >>
>> >> Regards,
>> >> kenneho
>> >> >>
>>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup
-~----------~----~----~----~------~----~------~--~---

Reply via email to