<div dir="ltr"><br>Hi list, <br><br>I want particular senders to bypass scanning. <br><br>here's what I have done. <br><br><br>in <a href="http://main.cf">main.cf</a> , I have added the line  check_sender_access hash:/etc/postfix/amavis_senderbypass <br><br>pls see below<br><br># Sender restrictions:<br>smtpd_sender_restrictions =<br>    permit_mynetworks,<br>    permit_sasl_authenticated,<br>    check_sender_access hash:/etc/postfix/amavis_senderbypass<br>    reject_non_fqdn_sender,<br>    reject_unknown_sender_domain,<br>    permit<br><br><br>contents of /etc/postfix/amavis_senderbypass<br><br>#<a href="mailto:sender@example.net">sender@example.net</a> FILTER smtp-amavis:[127.0.0.1]:10026<br>#<a href="mailto:sender@example.org">sender@example.org</a> FILTER smtp-amavis:[127.0.0.1]:10026<br>#<a href="http://gmail.com">gmail.com</a> FILTER smtp-amavis:[127.0.0.1]:10026<br><a href="mailto:mygmail@gmail.com">mygmail@gmail.com</a> FILTER smtp-amavis:[127.0.0.1]:10026<br><br><br>postmap /etc/postfix/amavis_senderbypass<br><br><br>then,  <br><br>In amavisd.conf:<br><br>#$inet_socket_port = 10024;   # listen on this local TCP port(s)<br>$inet_socket_port = [10024,10026];  # listen on multiple TCP ports<br><br><br>$interface_policy{'10026'} = 'SENDERBYPASS';<br><br>$policy_bank{'SENDERBYPASS'} = {<br><br>#bypass_spam_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br>#bypass_banned_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br>#bypass_header_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br><br>spam_lovers_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br>bypass_spam_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br><br>banned_files_lovers_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br>bypass_banned_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br><br>bad_header_lovers_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br>bypass_header_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br><br>};<br><br><br>/etc/init.d/amavisd restart<br><br><br>When I send mails mails from <a href="mailto:mygmail@gmail.com">mygmail@gmail.com</a>, sender is bypassed. It works as expected. <br><br>But, I have an question to discuss. <br><br>which option is better and safer?<br><br>option1 <br><br>bypass_spam_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br>bypass_banned_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br>bypass_header_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br><br><br>option 2<br><br>spam_lovers_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br>bypass_spam_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br><br>banned_files_lovers_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br>bypass_banned_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br><br>bad_header_lovers_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br>bypass_header_checks_maps => [[qw( .<a href="http://recipientdomain.com">recipientdomain.com</a>)]],<br><br><br><br>I have seen in mailing lists that having both spam_lovers_maps and bypass_spam_checks_maps are ok, when mails are addressed to multiple recipients.<br><br><br>here are some links.<br><br><a href="http://amavis-users.amavis.narkive.com/53G9WY8o/bypass-spam-check-for-domain">http://amavis-users.amavis.narkive.com/53G9WY8o/bypass-spam-check-for-domain</a><br><br>I'm not sure I understand your question. Here is an axample. A message<br>is addressed to ***@<a href="http://example.com">example.com</a> and ***@<a href="http://example.org">example.org</a> (both of which<br>are domains you are responsible for).<br><br>@bypass_spam_checks_maps = ( ["<a href="http://example.com">example.com</a>"] );<br><br>This message will still be scanned because ***@<a href="http://example.org">example.org</a> is not<br>included in @bypass_spam_checks_maps. ***@<a href="http://example.com">example.com</a> is in the map,<br>but in this case this recipient may not receive a copy of the message<br>(assuming it is spam). @bypass_spam_checks_maps does not guarantee<br>delivery of spam. To guarantee delivery of a message that has been<br>scanned by spamassassin and subsequently marked as spam, you want to<br>also include the recipient in @spam_lovers_maps.<br><br><br>another link<br><br><a href="https://sourceforge.net/p/amavis/mailman/amavis-user/thread/20090723230510.GA26675@tandon.net/">https://sourceforge.net/p/amavis/mailman/amavis-user/thread/20090723230510.GA26675@tandon.net/</a><br><br><br>bypass all scanning for one domain.<br><br><br>@spam_lovers_maps = ( ['<a href="http://sampledomain.org">sampledomain.org</a>'] );<br>@bypass_spam_checks_maps = ( ['<a href="http://sampledomain.org">sampledomain.org</a>'] );<br><br>or if you want to also cover subdomains:<br><br>@spam_lovers_maps = ( ['.<a href="http://sampledomain.org">sampledomain.org</a>'] );<br>@bypass_spam_checks_maps = ( ['.<a href="http://sampledomain.org">sampledomain.org</a>'] );<br><br><br><br>Waiting for your views. <br><br><br><br><br><br><br><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">cat /etc/motd<br><br>Thank you<br>Indunil Jayasooriya <br><a target="_blank" href="http://www.theravadanet.net/">http://www.theravadanet.net/</a><br><a target="_blank" href="http://www.siyabas.lk/sinhala_how_to_install.html">http://www.siyabas.lk/sinhala_how_to_install.html</a>   -  Download Sinhala Fonts<br><br></div></div>
</div>