LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2014, 09:31 AM   #1
hmj14
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Rep: Reputation: 0
Angry postfix route mails based on sending domain


Hi, I am trying to amend mail routing based on the sending domain, I have it working for incoming ip addresses. In my /etc/postfix/access I have this sort of thing...

xxx.xx.xxx.xx FILTER smtp:[xx.xxx.x.xx]
xxx.xx.xxx.xx FILTER smtp:[xx.xxx.x.xx]
testing.org FILTER smtp:[xx.xxx.x.xx]

the last line testing.org is ignored. I have postmapped the file and restarted postfix,I'm stuck!


~
 
Old 11-24-2014, 11:06 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,580
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
For Sendmail I used the "smarttable" feature to do this.

When I last asked about doing this in Postfix one answer I got was:

"look at the sender_dependent_relayhost_maps option in Postfix

For a simple example, you could have something like

sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay_map

in main.cf, and then in /etc/postfix/sender_relay_map you have something
like" (sic)

From my notes it appears I never actually tested that because I moved on to something else. Hopefully it helps you.
 
1 members found this post helpful.
Old 11-26-2014, 09:10 AM   #3
hmj14
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Question stuck still...

thanks have been looking into the sender_dependent_relayhost_maps, added line to main.cf below the transport line, created the file and have tried various text in the file
@testing.org [xx.xxx.x.xx]
testing.org [xx.xxx.x.xx]
.testing.org [xx.xxx.x.xx]
testing.org smtp:[xx.xxx.x.xx]
@testing.org smtp:[xx.xxx.x.xx]
postmap'd file and restarted postfix, it doesnt work, help please!
 
  


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
sending mails failed to particular mail domain venkatesh.alg Linux - Server 7 09-22-2013 08:26 AM
SENDING MAILS via Postfix in CENTOS6.4 rolf1316 Linux - Server 7 05-10-2013 09:31 AM
How to Block sending mails via telent in postfix amratta Linux - Networking 2 03-10-2012 09:54 AM
Issues with Receiving and Sending Mails through Postfix in Webmin troubledhoster Linux - General 2 01-30-2012 09:18 AM
Thunderbird SMTP error while sending mails in Windows7 to Postfix rytec General 8 01-28-2011 10:24 AM


All times are GMT -5. The time now is 03:12 AM.

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