Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED PARTIALLY] amavisd-new mimedefang and postfix
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 921

PostPosted: Wed Jan 18, 2012 1:59 pm    Post subject: [SOLVED PARTIALLY] amavisd-new mimedefang and postfix Reply with quote

Can amavisd-new do what mimedefang can (such as remove an attachment from the email, save the file to an HTTP directory and modify the e-mail so it displays a URL to the attachment instead of the attachment)?

If so, any quick guide or hints?

If not, what's the simplest way to use 2 content filters, first amavisd-new and then mimedefang, within postfix?

Thanks,

Vieri


Last edited by Vieri on Mon Jan 30, 2012 12:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
freke
Veteran
Veteran


Joined: 23 Jan 2003
Posts: 1093
Location: Somewhere in Denmark

PostPosted: Sun Jan 29, 2012 4:47 pm    Post subject: Reply with quote

I don't know mimedefang, but you chose where/which port amavisd-new should forward the message to after scanning - so I'd expect it could simply hand off the message to mimedefang?

Alternatively you could do something like:
Code:
main.cf
content_filter = smtp:127.0.0.1:20024

master.cf
localhost:20025  inet n - n - - smtpd -o content_filter=smtp:127.0.0.1:10026
127.0.0.1:10027 inet n - n - - smtpd
           -o content_filter=
           -o smtpd_delay_reject=no
           -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
           -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_header_body_checks,no_unknown_recipient_checks,no_milters
           -o local_header_rewrite_clients=


To first have postfix send the message to the contentfilter at 20024 - the first filter send it back to postfix at port 20025 and postfix then sends it to the filter at port 10026 which return the message at port 10027

Edit:
On further reading it seems that mimedefang is a Sendmail milter - which you can use like this:
Code:
main.cf

smtpd_milters = inet:localhost:10025
milter_default_action = accept
milter_protocol = 3

Assuming you have mimedefang running - listening on port 10025.

You can have multiple milters like this:
Code:
main.cf

smtpd_milters = inet:localhost:9999 inet:localhost:8026
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 921

PostPosted: Mon Jan 30, 2012 12:10 pm    Post subject: Reply with quote

Thanks

I'm using mimedefang with postfix and it seems to be working great.
I think I can do just about everything I need with mimedefang; I don't seem to require amavisd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum