postfix config: how to relay mails for only one user of a certain domain

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications postfix config: how to relay mails for only one user of a certain domain
# 1  
Old 02-23-2012
Question postfix config: how to relay mails for only one user of a certain domain

Hello there,

First of all I tell you that this is my first postfix installation so please be patient...

I have following scenario:

fetchmail --> postfix --> amavis-new --> postfix --> exchange 2010.
Everything -except exchange ;-)- runs on an opensuse 12.1 box.

Now, I have a list of domains entirely managed and hosted here so I have resolved everything using the transport file (do.main.name smtp:[exchange.ser.ver]) and the entries in the main.cf file (mydestination= $myhostname, localhost.$mydomain, localhost, $mydomain, do.main.one, do.main.two, domain.diffi.cult).

So far so good, everything seems to work for the "simple" domains.

Now, I have got one user with an address at domain.diffi.cult and this domain is not hosted by me. This user has a mailbox on the exchange server and everything is working fine on that side.

How can I configure postfix to deliver the mails for myuser@domain.diffi.cult locally and all the others @domain.diffi.cult to the internet?

Just a further clarification...
I am the owner of those "simple-to-manage" domains. All the managed domains are regularly polled with fetchmail, scanned for spam/viruses with amavis and then sent to the users mailboxes on exchange. Those domains can be easily managed locally because all user of those domains also have an exchange mailbox.

The user @ the difficult domain also has an exchange mailbox and has to send and receive mails using outlook/exchange. His address @ that domain must continue being used because it's an old known address.

Within Exchange everything works fine: if he sends mails to the other users/domains it works, if the other users/domains send mails to him it works.

The problem is that if I declare in postfix that domain as local, postfix tries to deliver all the mails addressed to users @ the difficult domain locally (to the exchange server) and that is wrong because they don't belong to the local organization thus -of course- aren't managed locally.

I succeeded in having a working config based on sendmail, but now I have to switch to postfix...

Any clue anybody?

Thanks
Luca
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Unable to receive mails from email relay server

Hi, I have reports that are generated in one server (10.61.1.108), hostname l28bi01. These reports are supposedly sent to a group of email addresses hourly via an email relay server. However, this is not happening. In sendmail.cf in bi01, the DS Smart Relay Host ip address is: ... (3 Replies)
Discussion started by: anaigini45
3 Replies

2. UNIX for Advanced & Expert Users

Need an help in configuring Postfix mail relay server

Hello, We have 2 servers, server A and Server B in same domain. I have already configured the Serevr A to send an email to the internet (outside domain) by opening the port 25 to the internet. Now I need to send an email to the outside domain from Server B using server A. I have opened the... (1 Reply)
Discussion started by: sathishbabu89
1 Replies

3. Ubuntu

NOQUEUE: reject: Relay access denied - Postfix

Hello, I am trying to setup a mail server (Postfix) on Ubuntu Server at my end but facing Relay access denied issue. Mail Server DNS is mydomain.com and MX record is also added to the DNS server for the same. When i am sending out emails from outer domain to user1@mydomain.com, I configured... (2 Replies)
Discussion started by: sunnysthakur
2 Replies

4. Red Hat

Postfix - Send mails to specific domains only

Hello, I am working on postfix server on CentOS 5.8 which will be send mails to a specific domain only. All the things are nearly finished but i am not getting how to setup the postfix to send mails to specific domains. Please help me out. Thanks, Sunny (2 Replies)
Discussion started by: sunnysthakur
2 Replies

5. Linux

Configure Postfix to relay to Exchange Server with NTLM authentication

Hello I have a shell script, which should send email, if any error occurred. This script is running in Red Hat Linux 4.6, and want to configure postfix so it can relay to an Exchange Server. The Authorization method of Exchange server, I guess is: 250-AUTH NTLM. So I have: Server A ( Red... (1 Reply)
Discussion started by: viktor1985
1 Replies

6. UNIX for Dummies Questions & Answers

postfix config: how to relay mails for only one user of a certain domain

Hello there, First of all I tell you that this is my first postfix installation so please be patient... I have following scenario: fetchmail --> postfix --> amavis-new --> postfix --> exchange 2010. Everything -except exchange ;-)- runs on an opensuse 12.1 box. Now, I have a list of... (2 Replies)
Discussion started by: lpacor
2 Replies

7. UNIX for Advanced & Expert Users

postfix config: how to relay mails for only one user of a certain domain

Hello there, First of all I tell you that this is my first postfix installation so please be patient... I have following scenario: fetchmail --> postfix --> amavis-new --> postfix --> exchange 2010. Everything -except exchange ;-)- runs on an opensuse 12.1 box. Now, I have a list of... (0 Replies)
Discussion started by: lpacor
0 Replies

8. UNIX for Dummies Questions & Answers

Please help with Postfix config issue - How to allow remote Exchange server to relay to my postfix

Hi guys One of our clients have a problem with sending email to a certain domain. No matter what we try, the mails just dont get delivered. What I did then, is created a new connector on their Exchange server, pointing all mail sent to their client at "domain1" to relay to our Postfix mail... (0 Replies)
Discussion started by: wbdevilliers
0 Replies

9. UNIX for Advanced & Expert Users

exim4 relay only to specific domain

Hi, I am new in exim. I am trying to configure a debian server running exim4 such that it relays only mails to our domain (@abcd.de).The exim server uses a smarthost for relaying. I do not get it to block outgoing mails to domains different from ours (i.e. with the "standard" configuration it... (0 Replies)
Discussion started by: one71
0 Replies

10. Solaris

Sendmail Config - Open Relay

Puzzled; I have two Solaris systems, both running Solaris 5.8 and Sendmail version 8.11.7p1. One of the machines will not allow relaying (via anonymous connection to port 25). The other will allow relaying from anywhere to anywhere with impunity. I can not find any fundemental difference in the... (1 Reply)
Discussion started by: fosteria
1 Replies
Login or Register to Ask a Question