Hello,

Each of my client has a domain, a website, a ftp and other services.
I have one IP per client and only one server.

So I have one server with multiple IP (eth0, eth0:0, eth0:1 etc...).

An example :
eth0:0 has IP 1.2.3.4
eth0:1 has IP 5.6.7.8

When a client send an email to IP 1.2.3.4, I'd like that postfix send this email with this options :
smtp_bind_address=1.2.3.4
myhostname=domain1

And when a client send an email to IP 5.6.7.8, I'd like to have this options :
smtp_bind_address=5.6.7.8
myhostname=domain2

I have test that configuration :

1.2.3.4:smtp      inet  n       -       -       -       -       smtpd
        -o content_filter=ip1

ip1      unix  -       -       -       -       -       smtp
        -o relayhost=
        -o smtp_bind_address=1.2.3.4
        -o myhostname=domain1

I have no relayhost in master.cf and main.cf.
But when I send an email trought IP 1.2.3.4, the server send it to my MX server.

Example :

Aug 27 22:34:05 ns12 postfix/qmgr[27700]: 911D27C1F: from=<[EMAIL PROTECTED]>, size=344, nrcpt=1 (queue active) Aug 27 22:34:05 ns12 postfix/smtp[27738]: 911D27C1F: to=<[EMAIL PROTECTED]>, relay=ns9.bacto.net[91.121.71.16]:25, delay=533, delays=533/0/0.01/0.01, dsn=5.7.1, status=bounced (host ns9.bacto.net[91.121.71.16] said: 554 5.7.1 <[EMAIL PROTECTED]>: Relay access denied (in reply to RCPT TO command)) Aug 27 22:34:05 ns12 postfix/cleanup[27740]: 249AA7C9F: message-id=<[EMAIL PROTECTED]> Aug 27 22:34:05 ns12 postfix/bounce[27739]: 911D27C1F: sender non-delivery notification: 249AA7C9F Aug 27 22:34:05 ns12 postfix/qmgr[27700]: 249AA7C9F: from=<>, size=2204, nrcpt=1 (queue active)
Aug 27 22:34:05 ns12 postfix/qmgr[27700]: 911D27C1F: removed
Aug 27 22:34:06 ns12 postfix/smtp[27742]: 249AA7C9F: to=<[EMAIL PROTECTED]>, relay=mx1.freesurf.fr[212.43.206.56]:25, delay=1.1, delays=0.01/0/0.93/0.14, dsn=2.0.0, status=sent (250 Ok: queued as F07C14FE1C)
Aug 27 22:34:06 ns12 postfix/qmgr[27700]: 249AA7C9F: removed

I don't know why the mail is send to ns9.bacto.net (my server here is ns12.bacto.net and the MX is ns9.bacto.net).

Somebody has an idea ? An other method to do this ?
I can do it with multiple instance of postfix but I think it's not a perfomant solution, no ?

I need your help :-(

Thanks,
Adrien

Reply via email to