1

Topic: Disclaimer

==== Required information ====
- iRedMail version (check /etc/iredmail-release):     v0.9.4
- Linux/BSD distribution name and version: Centos 7.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====
Good afternoon,
        I would need to put a disclaimer txt or html on all outgoing emails. I saw from the documentation how to use the amavisd disclaimer but unfortunately in my case is not enough. I have a complicated cases on the management of emails disclaimers.

In the past I used this method : https://www.howtoforge.com/how-to-autom … an-squeeze and it has always worked well, also because I have customized the bash script.

I tried to add it on iRedMail server but it doesn't works, where am I wrong ?

I modified master.cf :

smtp      inet  n       -       n       -       1       postscreen
   -o content_filter=dfilt:

and added

dfilt     unix    -       n       n       -       -       pipe
   flags=Rq user=filter argv=/etc/postfix/disclaimer.sh -f ${sender} -- ${recipient}

but it doesn't works, it doesn't call the script   /etc/postfix/disclaimer.sh.
It send the email but without disclaimer.

Thank you
Mark

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Disclaimer

kaifamm wrote:

It send the email but without disclaimer.

*) Did you try our tutorial here? http://www.iredmail.org/docs/sign.disclaimer.html
*) User submits email through 'submission' transport, not 'postscreen'.
*) If you override 'content_filter=', how do you use Amavisd+ClamAV+SpamAssassin?

3

Re: Disclaimer

ZhangHuangbin wrote:
kaifamm wrote:

It send the email but without disclaimer.

*) Did you try our tutorial here? http://www.iredmail.org/docs/sign.disclaimer.html

Yes, I tried it but my signature depends on the sender and also depends on particular words on the subject of the email or the email body. Basically I need a custom script like disclaimner.sh.

*) User submits email through 'submission' transport, not 'postscreen'.

This is my 'submission' (standard iRedMail) :

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_mynetworks,permit_sasl_authenticated,reject
  -o content_filter=smtp-amavis:[127.0.0.1]:10026

I can't change "content_filter=smtp-amavis:[127.0.0.1]:10026".


*) If you override 'content_filter=', how do you use Amavisd+ClamAV+SpamAssassin?

I do not understand the question

Thanks
Mark

4

Re: Disclaimer

*) Did you try our tutorial here? http://www.iredmail.org/docs/sign.disclaimer.html

Yes, I tried it but my signature depends on the sender and also depends on particular words on the subject of the email or the email body. Basically I need a custom script like disclaimner.sh.

*) User submits email through 'submission' transport, not 'postscreen'.

This is my 'submission' (standard iRedMail) :

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_mynetworks,permit_sasl_authenticated,reject
  -o content_filter=smtp-amavis:[127.0.0.1]:10026

I can't change "content_filter=smtp-amavis:[127.0.0.1]:10026".


*) If you override 'content_filter=', how do you use Amavisd+ClamAV+SpamAssassin?

I do not understand the question

Thanks
Mark

ZhangHuangbin wrote:
kaifamm wrote:

It send the email but without disclaimer.

*) Did you try our tutorial here? http://www.iredmail.org/docs/sign.disclaimer.html
*) User submits email through 'submission' transport, not 'postscreen'.
*) If you override 'content_filter=', how do you use Amavisd+ClamAV+SpamAssassin?

5

Re: Disclaimer

kaifamm wrote:

Yes, I tried it but my signature depends on the sender and also depends on particular words on the subject of the email or the email body. Basically I need a custom script like disclaimner.sh.

What do you mean "depends on the sender and also depends on particular words"?

6

Re: Disclaimer

For example :
if the sender is mark@example.com the signature must be Mark, if the body of email  contains the word "CAMPAIGN_EMAIL" the signature must be xxxxxxxxx, if the body of email  contains the word "ALERT_EMAIL" the signature must be YYYYYYYY, etc.

Thanks
Mark


ZhangHuangbin wrote:
kaifamm wrote:

Yes, I tried it but my signature depends on the sender and also depends on particular words on the subject of the email or the email body. Basically I need a custom script like disclaimner.sh.

What do you mean "depends on the sender and also depends on particular words"?

7

Re: Disclaimer

It's possible to sign per-user, but impossible to sign based on mail subject/body content.