snce we are speaking abount desnder-dependent %s is the sender
%d would be the sender-domain, on other mysql-config places %s
and %d stands for rcpt/rcpt-domain
________

BTW:

i would love an extra placeholder here beacuse i tried
to get "smtp_sender_dependent_authentication" and "transport_maps"
working together

example what i mean, see the subquery after "and"
why? bceause we are using this to relay mails from some client-senders
to their own server because we are not hosting mail-services for them
and this would be nice to exclude target-domains we are hosting inhouse
from the sender-relay-host, i got transport_maps running here but
"smtp_sender_dependent_authentication" was done on the transportmap-target
what fails....

select concat(username, ':', password) from dbma_sender_relay where email='%s'
and
((select count(*) from transport_maps where my_destination='%rcptdomain) < 1);

where email='%s'
and
((select count(*) from transport_maps where my_destination='%rpctdomain) < 1);

Am 22.04.2011 17:30, schrieb Dragan Zubac:
> Hello
> 
> Just one more question here.
> Are you referring to From email or To email in your mysql query ?
> 
> Sincerely
> 
> On 04/22/11 16:48, Reindl Harald wrote:
>> Am 22.04.2011 16:33, schrieb Dragan Zubac:
>>
>>> 2. Once this kind of email arrives,Postfix should route this email via
>>> remote relay host using SMTP AUTH with credentials from message body of
>>> email it received,like 
>>>
>>> SMTP:remote.host.com (AUTH: customer_username,customer_password)
>> no problem, see below
>> for details look at the postfix-documentation of my params
>> yes this can be also a hash-file, but mysql-config si from a working system
>>
>>> and remove everything from email body above line
>>> '----------------------------' from the message body.
>> no way, postfix is a MTA and has nothing to do with the mailbody
>>
>> sender_dependent_relayhost_maps          = 
>> mysql:/etc/postfix/mysql-sender_relay_hosts.cf
>> smtp_sasl_password_maps                  = 
>> mysql:/etc/postfix/mysql-sender_relay_hosts_auth.cf
>> smtp_sasl_auth_enable                    = yes
>> smtp_sender_dependent_authentication     = yes
>> smtp_sasl_security_options               = noanonymous
>>
>> cat /etc/postfix/mysql-sender_relay_hosts.cf
>> user          = relayhost
>> password      = *******************
>> dbname        = dbmail
>> hosts         = unix:/var/lib/mysql/mysql.sock
>> query         = select transport from dbma_sender_relay where email='%s';
>>
>> cat /etc/postfix/mysql-sender_relay_hosts_auth.cf
>> user          = relayhost
>> password      = *******************
>> dbname        = dbmail
>> hosts         = unix:/var/lib/mysql/mysql.sock
>> query         = select concat(username, ':', password) from 
>> dbma_sender_relay where email='%s';

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to