RE: Filter works great, Milter does not (despite log shows actions performed)‏

Christopher Kent chriskent_developer at hotmail.co.uk
Tue Aug 5 12:02:16 CEST 2014


Hi Stef,

Thanks, that's perfect. I had read that postfix should be able to do this, and had even played with the kind of setup you describe, but had not managed to join the dots.

I've adapted your instructions, and it works perfectly. Thank you so much for you help!

Have a good week!

________________________________
> From: stef+au at bgs.org 
> Subject: Re: Filter works great, Milter does not (despite log shows 
> actions performed)‏ 
> Date: Mon, 4 Aug 2014 20:05:22 +0200 
> To: chriskent_developer at hotmail.co.uk; amavis-users at amavis.org 
> 
> Christopher, 
> 
> The default amavisd-new set-up should work just fine, without using any 
> milter. 
> 
> Have a look at the following documentation: 
> - http://www.amavis.org/README.postfix.html 
> - http://www.postfix.org/FILTER_README.html [Advanced content filter example] 
> 
> A quick run through the config files [this is a quick cut-and-paste 
> from my config files; beware that the port numbers might not match the 
> above documents]: 
> 
> /etc/amavisd.conf 
> 
> $notify_method = 'smtp:[127.0.0.1]:10025'; 
> $forward_method = 'smtp:[127.0.0.1]:10025'; 
> 
> $inet_socket_port = [10024, 10026]; 
> 
> $interface_policy{'10026'} = 'ORIGINATING'; 
> 
> $policy_bank{'ORIGINATING'} = { # mail supposedly originating from our users 
> originating => 1, # declare that mail was submitted by our smtp client 
> allow_disclaimers => 1, # enables disclaimer insertion if available 
> } 
> 
> /etc/postfix/master.cf 
> smtp inet n - n - - smtpd 
> -o content_filter = smtp-amavis:[127.0.0.1]:10024 
> 
> [ you can also have the above config_filter configuration in 
> /etc/postfix/main.cf as a default setting. 
> The options below override the defaults in main.cf ] 
> 
> smtp-amavis unix - - n - 4 smtp 
> -o smtp_data_done_timeout=1200 
> -o smtp_send_xforward_command=yes 
> -o disable_dns_lookups=yes 
> -o max_use=20 
> -o smtp_generic_maps= 
> localhost:10025 inet n - n - - smtpd 
> -o content_filter= 
> -o local_recipient_maps= 
> -o relay_recipient_maps= 
> -o smtpd_delay_reject=no 
> -o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128 
> -o smtpd_authorized_xclient_hosts=127.0.0.0/8,[::1]/128 
> -o smtpd_client_restrictions=permit_mynetworks,reject 
> -o smtpd_helo_restrictions= 
> -o smtpd_sender_restrictions= 
> -o smtpd_recipient_restrictions=permit_mynetworks,reject 
> -o smtpd_data_restrictions=reject_unauth_pipelining 
> -o smtpd_end_of_data_restrictions= 
> -o smtpd_restriction_classes= 
> -o mynetworks=127.0.0.0/8,[::1]/128 
> -o smtpd_error_sleep_time=0 
> -o smtpd_soft_error_limit=1001 
> -o smtpd_hard_error_limit=1000 
> -o smtpd_client_connection_count_limit=0 
> -o smtpd_client_connection_rate_limit=0 
> -o 
> receive_override_options=no_unknown_recipient_checks,no_header_body_checks 
> -o local_header_rewrite_clients= 
> submission inet n - n - - smtpd 
> -o syslog_name=postfix/submission 
> -o smtpd_tls_security_level=encrypt 
> -o smtpd_sasl_auth_enable=yes 
> -o smtpd_client_restrictions=permit_sasl_authenticated,reject 
> -o smtpd_relay_restrictions=permit_sasl_authenticated,reject 
> -o content_filter=smtp-amavis:[127.0.0.1]:10026 
> pickup unix n - n 60 1 pickup 
> -o content_filter=smtp-amavis:[127.0.0.1]:10026 
> 
> Quick comments: 
> - incoming e-mail enters on port 25; with the “content-filter” option, 
> it is sent to a mavis on port 10024 
> - amavis scans, tags, quarantines, … — if mail goes through, it goes to 
> (postfix) port 10025 (this is done with the “$forward_method” in 
> amavisd.conf) 
> - postfix (listening on port 10025) delivers the e-mail 
> 
> - outgoing e-mail should enter on the submission port [587] or 
> delivered with the pickup service (“local e-mail”). 
> - postfix forwards this e-mail to amavis on port 10026 (!) 
> - the configuration of amavis is changed because of a “policy bank” 
> - again, amavis forwards e-mail to postfix on port 10025 
> - postfix (listening on port 10025) delivers e-mail 
> 
> Kind regards, 
> 
> Stef 
> 
> Op 4-aug.-2014, om 19:33 heeft Christopher Kent 
> <chriskent_developer at hotmail.co.uk<mailto:chriskent_developer at hotmail.co.uk>> 
> het volgende geschreven: 
> 
> Hi Andreas, 
> 
> Thanks a lot for your time and response- hope you had a good weekend! 
> 
> I understand that I may be pushing my luck, but do you please know of a 
> method to add signatures/modify the body of mails sent from local 
> accounts? 
> 
> Thanks! 
> 
>> Date: Sat, 2 Aug 2014 15:37:33 +0200 
>> From: sca at andreasschulze.de<mailto:sca at andreasschulze.de> 
>> To: amavis-users at amavis.org<mailto:amavis-users at amavis.org> 
>> Subject: Re: Filter works great, Milter does not (despite log shows 
> actions performed)‏ 
>> 
>> 
>> Christopher Kent: 
>> 
>>> I guess this is a permissions issue, or is there a 
>>> config/restriction within amavisd-milter or amavisd-new?  
>> changing the message body is not implemented via milter interface 
>> 
>> Andreas 
>> 
> 
 		 	   		  


More information about the amavis-users mailing list