LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-17-2009, 09:39 AM   #1
thndrchld
Member
 
Registered: Dec 2009
Posts: 33

Rep: Reputation: 1
MTA Headaches on Ubuntu Hardy / MS Exchange


This problem has been giving me some headaches for a while now.

I have two servers running in my office, one running Ubuntu Hardy Server Edition, which functions as my web server, as well as a Win2K3 machine that runs Exchange 2003, as well as several access databases.

I have a php based help desk tracking system on the webserver that uses a mail() function to send confirmation messages to registered supporters indicating that a change has been made to a ticket. the linux machine runs sendmail to manage mail transport.

Here is the problem: I need the linux machine to use the exchange server to send the messages. I have tried configuring sendmail to relay through the exchange server, but exchange drops the messages. Previously, this had worked, but the domain of the mail was incorrect. the messages should be coming through as helpdesk@domain.com, but instead were coming through as "Web Administrator webadmin@webserver" (verbatim, not edited).

How can I get sendmail to send messages properly? I have an account set up in exchange titled helpdesk@domain.com which I would like sendmail to use for ALL outgoing mail, regardless of the user that created it.

Is this feasible? I'm not particularly attached to sendmail. Actually, I hate it. My server runs webmin if that would make things easier.

Thank you for any help, and I can provide any information you need (so long as it doesn't compromise security)

Thndrchld
 
Old 12-17-2009, 09:51 AM   #2
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
If I correctly understand what you mean, then call sendmail with -fhelpdesk\@domain.com and ensure that the apache user is in sendmail's trusted senders list.
 
Old 12-17-2009, 11:20 AM   #3
thndrchld
Member
 
Registered: Dec 2009
Posts: 33

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by zordrak View Post
If I correctly understand what you mean, then call sendmail with -fhelpdesk\@domain.com and ensure that the apache user is in sendmail's trusted senders list.
I don't actually call sendmail. It's invoked by the php mail() function. My biggest problem that needs to be dealt with first, though, is why Exchange is dropping the relayed messages. I have the webserver (192.168.1.201) setup as an authorized relay agent on the exchange server(192.168.1.200).

when I invoke sendmail from the command line to test, it behaves as if the message has sent properly, but the message is never delivered to the recipient (exchange account).
 
Old 12-17-2009, 11:25 AM   #4
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
And the logs say....
 
Old 12-17-2009, 11:34 AM   #5
thndrchld
Member
 
Registered: Dec 2009
Posts: 33

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by zordrak View Post
And the logs say....
Well, that's my next question: Where does sendmail store its logs? I looked in /var/log, but there's nothing that seems specific to sendmail.

I also checked /etc/mail, but not there either.

I haven't looked at the Exchange log yet, I will when I get into the office this afternoon.
 
Old 12-17-2009, 11:43 AM   #6
thndrchld
Member
 
Registered: Dec 2009
Posts: 33

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by thndrchld View Post
Well, that's my next question: Where does sendmail store its logs? I looked in /var/log, but there's nothing that seems specific to sendmail.

I also checked /etc/mail, but not there either.

I haven't looked at the Exchange log yet, I will when I get into the office this afternoon.

Well, never mind. I found it in syslogd. Here is what it says:

Dec 17 06:21:02 webserver sm-msp-queue[14354]: nBGNounK010826: to=(exchange user)@(domain).com, ctladdr=webadmin (1000/1001), delay=11:30:06, xdelay=00:00:00, mailer=relay, pri=3360049, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

This is one entry. Obviously, I removed the domain and the user name. It looks to me like it's trying to relay through localhost. It should be relaying through 192.168.1.200. Why would it do that and how do I fix it?
 
Old 12-17-2009, 04:17 PM   #8
thndrchld
Member
 
Registered: Dec 2009
Posts: 33

Original Poster
Rep: Reputation: 1
I've got smart host setup. I've tried it through the sendmail.cf, the sendmail.mc, and through webmin. It always tries to use 127.0.0.1 for the relay.
 
Old 12-18-2009, 04:08 AM   #9
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
Have you set the smart host by IP address or hostname? If only hostname, try IP. Also, try sending test messages from sendmail manually.
 
Old 12-18-2009, 12:04 PM   #10
thndrchld
Member
 
Registered: Dec 2009
Posts: 33

Original Poster
Rep: Reputation: 1
Update: I've managed to get the Relaying to work properly. There was a DAEMON_OPTIONS directive that was routing messages to 127.0.0.1 I dnl commented it out and messages send properly now. However, they are not masquerading properly. I have specified a DM directive, but it appears to be ignoring it. I have also tried setting up a generics table to cause all outgoing messages from user webadmin to come from helpdesk@domain.com, but that is not working either.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail is installed as default MTA. How do I switch to Postfix as MTA? virtualpal Linux - Newbie 5 05-11-2009 02:10 AM
Email - MTA/MUA Exchange features laurielounge Linux - Server 4 05-01-2009 01:39 AM
LXer: Simple Guide How to Upgrade Ubuntu 8.04 (Hardy Heron) to Ubuntu 8.10 (Intrepid LXer Syndicated Linux News 0 10-31-2008 10:50 AM
LXer: Installing Xen On An Ubuntu 8.04 (Hardy Heron) Server From The Ubuntu Repositor LXer Syndicated Linux News 0 05-08-2008 02:10 PM
Ubuntu APT & Proxy authentication headaches siesa Ubuntu 1 09-21-2006 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration