HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Swift Mailer's Swift_SendmailTransport fails (http://www.howtoforge.com/forums/showthread.php?t=61741)

AlexTentwelve 6th May 2013 17:34

Swift Mailer's Swift_SendmailTransport fails
 
Hello!

I'm trying to get PHP to send email messages using Swift Mailer 3.0.0. This library can use three transport methods: SMTP, sendmail and PHP mail() function.

The sendmail methods fails in my PHP script, and I get this message in /var/log/mail.log:

Code:

May  6 16:47:13 ubuntu postfix/smtpd[6617]: fatal: open /etc/postfix/mysql-virtual_relaydomains.cf: Permission denied
Here are mysql-virtual_relaydomains.cf permissions:

Code:

-rw-r-----  1 root postfix  224 2009-12-11 15:26 mysql-virtual_relaydomains.cf
If I make mysql-virtual_relaydomains.cf readable by everyone, everything runs fine, but I don't know if it's a "clean" solution.

I'm also considering adding the website's user (webXX) to the postfix group, which would probably fix the problem as well.

Do you have any advice regarding this issue? What would be the best way to solve it? If it's possible, I would like to find a solution which doesn't require to make manual changes to the file permissions for every user needing it.

(Note: PHP runs using mod_fcgi and suexec.)

Thanks!

till 6th May 2013 17:39

Quote:

If I make mysql-virtual_relaydomains.cf readable by everyone, everything runs fine, but I don't know if it's a "clean" solution.
Dont do that or everyone is able to take over your server as this file contains the password for the ispconfig database.

Better use transport method smtp, accessing the sendmail binary with shell commands is not a good idea anyway.

AlexTentwelve 6th May 2013 17:48

Thank your for your quick answer!


All times are GMT +2. The time now is 14:46.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.