Enabled domainkeys in virtualmin. How to enable them for PHP mail ?

5 posts / 0 new
Last post
#1 Fri, 02/06/2015 - 08:05
arnold1

Enabled domainkeys in virtualmin. How to enable them for PHP mail ?

Hello, I have enabled domainkeys in virtualmin -> email messages -> domainkeys identified mail

when I email from webmin -> postfix -> user mailboxes -> compose

it is adding domainkeys.

When I email from PHP mail() function, the emails are not signed by domainkeys.

Please inform me how to set this.

( I am using dedicated server. Linux. centos 6. 64 bit.)

Thanks.

Fri, 02/06/2015 - 10:48
andreychek

Howdy,

Hmm, it should add those signatures for all email, so long as it's going through Postfix on your server.

Is it possible that PHP is configured to bypass Postfix, and go through another mail server?

-Eric

Fri, 02/06/2015 - 12:53 (Reply to #2)
arnold1

I think all my php mails go through php. because, i find those emails in postfix mail queue.

in php.ini I find

[mail function]

; For Win32 only.

; http://php.net/smtp

SMTP = localhost

; http://php.net/smtp-port

smtp_port = 25

Please suggest.

Thanks

Fri, 02/06/2015 - 23:10 (Reply to #3)
arnold1

I resubmitted the domainkeys form and regenerated the private key.

It is now working.

Thanks for your valuable help.

Fri, 02/06/2015 - 10:54
tpnsolutions
tpnsolutions's picture

Hi,

If possible, it's recommended even from PHP scripts to make use of a class which can send email through the SMTP server over direct via the "mail" function.

I recommend using the "Mail.php" and "Mail/mime.php" classes which can be installed through Virtualmin at:

Webmin > Other > PHP Modules

You can read about how to use at:

http://pear.php.net/manual/en/package.mail.mail-mime.example.php

Best Regards,
Peter Knowles
TPN Solutions

Email: pknowles@tpnsolutions.com
Phone: 604-782-9342
Skype: tpnsupport
Website: http://www.tpnsolutions.com

Ask me about my new support plans which include a FREE copy of Virtualmin Pro!!!

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Topic locked