Email issues with Virtualmin Pro server.

18 posts / 0 new
Last post
#1 Thu, 06/25/2009 - 15:50
mobiusllc

Email issues with Virtualmin Pro server.

So I am hosting a domain's website only. We have the site setup and all that good stuff. We will call this domain, mydomain.com.

All of his email and other needs are hosted through a shared hosting service he pays for. I will only be hosting the web files, mysqldb, and thats about it.

We are running into an issue where we are using Joomla as a CMS, and we have built a little form that people can fill out, then once they hit send it emails to admin@mydomain.com. The problem we are running into is if you check the virtualmin mailbox it has a bunch of mail delivery failures saying that admin@mydomain.com does not exist. I believe the problem is, it thinks it is hosting the mail so its just sending it locally. Its not actually reaching out to the net and sending to his actual mail server.

To fix this I disabled mail completely for all of virtualmin. Yet it still will not send. Any ideas?

Thu, 06/25/2009 - 15:51
Joe
Joe's picture

Disable mail in the virtual server in Virtualmin (Enabled Features in Edit Virtual Server).

--

Check out the forum guidelines!

Thu, 06/25/2009 - 16:11
mobiusllc

That is exactly what I thought. So I did that and I am still having issues.

Web virtual server enabled? MySQL login enabled? IP-based virtual FTP enabled? Webmin login enabled? Allow Subversion repositories?

Those are the only enabled features.

Thu, 06/25/2009 - 16:20
andreychek

A few thoughts -- have you verified that the MX record is setup correctly?

If you log into your server over SSH, what do you get if you type:

host mydomain.com

The second line there should say "mail is handled by XXX" -- is the "XXX" correct?

Also, are you sure the bounce messages you're seeing aren't from the remote server? That is, if the admin@ email address doesn't exist on the shared server, that could certainly cause the trouble you're seeing.

-Eric

Thu, 06/25/2009 - 16:28
mobiusllc

so when I SSH into the server that I am hosting his webfiles on (The Virtualmin Pro server) I then type host mydomain.com I get:

host mydomain.com mydomain.com has address 64.71.33.42 mydomain.com mail is handled by 10 mx.mydomain.com.

Fri, 06/26/2009 - 11:46 (Reply to #5)
Joe
Joe's picture

host mydomain.com mydomain.com has address 64.71.33.42 mydomain.com mail is handled by 10 mx.mydomain.com.

What does mx.mydomain.com resolve to?

--

Check out the forum guidelines!

Fri, 06/26/2009 - 12:26 (Reply to #6)
mobiusllc

mx.mydomain.com has address 64.26.60.153

Thu, 06/25/2009 - 16:29
mobiusllc

also about the bounce msg. I'm positive because I'm logged into the account we're trying to send to waiting to see if it receives the msgs. So I know it exists.

The account does NOT exist on my Virtualmin server, which I'm hosting the web stuff on.

Fri, 06/26/2009 - 11:29
mobiusllc

Joe,

Any ideas?

Fri, 06/26/2009 - 14:26 (Reply to #9)
andreychek

Does "mydomain.com" appear anywhere in /etc/postfix/virtual or /etc/postfix/main.cf?

Fri, 06/26/2009 - 14:42 (Reply to #10)
mobiusllc

Yes it does

For /etc/postfix/virtual:

username@mydomain.com username hostmaster@mydomain.com username webmaster@mydomain.com username abuse@mydomain.com username postmaster@mydomain.com username

For /etc/postfix/main.cf: It does not appear to be in here.

Fri, 06/26/2009 - 18:27 (Reply to #11)
Joe
Joe's picture

That is normally removed when you disable the mail feature in Virtualmin.

I guess you'll need to remove it manually. I have no idea why it would still be there.

--

Check out the forum guidelines!

Fri, 06/26/2009 - 14:51
andreychek

Alright, here's what I'd do:

First, backup your /etc/postfix/virtual file. I'm still trying to catch up on my sleep from the conference, and I'm not entirely sure I'm thinking straight yet :-)

Second, I don't think there should be any reference to a domain in the virtual file (on the left-hand side anyhow), if your system isn't accepting email for it. I'm not sure how those above lines snuck in there, but they should probably not exist in that file.

I would do this to correct it:

  1. You already backed up the "virtual" file, right?

  2. Remove the above 4 lines from your virtual file

  3. Regenerate the virtual file by running: postmap /etc/postfix/virtual

  4. Try sending an email again and see if it does the trick

Fri, 06/26/2009 - 14:59 (Reply to #13)
mobiusllc

Damn, I really hoped that would work!

Does not seem to have worked. It still will not mail to the address @mydomain.com. I have the form sending to gmail as well as another hosted site, @physikal.com and they all receive it no problems except for the one @mydomain.com

Fri, 06/26/2009 - 15:02 (Reply to #14)
andreychek

Okay, can I log in and take a look? As what you're trying to do should certainly work ;-)

If that's okay, what I'd need are:

  1. Root login details

  2. The domain name in question

  3. The address your trying to email

You can email those details to me using eric@virtualmin.com. Thanks!

-Eric

Fri, 06/26/2009 - 15:03 (Reply to #15)
mobiusllc

this is from /var/log/maillog when I just did that test after editing what you told me to edit:

Jun 26 12:46:57 hostname postfix/pickup[15974]: ADFF020E0864: uid=504 from= Jun 26 12:46:57 hostname postfix/cleanup[17399]: ADFF020E0864: message-id=<9ecfe2b3b157affb08b422d9e969df11@12.173.187.105> Jun 26 12:46:57 hostname postfix/qmgr[3274]: ADFF020E0864: from=username@hostname.localdomain, size=6899, nrcpt=3 (queue active) Jun 26 12:46:59 hostname postfix/smtp[17401]: ADFF020E0864: to=test@gmail.com, relay=gmail-smtp-in.l.google.com[209.85.210.79]:25, delay=1.4, delays=0.04/0.01/0.74/0.64, dsn=2.0.0, status=sent (250 2.0.0 OK 1246046168 11si3180189yxe.85) Jun 26 12:46:59 hostname postfix/smtp[17402]: ADFF020E0864: to=recruit@mydomain.com, relay=mx.mydomain.com[64.26.60.153]:25, delay=2, delays=0.04/0.02/1.7/0.26, dsn=4.0.0, status=deferred (host mx.mydomain.com[64.26.60.153] said: 450 username@hostname.localdomain: Sender address rejected: Domain not found (in reply to RCPT TO command)) Jun 26 12:47:04 hostname postfix/smtp[17403]: ADFF020E0864: to=test@physikal.com, relay=ASPMX.L.GOOGLE.com[72.14.247.114]:25, delay=6.6, delays=0.04/0.04/6/0.53, dsn=2.0.0, status=sent (250 2.0.0 OK 1246046173 39si392075agb.13)

Fri, 06/26/2009 - 15:06 (Reply to #16)
andreychek

Aha!

It looks like the form may not be setting the "from" address correctly.

Is there an option to set that in there somewhere?

-Eric

Fri, 06/26/2009 - 19:14
andreychek

The issue was related to the hostname.

Although the script in question was setting the From address correctly, Google was seeing the "Return-Path" header with a hostname that wasn't resolving correctly.

Making sure the hostname was set as desired, as well as resolvable, took care of the problem he was running into.

-Eric

Topic locked