How to force Postfix to send email for desired IP

This is a discussion on How to force Postfix to send email for desired IP within the alt.comp.mail.postfix forums, part of the Mail Servers and Related category; Hi.. I have more than one IP for my server, for example : 210.210.210.210 210.210.210.211 ...


Go Back   Usenet Forums > Mail Servers and Related > alt.comp.mail.postfix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-09-2006
Przemk0
 
Posts: n/a
Default How to force Postfix to send email for desired IP

Hi..

I have more than one IP for my server, for example :

210.210.210.210
210.210.210.211
210.210.210.212
210.210.210.213
210.210.210.214

Interfaces :
eth1 (main) has address : 210.210.210.210
and aliases :
eth1:0 has address : 210.210.210.213
eth1:1 has address : 210.210.210.214

Domain :

server.com has address 120.120.120.120 (www serwer from other firm)
mail.server.com has address 210.210.210.214
bla.bla.net address 210.210.210.210

Our email adresses :

przemk0@server.com (main domain)
przemk0@bla.bla.net (virtual domain)

Postfix configuration :

---

myhostname = server.com
mydomain = $myhostname
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mydestination = $myhostname
mynetworks = 127.0.0.0/8, 192.168.0.0/24
relay_domains = $mydestination
inet_interfaces = 210.210.210.214, 127.0.0.1

virtual_maps = hash:/etc/postfix/virtual

---

The thing is that when am sending email using przemk0@server.com it goes
from IP 210.210.210.210 :
Received: from server.com (unverified [210.210.210.210])

and i want to send my mail's from : 210.210.210.214

I was trying maybe to change myhostname to mail.server.com and mydomain
and myorigin to server.com, it didnt work :

Received: from mail.server.com (unverified [210.210.210.210])

Help :)

--
Pozdrawiam,
Przemk0
Reply With Quote
  #2 (permalink)  
Old 02-09-2006
Greg Hackney
 
Posts: n/a
Default Re: How to force Postfix to send email for desired IP

See "man 5 postconf" for "inet_interfaces":

"When inet_interfaces specifies just one IPv4 and/or IPv6 address that
is not a loopback address, the Postfix SMTP client will use this
address as the IP source address for outbound mail."

---<main.cf>---
inet_interfaces: 210.210.210.214, 127.0.0.1

--
Greg


Przemk0 wrote:
> Hi..
>
> I have more than one IP for my server, for example :
>
> 210.210.210.210
> 210.210.210.211
> 210.210.210.212
> 210.210.210.213
> 210.210.210.214
>
> Interfaces :
> eth1 (main) has address : 210.210.210.210
> and aliases :
> eth1:0 has address : 210.210.210.213
> eth1:1 has address : 210.210.210.214
>
> Domain :
>
> server.com has address 120.120.120.120 (www serwer from other firm)
> mail.server.com has address 210.210.210.214
> bla.bla.net address 210.210.210.210
>
> Our email adresses :
>
> przemk0@server.com (main domain)
> przemk0@bla.bla.net (virtual domain)
>
> Postfix configuration :
>
> ---
>
> myhostname = server.com
> mydomain = $myhostname
> alias_maps = hash:/etc/aliases
> alias_database = hash:/etc/aliases
> myorigin = $myhostname
> mydestination = $myhostname
> mynetworks = 127.0.0.0/8, 192.168.0.0/24
> relay_domains = $mydestination
> inet_interfaces = 210.210.210.214, 127.0.0.1
>
> virtual_maps = hash:/etc/postfix/virtual
>
> ---
>
> The thing is that when am sending email using przemk0@server.com it goes
> from IP 210.210.210.210 :
> Received: from server.com (unverified [210.210.210.210])
>
> and i want to send my mail's from : 210.210.210.214
>
> I was trying maybe to change myhostname to mail.server.com and mydomain
> and myorigin to server.com, it didnt work :
>
> Received: from mail.server.com (unverified [210.210.210.210])
>
> Help :)
>

Reply With Quote
  #3 (permalink)  
Old 02-09-2006
Przemk0
 
Posts: n/a
Default Re: How to force Postfix to send email for desired IP

Greg Hackney napisał(a):
> See "man 5 postconf" for "inet_interfaces":
>
> "When inet_interfaces specifies just one IPv4 and/or IPv6
> address that
> is not a loopback address, the Postfix SMTP client will use
> this
> address as the IP source address for outbound mail."
>
> ---<main.cf>---
> inet_interfaces: 210.210.210.214, 127.0.0.1
>


As you can see in my message, i have :

inet_interfaces: 210.210.210.214, 127.0.0.1

in my configuration file.. and it is not working :/


--
Pozdrawiam,
Przemk0
Reply With Quote
  #4 (permalink)  
Old 02-09-2006
Greg Hackney
 
Posts: n/a
Default Re: How to force Postfix to send email for desired IP


Run the command: postconf inet_interfaces

and verify that the value is: 210.210.210.214, 127.0.0.1

If it's not, then there's a duplicate entry in the main.cf file.

If it is, and a "postfix reload" doesn't fix the problem, then I
don't know what else the problem could be,

--
Greg





Przemk0 wrote:
> Greg Hackney napisał(a):
>
>> See "man 5 postconf" for "inet_interfaces":
>>
>> "When inet_interfaces specifies just one IPv4 and/or IPv6
>> address that
>> is not a loopback address, the Postfix SMTP client will
>> use this
>> address as the IP source address for outbound mail."
>>
>> ---<main.cf>---
>> inet_interfaces: 210.210.210.214, 127.0.0.1
>>

>
> As you can see in my message, i have :
>
> inet_interfaces: 210.210.210.214, 127.0.0.1
>
> in my configuration file.. and it is not working :/
>
>


Reply With Quote
  #5 (permalink)  
Old 02-10-2006
Przemk0
 
Posts: n/a
Default Re: How to force Postfix to send email for desired IP

Greg Hackney napisał(a):
>
> Run the command: postconf inet_interfaces
>
> and verify that the value is: 210.210.210.214, 127.0.0.1
>
> If it's not, then there's a duplicate entry in the main.cf file.
>
> If it is, and a "postfix reload" doesn't fix the problem, then I
> don't know what else the problem could be,
>
> --
> Greg
>


I solve this problem (someone from polish linux debian grup help me)..
there was empty "smtp_bind_address" and it should to be :

smtp_bind_address = 210.210.210.214

Thx anyway for your time :)


>
>
>
>
> Przemk0 wrote:
>
>> Greg Hackney napisał(a):
>>
>>> See "man 5 postconf" for "inet_interfaces":
>>>
>>> "When inet_interfaces specifies just one IPv4 and/or IPv6
>>> address that
>>> is not a loopback address, the Postfix SMTP client will
>>> use this
>>> address as the IP source address for outbound mail."
>>>
>>> ---<main.cf>---
>>> inet_interfaces: 210.210.210.214, 127.0.0.1
>>>

>>
>> As you can see in my message, i have :
>>
>> inet_interfaces: 210.210.210.214, 127.0.0.1
>>
>> in my configuration file.. and it is not working :/
>>
>>

>



--
Pozdrawiam,
Przemk0
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:30 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0