LinuxQuestions.org
Visit Jeremy's Blog.
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 04-20-2008, 06:57 PM   #1
Zippy1970
Member
 
Registered: Sep 2007
Posts: 119

Rep: Reputation: 17
Postfix: Forwarding mail to non standard port


I'm currently making the move from Sendmail to Postfix. My current (Sendmail) mailserver delivers most incoming mail to local mailboxes, but some of the incoming mail needs to be forwarded to another external mailserver (mail.externaldomain.dom) which is listening to a non standard port (10025).

In Sendmail, this involved creating a mailer that delivers to port 10025 ("ESMTP10025"), then create a rule in mailertable.db that specifies all mail addressed to mail.externaldomain.dom should use the new mailer, then simply forward the incoming mail to mail.domain.dom in virtusertable.

So for instance, mail arrives at my mailserver address to user1@mydomain.dom. Virtusertable contains a line that reads:

Code:
user1@mydomain.dom    user1@mail.externaldomain.dom
Sendmail then uses the ESMTP10025 mailer to forward the incoming mail to port 10025 on mail.externaldomain.dom.

This works perfectly in Sendmail.

But how do I do this with Postfix?
 
Old 04-20-2008, 07:06 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have you tried

relayhost = mail.externaldomain.dom:10025

or some derivative for virtual relay/transport?
 
Old 04-20-2008, 07:18 PM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have a look at this while you're about it

http://www.postfix.org/transport.5.html
 
Old 04-21-2008, 02:43 AM   #4
Zippy1970
Member
 
Registered: Sep 2007
Posts: 119

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by billymayday View Post
Have you tried

relayhost = mail.externaldomain.dom:10025

or some derivative for virtual relay/transport?
Yes, I had ssen the relayhost directive, but doesn't that forward all mail to the specified host?

Quote:
Originally Posted by billymayday View Post
Have a look at this while you're about it

http://www.postfix.org/transport.5.html
Cool! That seems to be exactly what I need! Thanks!
 
Old 04-21-2008, 02:49 AM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
As I said, you may need one of the virtual transport map versions depending on exactly what you are trying to do. What mail will go to this server/port?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mail Forwarding in postfix/maildrop/redhat (like yahoo mail forwarding) topcat Linux - Software 1 08-31-2007 12:10 PM
postfix and mail forwarding ? lhrt Linux - Software 12 07-02-2007 06:25 AM
Forwarding incoming mail (postfix) herc Linux - Software 3 03-09-2007 04:43 PM
Postfix mail forwarding loop lacerto Linux - Networking 1 06-01-2005 06:07 PM
Forwarding mail through Postfix Phaethar Linux - Networking 0 03-01-2004 08:00 AM

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

All times are GMT -5. The time now is 04:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration