gabriele esposito wrote:
I have changed postfix configuration , this is my new postconf -n:
[...]
transport_maps = hash:/etc/postfix/transport

I also found a better way to explain in english what i'm trying to do:
i want postfix to use smtp.gmail.com as relayhost for users in $mydomain.
Users in host.mydomain mail is only local, like logcheck mail .
Users in my host2.subdomain.mydomain are going to use the local
postfix which is not going to use smtp.gmail.com as relayhost in this
case.
First i listed in /etc/postfix/local_domains my two destination
domains, $mydomain and subdomain.$mydomain, than in relay_domains i
listed which domains that are OK to relay .
It sounded ok to me also the "sender_dependent_relayhost_maps"
directive in this form:
[EMAIL PROTECTED]                 [smtp.gmail.com]
[EMAIL PROTECTED]   [smtp.mydomain]
[EMAIL PROTECTED]  [smtp.mydomain]
[EMAIL PROTECTED]                 [smtp.mydomain]

and the transport map in this form:

mydomain            smtp:[smtp.gmail.com]
Your config was:

relayhost = [smtp.gmail.com]:587

So your transport_maps entry must match..

mydomain   smtp:[smtp.gmail.com]:587

Note: if doing a full domain, transport_maps makes things easier.
If you only need a few addresses, sender_dependent_relayhost_maps is the way to go. transport_maps entries will take priority over sender_dependent_relayhost_maps


host1.mydomain           local:
subdomain.mydomain   smtp:
guestdomain                 smtp:
It's best to list only those domains you want to work *differently* from the default.
If it's local, postfix knows what to do if listed in mydestination.
If it's to be relayed, postfix knows what to do if listed in relay_domains.

HIGHLY recommended to set relay_recipient_maps with a list of valid addresses you will be relaying to.
Not doing so can create Backscatter.
This should , IMHHHHHHO , make my local postfix use gmail.com  as
relayhost for user in @mydomain , listed guests domains not use any
relayhost for sending in internet and users  in $myorigin just local
delivery .
This my firsts logs after the change , things are not right , yet !

Jul 30 14:35:11 mail postfix/pickup[16186]: 81BD6B6EFA: uid=1000
from=<[EMAIL PROTECTED]>
[...]
Jul 30 14:35:14 mail postfix/smtp[16707]: warning: SASL authentication
failure: No worthy mechs found
Looks like you may need to set "smtp_sasl_security_options = noanonymous" but this a pure guess.
Jul 30 14:35:14 mail postfix/smtp[16707]: 81BD6B6EFA:
to=<[EMAIL PROTECTED]>, relay=smtp.gmail.com[66.249.91.109]:25,
delay=3.5, delays=0.28/0.15/3.1/0, dsn=4.7.0, status=deferred (SASL
authentication failed; cannot authenticate to server
smtp.gmail.com[66.249.91.109]: no mechanism available)
Jul 30 14:35:57 mail postfix/qmgr[16187]: warning: connect to
transport post smtp: No such file or directory
Config or map error?   You seem to list transport "post smtp" somewhere.

Brian

I will appreciate any help thanks !

2008/7/29, Brian Evans - Postfix List <[EMAIL PROTECTED]>:
gabriele esposito wrote:
I run Debian etch and i use smtp.gmail.com as postfix relayhost.
I also have a list of senders from different domains allowed to relay
smtp traffic on my server .
While for local senders in $myorigin i want my postfix to relay smtp
with gmail , for users in the list i want my local postfix to not
relay and to do it on its own .

Note: I see no evidence of your claim in your postconf -n listing that
says "have a list of senders from different domains allowed to relay".

To relay only $myorigin, you should remove relayhost and use transport_maps.

Example:

 example.com      :[gateway.example.com]
 .example.com     :[gateway.example.com]

Brian




Reply via email to