1 (edited by copart 2010-12-20 15:25:52)

Topic: [solved] dkim and php mail send

Hi,

My mail gets signed by dkim no problem when I send via my mail client (thunrderbird).  However, if I use the php mail function to send email, the email does not get signed via postfix.  Any ideas?

-Copart

2

Re: [solved] dkim and php mail send

Try to add below lines in amavisd.conf, restarting amavisd service is required:

$policy_bank{'MYUSERS'} = {  # 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
  # notify administrator of locally originating malware
  virus_admin_maps => ["root\@$mydomain"],
  spam_admin_maps  => ["root\@iredmail.org"],
  warnbadhsender   => 1,
  # forward to a smtpd service providing DKIM signing service
  #forward_method => 'smtp:[127.0.0.1]:10027',
  # force MTA conversion to 7-bit (e.g. before DKIM signing)
  smtpd_discard_ehlo_keywords => ['8BITMIME'],
  bypass_banned_checks_maps => [1],  # allow sending any file names and types
  terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
};

3

Re: [solved] dkim and php mail send

That didn't help, I already tried playing with the MYUSERS setting a little bit.  Is there anything I can do on the php.ini side to force it to go through the smtp server differently?

4

Re: [solved] dkim and php mail send

Find 'pickup' line in postfix config file: /etc/postfix/master.cf, it looks like below:

pickup - - [skip]
-o content-filter=

Comment the '-o content-filter' line and restart postfix will fix your issue.

5 (edited by copart 2010-12-20 03:02:36)

Re: [solved] dkim and php mail send

That seems of worked!! Thanks, however, what does the -o content-filter do?  Did I turn any features off?

6

Re: [solved] dkim and php mail send

It won't turn off any feature, actually, it turns on one feature.

'pickup' defined in postfix master.cf is used to pick up mails generanted by localhost, it's considered as safe and non-spam, so we don't inject it into content filter for anti-spam/anti-virus scanning.

7

Re: [solved] dkim and php mail send

Thank you Zhang!  Since sending I started getting LOCAL SPAM alerts, which obviously never got before, I was able to turn off those alerts.