Forms on website (WP) not working

I have not really experience with mail but I have setup a VPS with LAMP (Centos 7). I don't need mailserver etc. I host websites on the VPS. The sites have DNS settings that have a A record pointing to the VPS IP. So that works well.

However the mails from the forms on the WP sites are not send (received).

Postfix is installed.

Anybody any idea where I can find a manual - or have a solution- how to make this work? So I only need the forms to be send.

6 Replies

PHP/Worpress is probably handing the mail off to the system's MTA (evidence suggests, in your case) Postfix. I am not sure but wordpress may have a plugin or option that allow you to use SMTP instead. Otherwise you are going to need to tell the local MTA (Postfix) what to do with the mail it is receiving. You could ship it off to gmail with this guide: https://charlesauer.net/tutorials/cento … centos.php">https://charlesauer.net/tutorials/centos/postfix-as-gmail-relay-centos.php or similar. Keywords: Postfix relay external mail server centos

@jeremye77:

PHP/Worpress is probably handing the mail off to the system's MTA (evidence suggests, in your case) Postfix. I am not sure but wordpress may have a plugin or option that allow you to use SMTP instead. Otherwise you are going to need to tell the local MTA (Postfix) what to do with the mail it is receiving. You could ship it off to gmail with this guide: https://charlesauer.net/tutorials/cento … centos.php">https://charlesauer.net/tutorials/centos/postfix-as-gmail-relay-centos.php or similar. Keywords: Postfix relay external mail server centos

Thanks for your reply. Appreciate it.

You are right, WP (theme) is using MTA. Changing hostname to a fulldomainname (domain.ext) was all that I needed to get it working.

Now I still need the reports from root (/var/spool/mail/root ) and user (/var/spool/mail/user) to be mailed to me ;). But that's another topic, but a remark would be appreciated.

This worked for me: www.postfix.org/STANDARD_CONFIGURATION_ … ull_client">www.postfix.org/STANDARDCONFIGURATIONREADME.html#null_client

Edit: Too late :-).

@GASOLINE:

Now I still need the reports from root (/var/spool/mail/root ) and user (/var/spool/mail/user) to be mailed to me ;). But that's another topic, but a remark would be appreciated.

In centos 7, that is usually handled by editing the file /etc/aliases. Look at the bottom of the file, it should have something like:

> # Person who should get root's mail

root: marc

uncomment and change that to an email address, for example:
> # Person who should get root's mail

root: gasoline@domain.tld

now run the newaliases command to make the change permanent:
> /usr/bin/newaliases

you can redirect user account emails the same way.

@IfThenElse:

@GASOLINE:

Now I still need the reports from root (/var/spool/mail/root ) and user (/var/spool/mail/user) to be mailed to me ;). But that's another topic, but a remark would be appreciated.

In centos 7, that is usually handled by editing the file /etc/aliases. Look at the bottom of the file, it should have something like:

> # Person who should get root's mail

root: marc

uncomment and change that to an email address, for example:
> # Person who should get root's mail

root: gasoline@domain.tld

now run the newaliases command to make the change permanent:
> /usr/bin/newaliases

you can redirect user account emails the same way.

Thanks IfThenElse,

I'll try to implement that this week.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct