Postfix: forward mail
Hi,
I'm new to linux/postfix, and would like some help with relaying/forwarding mail from a linux standalone server to our corporate mail environment (exchange 2003). I installed vmware server on a standalone linux server (Centos 5.2), and wrote a shell script to make backups of the virtual machines. The script makes a tar file from a virtual machine, which is transfered to our backup server. The script includes a procedure to send a mail about the result of that file transfer to a corporate mailaddress (exchange). I made the following change on the linux server: -stop sendmail from starting automatically -install postfix and configure it to start at level 2,3,4 and 5 -adjust main.cf from postfix: mydomain = companyname.org myhostname = myservername mynetworks = xx.xx.xx.0/24, 127.0.0.0/8 relayhost = [ipadress exchange server]-adjust transport file: add the line: * smtp:ipaddress exchange server-configure exchange to allow relaying from the linux server I have been reading several pages about this topic on the web, but sofar the mail is not relayed/forwarded to the corporate mailaddress. Any help will be appreciated. TIA |
On the other server have you allowed the ip address of that machine to be allowed to forward? normally you have to say I allow machine w.x.y.z to relay email to me.
|
Yes, in exchange 2003 the linux server is granted the relay right.
|
Quote:
Code:
postmap transport |
I ran "postmap transport" and restarted postfix. In my case the transport file was create by the installation of postfix. I already made the following entry in the transport file: * smtp:ipaddress exchange server. I was succesful to send a mail to my own mailacount by using the telnet method.
However, to send a mail by a script still does not work. |
I solved the problem. A newbie mistake. It seemed the linux server was configured without any nameservers being specified in resolv.conf.
Thanks for all the help. |
doh, stupid dns. Why didn't I think of that. Oh well glad to hear you got it up and running.
|
Quote:
I have a CentOS 5.3 server set up as you described in your posting. Mail gets forwarded to the Exchange box like it should with one exception. Mail from one domain apparently gets delivered to the Exchange Server machine ok after being scanned by amavis-new, but when I go to log into a certain mailbox on the Exchange server, the message is not in the inbox folder, nor is there any logging of the connection attempt. It seems that emails from other domains get relayed fine (with the exclusion of spam and virii). If anyone has any experience with this issue and has a possible solution, I would be thankful for any assistance I can get with this. TIA! |
I don't know if you already tried this, but maybe you can test the relaying to exchange manually. The included link describes a procedure how this can be done (http://www.auditmypc.com/freescan/readingroom/relay.asp).
I remember that i solved my problem, because i accidentally found some emails in the mailbox on linux describing the reason why the message could not be delivered. I my case that were the missing nameservers. |
All times are GMT -5. The time now is 09:45 PM. |