Mail from Wordpress

Discussion in 'Installation/Configuration' started by francoisPE, Dec 23, 2021.

  1. francoisPE

    francoisPE Active Member HowtoForge Supporter

    Hello,
    I have a multiserver set up with ISPconfig 3.2.7p1
    On my webserver I have a wordpress site. From it, I try send mail.
    I use wpsmtp plugin: it sends mail via smtp authentication. I define my account [email protected].
    I made a test sending a mail to [email protected]
    My webserver is connecting to my mail server. But instead of using user defined in wpsmtp pluging ([email protected]), it used "[email protected]"
    See mail.log from my mailserver
    Code:
    Dec 20 19:54:01 ns1 postfix/smtpd[3645050]: connect from ns2.dom.tld[xx.yy.zz.tt]
    Dec 20 19:54:01 ns1 postfix/smtpd[3645050]: NOQUEUE: filter: RCPT from ns2.dom.tld[xx.yy.zz.tt]: <[email protected]>: Sender address triggers FILTER lmtp:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<ns2.dom.tld>
    Dec 20 19:54:01 ns1 postfix/smtpd[3645050]: NOQUEUE: reject: RCPT from ns2.dom.tld[xx.yy.zz.tt]: 550 5.1.0 <[email protected]>: Sender address rejected: User unknown in virtual mailbox table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<ns2.dom.tld>
    Dec 20 19:54:01 ns1 postfix/smtpd[3645050]: disconnect from ns2.dom.tld[xx.yy.zz.tt] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=6/8
    Dec 20 19:54:01 ns1 postfix/smtpd[3645050]: connect from ns2.dom.tld[xx.yy.zz.tt]
    Dec 20 19:54:01 ns1 postfix/smtpd[3645050]: NOQUEUE: filter: RCPT from ns2.dom.tld[xx.yy.zz.tt]: <>: Sender address triggers FILTER lmtp:[127.0.0.1]:10026; from=<> to=<[email protected]> proto=ESMTP helo=<ns2.dom.tld>
    Dec 20 19:54:01 ns1 postfix/smtpd[3645050]: NOQUEUE: filter: RCPT from ns2.dom.tld[xx.yy.zz.tt]: <>: Sender address triggers FILTER lmtp:[127.0.0.1]:10024; from=<> to=<[email protected]> proto=ESMTP helo=<ns2.dom.tld>
    Dec 20 19:54:01 ns1 postfix/smtpd[3645050]: NOQUEUE: reject: RCPT from ns2.dom.tld[xx.yy.zz.tt]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<> to=<[email protected]> proto=ESMTP helo=<ns2.dom.tld>
    Dec 20 19:54:01 ns1 postfix/smtpd[3645050]: disconnect from ns2.dom.tld[xx.yy.zz.tt] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=6/8
    Dec 20 19:54:31 ns1 postfix/smtpd[3645050]: connect from ns2.dom.tld[xx.yy.zz.tt]
    Dec 20 19:54:32 ns1 postfix/smtpd[3645050]: NOQUEUE: filter: RCPT from ns2.dom.tld[xx.yy.zz.tt]: <[email protected]>: Sender address triggers FILTER lmtp:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<ns2.dom.tld>
    Dec 20 19:54:32 ns1 postfix/smtpd[3645050]: NOQUEUE: reject: RCPT from ns2.dom.tld[xx.yy.zz.tt]: 550 5.1.0 <[email protected]>: Sender address rejected: User unknown in virtual mailbox table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<ns2.dom.tld>
    Dec 20 19:54:32 ns1 postfix/smtpd[3645050]: disconnect from ns2.dom.tld[xx.yy.zz.tt] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=6/8
    Dec 20 19:54:32 ns1 postfix/smtpd[3645050]: connect from ns2.dom.tld[xx.yy.zz.tt]
    Dec 20 19:54:32 ns1 postfix/smtpd[3645050]: NOQUEUE: filter: RCPT from ns2.dom.tld[xx.yy.zz.tt]: <>: Sender address triggers FILTER lmtp:[127.0.0.1]:10026; from=<> to=<[email protected]> proto=ESMTP helo=<ns2.dom.tld>
    Dec 20 19:54:32 ns1 postfix/smtpd[3645050]: NOQUEUE: filter: RCPT from ns2.dom.tld[xx.yy.zz.tt]: <>: Sender address triggers FILTER lmtp:[127.0.0.1]:10024; from=<> to=<[email protected]> proto=ESMTP helo=<ns2.dom.tld>
    Dec 20 19:54:32 ns1 postfix/smtpd[3645050]: NOQUEUE: reject: RCPT from ns2.dom.tld[xx.yy.zz.tt]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<> to=<[email protected]> proto=ESMTP helo=<ns2.dom.tld>
    Dec 20 19:54:32 ns1 postfix/smtpd[3645050]: disconnect from ns2.dom.tld[xx.yy.zz.tt] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 rset=1 quit=1 commands=6/8
    I did #grep -r "webmaster@" /*
    it gives
    Code:
    etc/php/7.4/fpm/pool.d/web6.conf:php_admin_value[sendmail_path] = "/usr/sbin/sendmail -t -i -f [email protected]"
    etc/apache2/sites-available/dom.tld.vhost:          ServerAdmin [email protected]
    
    I try to find where [email protected] is defined inside ISPConfig. I use hostmaster instead of webmaster, I would like to change ServerAdmin.

    I have another question: when wordpress is sending a mail via wp_mail(), it seems wordpress uses etc/php/7.4/fpm/pool.d/web6.conf ? Where should I look to understand why wpsmtp settings are not used?
     
    Last edited: Dec 23, 2021
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Your website seems indeed be using php mail() function and is nots ending by smtp. You might want to ask the author for this SMTP plugin to find out in whcih cases it might not be working. When yous end by smtp and not php mail() function, then webmaster@ address will not get used, so the solution is to find out why this plugin is not sending via smtp.
     
  3. francoisPE

    francoisPE Active Member HowtoForge Supporter

  4. francoisPE

    francoisPE Active Member HowtoForge Supporter

    I read ServerAdmin directive is deprecated.
    is that correct ?
     

Share This Page