Thanks a lot Noel for your reply.

I added gmail and yahoo as relay domains when I was playing around
with Postfix. I am new to postfix and am trying to understand it. So,
point is, I can live without gmail and yahoo being listed as relay
domains.

And about my project. It is an academic project. I want to use Postfix
as a relay server. I have implemented my own mail sender and receiver.
Sender sends mails to postfix and postfix relays them to receiver.
But, as of now, I don't want any network delays to be introduced.
Hence, I want all the three processes to be on the same machine.
Postfix listens on port 4567 and my mail receiver listens on port 25.
And kmail4u.com is just a random domain that I picked up(which
according to my knowledge was not in use by anybody at that time) and
made it point to the machine on which all three processes are present,
using bind9. I hope that explains you the project.

Is there any way I can achieve this?

- Mayuresh

On Tue, Jun 9, 2009 at 8:51 PM, Noel Jones <njo...@megan.vbhcs.org> wrote:
>
> Mayuresh Kasture wrote:
>>
>> Hello All,
>>
>> For some reason, I want to set two mail servers on one machine. One of them 
>> is Postfix. The setup is such that Postfix should receive mails at port 4567 
>> and should send mails corresponding to domain "kmail4u.com 
>> <http://kmail4u.com>" to port 25 of the same machine where other mail 
>> server(coded by me) is waiting for incoming mails.
>>
>> I have installed and configured bind9 which properly associates domain 
>> kmail4u.com <http://kmail4u.com> with the IP address of the machine. And 
>> postfix listens to port 4567.
>>
>> But, when I send a mail to port 4567 addressed to x...@kmail4u.com 
>> <mailto:x...@kmail4u.com>, I get a delivery failure with message "mail for 
>> kmail4u.com <http://kmail4u.com/> loops back to myself"
>
> Please don't post in html.  On gmail, press the [Plain Text] button when 
> composing.
>
>>
>> This is a part of main.cf <http://main.cf> file which tries to set this 
>> domain as virtual mailbox domain.
>>
>> relay_domains = $mydomain gmail.com <http://gmail.com> yahoo.co.in 
>> <http://yahoo.co.in>
>
> Why in the world would you list gmail and yahoo as relay domains???  That 
> makes you an open relay to any address at those domains.
>
> Don't do that.
>
> http://www.postfix.org/BASIC_CONFIGURATION_README.html
> http://www.postfix.org/ADDRESS_CLASS_README.html
>
>
>> virtual_transport = smtp:kmail4u.com:25 <http://kmail4u.com:25>
>> virtual_mailbox_domains = kmail4u.com <http://kmail4u.com>
>> virtual_mailbox_maps = hash:/etc/postfix/vmailbox
>>
>> And /etc/postfix/vmailbox contains,
>>
>> @kmail4u.com <http://kmail4u.com>    XXXX
>>
>> Can anybody suggest how I can achieve this set up?
>
> The "loops back to myself" message is caused when postfix is greeted with its 
> own hostname.  One instance needs a different hostname.
>
> I fear the gun is pointing at your foot... Before pulling the trigger maybe 
> you should describe your project in more detail.
>
>>
>> Thanks,
>> Mayuresh
>
>  -- Noel Jones

Reply via email to