2

I've configured a new WordPress website to send emails from no-reply@domain.com for things like user registrations, password resets and newsletters.

The email info@domain.com is the only other mailbox for this domain which is what the site's owner will use for enquiries and personal outgoing mail.

info@domain.com uses Namecheap's private email hosting, while no-reply@domain.com uses my own iRedMail mail server. I am able to receive emails at info@domain.com and send from no-reply@domain.com without issues, however if I try send an email from no-reply@domain.com to info@domain.com, I receive the following error:

5.1.1 : Recipient address rejected: User unknown in virtual mailbox table. Please check the message recipient info@domain.com and try again.

What can I do about this? I have tried creating a info@domain.com user on the iRedMail server, however emails sent from no-reply@domain.com go to the inbox on the iRedMail server rather than the intended Namecheap inbox.

This is an issue primarily because the contact form on the site will send enquiries to info@domain.com.

Torvero
  • 414
  • 7
  • 14
  • I think you want a [transport](http://linux.die.net/man/5/transport) – sebix Nov 01 '14 at 21:54
  • I'm not familiar with postfix transports (I haven't configured iRedMail components that much beyond the default configuration), but I'll have a look at the documentation and see if they do what I need. – Torvero Nov 01 '14 at 22:11

1 Answers1

3

The error message that you are receiving is coming from your internal iRedMail mail server and is not a response from the Namecheap SMTP server. Since you configured iRedMail with the Domain "domain.com" it does not even attempt to send mail outside of its own mail server for the email domain that it believes it is hosting.

Configure the Wordpress server to send email through Namecheap's SMTP server rather than the localhost iRedMail server.

Kevin Hayashi
  • 166
  • 1
  • 3
  • As he uses Wordpress, this is not as easy as it might appear. It does not support SMTP, only local mail delivery via PHP's-mail functions AFAIK. – sebix Nov 01 '14 at 21:57
  • Just a plugin away: https://wordpress.org/plugins/webriti-smtp-mail/ – Kevin Hayashi Nov 01 '14 at 21:58
  • Thanks for your reply, however I am using the iRedMail server for no-reply emails because I have an existing iRedMail server and don't want to purchase another mailbox with Namecheap just for no-reply emails. I'm using an SMTP plugin to send emails from the no-reply address, and the iRedMail installation is on a separate server from the website. I should have explained the setup better. – Torvero Nov 01 '14 at 22:03
  • Is your iRedMail or Namecheap server configured on your Wordpress SMTP plugin? If your MX Record for your domain is pointing to the Namecheap server, there is no need to have a local SMTP server hosting the same domain. Mail will only be delivered the servers listed on your public DNS server. Normally, no-reply@domain.com email addresses aren't real anyway.. hence "no-reply" although you can still spoof that as the sending email address. – Kevin Hayashi Nov 01 '14 at 22:32
  • The SMTP plugin is configured with the iRedMail email address, and the MX record points to Namecheap. I asked the same question on iRedMail's forum and got an answer which seems like it will do what I'm after. http://www.iredmail.org/forum/post34102.html#p34102. I'm using my iRedMail server so I can do DKIM signing later on, however you're right. There's probably a better way to implement this. – Torvero Nov 01 '14 at 22:56
  • actually, I think that answer assumes that `info` is also used on the iRedMail server. – Torvero Nov 01 '14 at 23:05
  • Sending without any WordPress SMTP plugin sends mail using an email address set up on my server for login notifications amongst other things. Since the user who will read `info`'s mail isn't myself, they will set their own password, which is why I can't send emails via SMTP from `info`. I should have explained that before, too. – Torvero Nov 01 '14 at 23:11
  • 1
    If that is the case, then setup a Mandrill account to send email out (Free account for up to 12k emails a month) and you can setup DKIM using their service. Use this Wordpress plugin https://wordpress.org/plugins/wpmandrill/ to send mail through that service. You will still need to update the public DNS server to setup your SPF and DKIM records. – Kevin Hayashi Nov 01 '14 at 23:42
  • I've never heard of Mandrill, but it sounds perfect. Thanks! I appreciate your help. – Torvero Nov 01 '14 at 23:52
  • I read the other reply at iredmail.org from your previous post and my earlier comment still applies. Setting allowed_login_mismatch_senders simply allows you so send mail as another user however the destination email address is to the same email domain that it hosts. Since Wordpress is configured to use the iRedMail server as the sending server, any mail to anything @domain.com will stop there. Anything to any other domain would be forwarded out to the SMTP server listed in the receiving email domains MX record. – Kevin Hayashi Nov 01 '14 at 23:54
  • 1
    I use Mandrill myself and it works perfect. I cant believe that the service is free. Just be sure to validate the domain and setup DKIM and SPF records properly, otherwise Mandrill will deliver mail "On Behalf Of" the sending domain. – Kevin Hayashi Nov 01 '14 at 23:57
  • I got Mandrill set up with DKIM and SPF, and it works *exactly* how I want, and setting up DKIM was easy. Thanks again! I'll definitely find Mandrill useful in the future for other projects. – Torvero Nov 02 '14 at 00:10