[ale] sendmail configuration

Mike Harrison cluon at geeklabs.com
Wed Jan 12 10:05:29 EST 2011


On Wed, 12 Jan 2011, Christopher Fowler wrote:

> On 1/12/2011 9:08 AM, Geoffrey Myers wrote:
>> Can sendmail be configured to use Exchange for outgoing email?
>>
>> Basically, I want to be able to send email from the command line on a
>> linux machine and the only way this can be done for this client is via
>> their Exchange. server.
>>
> Try the smart relay option in sendmail.
>
> You may experience and issue where the Exchange server requires
> authentication of SSL.  I've written a PERL program to send mail using
> these setups.


Just because it was a bear to find and make work, I want to share
the critical lines in PHP to authing against an Exchange server:

$smtp = Mail::factory('smtp',array ('host' => $host,'auth' => true,'username' => $username,'password' => $password));
$mail = $smtp->send($email, $headers, $message);

But just configuring the systems mail server would work as well.

If it's an app on a linux machine, making it send via the exchange server
might be preferential for dealing with error messages directly.

If you are sending via the local linux mail server 
(Sendmail/Postfix/Exim/Courier) make sure something/someone is handling 
the bounces, rejects, returns.. etc.. I've seen a lot of systems
not know their mail never went out, but bounced between two mail servers
until tossed.










More information about the Ale mailing list