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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 :) > |
|
|||
|
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 |
|
|||
|
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 :/ > > |
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|