LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-17-2008, 10:26 AM   #1
Wheddod
LQ Newbie
 
Registered: Aug 2008
Posts: 12

Rep: Reputation: 0
Post Postfix Transport(5)


Hi all, now that i have postfix installed and working in a fasion i decided that i should be checking some of its other features. The one that strikes me as most useful is the transport file. But i currently don't know how to set it up. Would someone be able to help me?

Many Thanks in Advance
Dan
 
Old 10-18-2008, 03:19 AM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Transport can do a lot of things. Here's an example.

In main.cf, you have the entry

Code:
transport_maps = hash:/etc/postfix/transport
or similar.

Now in my transport file, I have entries like:

Code:
fax.mydomain.com	fax:localhost
fax_ps.mydomain.com	fax_ps:localhost

In master.cf

Code:
fax     unix    -       n       n       -       1       pipe
  flags= user=fax argv=/usr/local/bin/faxmail -d -n ${user}

fax_ps     unix    -       n       n       -       1       pipe
  flags= user=fax argv=/etc/postfix/fax_ps -u ${user}
When a message is sent to user@fax.mydomain.com, the fax transport agent is called with the user (in this case the fax num,ber) as a parameter (fax_ps faxes a postscript file, the basic version faxes the mail body)

Hope that makes some sense.
 
Old 10-18-2008, 03:21 AM   #3
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Set it up to do what?

Search transport here: http://www.postfix.org/STANDARD_CONF...ON_README.html for examples.
 
Old 10-18-2008, 03:29 AM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'm assuming he just wants to have a play
 
Old 10-20-2008, 08:09 AM   #5
Wheddod
LQ Newbie
 
Registered: Aug 2008
Posts: 12

Original Poster
Rep: Reputation: 0
So if i wanted to redirect all internal mail to one destination and then have everything external going to another address, would i just have to vi /etc/postfix/transport then add a couple of lines in to the bottom of the file? Would the following lines suffice?

my.domain.com :[Internal.my.domain.com]
.my.domain.com :[external.my.domain.com]
 
Old 10-20-2008, 11:15 AM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
You would use a regexp or pcre map:

Code:
/^domain\.com$/  smtp:[Internal.my.domain.com]
/./              smtp:[external.ip]
If parent_domain_matches_subdomains is set, no need to list the extra subdomain pattern.
 
  


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
Postfix and Transport.cf i56kfm Linux - Newbie 1 06-19-2008 01:33 PM
Postfix Transport Suspended Maeltor Linux - Software 4 07-06-2006 11:28 AM
Postfix: slow transport? Chowroc Linux - Networking 0 02-04-2006 02:49 AM
postfix transport question jeru Linux - Software 3 06-12-2005 02:17 AM
Postfix transport problems BarrySharpen Linux - Networking 1 12-02-2004 05:36 PM


All times are GMT -5. The time now is 08:21 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration