Le 21/05/2011 20:19, Reindl Harald a écrit :
> hi
> 
> is there any recommended way to implement SRS (Sender Rewrite Scheme) in 
> Postfix
> to get rid of SPF warnings/blocks for via "virtual_alias_maps" forwarded
> messages?
> 

if you want to implement SRS, then you'll need to deliver to an external
program which does that.

<untested elabor...@your.own.risk>
you could use smtp_generic_maps, something like
/(.*)@(google\.com)$/   srs-AHBHSRD-$1@$2

and to get bounces forwarded back to sender, virtual_alias_maps
/^srs-AHBHSRD-(.*)@(google\.com)$/      $1@$2

replace AHBHSRD with anything to avoid people abusing your virtual
alias... but as soon as this is known, you'll be abused. so make this
dynamic. you could use an sql map to generate a random string...
</untested>



> status=sent (250 mail from IP 193.104.1.241 soft failed sender ID check.
> Please ensure this IP is authorized to send mail on behalf of [google.com])
> ___________________
> 
> currently most forwarders are implmented this way, and yes the 
> round(deliver_to)
> is needed because numeric targets are physical usermappings from dbmail and
> the limitation at the end is to make sure that multi-forwardings are handeled
> native by dbmail
> 
> virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-forwarders.cf
> 
> user     = dbmailro
> password = *****
> dbname   = dbmail
> hosts    = unix:/var/lib/mysql/mysql.sock inet:127.0.0.1:3307
> query    = select deliver_to from dbmail_aliases where alias='%u@%d' and 
> round(deliver_to)=0 and (select count(*)
> from dbmail_aliases where alias='%u@%d')=1;
> 

Reply via email to