I'm trying to configure Postfix to scan inbound and outbound smtp mail on my network. We use Exchange 2003 internally on a Windows 2003 domain. I also have an ISA firewall sat at the border, so the Mandriva machine is behind this ISA box.

I have email flowing just fine without using the Mandriva box. So when I have Exchange setup to route external SMTP through the ISA server using the IP of the ISA server as a smarthost, it all works fine inbound and outbound.

As soon as I set the smarthost IP on the Exchange server to point to the Mandriva machine, email stops flowing.

I'm a total newb with Linux, so please be gentle ;-)

I don't even know where to look on the Mandriva box to see if mail is being received into any of the queues?

I have tried telnetting to the Mandriva box using port 25, and I think it connects - I don't see any message saying it couldn't establish a connection - but I also don't see what I would class as an SMTP connected notice?

I have disabled the firewall on the Mandriva box - as a temporary measure, to see if that made a difference but unfortunately it hasn't so far.

It now appears as though my problem lies with Amavisd. Having Googled for this, I should be able to telnet to 127.0.01 on port 10025 - but this is not working. I've tried to amend the amavisd.conf file and now when I issue the command amavisd reload, I get the following error:

The amavisd daemon is apparently not running, no PID file /var/lib/amavis/amavisd.pid

Any ideas why that's occurring and how I should fix it? Should I just re-install Amavisd and start over?

I did manage to get Amavisd to run now and I can telnet to 127.0.0.1 10025, but it seems like the email relaying is not configured correctly. I now get the following error in the /var/log/mail/info/log file:

OK, I've made a bit of progress by enabling this section in the master.cf file:

127.0.0.1:10026 inet n - n - - smtpd

(As you can see from the post below).

I now get an undeliverable message in my Outlook when I send a test message. Here's the contents of the undeliverable:

Code:

This is the mail system at host tlvmmail1.tlab.local.
I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can delete your own text from the attached returned message.
The mail system
<gregn>: host tlfw1.tlab.local[172.31.3.28] said: 550 5.7.1 Unable to
relay for [email protected] (in reply to RCPT TO command)
Reporting-MTA: dns; tlvmmail1.tlab.local
X-Postfix-Queue-ID: A454F30A99
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Sun, 28 Oct 2007 18:43:02 +0000 (GMT)
Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 5.7.1
Remote-MTA: dns; tlfw1.tlab.local
Diagnostic-Code: smtp; 550 5.7.1 Unable to relay for [email protected]

The [email protected] address is the delivery address (i.e. the TO address) for the email I sent out. The from address is the [email protected] address and this is a Microsoft Exchange mailbox.

There are no mailboxes on the Linux box. All I want the Linux box to do is to scan inbound and outbound emails for viruses and spam. As long as the mails are clean, the Linux box should just forward to the appropriate next hop - either the ISA firewall for outbound mail, or the Exchange server for inbound mail.

The mail that generated this delivery failure notice was an outbound mail from the Exchange mailbox to an external email address in a totally separate Exchange email system.